/*! For license information please see volunteers-6de49a5c0d08fd7a406a.cjs.LICENSE.txt */ (self.webpackChunkroot=self.webpackChunkroot||[]).push([[346],{384:(e,t,n)=>{"use strict";e.exports=n.p+"img/avatarGroup-faca1e69e2c224b7eebe.png"},477:()=>{},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"},1623:(e,t,n)=>{"use strict";var i,o=n(4848),r=(n(8630),n(6540));function s(e){return null==e?[]:Array.isArray(e)?e:[e]}function a(e){return Array.isArray(e)&&e.length>0}function c(e){return!a(e)}function l(e,t,n){const i=new Set(e);return n?i.add(t):i.delete(t),Array.from(i)}!function(e){e.Development="development",e.Production="production",e.Test="test"}(i||(i={}));var d,u,h,m,g,p,f,_,b,k,v,A,y,w,C,I,x,S,E,j,T,D,P,R,O,F,z,M,$,N,B,L,V,U,G,W,q,H,K,Y,Z,J,X,Q,ee,te,ne,ie,oe,re,se,ae,ce,le,de,ue,he,me,ge,pe,fe,_e,be,ke,ve,Ae,ye,we,Ce,Ie,xe,Se,Ee,je,Te,De,Pe,Re,Oe,Fe,ze,Me,$e,Ne,Be,Le,Ve,Ue,Ge,We,qe,He,Ke,Ye,Ze,Je,Xe,Qe,et,tt,nt,it,ot,rt,st,at=n(1519);!function(e){e.Delegation="Delegation",e.DelegationCategory="DelegationCategory",e.Event="Event",e.Organization="Organization",e.Position="Position",e.PositionCategory="PositionCategory"}(d||(d={})),function(e){e.Calendar="Calendar",e.List="List",e.Radio="Radio"}(u||(u={})),(st=h||(h={})).Acronym="Acronym",st.Address="Address",st.AutoAccredit="AutoAccredit",st.Category="Category",st.Color="Color",st.Description="Description",st.Icon="Icon",st.Index="Index",st.Latitude="Latitude",st.Longitude="Longitude",st.Name="Name",st.Tag="Tag",st.WeezeventIsSynchronized="WeezeventIsSynchronized",function(e){e.Accredited="Accredited",e.Everyone="Everyone",e.Members="Members",e.Refused="Refused",e.Segments="Segments"}(m||(m={})),function(e){e.Accreditation="Accreditation",e.Acronym="Acronym",e.Category="Category",e.CreatedAt="CreatedAt",e.Date="Date",e.Id="Id",e.Name="Name"}(g||(g={})),function(e){e.Acronym="Acronym",e.Category="Category",e.CreatedAt="CreatedAt",e.Id="Id",e.Index="Index",e.Name="Name"}(p||(p={})),function(e){e.Accredited="Accredited",e.AutoAccredited="AutoAccredited",e.NotApplicable="NotApplicable",e.Refused="Refused",e.WaitingAccreditation="WaitingAccreditation"}(f||(f={})),function(e){e.Assigned="Assigned",e.Everyone="Everyone",e.Members="Members",e.Refused="Refused",e.Segments="Segments"}(_||(_={})),function(e){e.InsertedAt="InsertedAt",e.Name="Name",e.State="State",e.Type="Type"}(b||(b={})),function(e){e.Done="Done",e.Draft="Draft",e.InProgress="InProgress",e.Scheduled="Scheduled",e.Template="Template"}(k||(k={})),function(e){e.Email="Email",e.Sms="Sms"}(v||(v={})),(rt=A||(A={})).Waiting="Waiting",rt.CheckedIn="CheckedIn",rt.CheckedOut="CheckedOut",function(e){e.CheckIn="CheckIn",e.CheckInOut="CheckInOut",e.CheckOut="CheckOut",e.Reset="Reset"}(y||(y={})),function(e){e.And="And",e.Or="Or"}(w||(w={})),(ot=C||(C={})).Animajeconvention="Animajeconvention",ot.Asoassignment="Asoassignment",ot.Cerclelivraison="Cerclelivraison",ot.Cercleopcom="Cercleopcom",ot.Cerclepressandpartenaire="Cerclepressandpartenaire",ot.Cerclestaff="Cerclestaff",ot.Delta="Delta",ot.Dfcoa4="Dfcoa4",ot.Dfcosmall="Dfcosmall",ot.Eurockeennes="Eurockeennes",ot.Fcg="Fcg",ot.Garorockplanning="Garorockplanning",ot.Goldencoast="Goldencoast",ot.Hbcldc="Hbcldc",ot.Hbclnh="Hbclnh",ot.Lnh="Lnh",ot.Moorea="Moorea",ot.Nuitssecretes="Nuitssecretes",ot.Openbrest="Openbrest",ot.P2nassignment="P2nassignment",ot.P2nassignmentmontagedemontage="P2nassignmentmontagedemontage",ot.P2nbadge="P2nbadge",ot.Paris20km="Paris20km",ot.Paris20kmassignment="Paris20kmassignment",ot.Paris20kmcontremarque="Paris20kmcontremarque",ot.Pastourelle="Pastourelle",ot.Pastourelleexposant="Pastourelleexposant",ot.Pec="Pec",ot.Playground="Playground",ot.Roiarthur="Roiarthur",ot.Rose="Rose",ot.Roseparking="Roseparking",ot.Salamandre="Salamandre",ot.T24assignment="T24assignment",ot.Triathlonlarochellebadge="Triathlonlarochellebadge",ot.Utopialesa4="Utopialesa4",ot.Utopialesimprimeur="Utopialesimprimeur",ot.Vandbcontremarque="Vandbcontremarque",ot.Vannes="Vannes",ot.Vannesassignment="Vannesassignment",ot.Vendanges="Vendanges",ot.Vendeeglobebadge="Vendeeglobebadge",ot.Vendeeglobecontremarque="Vendeeglobecontremarque",function(e){e.All="All",e.Public="Public",e.Private="Private"}(I||(I={})),(it=x||(x={})).Category="Category",it.Label="Label",it.Name="Name",it.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"}(S||(S={})),function(e){e.Accreditation="Accreditation",e.Delegation="Delegation",e.Event="Event",e.Position="Position",e.UserInfo="UserInfo"}(E||(E={})),(nt=j||(j={})).Campaigns="Campaigns",nt.CanLeadersAddMembers="CanLeadersAddMembers",nt.CanLeadersDeleteMembers="CanLeadersDeleteMembers",nt.CanLeadersEditColumns="CanLeadersEditColumns",nt.CanLeadersEditCustomFields="CanLeadersEditCustomFields",nt.CanLeadersEditMembers="CanLeadersEditMembers",nt.CanLeadersImportMembers="CanLeadersImportMembers",nt.CanLeadersSeeHiddenAccreditationsSlots="CanLeadersSeeHiddenAccreditationsSlots",nt.Category="Category",nt.Columns="Columns",nt.DeadlineDate="DeadlineDate",nt.Description="Description",nt.Documents="Documents",nt.Form="Form",nt.IsLocked="IsLocked",nt.MaxResources="MaxResources",nt.Name="Name",nt.ShowFormLinkInDelegationSpace="ShowFormLinkInDelegationSpace",nt.ShowInDelegationSpace="ShowInDelegationSpace",nt.Tag="Tag",function(e){e.CreatedAt="CreatedAt",e.Id="Id",e.Name="Name"}(T||(T={})),function(e){e.Done="Done",e.Waiting="Waiting"}(D||(D={})),function(e){e.Category="Category",e.CreatedAt="CreatedAt",e.Id="Id",e.Name="Name"}(P||(P={})),(tt=R||(R={})).Expired="Expired",tt.Full="Full",tt.Locked="Locked",tt.Ongoing="Ongoing",function(e){e.Failed="FAILED",e.Pending="PENDING",e.Success="SUCCESS"}(O||(O={})),function(e){e.OnePerPage="OnePerPage",e.GroupedA4="GroupedA4"}(F||(F={})),function(e){e.Name="Name"}(z||(z={})),function(e){e.Assignments="Assignments",e.Badge="Badge",e.Certificate="Certificate",e.CustomBadge="CustomBadge",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"}(M||(M={})),function(e){e.Bounced="Bounced",e.Delivered="Delivered",e.Opened="Opened",e.Queued="Queued",e.Sent="Sent",e.Waiting="Waiting"}($||($={})),function(e){e.DoesNotExist="DoesNotExist",e.NotVerified="NotVerified",e.Verified="Verified"}(N||(N={})),function(e){e.Accreditations="Accreditations",e.AccreditationsRefused="AccreditationsRefused",e.Assignments="Assignments",e.Campaign="Campaign",e.Code="Code",e.DelegationCategoryLeaderAssign="DelegationCategoryLeaderAssign",e.DelegationFormInvite="DelegationFormInvite",e.DelegationLeaderAssign="DelegationLeaderAssign",e.DelegationsImport="DelegationsImport",e.Documents="Documents",e.EventInvite="EventInvite",e.Export="Export",e.FilesImport="FilesImport",e.FormInvite="FormInvite",e.FormSubmit="FormSubmit",e.MembersImport="MembersImport",e.NewMember="NewMember",e.NewVolunteer="NewVolunteer",e.NotifyLeaders="NotifyLeaders",e.OrganizationInvite="OrganizationInvite",e.PositionCategoryLeaderAssign="PositionCategoryLeaderAssign",e.PositionLeaderAssign="PositionLeaderAssign",e.PositionsImport="PositionsImport",e.Refused="Refused",e.VolunteerRegistration="VolunteerRegistration"}(B||(B={})),function(e){e.EndAt="EndAt",e.Name="Name",e.StartAt="StartAt",e.Tag="Tag"}(L||(L={})),function(e){e.EndAt="EndAt",e.Id="Id",e.Name="Name",e.StartAt="StartAt"}(V||(V={})),(et=U||(U={})).Archived="Archived",et.Done="Done",et.Ongoing="Ongoing",et.Upcoming="Upcoming",function(e){e.Excel="Excel",e.Csv="CSV"}(G||(G={})),function(e){e.Done="Done",e.Waiting="Waiting"}(W||(W={})),function(e){e.Accreditation="Accreditation",e.Api="Api",e.Community="Community",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"}(q||(q={})),function(e){e.City="city",e.Country="country",e.Custom="custom",e.DateOfBirth="dateOfBirth",e.Eid="eid",e.FirstName="firstName",e.Language="language",e.LastName="lastName",e.Nationality="nationality",e.Phone="phone",e.Picture="picture",e.Population="population",e.PostalCode="postalCode",e.Sex="sex",e.Street="street"}(H||(H={})),(Qe=K||(K={})).Address="Address",Qe.Checkbox="Checkbox",Qe.Country="Country",Qe.Date="Date",Qe.Datetime="Datetime",Qe.File="File",Qe.Language="Language",Qe.Nationality="Nationality",Qe.Number="Number",Qe.Phone="Phone",Qe.Select="Select",Qe.Sex="Sex",Qe.Text="Text",Qe.Textarea="Textarea",Qe.Time="Time",Qe.Validation="Validation",function(e){e.Done="Done",e.Waiting="Waiting"}(Y||(Y={})),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"}(Z||(Z={})),function(e){e.Field="Field",e.Section="Section",e.Text="Text"}(J||(J={})),function(e){e.Ranked="Ranked",e.Unranked="Unranked"}(X||(X={})),function(e){e.Admin="Admin",e.DelegationsSpace="DelegationsSpace",e.Form="Form"}(Q||(Q={})),function(e){e.CloseWhenEventDone="CloseWhenEventDone",e.Closed="Closed",e.ClosedAt="ClosedAt",e.Open="Open"}(ee||(ee={})),(Xe=te||(te={})).Backpack="Backpack",Xe.BadgeCheck="BadgeCheck",Xe.BagShopping="BagShopping",Xe.Bed="Bed",Xe.BriefcaseMedical="BriefcaseMedical",Xe.BurgerSoda="BurgerSoda",Xe.CakeCandles="CakeCandles",Xe.Camera="Camera",Xe.Car="Car",Xe.CircleParking="CircleParking",Xe.CircleQuestion="CircleQuestion",Xe.Droplet="Droplet",Xe.ForkKnife="ForkKnife",Xe.HatCowboy="HatCowboy",Xe.House="House",Xe.LocationDot="LocationDot",Xe.MartiniGlass="MartiniGlass",Xe.Megaphone="Megaphone",Xe.PersonBiking="PersonBiking",Xe.PersonHiking="PersonHiking",Xe.ScrewdriverWrench="ScrewdriverWrench",Xe.Shirt="Shirt",Xe.SignsPost="SignsPost",Xe.Star="Star",Xe.Ticket="Ticket",Xe.UserPolice="UserPolice",function(e){e.Create="Create",e.CreateUpdate="CreateUpdate",e.Update="Update"}(ne||(ne={})),function(e){e.Overdue="Overdue",e.Paid="Paid",e.Refunded="Refunded",e.Waiting="Waiting"}(ie||(ie={})),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"}(oe||(oe={})),function(e){e.App="App",e.DelegationsSpace="DelegationsSpace",e.MembersSpace="MembersSpace",e.VolunteerAssignments="VolunteerAssignments",e.VolunteerRegister="VolunteerRegister"}(re||(re={})),function(e){e.Google="Google",e.GoogleSatellite="GoogleSatellite",e.IgnPlan="IgnPlan"}(se||(se={})),function(e){e.Add="Add",e.Delete="Delete",e.Replace="Replace"}(ae||(ae={})),function(e){e.Categories="Categories",e.Positions="Positions"}(ce||(ce={})),(Je=le||(le={})).Both="Both",Je.Event="Event",Je.Organization="Organization",function(e){e.Id="Id",e.InsertedAt="InsertedAt",e.PeriodEndAt="PeriodEndAt"}(de||(de={})),function(e){e.A4Portrait="A4Portrait",e.A4Landscape="A4Landscape",e.A5Portrait="A5Portrait",e.A6Portrait="A6Portrait"}(ue||(ue={})),(Ze=he||(he={})).Acronym="Acronym",Ze.Address="Address",Ze.Category="Category",Ze.Color="Color",Ze.Description="Description",Ze.Icon="Icon",Ze.Latitude="Latitude",Ze.Longitude="Longitude",Ze.Name="Name",Ze.Tag="Tag",Ze.Traces="Traces",function(e){e.CreatedAt="CreatedAt",e.Id="Id",e.Name="Name"}(me||(me={})),function(e){e.Done="Done",e.Waiting="Waiting"}(ge||(ge={})),function(e){e.Acronym="Acronym",e.Category="Category",e.CreatedAt="CreatedAt",e.Id="Id",e.Name="Name",e.Position="Position",e.Range="Range"}(pe||(pe={})),function(e){e.Acronym="Acronym",e.Category="Category",e.CreatedAt="CreatedAt",e.Id="Id",e.Name="Name",e.Slot="Slot"}(fe||(fe={})),function(e){e.Empty="Empty",e.Partial="Partial",e.Full="Full"}(_e||(_e={})),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.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.Today="today"}(be||(be={})),function(e){e.Accreditation="Accreditation",e.None="None"}(ke||(ke={})),function(e){e.AllDays="AllDays",e.DaysWithSlots="DaysWithSlots"}(ve||(ve={})),function(e){e.Category="Category",e.Position="Position",e.Slot="Slot",e.None="None"}(Ae||(Ae={})),function(e){e.FilterWithSlots="FilterWithSlots",e.None="None"}(ye||(ye={})),(Ye=we||(we={})).Calendar="Calendar",Ye.Custom="Custom",Ye.Display="Display",Ye.DisplayDays="DisplayDays",Ye.Hide="Hide",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"}(Ce||(Ce={})),function(e){e.Accreditations="Accreditations",e.Campaigns="Campaigns",e.CustomFields="CustomFields",e.Delegations="Delegations",e.Events="Events",e.Positions="Positions",e.Volunteers="Volunteers"}(Ie||(Ie={})),function(e){e.Female="Female",e.Male="Male",e.Nonbinary="Nonbinary",e.Notsay="Notsay",e.Other="Other"}(xe||(xe={})),function(e){e.Asc="Asc",e.Desc="Desc"}(Se||(Se={})),(Ke=Ee||(Ee={})).De="De",Ke.En="En",Ke.Es="Es",Ke.Fr="Fr",Ke.Keys="Keys",Ke.Nl="Nl",function(e){e.Accreditations="Accreditations",e.Delegations="Delegations",e.Events="Events",e.Positions="Positions",e.UsersInfos="UsersInfos"}(je||(je={})),function(e){e.WithReplies="WithReplies",e.WithUnreadReplies="WithUnreadReplies",e.WithoutReplies="WithoutReplies"}(Te||(Te={})),function(e){e.Delivered="Delivered",e.InvalidNumber="InvalidNumber",e.Other="Other",e.Refused="Refused",e.Sent="Sent",e.Undelivered="Undelivered",e.Waiting="Waiting"}(De||(De={})),function(e){e.None="None",e.Backward="Backward",e.Forward="Forward"}(Pe||(Pe={})),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"}(Re||(Re={})),function(e){e.NotTranslated="NotTranslated",e.Translated="Translated",e.TranslatedAndNotTranslated="TranslatedAndNotTranslated"}(Oe||(Oe={})),function(e){e.String="String",e.StringArray="StringArray",e.RichText="RichText"}(Fe||(Fe={})),function(e){e.Admin="Admin",e.Leader="Leader"}(ze||(ze={})),function(e){e.FirstName="FirstName",e.Id="Id",e.InsertedAt="InsertedAt",e.LastName="LastName",e.Name="Name",e.UpdatedAt="UpdatedAt"}(Me||(Me={})),(He=$e||($e={})).Assigned="Assigned",He.NotApplicable="NotApplicable",He.PreAssigned="PreAssigned",He.Refused="Refused",He.WaitingAssignment="WaitingAssignment",function(e){e.Done="Done",e.Waiting="Waiting"}(Ne||(Ne={})),function(e){e.AccreditationState="AccreditationState",e.Delegation="Delegation",e.FirstName="FirstName",e.Id="Id",e.InsertedAt="InsertedAt",e.LastName="LastName",e.LocalId="LocalId",e.Name="Name",e.State="State",e.TeamCode="TeamCode",e.UpdatedAt="UpdatedAt"}(Be||(Be={})),function(e){e.AddAccreditations="AddAccreditations",e.AddEvent="AddEvent",e.CreateDelegation="CreateDelegation",e.DeleteAccreditations="DeleteAccreditations",e.SendCampaign="SendCampaign",e.SetCustomField="SetCustomField"}(Le||(Le={})),function(e){e.EveryMinute="EveryMinute",e.Every2Minutes="Every2Minutes",e.Every5Minutes="Every5Minutes",e.Every10Minutes="Every10Minutes"}(Ve||(Ve={})),function(e){e.DelegationsLeaders="DelegationsLeaders",e.PositionsLeaders="PositionsLeaders",e.UsersInfosIds="UsersInfosIds",e.View="View"}(Ue||(Ue={})),function(e){e.CreatedAt="CreatedAt",e.ExecutedAt="ExecutedAt",e.Id="Id",e.Name="Name",e.VolunteersSegment="VolunteersSegment"}(Ge||(Ge={})),function(e){e.Active="Active",e.Error="Error",e.Paused="Paused"}(We||(We={})),function(e){e.Assigned="Assigned",e.FormSubmit="FormSubmit",e.VolunteersSegment="VolunteersSegment"}(qe||(qe={})),Object.keys(d);const ct=Object.keys(u),lt=(Object.keys(h),Object.keys(m),Object.keys(g),Object.keys(p),Object.keys(f)),dt=(Object.keys(_),Object.keys(b),Object.keys(k)),ut=Object.keys(v),ht=Object.keys(A),mt=(Object.keys(y),Object.keys(w),Object.keys(C)),gt=(Object.keys(I),Object.keys(x),Object.keys(S),Object.keys(E)),pt=(Object.keys(j),Object.keys(T),Object.keys(D),Object.keys(P),Object.keys(R)),ft=(Object.keys(O),Object.keys(F),Object.keys(z),Object.keys(M),Object.keys($)),_t=(Object.keys(N),Object.keys(B)),bt=(Object.keys(L),Object.keys(V),Object.keys(U),Object.keys(G),Object.keys(W),Object.keys(q)),kt=(Object.keys(H),Object.keys(K)),vt=(Object.keys(Y),Object.keys(Z),Object.keys(J),Object.keys(X)),At=(Object.keys(Q),Object.keys(ee)),yt=Object.keys(te),wt=Object.keys(ne),Ct=(Object.keys(ie),Object.keys(oe)),It=(Object.keys(re),Object.keys(se)),xt=Object.keys(ae),St=Object.keys(ce),Et=(Object.keys(le),Object.keys(de),Object.keys(ue),Object.keys(he),Object.keys(me),Object.keys(ge),Object.keys(pe),Object.keys(fe),Object.keys(_e)),jt=(Object.keys(be),Object.keys(ke)),Tt=Object.keys(ve),Dt=Object.keys(Ae),Pt=Object.keys(ye),Rt=Object.keys(we),Ot=(Object.keys(Ce),Object.keys(Ie),Object.keys(xe)),Ft=(Object.keys(Se),Object.keys(Ee),Object.keys(je),Object.keys(Te),Object.keys(De)),zt=(Object.keys(Pe),Object.keys(Re),Object.keys(Oe),Object.keys(Fe),Object.keys(ze),Object.keys(Me),Object.keys($e)),Mt=(Object.keys(Ne),Object.keys(Be),Object.keys(Le)),$t=(Object.keys(Ve),Object.keys(Ue)),Nt=(Object.keys(Ge),Object.keys(We)),Bt=Object.keys(qe),Lt=["insertedAt","updatedAt","checkInAt","date","sentAt","scheduledAt","deletedAt","lockedAt","bouncedAt","complaintAt","deliveredAt","rejectedAt","openedAt","clickedAt","queuedAt","closedAt","periodEndAt","checkOutAt","validatedAt","receptionDate","termsAcceptedAt","lastSeenAt","registrationDate","weezeventPairedAt","executedAt"],Vt=["date","calendarInviteStartDate","calendarInviteEndDate","startDate","endDate","deadlineDate","minAccreditationSlotDate","startAt","endAt","paidAt"],Ut=["range","ranges"],Gt=["assignedDuration","duration"];let Wt=class{language;translations;constructor(e,t){this.language=e,this.translations=t}translate(e,...t){if("production"!==i.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[i,s]of e.split(/{\d+}/).entries())n>0&&(yield(0,o.jsx)(r.Fragment,{children:t[i-1]},n)),n++,yield s}formatListValues(e,t="disjunction"){return new Intl.ListFormat(this.language.toLowerCase(),{style:"long",type:t}).format(e)}};Wt=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[String,Object])],Wt);const qt=(0,r.createContext)({}),Ht=qt.Consumer;function Kt(e){return(0,r.useContext)(qt).container.get(e)}function Yt(){const e=(0,r.useContext)(qt).container.get(Wt);return e.translate.bind(e)}function Zt(){const e=(0,r.useContext)(qt).container.get(Wt);return e.interpolateWithComponents.bind(e)}function Jt(e,t,n=[]){const o="production"!==i.Test?e:e.loc.source.body;return(0,r.useContext)(qt).useQuery(o,t,n)}function Xt(e,t={}){return(0,r.useContext)(qt).useMutation(e,t)}function Qt(){return(0,r.useContext)(qt).useParams()}function en(){return(0,r.useContext)(qt).useHistory()}function tn(){return(0,r.useContext)(qt).useLocalStorage()}var nn,on=n(2664);function rn(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function sn(e){return(e||"").trim().toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function an(e){return"string"==typeof e&&e.trim().length>0}function cn(e){return!an(e)}!function(e){e[e.Dash=0]="Dash",e[e.Empty=1]="Empty",e[e.Underscore=2]="Underscore"}(nn||(nn={}));const ln=e=>an(e)?e[0].toUpperCase()+e.slice(1):"";function dn(e){return(e??"").trim().toLowerCase().replace(/\s+/g," ").split(" ").map(e=>ln(e)).join(" ").split("-").map(e=>ln(e.trim())).join("-")}function un(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 r=0;for(;r{let t="$gray200",n="$2",i="$xs";if(an(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,"-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})}});yn("weezcrew-theme",{});const In=bn("div",{variants:{color:{inherit:{color:"inherit"},cyan:{color:"$cyan"},gray25:{color:"$gray25"},gray50:{color:"$gray50"},gray100:{color:"$gray100"},gray200:{color:"$gray200"},gray300:{color:"$gray300"},gray400:{color:"$gray400"},gray500:{color:"$gray500"},gray600:{color:"$gray600"},gray700:{color:"$gray700"},gray800:{color:"$gray800"},gray900:{color:"$gray900"},primary25:{color:"$primary25"},primary50:{color:"$primary50"},primary100:{color:"$primary100"},primary200:{color:"$primary200"},primary300:{color:"$primary300"},primary400:{color:"$primary400"},primary500:{color:"$primary500"},primary600:{color:"$primary600"},primary700:{color:"$primary700"},primary800:{color:"$primary800"},primary900:{color:"$primary900"},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"},blueLight100:{color:"$blueLight100"},blueLight400:{color:"$blueLight400"},blueLight600:{color:"$blueLight600"},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"},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"},orange100:{color:"$orange100"},orange400:{color:"$orange400"},orange600:{color:"$orange600"},orange700:{color:"$orange700"},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"}}),xn=r.forwardRef((e,t)=>{const n={};return e.height&&(n.height=gn(e.height)),e.width&&(n.width=gn(e.width)),(0,o.jsx)(In,{...(0,hn.A)(e,"font"),...mn(e.font),ref:t,css:{...n,...e.css}})});xn.displayName="Box";var Sn,En=n(8542);function jn(e){return(0,En.A)(e,["direction","align","justify","wrap","gap","css","height","width"])}!function(e){e.Nav="nav",e.Header="header",e.Main="main"}(Sn||(Sn={}));const Tn=bn("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"}}),Dn=r.forwardRef(({onClick:e,...t},n)=>{const i={};return t.height&&(i.height=gn(t.height)),t.width&&(i.width=gn(t.width)),(0,o.jsx)(Tn,{...t,ref:n,css:{...i,...t.css},onClick:e})});Dn.displayName="Flex";var Pn=n(2326),Rn=n(4625);const On=["access","ticket","pay"],Fn=({children:e,height:t,replace:n,style:i,to:r,width:s,...a})=>{const c=new URL(r.toString(),location.origin),l={};t&&(l.height=gn(t)),s&&(l.width=gn(s));const d={alignItems:"inherit",color:"inherit",cursor:"pointer",display:"inherit",flexDirection:"inherit",flexWrap:"inherit",gap:"inherit",justifyContent:"inherit",textDecoration:"none",...l,...i};return c.origin!==location.origin||On.includes(c.pathname.split("/")[1])?(0,o.jsx)("a",{href:c.href,rel:"noreferrer",style:d,target:"_blank",...a,children:e}):(0,o.jsx)(Rn.N_,{replace:n,style:d,to:{pathname:c.pathname,hash:c.hash,search:c.search},...a,children:e})};function zn(e){return(0,Pn.A)(e)}Fn.displayName="LinkWrapper";const Mn=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 i=()=>(0,o.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,o.jsx)(Fn,{target:e.target,to:e.to,onClick:e.onClick,children:i()}):i()},$n=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"}))),Nn=(0,r.memo)(function(){return(0,o.jsx)(Dn,{align:"center",height:1,justify:"center",width:1,children:(0,o.jsx)($n,{color:"#162131",height:"200px",strokeWidth:"2",width:"200px"})})}),Bn={alignItems:"center",borderRadius:"$1",cursor:"pointer",display:"flex",fontWeight:"$semiBold",gap:"$2",padding:"$1 $4",userSelect:"none","& .loader":{borderRadius:"$1"},variants:{color:{primary:{background:"$primary700",border:"1px solid $primary700",color:"white","&:hover":{background:"$primary800",border:"1px solid $primary800"},"& .loader":{background:"$primary700",border:"1px solid $primary700"},"& .loader:hover":{background:"$primary800",border:"1px solid $primary800"}},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:"$gray700","&:hover":{background:"$gray50",color:"$gray800"},"& .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:"$primary700",fontSize:"$textSm",fontWeight:"$medium",padding:"$1 $2","&:hover":{color:"$primary900"},"& .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:"$primary25",border:"1px solid $primary25",color:"$primary300","&:hover":{background:"$primary25",border:"1px solid $primary25"},"& .loader":{background:"$primary25",border:"1px solid $primary25"},"& .loader:hover":{background:"$primary25",border:"1px solid $primary25"}}},{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"}},Ln=bn("button",Bn),Vn=bn("div",Bn),Un=r.forwardRef(({children:e,className:t,color:n,css:i,disabled:r,featureFlags:s,isLoading:a,leftIcon:c,onClick:l,to:d,rightIcon:u,size:h,textAlign:m=(s?.isV4?"center":void 0),title:g,...p},f)=>{const _=!!c&&!e&&!u||!c&&!e&&!!u,b={className:`button ${t||""}`,color:n,css:{width:s?.isV4?"100%":void 0,...i,position:"relative"},disabled:r,iconOnly:_,size:h,title:g},k={children:e,color:n,leftIcon:c,isLoading:a,rightIcon:u,textAlign:m};return d&&!r?(0,o.jsx)(Fn,{style:s?.isV4?{flex:"1"}:void 0,title:g,to:d,onClick:e=>{r||a||l&&l(e)},...p,children:(0,o.jsx)(Vn,{...b,ref:f,children:(0,o.jsx)(Gn,{...k})})}):(0,o.jsx)(Ln,{...b,ref:f,type:"button",onClick:e=>{r||a||l&&l(e)},...p,children:(0,o.jsx)(Gn,{...k})})});Un.displayName="Button",Un.toString=()=>".button";const Gn=({children:e,color:t,isLoading:n,leftIcon:i,rightIcon:r,textAlign:s})=>(0,o.jsxs)(o.Fragment,{children:[i&&(0,o.jsx)(Dn,{children:(0,o.jsx)(Mn,{icon:i})}),e&&(0,o.jsx)(xn,{className:"h-button-content",css:{flex:"1"},textAlign:s,children:e}),r&&(0,o.jsx)(Dn,{children:(0,o.jsx)(Mn,{icon:r})}),n&&(0,o.jsx)(Dn,{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,o.jsx)($n,{color:t&&"primary"!==t&&"error"!==t?kn.colors.gray800.value:"white",height:"40px",strokeWidth:"3",width:"40px"})})]}),Wn=r.createContext({});function qn(){return r.useContext(Wn)}const Hn=(e,t=!0)=>{t&&e?.preventDefault(),e?.nativeEvent?.stopImmediatePropagation(),e?.stopPropagation()};var Kn=n(961);function Yn(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)}),[])}const Zn=(0,pn.I4)("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}}),Jn=e=>{const t=Yt(),{onClose:n}=qn();return(0,o.jsxs)(Dn,{css:{borderTop:e.hideBorder?void 0:"1px solid $gray200",padding:"$6 $7"},gap:"3",justify:"end",children:[!e.hideCancelButton&&(0,o.jsx)(Un,{color:"white",onClick:n,children:t("annuler_48254")}),"function"==typeof e.children?e.children(n):e.children]})},Xn=e=>(0,o.jsx)(Dn,{direction:"column",...jn(e),css:{borderTop:e.hideBorder?void 0:"1px solid $gray200",padding:"$5 $7 $7 $7",...e.css},children:e.children}),Qn=({icon:e,iconColor:t,children:n,subtitle:i,onClose:r})=>(0,o.jsxs)(Dn,{children:[(0,o.jsxs)(Dn,{align:"center",css:{flexGrow:"1",padding:"$6 $7 $5 $7"},gap:"4",children:[(0,o.jsx)(Dn,{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,o.jsx)(Mn,{className:"fa-xl",icon:e})}),(0,o.jsxs)(Dn,{direction:"column",children:[(0,o.jsx)(xn,{font:"gray900 textLg medium",children:n}),an(i)&&(0,o.jsx)(xn,{color:"gray500",children:i})]})]}),r&&(0,o.jsx)(Dn,{align:"center",css:{color:"$gray500",cursor:"pointer",fontSize:"textMd",padding:"$2",margin:"$3 $3"},height:24,justify:"center",width:24,onClick:r,children:(0,o.jsx)(Mn,{className:"fa-xl",icon:"xmark"})})]}),ei=({children:e})=>{const{isOpen:t,onClose:n}=qn();return Yn(n),t?(0,Kn.createPortal)((0,o.jsx)(Dn,{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,o.jsx)(Zn,{onClick:e=>Hn(e,!1),children:e})}),document.body):null},ti=e=>{const[t,n]=r.useState(e.isOpen??!1),i=r.useCallback(()=>{n(!1),e.onClose?.()},[n,e.onClose]);return r.useEffect(()=>{"boolean"==typeof e.isOpen&&n(e.isOpen)},[e.isOpen]),(0,o.jsx)(Wn.Provider,{value:{isOpen:t,onClose:i,setIsOpen:n},children:e.children})},ni=e=>{const{setIsOpen:t}=qn(),n=e.children,i=r.useCallback(e=>{Hn(e),t(!0),n.props.onClick?.(e)},[t,n]),s=r.useMemo(()=>r.cloneElement(r.Children.only(n),{onClick:i,onKeyPress:i,tabIndex:0}),[n,i]);return(0,o.jsx)(o.Fragment,{children:s})},ii=e=>{const t=Yt(),n=an(e.content?.[0])?t(e.content[0]):t("ooops_on_a_un_p_56888"),i=((e,t)=>"accreditation_limit_reached"===t?.[0]?e("_ditez_l_accr_d_66820"):"delegation_limit_reached"===t?.[0]?e("_diter_la_d_l_g_14763"):"can_not_delete_paired"===t?.[0]?e("ce_membre_est_d_53903"):a(t)?t:[e("une_erreur_est_92333")])(t,e.content);return(0,o.jsx)(ti,{isOpen:!0,onClose:e.onClose,children:(0,o.jsxs)(ei,{children:[(0,o.jsx)(Qn,{icon:"triangle-exclamation",iconColor:"$error700",children:n}),(0,o.jsx)(Xn,{css:{color:"$gray500"},hideBorder:!0,children:i}),(0,o.jsx)(Jn,{hideBorder:!0,hideCancelButton:!0,children:(0,o.jsx)(Un,{color:"error",onClick:e.onClose,children:t("fermer_62479")})})]})})},oi=r.createContext({}),ri=e=>{const[t,n]=r.useState(!1),[i,s]=r.useState([]),a=r.useCallback((e,t)=>{n(e),s((t||[]).flatMap(e=>e.isHeaventError?e.message.split("\n"):e.message?.startsWith("db::")?[e.message.substring(4).split(" ")[0]]:[]))},[n,s]),c=r.useCallback(()=>{n(!1),s([])},[n,s]);return(0,o.jsxs)(oi.Provider,{value:{isError:t,setIsError:a},children:[e.children,t&&(0,o.jsx)(ii,{content:i,onClose:c})]})};var si=n(9191);function ai(e){try{return Buffer.from(e,"base64").toString()}catch{try{return atob(e)}catch{return""}}}class ci 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 li="undefined"!=typeof process&&an(process?.env?.SECRETS_PATH)?process.env.SECRETS_PATH:null,di="undefined"!=typeof process?(0,si.existsSync)(`${li}/HEAVENT_SECRETS`)?JSON.parse(ai((0,si.readFileSync)(`${li}/HEAVENT_SECRETS`,"utf-8"))):an(process?.env?.HEAVENT_SECRETS)?JSON.parse(ai(process.env.HEAVENT_SECRETS)):null:null,ui=e=>{if("object"==typeof window&&void 0!==window[e])return window[e];if(void 0!==di?.[e])return di[e];throw new Error(`Missing env. var. ${e}`)},hi=e=>"object"==typeof window&&void 0!==window[e]?window[e]:void 0!==di?.[e]?di[e]:void 0,mi=e=>{const t=ui(e);return"boolean"==typeof t?t:"true"===t},gi=ui("HEAVENT_APPLICATION_DOMAIN"),pi=hi("HEAVENT_RESOURCES_DOMAIN")??gi,fi=hi("HEAVENT_ASSETS_DOMAIN")??pi,_i=hi("HEAVENT_APP_SUBDOMAIN")??"app",bi=hi("HEAVENT_API_SUBDOMAIN")??"api",ki=hi("HEAVENT_PUBLIC_SUBDOMAIN")??"event",vi=hi("HEAVENT_INVOICES_SUBDOMAIN")??"invoices",Ai=hi("HEAVENT_ASSETS_SUBDOMAIN")??"assets",yi=hi("HEAVENT_UPLOADS_SUBDOMAIN")??"uploads",wi=hi("HEAVENT_APPLICATION_BASENAME")??"",Ci=hi("HEAVENT_RESOURCES_BASENAME")??"",Ii={ADMINS:ui("HEAVENT_ADMINS"),EMAIL_FROM:ui("HEAVENT_EMAIL_FROM"),EMAIL_FROM_NAME:ui("HEAVENT_EMAIL_FROM_NAME"),HEAVENT_APPLICATION_DOMAIN:gi,HEAVENT_RESOURCES_DOMAIN:pi,HEAVENT_ASSETS_DOMAIN:fi,HEAVENT_APPLICATION_BASENAME:wi,HEAVENT_APP_URL:new ci(hi("HEAVENT_APP_DOMAIN")??gi,void 0,_i,hi("HEAVENT_APP_BASENAME")??wi),HEAVENT_API_URL:new ci(hi("HEAVENT_API_DOMAIN")??gi,void 0,bi,hi("HEAVENT_API_BASENAME")??wi),HEAVENT_PUBLIC_URL:new ci(hi("HEAVENT_PUBLIC_DOMAIN")??gi,void 0,ki,hi("HEAVENT_PUBLIC_BASENAME")??wi),HEAVENT_ASSETS_URL:new ci(fi,void 0,Ai,hi("HEAVENT_ASSETS_BASENAME")??Ci),HEAVENT_INVOICES_URL:new ci(hi("HEAVENT_INVOICES_DOMAIN")??pi,void 0,vi,hi("HEAVENT_INVOICES_BASENAME")??Ci),HEAVENT_UPLOADS_URL:new ci(hi("HEAVENT_UPLOADS_DOMAIN")??pi,void 0,yi,hi("HEAVENT_UPLOADS_BASENAME")??Ci),USE_HUBSPOT:ui("HEAVENT_USE_HUBSPOT"),COGNITO_USER_POOL_ID:ui("HEAVENT_COGNITO_USER_POOL_ID"),COGNITO_USER_POOL_CLIENT_ID:ui("HEAVENT_COGNITO_USER_POOL_CLIENT_ID"),COGNITO_DOMAIN_URL:ui("HEAVENT_COGNITO_DOMAIN_URL"),COGNITO_CLIENT_CALLBACK_URL:ui("HEAVENT_COGNITO_CLIENT_CALLBACK_URL")[0],USE_MIXPANEL:mi("HEAVENT_USE_MIXPANEL"),MIXPANEL_TOKEN:mi("HEAVENT_MIXPANEL_TOKEN"),HEAVENT_AWS_UPLOADS_BUCKET:ui("HEAVENT_AWS_UPLOADS_BUCKET"),LOG_TOKEN:ui("HEAVENT_LOG_TOKEN"),WEEZEVENT_DOMAIN:ui("HEAVENT_WEEZEVENT_DOMAIN")};var xi=n(8097);function Si(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 Ei=n(1343);const ji={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 name\n }\n\n accreditation {\n id\n eventId\n name\n description\n address\n latitude\n longitude\n }\n\n accreditationSlot {\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:[]},AccreditationSlotMatrixFragment:{code:"fragment AccreditationSlotMatrix on AccreditationsSlot {\n id\n name\n date\n\n accreditation {\n id\n acronym\n color\n name\n index\n }\n\n accreditationCategory {\n name\n }\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 }\n\n accreditationCategory {\n id\n name\n }\n}\n",fragments:[]},AccreditationsAccreditationFragment:{code:"fragment AccreditationsAccreditation on Accreditation {\n id\n name\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 insertedAt\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 name\n date\n maxResources\n assignedResources\n fillingRate\n isHidden\n insertedAt\n weezeventChecklistId\n\n accreditation {\n id\n name\n address\n latitude\n longitude\n acronym\n icon\n color\n fields\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\n accreditationCategory {\n id\n name\n }\n}\n",fragments:["AccreditationsAccreditationCustomFieldFragment"]},AccreditationsSlotFragment:{code:"fragment AccreditationsSlot on AccreditationsSlot {\n id\n accreditationCategoryId\n accreditationId\n eventId\n name\n date\n assignedResources\n wishedResources\n maxResources\n isBlocked\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 }\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 hasCalendarInvite\n calendarInviteName\n calendarInviteStartDate\n calendarInviteStartTime\n calendarInviteEndDate\n calendarInviteEndTime\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 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 email\n\n userInfo(organizationId: $organizationId) {\n name\n nameOrEmail\n picture {\n url\n }\n }\n }\n}\n",fragments:[]},ConditionCustomFieldFragment:{code:"fragment ConditionCustomField on CustomField {\n id\n name\n slug\n fieldType\n\n values {\n id\n value\n }\n}\n",fragments:[]},ConditionsCustomFieldsFragment:{code:"fragment ConditionsCustomFields on Organization {\n conditionsCustomFields: customFields(\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:[]},CreateCampaignEmailSenderFragment:{code:"fragment CreateCampaignEmailSender on EmailsSender {\n id\n name\n isValidToSendEmail\n}\n",fragments:[]},CreateCustomFieldInfosFragment:{code:"fragment CreateCustomFieldInfos on Organization {\n customFields(\n variety: UserInfo\n privacy: All\n fieldTypes: [Checkbox, Country, Language, Nationality, Select]\n ) {\n nodes {\n id\n name\n label\n fieldProperty\n fieldType\n\n values {\n id\n value\n }\n }\n }\n\n customFieldsCategories {\n nodes {\n id\n name\n }\n }\n}\n",fragments:[]},CreateDelegationEventFragment:{code:"fragment CreateDelegationEvent on Event {\n startAt\n endAt\n\n campaigns(states: [Template]) {\n nodes {\n id\n name\n }\n }\n\n customDocuments {\n slug\n name\n }\n\n forms {\n nodes {\n ...CreateDelegationForm\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\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 {\n id\n name\n }\n\n tags {\n nodes {\n id\n name\n }\n }\n}\n",fragments:["AttachCustomFieldFragment"]},CreateUpdateMemberFormFragment:{code:"fragment CreateUpdateMemberForm on Form {\n id\n name\n description\n daysDisplay\n positionTitle\n positionSubtitle\n slotTitle\n slotSubtitle\n accreditationTitle\n accreditationSubtitle\n informationTitle\n registerButtonText\n\n ...FormMissionsOptions\n ...FormAccreditationsOptions\n\n elements {\n ...FormElementDisplay\n }\n\n customSlotsPeriods {\n ...FormRegisterCustomSlotPeriod\n }\n}\n",fragments:["FormMissionsOptionsFragment","FormAccreditationsOptionsFragment","FormElementDisplayFragment","FormRegisterCustomSlotPeriodFragment"]},CreatedByFragment:{code:"fragment CreatedBy on UsersInfo {\n name\n email\n picture {\n url\n }\n}\n",fragments:[]},CustomBadgeVolunteerRegistrationFragment:{code:'fragment CustomBadgeVolunteerRegistration on VolunteersRegistration {\n localId\n state\n isLeader\n utid\n ticketId\n weezevent\n\n userInfo {\n id\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 delegation {\n name\n\n leaders {\n name\n firstName: fieldValue(slug: "firstName")\n lastName: fieldValue(slug: "lastName")\n phone: fieldValue(slug: "phone")\n }\n }\n\n accreditationsUsersInfos {\n accreditation {\n id\n name\n acronym\n color\n icon\n }\n\n accreditationSlot {\n id\n name\n date\n }\n\n accreditationCategory {\n id\n name\n }\n }\n\n positionsSlotsUsersInfos {\n ...AssigmentEmail\n }\n}\n',fragments:["UserInfoLinksFragment","AssigmentEmailFragment"]},CustomDocumentPopulationFragment:{code:"fragment CustomDocumentPopulation on CustomDocument {\n slug\n name\n populationsIds\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 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 name\n email\n\n picture {\n url\n }\n }\n\n values {\n value\n }\n}\n",fragments:[]},CustomFieldImportFragment:{code:"fragment CustomFieldImport on CustomField {\n id\n name\n slug\n customFieldCategoryId\n customFieldCategoryName\n fieldType\n fieldProperty\n canSelectMultiple\n\n values {\n id\n value\n }\n}\n",fragments:[]},CustomFieldWithConditionFragment:{code:"fragment CustomFieldWithCondition on CustomField {\n id\n name\n label\n description\n fieldType\n fieldProperty\n isPrivate\n hasCondition\n conditionValue\n canSelectMultiple\n slug\n isSelectV2\n\n conditionCustomField {\n id\n name\n fieldType\n fieldProperty\n canSelectMultiple\n slug\n }\n\n document {\n url\n name\n }\n\n values {\n id\n value\n }\n}\n",fragments:[]},DelegationAccreditationSlotFragment:{code:"fragment DelegationAccreditationSlot on DelegationAccreditationSlot {\n accreditationCategoryId\n accreditationId\n accreditationSlotId\n isDefault\n isFull\n isVisible\n\n accreditationSlot {\n date\n isBlocked\n isFull\n }\n}\n",fragments:[]},DelegationAccreditationSlotStatsFragment:{code:"fragment DelegationAccreditationSlotStats on DelegationAccreditationSlot {\n accreditationSlotId\n accreditationId\n assignedResources\n maxResources\n scannedResources\n wishedResources\n}\n",fragments:[]},DelegationAccreditationsSlotsFragment:{code:"fragment DelegationAccreditationsSlots on Delegation {\n accreditationsSlots {\n accreditationId\n accreditationSlotId\n maxResources\n assignedResources\n isDefault\n isVisible\n\n accreditationSlot {\n id\n name\n date\n isHidden\n accreditation {\n id\n name\n }\n accreditationCategoryId\n }\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 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 canLeadersEditColumns\n canLeadersEditCustomFields\n canLeadersImportMembers\n canLeadersSeeHiddenAccreditationsSlots\n showFormLinkInDelegationSpace\n lockedAt\n usedCustomFieldsFilled @include(if: $includeUsedCustomFieldsFilled)\n insertedAt\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 customDocuments @include(if: $includeDocuments) {\n slug\n name\n }\n\n delegationCategory {\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 accreditationsSlots @include(if: $includeAccreditationsSlots) {\n ...DelegationAccreditationSlotStats\n }\n}\n",fragments:["DelegationAccreditationSlotStatsFragment"]},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 position(id: $positionId) {\n name\n range\n\n slots {\n id\n range\n }\n }\n\n volunteersRegistrations(positionId: $positionId, sort: { attribute: "Name", direction: Asc }) {\n nodes {\n id\n\n userInfo {\n email\n name\n picture {\n url\n }\n }\n\n slots {\n range\n }\n\n positionsSlotsUsersInfos {\n positionSlotId\n positionSlot {\n range\n }\n }\n }\n }\n}\n',fragments:[]},DocumentPositionSheetFragment:{code:"fragment DocumentPositionSheet on Query {\n organization(id: $organizationId) {\n customFields(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 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 email\n name\n picture {\n url\n }\n }\n\n positionsSlotsUsersInfos {\n positionSlotId\n }\n }\n }\n}\n",fragments:[]},DocumentUserAssignmentsFragment:{code:"fragment DocumentUserAssignments on Query {\n organization(id: $organizationId) {\n id\n\n customFields(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 preassignPositions {\n name\n }\n\n preassignPositionsCategories {\n name\n }\n\n positionsSlotsUsersInfos {\n ...AssigmentEmail\n }\n }\n }\n}\n",fragments:["CustomFieldWithConditionFragment","UserInfoDocumentFragment","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 name\n email\n nameOrEmail\n language: fieldValue(slug: "language")\n\n links(eventId: $eventId) {\n userBadgeLink\n }\n\n picture {\n url\n }\n }\n\n positionsSlotsUsersInfos {\n position {\n name\n }\n\n positionSlot {\n range\n }\n }\n }\n}\n',fragments:[]},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\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 userInfo {\n ...UserInfoDocument\n }\n\n positionsSlotsUsersInfos {\n ...PsuiUserPlanning\n }\n }\n}\n",fragments:["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(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 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 name\n email\n firstName: fieldValue(slug: "firstName")\n lastName: fieldValue(slug: "lastName")\n\n phone {\n internationalFormat\n }\n\n picture {\n url\n }\n }\n }\n }\n }\n}\n',fragments:[]},DocumentUsersPlanningFragment:{code:"fragment DocumentUsersPlanning on VolunteersRegistration {\n id\n state\n\n userInfo {\n id\n email\n name\n picture {\n url\n }\n }\n\n positionsSlotsUsersInfos {\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:[]},EditVolunteerRegistrationSlotFragment:{code:"fragment EditVolunteerRegistrationSlot on ISlot {\n startDate\n startTime\n endDate\n endTime\n}\n",fragments:[]},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}\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:[]},EventEmailRendererFragment:{code:"fragment EventEmailRenderer on Event {\n id\n organizationId\n name\n languages\n timeZone\n startAt\n endAt\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 state\n startAt\n endAt\n fields\n numberOfMembers @include(if: $includeNumberOfMembers)\n numberOfMembersAccredited @include(if: $includeNumberOfMembers)\n numberOfMembersAssigned @include(if: $includeNumberOfMembers)\n\n tags {\n id\n name\n }\n}\n",fragments:[]},ExistingVolunteerFragment:{code:"fragment ExistingVolunteer on UsersInfo {\n id\n nameOrEmail\n name\n email\n picture {\n url\n }\n}\n",fragments:[]},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 name\n label\n fieldType\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 }\n}\n",fragments:[]},FormCustomFieldsFragment:{code:"fragment FormCustomFields on Organization {\n formCustomFields: customFields(\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 displayedPositionsCategoriesIds\n displayedPositionsIds\n displayedPositionsSlotsIds\n showPositionCategoryDescription\n showPositionDescription\n slotDisplay\n willAutoAssign\n}\n",fragments:[]},FormRegisterAccreditationFragment:{code:"fragment FormRegisterAccreditation on IAccreditation {\n id\n name\n description\n color\n icon\n hiddenSlotId\n hasSlots\n accreditationDisplay\n conditionsOperator\n index\n\n slots {\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"]},FormRegisterAccreditationSlotFragment:{code:"fragment FormRegisterAccreditationSlot on IAccreditationsSlot {\n id\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 name\n startDate\n endDate\n hideNameDates\n displayAsCalendar\n\n customSlots {\n ...FormRegisterCustomSlot\n }\n}\n",fragments:["FormRegisterCustomSlotFragment"]},FormRegisterPositionFragment:{code:"fragment FormRegisterPosition on IPosition {\n id\n name\n description\n isVisible\n conditionsOperator\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 name\n range\n nameOrRange\n isFull\n}\n",fragments:[]},FormSlotsOptionsFragment:{code:"fragment FormSlotsOptions on Form {\n slotDisplay\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 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\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 range\n }\n }\n}\n",fragments:["FormMemberRegistrationFragment"]},FullPageInfoFragment:{code:"fragment FullPageInfo on PageInfo {\n hasNextPage\n hasPreviousPage\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 email\n name\n nameOrEmail\n picture {\n url\n }\n phone {\n internationalFormat\n }\n}\n",fragments:[]},MassEditCustomFieldFragment:{code:"fragment MassEditCustomField on CustomField {\n id\n name\n label\n slug\n fieldType\n fieldProperty\n canSelectMultiple\n\n values {\n id\n value\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 name\n email\n nameOrEmail\n fields\n picture {\n url\n }\n}\n",fragments:[]},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 {\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(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 {\n colors\n logo {\n url\n }\n\n banner {\n url\n }\n }\n}\n",fragments:[]},OrganizationEmailRendererFragment:{code:"fragment OrganizationEmailRenderer on Organization {\n id\n name\n datetimeFormat\n timeZone\n}\n",fragments:[]},OrganizationMembersSpaceFragment:{code:"fragment OrganizationMembersSpace on Organization {\n hideAssignmentsUntilConfirmationEmailSent\n hideAccreditationsUntilConfirmationEmailSent\n name\n\n membersSpaceDesign {\n colors\n logo {\n url\n }\n\n banner {\n url\n }\n }\n}\n",fragments:[]},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 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 range\n resources\n assignedResources\n address\n latitude\n longitude\n acronym\n color\n icon\n isVisible\n state\n fillingRate\n numberOfSlots\n fields\n insertedAt\n\n checkedInRate @include(if: $includeCheckedInRate)\n\n category {\n id\n name\n\n leaders @include(if: $includeLeaders) {\n userInfo {\n id\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 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",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 insertedAt\n\n checkedInRate @include(if: $includeCheckedInRate)\n\n position {\n id\n name\n fields\n acronym\n color\n icon\n address\n latitude\n longitude\n\n createdBy @include(if: $includeCreatedBy) {\n email\n name\n }\n\n positionsCustomFields @include(if: $includeConditions) {\n ...PositionsPositionCustomField\n }\n\n tags @include(if: $includeTags) {\n id\n name\n }\n }\n\n positionCategory {\n id\n name\n }\n}\n",fragments:["PositionsPositionCustomFieldFragment"]},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 fieldProperty\n canSelectMultiple\n customFieldCategoryId\n customFieldCategoryName\n isSelectV2\n isEncrypted\n\n values {\n id\n value\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 predicates\n columns\n columnsExport\n columnsSearch\n sort\n count\n rendering\n description\n isUsedInWorkflow\n infos\n }\n}\n",fragments:[]},TraceFragment:{code:"fragment Trace on Trace {\n id\n name\n color\n points\n direction\n}\n",fragments:[]},TracePositionsMapFragment:{code:"fragment TracePositionsMap on Trace {\n id\n color\n points\n direction\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 role {\n id\n name\n type\n }\n }\n\n usersEvents(eventId: $eventId) {\n id\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 delegationCategory {\n name\n }\n\n role {\n id\n name\n }\n }\n\n usersPositionsCategories(eventId: $eventId) {\n id\n eventId\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 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 name\n email\n nameOrEmail\n fields\n insertedAt\n phone: fieldValue(slug: "phone")\n\n ...UserAllPermissions @include(if: $includeRoles)\n\n picture {\n url\n }\n\n events @include(if: $includeEvents) {\n id\n name\n }\n\n delegations(level: Organization) @include(if: $includeDelegations) {\n id\n name\n\n delegationCategory {\n id\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"]},UserInfoDocumentFragment:{code:'fragment UserInfoDocument on UsersInfo {\n id\n name\n nameOrEmail\n email\n language: fieldValue(slug: "language")\n fields(expand: true)\n registrationDate(eventId: $eventId)\n\n links(eventId: $eventId) {\n ...UserInfoLinks\n }\n\n picture {\n url\n }\n}\n',fragments:["UserInfoLinksFragment"]},UserInfoEmailRendererFragment:{code:"fragment UserInfoEmailRenderer on UsersInfo {\n id\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 email\n nameOrEmail\n fields\n registrationDate(eventId: $eventId)\n canAccess(formId: $formId)\n\n links(eventId: $eventId) {\n ...UserInfoLinks\n }\n}\n",fragments:["UserInfoLinksFragment"]},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:[]},UserInfoOrganizationFragment:{code:"fragment UserInfoOrganization on UsersInfo {\n id\n userId\n name\n email\n nameOrEmail\n\n ...UserAllPermissions\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 email\n name\n\n picture {\n url\n }\n}\n",fragments:[]},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 email\n name\n\n picture {\n url\n }\n }\n}\n",fragments:[]},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 createdBy {\n email\n name\n }\n}\n",fragments:[]},UserPermissionsFragment:{code:"fragment UserPermissions on User {\n roles(organizationId: $organizationId, eventId: $eventId) {\n id\n delegationCategoryPermissions\n positionPermissions\n type\n }\n\n usersPositionsCategories(eventId: $eventId) {\n positionCategoryId\n\n role {\n id\n editPosition\n type\n }\n }\n\n usersPositions(eventId: $eventId) {\n positionId\n\n role {\n id\n editPosition\n type\n }\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 organizationId\n positionCategoryId\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 teams {\n teamCode\n }\n\n userInfo {\n id\n name\n email\n fields\n\n picture {\n url\n }\n }\n}\n",fragments:[]},VolunteerRegistrationFragment:{code:"fragment VolunteerRegistration on VolunteersRegistration {\n id\n localId\n ticketId\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 volunteerMinutes @include(if: $includeVolunteerMinutes)\n weezeventPairedAt @include(if: $includeWeezevent)\n weezeventPayUrl @include(if: $includeWeezeventUrls)\n weezeventTicketUrl @include(if: $includeWeezeventUrls)\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 userId\n organizationId\n name\n email\n nameOrEmail\n fields\n isEditable @include(if: $includeIsEditable)\n insertedAt\n\n ...UserAllPermissions @include(if: $includeRoles)\n\n links(eventId: $eventId) {\n ...UserInfoLinks\n }\n\n picture {\n url\n }\n\n comments @include(if: $includeComments) {\n content\n }\n\n emails(emailTypes: [Campaign], delegationId: $delegationId) @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 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 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 }\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 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","UserInfoTeamMemberFragment","AccreditationSlotVolunteerRegistrationFragment","UserPositionSlotUserInfoFragment"]},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 email\n name\n\n picture {\n url\n }\n }\n}\n",fragments:[]},VolunteerRegistrationEmailRendererFragment:{code:'fragment VolunteerRegistrationEmailRenderer on VolunteersRegistration {\n localId\n ticketId\n weezevent\n\n delegation {\n name\n\n leaders {\n firstName: fieldValue(slug: "firstName")\n lastName: fieldValue(slug: "lastName")\n phone: fieldValue(slug: "phone")\n }\n }\n}\n',fragments:[]},VolunteerRegistrationWaitingAssignmentFragment:{code:"fragment VolunteerRegistrationWaitingAssignment on VolunteersRegistration {\n insertedAt\n\n userInfo {\n id\n name\n email\n picture {\n url\n }\n }\n}\n",fragments:[]},VolunteerRegistrationWeezeventFragment:{code:"fragment VolunteerRegistrationWeezevent on VolunteersRegistration {\n id\n state\n accreditationState\n ticketId\n weezevent\n\n accreditationsUsersInfos {\n accreditationSlotId\n accreditationCategoryId\n\n accreditation {\n id\n name\n fields\n }\n }\n\n positionsSlotsUsersInfos {\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 email\n fieldsExpanded: fields(expand: true)\n\n picture {\n url\n }\n }\n}\n",fragments:[]},WishesEmailFragment:{code:"fragment WishesEmail on FormsUsersInfo {\n positionsCategories {\n name\n }\n\n positions {\n name\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 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 volunteersSegment {\n id\n name\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 Ti(e){return e.flatMap(e=>[e.code].concat(Ti(e.fragments.map(e=>ji[e]))))}function Di(e){return(0,Ei.A)(Ti(e)).join(" ")}const Pi="yyyy-MM-dd",Ri="yyyy-MM-dd'T'HH:mm",Oi="yyyy-MM-dd'T'HH:mm:ss";function Fi(e){const[t,n]=JSON.parse(e);return xi.IX.fromDateTimes(xi.c9.fromISO(t,{zone:"UTC"}),xi.c9.fromISO(n,{zone:"UTC"}))}function zi({startDate:e,startTime:t,endDate:n,endTime:i}){try{const[o,r]=t.split(":"),[s,a]=i.split(":");return xi.IX.fromDateTimes(e.set({hour:parseInt(o,10),minute:parseInt(r,10)}),n.set({hour:parseInt(s,10),minute:parseInt(a,10)}))}catch{return xi.IX.invalid("Invalid")}}function Mi(e){return xi.IX.isInterval(e)?e:zi(e)}function $i(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 Ni=(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(),Bi={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 Li(){return xi.c9.utc().toLocal().zoneName}function Vi(e){if(!0===Array.isArray(e))return e.map(e=>null!=e&&"object"==typeof e?Vi(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];Vt.includes(n)||Lt.includes(n)?t[n]=i&&xi.c9.fromISO(i,{zone:"UTC"}):Ut.includes(n)?Array.isArray(i)?t[n]=i.map(Fi):t[n]=i&&Fi(i):Gt.includes(n)?t[n]=i&&xi.dw.fromISO(i):t[n]=null!=i&&"object"==typeof i?Vi(i):i}),t}}const Ui="00aab77ba79f6f9e0cb7a7ac64427def73b41871\n".trim(),Gi="x-heavent-commit-sha",Wi="x-user-token";function qi(){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 Hi=n(7405),Ki=n(5002);const Yi="heavent-user-session-key",Zi="heavent-user-email",Ji="UserNotFoundException";let Xi=null;const Qi=()=>(null===Xi&&(Xi=new Ki.NE({UserPoolId:Ii.COGNITO_USER_POOL_ID,ClientId:Ii.COGNITO_USER_POOL_CLIENT_ID})),Xi);function eo(){return new Promise((e,t)=>{const n=Qi().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 to(){try{const e=localStorage.getItem("heavent-test-token");return an(e)?e:(await eo()).token}catch{return}}function no(){eo().then(({user:e})=>{e.signOut(),location.reload()}).catch(()=>{alert("Something wrong happened ")})}function io(){return eo().then(({user:e})=>{e.signOut()})}function oo(e,t,n){return new Promise((i,o)=>{const r=new Ki.TU({Username:e,Pool:Qi()}),s=new Ki.By({Username:e}),a={onSuccess(e){t(e.getIdToken().getJwtToken())},onFailure(e){e.code===Ji?o(Ji):n(e)},customChallenge(){localStorage.setItem(Zi,e),localStorage.setItem(Yi,r.Session),i({user:r,callbacks:a})}};r.setAuthenticationFlowType("CUSTOM_AUTH"),r.initiateAuth(s,a)})}async function ro(e,t,n){try{return await oo(e,t,n)}catch(i){if(i!==Ji)throw i;try{return await function(e,t){const n=e.trim().toLowerCase();return new Promise((e,i)=>{const o=[new Ki.HB({Name:"email",Value:n})];Qi().signUp(n,t,o,[],(t,n)=>{t?i(t):e(n.user)})})}(e,qi()),await oo(e,t,n)}catch{throw new Error("Auth failure")}}}function so({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 ao(e,t,n){!async function(e){await fetch(`${Ii.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 co(e,t={}){let n=Ii.HEAVENT_API_URL.href;const i=new URL(location.href).searchParams,o=`${e} ${a(t.fragments)?Di(t.fragments):""}`,r={"Content-Type":"application/json",[Gi]:Ui};i.has("lang")&&(n=`${n}?lang=${i.get("lang")}`),t.token&&(r[Wi]=t.token);const s=await fetch(n,{method:"post",headers:r,body:JSON.stringify({query:o,variables:t.variables||{},uuid:qi()})});if(s.ok){t.reloadOnNewVersion&&"true"===s.headers.get("x-heavent-new-version")&&document.body.dispatchEvent(new CustomEvent("h-new-version",{bubbles:!0}));const e=await s.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 e.errors}{const t=(0,Hi.A)(e.data),n={};return t.forEach(t=>{n[t]=Vi(e.data[t])}),n}}throw new Error(s.statusText)}function lo(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)(()=>to().then(i=>co(e,{variables:t,token:i||void 0,fragments:n})),[e,i])}const uo="mutation UserCreate {\n userCreate {\n id\n email\n }\n}\n";function ho(e={}){return Xt("mutation VolunteersRegistrationsMassAccredit(\n $eventId: EventId!\n $massAccredit: MassAccreditInput!\n) {\n numberOfMembers: volunteersRegistrationsMassAccredit(\n eventId: $eventId\n massAccredit: $massAccredit\n )\n}\n",e)}function mo(e={}){return Xt("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 go(e){return Jt("query OrganizationParametersInfos($organizationId: OrganizationId!) {\n organization(id: $organizationId) {\n ...OrganizationAdminInfos\n }\n}\n",e,[ji.OrganizationAdminInfosFragment])}function po(e={}){return Xt("mutation PositionsSlotsUsersInfosCheckIn($eventId: EventId!, $checkIn: PositionSlotCheckInInput!) {\n positionsSlotsUsersInfosCheckIn(eventId: $eventId, checkIn: $checkIn)\n}\n",e)}function fo(e){return Jt("query UserPositions(\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 name\n startAt\n endAt\n dayStartTime\n hasFormWithPositionDisplay\n hasFormWithSlotDisplay\n\n volunteerRegistration: volunteerRegistrationByUserInfoId(userInfoId: $userInfoId) {\n id\n volunteerMinutes\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,[ji.FormsUsersInfosWishedFragment,ji.UserPositionSlotUserInfoFragment])}function _o(e={}){return Xt("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 bo(e,t){return co("query User(\n $organizationId: OrganizationId!\n $eventId: EventId\n $id: UsersInfoId!\n $includeDelegations: 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:[ji.UserInfoCommunityFragment]})}function ko(e,t){return co("query Users(\n $organizationId: OrganizationId!\n $eventId: EventId\n $predicates: [Predicate!]!\n $name: String\n $columnsSearch: [String!]\n $limit: Int\n $offset: Int\n $sort: UsersInfosSort\n $delegationCategoryId: DelegationsCategoryId\n $delegationId: DelegationId\n $includeDelegations: Boolean!\n $includeEvents: Boolean!\n $includeForms: Boolean!\n $includeTags: Boolean!\n $includeRoles: Boolean!\n) {\n data: organization(id: $organizationId) {\n rows: usersInfos(\n predicates: $predicates\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:[ji.UserInfoCommunityFragment]})}function vo(e={}){return Xt("mutation LoginCodeEmailCreate($loginCodeEmail: LoginCodesEmailInput!) {\n loginCodeEmailCreate(loginCodeEmail: $loginCodeEmail) {\n insertedAt\n }\n}\n",e)}function Ao(e={}){return Xt("mutation VolunteersRegistrationsAccreditationsValidate(\n $eventId: EventId!\n $delegationId: DelegationId!\n $usersInfosIds: [UsersInfoId!]\n) {\n volunteersRegistrationsAccreditationsValidate(\n eventId: $eventId\n delegationId: $delegationId\n usersInfosIds: $usersInfosIds\n )\n}\n",e)}function yo(e={}){return Xt("mutation VolunteersRegistrationsMassAssign($eventId: EventId!, $massAssign: MassAssignInput!) {\n numberOfMembers: volunteersRegistrationsMassAssign(eventId: $eventId, massAssign: $massAssign)\n}\n",e)}function wo(e={}){return Xt("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 Co(e={}){return Xt("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 Io(e,t){return co("query Volunteer(\n $eventId: EventId!\n $id: VolunteersRegistrationId!\n $delegationId: DelegationId\n $onlyVisibleAccreditationsSlots: Boolean\n $includeAccreditations: Boolean!\n $includeAccreditationsMatrix: Boolean!\n $includeAvailability: Boolean!\n $includeCanRegistrationStateUpdate: Boolean!\n $includeComments: Boolean!\n $includeDelegation: 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 $includePositions: Boolean!\n $includeRoles: Boolean!\n $includeTags: Boolean!\n $includeTeam: Boolean!\n $includeVolunteerMinutes: Boolean!\n $includeWishedPositions: Boolean!\n $includePreassignedPositions: Boolean!\n $includeWeezeventChecklists: Boolean!\n $includeWeezevent: 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:[ji.VolunteerRegistrationFragment]})}function xo(e,t){return co("query Volunteers(\n $eventId: EventId!\n $predicates: [Predicate!]!\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 $accreditationCategoryId: AccreditationsCategoryId\n $accreditationId: AccreditationId\n $accreditationSlotId: AccreditationsSlotId\n $delegationCategoryId: DelegationsCategoryId\n $delegationId: DelegationId\n $onlyVisibleAccreditationsSlots: Boolean\n $includeAccreditations: Boolean!\n $includeAccreditationsMatrix: Boolean!\n $includeAvailability: Boolean!\n $includeCanRegistrationStateUpdate: Boolean!\n $includeComments: Boolean!\n $includeDelegation: 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 $includePositions: Boolean!\n $includeRoles: Boolean!\n $includeTags: Boolean!\n $includeTeam: Boolean!\n $includeVolunteerMinutes: Boolean!\n $includeWishedPositions: Boolean!\n $includePreassignedPositions: Boolean!\n $includeWeezeventChecklists: Boolean!\n $includeWeezevent: Boolean!\n $includeWeezeventUrls: Boolean!\n) {\n data: event(id: $eventId) {\n rows: volunteersRegistrations(\n predicates: $predicates\n name: $name\n columnsSearch: $columnsSearch\n positionCategoryId: $positionCategoryId\n positionId: $positionId\n preassignedPositionCategoryId: $preassignedPositionCategoryId\n preassignedPositionId: $preassignedPositionId\n accreditationCategoryId: $accreditationCategoryId\n accreditationId: $accreditationId\n accreditationSlotId: $accreditationSlotId\n delegationCategoryId: $delegationCategoryId\n delegationId: $delegationId\n limit: $limit\n offset: $offset\n sort: $sort\n ) {\n nodes {\n ...VolunteerRegistration\n }\n\n numberOfPages\n totalCount\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[ji.VolunteerRegistrationFragment]})}function So(e={}){return Xt("mutation VolunteersRegistrationsMassWishedAccreditationsUpdate(\n $eventId: EventId!\n $delegationId: DelegationId!\n $massAccredit: MassAccreditInput!\n) {\n volunteersRegistrationsMassWishedAccreditationsUpdate(\n eventId: $eventId\n delegationId: $delegationId\n massAccredit: $massAccredit\n )\n}\n",e)}const Eo=async()=>{const{user:e}=await(async()=>{try{const e=await async function(){const e=await to();if(an(e)){const{user:t}=await function(e,t){return co("query CurrentUser {\n user {\n id\n email\n language\n insertedAt\n hubspotToken\n profile\n termsAcceptedAt\n }\n}\n",{variables:{},token:t||void 0,fragments:[]})}(0,e);return{user:t}}throw new Error("No token")}();return xi.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()),an(t)&&(n=t),Si(`${Ii.HEAVENT_API_URL}/translation/language.js?${n?`lang=${n}`:""}`)})(e),{user:e}},jo=window.matchMedia("(max-width: 1200px)"),To=r.createContext({isMobile:!1}),Do=e=>{const[t,n]=r.useState(!1);return r.useEffect(()=>{n(jo.matches),jo.addListener(e=>{n(e.matches)})},[]),(0,o.jsx)(To.Provider,{value:{isMobile:t},children:e.children})},Po=(0,r.createContext)({user:null});function Ro(){return(0,r.useContext)(Po)}const Oo=(0,o.jsx)(Nn,{});function Fo(e,{redirectOnSuccess:t}={}){const[n,i]=(0,r.useState)(!1),{setIsError:o}=(0,r.useContext)(oi);let s=null;return n&&(s=Oo),{isLoading:n,loader:s,mutate:async(n,r)=>{i(!0);try{const s=await to(),a=await((e,t,n)=>co(e,{variables:t,token:n||void 0}))(e,n,r||s);return!0!==t&&(i(!1),o(!1)),a}catch(e){throw o(!0,a(e)?e:[]),e}}}}const zo=(0,o.jsx)(Nn,{});function Mo(e,t,n){const[i,o]=(0,r.useState)(!0),[s,a]=(0,r.useState)({}),[c,l]=(0,r.useState)(0),{setIsError:d}=(0,r.useContext)(oi),u=Object.keys(t).sort().map(e=>{const n=t[e];return`"${e}":${JSON.stringify(n)}`}).join(",");(0,r.useEffect)(()=>{let i=!1;var r;return o(!0),r=u,to().then(i=>co(e,{reloadOnNewVersion:!0,variables:t,token:i,fragments:n})).then(e=>{i||r!==u||(a(e),d(!1),o(!1))},()=>{i||r!==u||d(!0)}),()=>{i=!0}},[e,u,c]);let h=null;return i&&(h=zo),{data:s,isLoading:i,loader:h,reload(){l(c+1)}}}var $o=n(6347);function No(){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,$o.g)())}function Bo(){const e=(0,$o.W6)();return{...e,goBack:t=>{"POP"===e.action&&e.length<=2?e.push(t):e.goBack()}}}function Lo(){return(0,$o.zy)()}function Vo(){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 Uo=n(2499),Go=n(9241);function Wo(e){return"number"==typeof e&&!isNaN(e)}function qo(e){return e?{lat:e.latitude,lng:e.longitude}:null}const Ho=qo({latitude:43.6087733,longitude:3.87963579999996});function Ko(e){return Wo(e.latitude)&&Wo(e.longitude)?(0,En.A)(e,["latitude","longitude"]):void 0}function Yo(e){return e===se.GoogleSatellite?"satellite":e===se.Google?"roadmap":e??se.Google}let Zo=class{translationService;constructor(e){this.translationService=e}t(e,...t){return this.translationService.translate(e,...t)}};Zo=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Wt])],Zo);let Jo=class extends Zo{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))))}};Jo=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Wt])],Jo);let Xo=class extends Jo{constructor(e){super(e)}accreditationsCustomFieldInputSchema(){return on.Ik().shape({customFieldId:on.ai().required(this.t("le_champ_person_80074")),conditionValue:on.gl().required(this.t("la_condition_es_66568"))})}};Xo=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Wt])],Xo);const Qo=on.gl(e=>e&&xi.c9.fromISO(e).isValid);let er=class extends Jo{constructor(e){super(e)}accreditationsSlotInputDefault(){return{name:""}}createAccreditationSlotSchema(){return on.Ik().shape({slot:this.accreditationsSlotInputSchema()})}accreditationsSlotInputSchema(){return on.Ik().shape({name:on.Yj(),maxResources:on.ai().nullable(),date:Qo.typeError(this.t("la_date_est_inv_22002")).nullable()})}};er=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Wt])],er);let tr=class extends Jo{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 on.Ik().shape({name:on.Yj().required(this.t("le_nom_de_l_acc_82676")),accreditationCategoryId:on.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:on.Yj(),privateNote:on.Yj(),acronym:on.Yj(),color:on.Yj().required(this.t("la_couleur_est_95740")),icon:on.Yj().required(this.t("l_ic_ne_est_req_15843")).oneOf(yt,this.t("l_ic_ne_est_req_15843")),weezeventIsSynchronized:on.zM().required(),address:on.Yj().nullable(),latitude:on.ai().nullable().typeError(this.t("la_latitude_doi_43118")),longitude:on.ai().nullable().typeError(this.t("la_longitude_do_35170")),zoom:on.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:on.Yj().required(this.t("le_fond_de_cart_48524")).oneOf(It,this.t("le_fond_de_cart_48524")),slots:on.YO().of(this.accreditationsSlotInput.accreditationsSlotInputSchema()),accreditationDisplay:on.Yj().required(this.t("le_type_d_affic_60154")).oneOf(ct,this.t("le_type_d_affic_60154")).test("calendar-slots",this.t("tous_les_cr_nea_42033"),(e,t)=>e!==u.Calendar||a(t.parent.slots)&&t.parent.slots.every(e=>e.date?.isValid)),numberOfDaysLimit:on.ai().notRequired(),accreditationsCustomFields:on.YO().of(this.accreditationsCustomFieldInput.accreditationsCustomFieldInputSchema()),formCustomFields:on.YO(),tagsIds:on.YO().of(on.ai())})}createUpdateAccreditationSchema(){return on.Ik().shape({accreditation:this.accreditationInputSchema()})}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??kn.colors.primary700.value,icon:t?.icon??te.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??u.List,numberOfDaysLimit:t?.numberOfDaysLimit??null,slots:(0,Uo.A)(t?.slots??[],e=>(0,Go.A)([e.date?.toMillis(),e.name])),conditionsOperator:t?.conditionsOperator??w.And,accreditationsCustomFields:t?.accreditationsCustomFields??[],tagsIds:t?.tagsIds??[],fields:t?.fields??{},formCustomFields:t?.formCustomFields??[]}}};function nr(e){let t=e;try{t=new URL(e).pathname}catch{}if(an(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 ir;tr=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Wt,Xo,er])],tr),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"}(ir||(ir={}));const or=e=>{switch(e.toLowerCase()){case"csv":return ir.Csv;case"xls":case"xlsx":return ir.Excel;case"gif":return ir.Gif;case"jpg":case"jpeg":return ir.Jpeg;case"pdf":return ir.Pdf;case"png":return ir.Png;case"zip":return ir.Zip;default:return ir.Default}};let rr=class extends Jo{constructor(e){super(e)}schema(){const e=this.t("le_document_est_86403");return on.Ik().shape({acl:on.Yj().required(e),key:on.Yj().required(e).test("is-a-zip",this.t("le_fichier_n_es_91526"),e=>or(nr(e).extension)===ir.Zip),name:on.Yj().required(e),file:on.gl().test("is-not-too-big",this.t("le_fichier_est_17522"),e=>!e||e.size<5e9)})}};rr=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Wt])],rr);let sr=class extends Jo{constructor(e){super(e)}signInSchema(){return on.Ik().shape({email:this.email()})}signInPasswordSchema(){return on.Ik().shape({email:this.email(),password:this.password()})}codeSchema(){return on.Ik().shape({code:this.code()})}emailSchema(){return on.Ik().shape({email:this.email()})}emailConfirmSchema(){return on.Ik().shape({email:this.email(),emailConfirm:this.emailConfirm()})}emailCodeSchema(){return on.Ik().shape({email:this.email(),code:this.code()})}email(){return on.Yj().required(this.t("l_e_mail_est_re_04856")).email(this.t("l_e_mail_est_re_04856"))}emailConfirm(){return on.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 on.Yj().required(this.t("le_code_est_req_77618")).length(6,this.t("le_code_doit_co_37160"))}password(){return on.Yj().required(this.t("le_mot_de_passe_14773"))}passwordRules(){return on.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})}};sr=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Wt])],sr);let ar=class extends Jo{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 on.Ik().shape({name:on.Yj().required(this.t("le_nom_de_l_org_60618")),periodEndAt:Qo.required(this.t("la_date_de_fin_04076")).typeError(this.t("la_date_de_fin_04076")),features:on.YO().of(on.Yj().oneOf(bt,this.t("les_fonctionnal_36778"))),usersIds:on.YO().of(on.ai()),isBlocked:on.zM().required()})}updateOrganizationSchema(){return on.Ik().shape({organization:this.organizationInputSchema()})}};ar=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Wt])],ar);var cr=n(5526);function lr(e){return"string"!=typeof e||""===e.trim()||rn(e.toLowerCase())===e}const dr=[" ","@","£","$","¥","è","é","ù","ì","ò","Ç","Ø","ø","Å","å","Æ","æ","ß","É","!",'"',"#","¤","%","&","'","(",")","*","+",",","-",".","/","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"]);const ur=/^[a-z][a-z0-9]{2,10}$/i;var hr;!function(e){e.Accreditations="accreditations",e.Everyone="everyone",e.Positions="positions",e.Segments="segments",e.States="states",e.Users="users"}(hr||(hr={}));let mr=class extends Jo{constructor(e){super(e)}createUpdateCampaignValuesDefault(e,t,n,i,o){const r=this.campaignInputDefault(e,t,n,i,o);return{campaign:r,recipients:r.sendToEveryone?hr.Everyone:a(r.states)?hr.States:a(r.usersInfosIds)?hr.Users:a(r.segmentsIds)?hr.Segments:a(r.accreditationsCategoriesIds)||a(r.accreditationsIds)||a(r.accreditationsSlotsIds)?hr.Accreditations:hr.Positions,customSender:an(i?.sender),textOrHtml:an(i?.html)?"html":"text",delivery:r.state===k.Scheduled&&i?.scheduledAt?.isValid?"later":"now"}}campaignStep1Fields(){return{name:on.Yj().required(this.t("le_nom_de_la_ca_63405")),campaignType:on.Yj().required(this.t("le_type_de_camp_96559")).oneOf(ut,this.t("le_type_de_camp_56467"))}}campaignStep1Schema(){return on.Ik().shape({campaign:on.Ik().shape({...this.campaignStep1Fields()})})}campaignStep2Fields(){const e=this;return{sender:on.Yj().test("is-valid",this.t("l_metteur_ne_r_16421"),function(){return!an(this.parent.sender)||ur.test(this.parent.sender)}),text:on.Yj().test("non-empty-text",this.t("le_contenu_est_45048"),function(){return an(this.parent.text)||an(this.parent.html)}).test("only-valid-characters","",function(){if(this.parent.campaignType===v.Email)return!0;{const n=(t=this.parent.text,new Set(Array.from(t??"").filter(e=>!dr.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===v.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:on.Yj().when("campaignType",{is:v.Email,then:e=>e.required(this.t("le_sujet_est_re_18923"))}),html:on.Yj().test("non-empty-text",this.t(this.t("le_code_html_es_52280")),function(){return an(this.parent.text)||an(this.parent.html)}),replyTo:on.Yj().email(this.t("l_adresse_de_r_53879")).test("clean-reply-to",this.t("l_adresse_de_r_53879"),function(){return lr(this.parent.replyTo)}),documents:on.YO().test("max-size",this.t("l_ensemble_des_32797"),function(){return this.parent.campaignType!==v.Email||!a(this.parent.documents)||(0,cr.A)(this.parent.documents,e=>e.size)<2e7}),emailSenderId:on.ai().nullable(),attachments:on.YO().of(on.Yj()),hasCalendarInvite:on.zM().required(),calendarInviteName:on.Yj().when("hasCalendarInvite",{is:!0,then:e=>e.required(this.t("nom_de_l_v_nem_58512")),otherwise:e=>e.nullable()}),calendarInviteStartDate:Qo.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:on.Yj().when("hasCalendarInvite",{is:!0,then:e=>e.required(this.t("heure_de_d_but_90785")),otherwise:e=>e.nullable()}),calendarInviteEndDate:Qo.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:on.Yj().when("hasCalendarInvite",{is:!0,then:e=>e.required(this.t("l_heure_de_fin_78626")),otherwise:e=>e.nullable()})}}campaignStep2Schema(){return on.Ik().shape({campaign:on.Ik().shape({...this.campaignStep2Fields()})})}campaignStep3Fields(){const e=this,t=function(){return!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:on.zM().required(this.t("requis_75853")),states:on.YO().of(on.Yj()).test("non-empty","",t),positionsCategoriesIds:on.YO().of(on.ai()).test("non-empty","",t),positionsIds:on.YO().of(on.ai()).test("non-empty","",t),positionsSlotsIds:on.YO().of(on.ai()).test("non-empty","",t),tagsIds:on.YO().of(on.ai()).test("non-empty","",t),accreditationsCategoriesIds:on.YO().of(on.ai()).test("non-empty","",t),accreditationsIds:on.YO().of(on.ai()).test("non-empty","",t),accreditationsSlotsIds:on.YO().of(on.ai()).test("non-empty","",t),usersInfosIds:on.YO().of(on.ai()).test("non-empty","",t),segmentsIds:on.YO().of(on.ai()).test("non-empty","",t)}}campaignStep3Schema(){return on.Ik().shape({campaign:on.Ik().shape({...this.campaignStep3Fields()})})}campaignStep4Fields(){return{scheduledAtDate:Qo.when("state",{is:k.Scheduled,then:e=>e.required(this.t("la_date_d_envoi_17792")).typeError(this.t("la_date_d_envoi_17792"))}),scheduledAtTime:on.Yj().when("state",{is:k.Scheduled,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 on.Ik().shape({campaign:on.Ik().shape({...this.campaignStep4Fields()})})}campaignInputSchema(){return on.Ik().shape({...this.campaignStep1Fields(),...this.campaignStep2Fields(),...this.campaignStep3Fields(),...this.campaignStep4Fields()})}createUpdateCampaignSchema(){return on.Ik().shape({campaign:this.campaignInputSchema()})}campaignInputDefault(e,t,n,i,o){let r=i?.segmentsIds??[],s=i?.usersInfosIds??[];if(an(o))try{const e=JSON.parse(ai(o));e.segmentId&&(r=[e.segmentId]),a(e.usersInfosIds)&&(s=e.usersInfosIds)}catch{}const c=!a(r)&&!a(s)&&(i?.sendToEveryone??e);return{name:i?.name??"",state:i?.state??(t?k.Template:k.Draft),campaignType:i?.campaignType??v.Email,sender:i?.sender??"",text:i?.text??"",subject:i?.subject??"",html:i?.html??"",replyTo:i?.replyTo??"",sendToEveryone:c,states:i?.states??[],positionsCategoriesIds:i?.positionsCategoriesIds??[],positionsIds:i?.positionsIds??[],positionsSlotsIds:i?.positionsSlotsIds??[],tagsIds:i?.tagsIds??[],accreditationsCategoriesIds:i?.accreditationsCategoriesIds??[],accreditationsIds:i?.accreditationsIds??[],accreditationsSlotsIds:i?.accreditationsSlotsIds??[],usersInfosIds:s,segmentsIds:r,scheduledAtDate:i?.scheduledAt??void 0,scheduledAtTime:i?.scheduledAt?.toFormat("HH:mm")??void 0,documents:i?.documents??[],emailSenderId:i?.emailSenderId??n,attachments:i?.attachments??[],hasCalendarInvite:i?.hasCalendarInvite??!1,calendarInviteName:i?.calendarInviteName??null,calendarInviteStartDate:i?.calendarInviteStartDate??null,calendarInviteStartTime:i?.calendarInviteStartTime??null,calendarInviteEndDate:i?.calendarInviteEndDate??null,calendarInviteEndTime:i?.calendarInviteEndTime??null}}};mr=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Wt])],mr);let gr=class extends Jo{constructor(e){super(e)}commentInputDefault(){return{content:""}}commentInputSchema(){return on.Ik().shape({content:on.Yj().required(this.t("le_commentaire_33393"))})}createCommentSchema(){return on.Ik().shape({comment:this.commentInputSchema()})}};gr=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Wt])],gr);var pr=n(4809),fr=n.n(pr);const _r=2e7;let br=class extends Jo{constructor(e){super(e)}csvDocumentInputDefault(e){return{key:"",name:"",acl:"",formats:{timeFormat:"HH:mm",dateFormat:Pi,datetimeFormat:"yyyy-MM-dd HH:mm",...e}}}schema(){const e=this.t("le_document_est_86403");return on.Ik().shape({acl:on.Yj().required(e),delimiter:on.Yj().optional().test("is-valid-value",this.t("delimiter_value_52108"),e=>!e||!fr().BAD_DELIMITERS.includes(e)),key:on.Yj().required(e).test("is-a-csv",this.t("le_fichier_n_es_33134"),e=>or(nr(e).extension)===ir.Csv),name:on.Yj().required(e),newline:on.Yj().optional().test("is-valid-value",this.t("newline_charact_88066"),e=>!e||["\r","\n","\r\n"].includes(e)),quoteChar:on.Yj().optional(),formats:on.Ik().shape({timeFormat:on.Yj().optional(),dateFormat:on.Yj().optional(),datetimeFormat:on.Yj().optional()}),file:on.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<_r)})}};br=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Wt])],br);const kr=1123,vr=794;let Ar=class extends Jo{constructor(e){super(e)}customDocumentInputDefault(e){return{name:e?.name??"",slug:e?.slug??"",populationsIds:e?.populationsIds??[],configuration:e?.configuration??this.getConfigurationDefault()}}customDocumentInputSchema(){return on.Ik().shape({name:on.Yj().required(this.t("le_nom_est_requ_61536")),slug:on.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:kr,pages:[this.getPageDefault()],width:vr}}getPageDefault(){return{id:qi(),accreditationsSlotsIds:[],accreditationAcronym:"",conditionsCustomFields:[],elements:[],hasConditions:!1,positionsSlotsIds:[]}}getContainerElementDefault(e,t,n){return{type:"container",id:e,inContainer:t,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,top:0,width:100,zIndex:1}}getImageElementDefault(e,t,n){return{type:"image",id:e,inContainer:t,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,top:0,width:100,zIndex:1}}getTextElementDefault(e,t,n){return{type:"text",id:e,inContainer:t,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,textTransform:"none",top:0,width:100,zIndex:1}}};Ar=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Wt])],Ar);const yr=["key","name","acl"];let wr=class extends Jo{constructor(e){super(e)}documentInputDefault(){return{key:"",name:"",acl:""}}documentInputSchema(e){const t=an(e)?this.t("_1_est_requis_99856",e):this.t("le_document_est_86403");return on.Ik().shape({key:on.Yj().required(t),name:on.Yj().required(t),acl:on.Yj().required(t)})}documentInputSchemaNotRequired(){return on.Ik().shape({key:on.Yj(),name:on.Yj(),acl:on.Yj()})}};wr=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Wt])],wr);let Cr=class extends Jo{documentInputService;constructor(e,t){super(t),this.documentInputService=e}customFieldInputDefault(e,t){return{name:e?.name??"",label:e?.label??"",customFieldCategoryId:e?.customFieldCategoryId??t[0].id,description:e?.description??"",variety:e?.variety??E.UserInfo,fieldType:e?.fieldType??K.Text,isPrivate:e?.isPrivate??!1,values:a(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}}customFieldInputSchema(){return on.Ik().shape({name:on.Yj().required(this.t("le_nom_du_champ_17959")),label:on.Yj(),customFieldCategoryId:on.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:on.Yj().required(this.t("le_type_est_req_41180")).oneOf(kt,this.t("le_type_est_req_41180")),isPrivate:on.zM().nullable(),hasCondition:on.zM().nullable(),values:on.YO().when("fieldType",{is:K.Select,then:e=>e.of(on.Ik().shape({id:on.ai(),value:on.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:on.ai().when("hasCondition",{is:!0,then:e=>e.required(),otherwise:e=>e.nullable()}),conditionValue:on.gl(),canSelectMultiple:on.zM().nullable(),document:this.documentInputService.documentInputSchemaNotRequired(),isEncrypted:on.zM().required()})}createUpdateCustomFieldSchema(){return on.Ik().shape({customField:this.customFieldInputSchema()})}};Cr=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[wr,Wt])],Cr);class Ir extends Jo{constructor(e){super(e)}customSlotInputDefault(){return{name:"",startTime:"",endTime:""}}customSlotInputSchema(){return on.Ik().shape({name:on.Yj().required(this.t("le_nom_du_cr_ne_97703")),startTime:on.Yj().required(this.t("le_d_but_du_cr_40745")),endTime:on.Yj().required(this.t("la_fin_du_cr_ne_90351"))})}}let xr=class extends Jo{customSlotInputService;constructor(e,t){super(e),this.customSlotInputService=t}customSlotPeriodInputDefault(){return{name:"",customSlots:[this.customSlotInputService.customSlotInputDefault()],hideNameDates:!1,displayAsCalendar:!1}}};xr=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Wt,Ir])],xr);let Sr=class extends Jo{constructor(e){super(e)}delegationFormInviteValuesDefault(){return{usersInfos:[{email:"",fields:{firstName:"",lastName:""}}]}}delegationFormInviteValuesSchema(){return on.Ik().shape({usersInfos:on.YO().of(on.Ik().shape({email:on.Yj().email(this.t("l_e_mail_est_re_04856")).required(this.t("l_e_mail_est_re_04856")),fields:on.gl()})).min(1,"Vous devez invité au moins une personne.")})}};Sr=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Wt])],Sr);var Er=n(5582);function jr(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.",addMemberButton:"Ajouter un invité",tabMembers:"Invités ({1})",tabAccreditations:"Invitations",dashboardLeaders:"Exposants"}:3136===e?{connectionTitle:"Connexion à mon espace",connectionSubtitle:"Connecter sur votre espace afin de suivre vos demandes d’accréditation",delegationsListTitle:"quelle_d_l_gati_13930",delegationsListButton:"voir_cette_d_l_96190",delegationHeader:"g_rer_votre_d_l_49654",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",addMemberButton:"ajouter_un_memb_33261",tabMembers:"membres_125561",tabAccreditations:"accr_ditations_39450",dashboardLeaders:"reponsable_82458_plural"}}let Tr=class extends Jo{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??-1,o=a(t?.delegationsCategories)&&t?.parentDelegation?t.delegationsCategories.find(e=>e.name===t.parentDelegation?.delegationCategory.name):null;let r=e?.delegationCategoryId??o?.id??t?.delegationCategoryId;return Number.isInteger(r)||(r=null),{...this.getDefaultAccreditations(e),delegationCategoryId:r,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,columns:e?.columns??t?.parentDelegation?.columns??["name","accreditations","accreditation_state"],canLeadersAddMembers:e?.canLeadersAddMembers??!0,canLeadersDeleteMembers:e?.canLeadersDeleteMembers??!0,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,tagsIds:e?.tagsIds??t?.parentDelegation?.tagsIds??[],customFields:e?.customFields||[],fields:e?.fields??{},campaignsIds:e?.campaignsIds??[],customDocumentsSlugs:e?.customDocumentsSlugs??[],usedCustomFieldsIds:e?.usedCustomFieldsIds??[]}}delegationInputSchema(){return on.Ik().shape({parentId:on.ai().nullable(),name:on.Yj().when("parentId",{is:null,then:e=>e.required(this.t("le_nom_de_la_d_10042"))}),description:on.Yj(),delegationCategoryId:on.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:on.YO().of(on.ai()),formId:on.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:Qo.typeError(this.t("la_date_limite_91708")).nullable(),maxResources:on.ai().min(0).nullable(),showInDelegationSpace:on.zM().required(),showFormLinkInDelegationSpace:on.zM().required(),columns:on.YO().of(on.Yj()).required(this.t("vous_devez_choi_82605")).min(1,this.t("vous_devez_choi_82605")),canLeadersAddMembers:on.zM().required(),canLeadersDeleteMembers:on.zM().required(),canLeadersEditColumns:on.zM().required(),canLeadersEditMembers:on.zM().required(),canLeadersEditCustomFields:on.zM().required(),canLeadersImportMembers:on.zM().required(),canLeadersSeeHiddenAccreditationsSlots:on.zM().required(),privateNote:on.Yj(),accreditations:on.YO().of(on.Ik().shape({accreditationCategoryId:on.ai().required(),accreditationId:on.ai().required(),maxResources:on.gl().nullable(),willAutoAccredit:on.zM().required()})),accreditationsSlots:on.YO().of(on.Ik().shape({accreditationCategoryId:on.ai().required(),accreditationId:on.ai().required(),accreditationSlotId:on.ai().required(),isDefault:on.zM().required(),maxResources:on.gl().nullable()})),campaignsIds:on.YO().of(on.ai()),customDocumentsSlugs:on.YO().of(on.gl()),usedCustomFieldsIds:on.YO().of(on.ai())})}createUpdateDelegationSchema(){return on.Ik().shape({delegation:this.delegationInputSchema()})}adminAddSchema(){return on.Ik().shape({usersInfosIds:on.YO().of(on.ai())})}getDefaultAccreditations(e){let t=e?.accreditations||[];const n=e?.accreditationsSlots||[];return c(t)&&a(n)&&(t=(0,Er.A)(n,e=>e.accreditationId).map(e=>({accreditationCategoryId:e.accreditationCategoryId,accreditationId:e.accreditationId,maxResources:null,willAutoAccredit:!1}))),{accreditations:t,accreditationsSlots:n}}};Tr=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Wt])],Tr);var Dr;let Pr=class extends Jo{static{Dr=this}csvInputService;static IMPORT_COLUMNS_DEFAULT={Id:"id"};static IMPORT_COLUMNS_REQUIRED=e=>e===ne.Update?[Dr.IMPORT_COLUMNS_DEFAULT.Id]:[];constructor(e,t){super(t),this.csvInputService=e}default(e){return{input:{csv:this.csvInputService.csvDocumentInputDefault(e),mode:ne.CreateUpdate}}}schema(){return on.Ik().shape({input:on.Ik().shape({csv:this.csvInputService.schema(),mode:on.Yj().oneOf(wt,this.t("le_mode_d_impor_75706"))})})}};Pr=Dr=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[br,Wt])],Pr);let Rr=class extends Pr{csvInputService;default(e){return{input:{csv:this.csvInputService.csvDocumentInputDefault(e),mappings:[],presets:[],mode:ne.CreateUpdate,tag:""}}}schema(){return on.Ik().shape({input:on.Ik().shape({csv:this.csvInputService.schema(),mappings:on.YO().of(on.Yj().nullable()),presets:on.YO().of(on.Ik().shape({customFieldId:on.ai().positive(this.t("le_choix_du_typ_07079")),value:on.gl().when("customFieldId",{is:e=>e>-1,then:e=>e.required(this.t("la_valeur_du_ch_65599"))})})),mode:on.Yj().oneOf(wt,this.t("le_mode_d_impor_75706")),tag:on.Yj().required("a_tag_must_be_s_23274")})})}constructor(e,t){super(e,t),this.csvInputService=e}};Rr=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[br,Wt])],Rr);var Or;let Fr=class extends Rr{static{Or=this}csvInputService;static IMPORT_COLUMNS_DEFAULT={...Rr.IMPORT_COLUMNS_DEFAULT,CategoryName:"categoryName",Name:"name",FormId:"formId",Deadline:"deadline",MaxResources:"maxResources",LeadersEmails:"leadersEmails",LeadersFirstNames:"leadersFirstnames",LeadersLastNames:"leadersLastnames",PrivateNote:"privateNote",Tags:"tags"};static IMPORT_COLUMNS_REQUIRED=e=>[...e===ne.Update?[Or.IMPORT_COLUMNS_DEFAULT.Id]:[],Or.IMPORT_COLUMNS_DEFAULT.Name,Or.IMPORT_COLUMNS_DEFAULT.FormId];constructor(e,t){super(e,t),this.csvInputService=e}};Fr=Or=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[br,Wt])],Fr);function zr(e){return{gray50:e?.gray50??kn.colors.gray50.value,gray500:e?.gray500??kn.colors.gray500.value,gray700:e?.gray700??kn.colors.gray700.value,gray800:e?.gray800??kn.colors.gray800.value,gray900:e?.gray900??kn.colors.gray900.value,primary700:e?.primary700??kn.colors.primary700.value,primary800:e?.primary800??kn.colors.primary800.value}}let Mr=class extends Jo{documentInputService;constructor(e,t){super(t),this.documentInputService=e}organizationDesignInputDefault(e){return{banner:e?.banner??this.documentInputService.documentInputDefault(),logo:e?.logo??this.documentInputService.documentInputDefault(),colors:zr(e?.colors)}}formParametersDesignInputDefault(e){return{banner:e?.banner??this.documentInputService.documentInputDefault(),colors:zr(e?.colors)}}};Mr=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[wr,Wt])],Mr);let $r=class extends Jo{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 on.Ik().shape({header:this.documentInputService.documentInputSchemaNotRequired(),picture:this.documentInputService.documentInputSchemaNotRequired(),signature:on.Yj(),name:on.Yj().required(this.t("le_label_est_re_86986")),fromEmail:on.Yj().required(this.t("l_e_mail_de_l_56279")),fromName:on.Yj().required(this.t("le_nom_de_l_me_01331")),replyTo:on.Yj()})}createUpdateEmailSenderSchema(){return on.Ik().shape({emailSender:this.emailSenderInputSchema()})}};$r=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Wt,wr])],$r);const Nr=Ii.EMAIL_FROM_NAME;function Br(e){throw new Error("Didn't expect to get here")}let Lr=class extends Jo{constructor(e){super(e)}emailTemplateDefault(e,t,n,i,o){const r=this.emailTypeToDefault(e,t,i,o);return n&&(r.subject=n.subject,r.content=n.content),{useDefault:n?.useDefault??!0,emailType:e,emailSenderId:n?.emailSenderId,attachments:n?.attachments??[],...r}}emailTemplateSchema(){return on.Ik().shape({useDefault:on.zM().required(""),emailType:on.Yj().required(this.t("le_type_d_e_mai_84281")).oneOf(_t,this.t("le_type_d_e_mai_84281")),subject:on.Yj().when("useDefault",{is:!1,then:e=>e.required(this.t("le_sujet_est_re_18923"))}),content:on.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===B.Code)||this.parent.content.includes("{code}")})}),attachments:on.YO().of(on.Yj())})}updateEmailTemplateSchema(){return on.Ik().shape({emailTemplate:this.emailTemplateSchema()})}emailTypeToDefault(e,t,n,i){switch(e){case B.Accreditations:return this.accreditationsDefault();case B.AccreditationsRefused:return this.accreditationsRefusedDefault();case B.Assignments:return this.assignmentsDefault();case B.Code:return this.codeDefault(n,i);case B.FormInvite:return this.formInviteDefault();case B.FormSubmit:return this.formSubmitDefault(n);case B.NotifyLeaders:return this.notifyLeadersDefault(t);case B.DelegationCategoryLeaderAssign:return this.delegationCategoryLeaderAssign(t);case B.DelegationFormInvite:return this.delegationFormInviteDefault();case B.DelegationLeaderAssign:return this.delegationLeaderAssign();case B.PositionCategoryLeaderAssign:return this.positionCategoryLeaderAssignDefault(t);case B.PositionLeaderAssign:return this.positionLeaderAssign(t);case B.Refused:return this.refusedDefault();case B.VolunteerRegistration:return this.volunteerRegistrationDefault();case B.Campaign:case B.DelegationsImport:case B.FilesImport:case B.Documents:case B.EventInvite:case B.Export:case B.MembersImport:case B.NewMember:case B.NewVolunteer:case B.OrganizationInvite:case B.PositionsImport:throw new Error("Impossible to change this email");default:return Br()}}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,Nr)}}delegationCategoryLeaderAssign(e){return{subject:this.t("_event_name_69973"),content:this.t("_p_bonjour_use_97817",Nr,e.href,Nr)}}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",Nr,e.href,Nr)}}positionLeaderAssign(e){return{subject:this.t("_event_name_60486"),content:this.t("leader_assign_default_1",Nr,e.href,Nr)}}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")}}};Lr=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Wt])],Lr);let Vr=class extends Jo{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,includeDelegations:!0,includeForms:!0,includePositions:!0,includeSegments:!0,includeTemplates:!0,includeWorkflows:!0}}eventDuplicateSchema(){return on.Ik().shape({name:on.Yj().required(this.t("le_nom_est_requ_61536")),startAt:Qo.required(this.t("la_date_d_but_d_30022")).typeError(this.t("la_date_d_but_d_30022")),endAt:Qo.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 xi.c9.isDateTime(this.parent.startAt)&&this.parent.startAt.isValid&&xi.c9.isDateTime(this.parent.endAt)&&this.parent.endAt.isValid&&this.parent.endAt>=this.parent.startAt}),includeAccreditations:on.zM(),includeCustomDocuments:on.zM(),includeDelegations:on.zM(),includeForms:on.zM(),includePositions:on.zM(),includeSegments:on.zM(),includeTemplates:on.zM(),includeWorkflows:on.zM()})}};Vr=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Wt])],Vr);let Ur=class{countries;countriesCodes;phoneCodes;constructor(e){const t=e.translate.bind(e);this.countries=(0,Uo.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_43680"),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:"+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:"+586",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_43680"),emoji:"🇻🇬"},{phoneCode:"+1340",code:"VI",name:t("virgin_islands_12516"),nationality:t("american_36800"),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})=>rn(e)),this.countriesCodes=this.countries.map(({code:e})=>e),this.phoneCodes=this.countries.flatMap(({phoneCode:e})=>s(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,Uo.A)(this.countries.map(({code:e,name:t})=>({id:e,name:t})),({id:e})=>e===t?1:2)}getNationalitiesIdName(e){const t=this.getDefaultCountryValues(e).user.nationality;return(0,Uo.A)(this.countries.map(({code:e,nationality:t})=>({id:e,name:t})),({id:e})=>e===t?1:2)}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=>s(e.language||[]).map(e=>e.toLowerCase()).includes(navigator.language.toLowerCase()))}catch{}t||(t=this.countries.find(({code:e})=>"FR"===e))}const n=s(t.language||[]);return{user:{language:n.some(e=>e.toLowerCase().startsWith("fr"))?Ee.Fr:n.some(e=>e.toLowerCase().startsWith("es"))?Ee.Es:n.some(e=>e.toLowerCase().startsWith("de"))?Ee.De:n.some(e=>e.toLowerCase().startsWith("nl"))?Ee.Nl:Ee.En,country:t.code,nationality:t.code},phone:{country:t.code,code:s(t.phoneCode)[0]}}}getSmsPriceByPhone(e){return this.countries.find(t=>s(t.phoneCode).some(t=>e.startsWith(t)))?.smsPrice}};Ur=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Wt])],Ur);var Gr=n(7480);const Wr=[Ee.De,Ee.En,Ee.Es,Ee.Fr,Ee.Nl];function qr(e){if(an(e)){const t=(0,Gr.A)(e.trim());return Wr.includes(t)?t:null}return null}const Hr=["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"];const Kr=["country","code","number"];let Yr=class extends Jo{countriesService;constructor(e,t){super(e),this.countriesService=t}basePhoneInputDefault(){return{country:"",code:"",number:""}}phoneInputDefault(e){return{...this.basePhoneInputDefault(),...e.phone}}phoneInputSchema(){return on.Ik().shape({country:on.Yj().required(this.t("le_num_ro_de_t_76885")).oneOf(this.countriesService.countriesCodes,this.t("le_num_ro_de_t_76885")),code:on.Yj().required(this.t("le_num_ro_de_t_76885")).oneOf(this.countriesService.phoneCodes,this.t("le_num_ro_de_t_76885")),number:on.Yj().required(this.t("le_num_ro_de_t_76885"))})}phoneInputSchemaNotRequired(){return on.Ik().nullable().shape({country:on.Yj(),code:on.Yj(),number:on.Yj()})}};Yr=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Wt,Ur])],Yr);let Zr=class extends Jo{countriesService;phoneInputService;constructor(e,t,n){super(n),this.countriesService=e,this.phoneInputService=t}organizationInputDefault(){const e=this.countriesService.getDefaultCountryValues();return{name:"",adminFirstName:"",adminLastName:"",adminPhone:this.phoneInputService.phoneInputDefault(e)}}organizationInputSchema(e){let t=on.Ik().shape({name:on.Yj().required(this.t("le_nom_de_l_org_60618")),adminFirstName:on.Yj().required(this.t("le_pr_nom_est_r_10935")),adminLastName:on.Yj().required(this.t("le_nom_est_requ_61536")),adminPhone:this.phoneInputService.phoneInputSchema()});return e||(t=t.shape({termsAccepted:on.zM().oneOf([!0],this.t("il_est_n_cessai_83896")).required(this.t("il_est_n_cessai_83896"))})),t}createOrganizationSchema(e){return on.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??xi.c9.local().zoneName,emailSenderId:e.emailSenderId,dateFormat:e.dateFormat,datetimeFormat:e.datetimeFormat,timeFormat:e.timeFormat}}organizationInfosInputSchema(){return on.Ik().shape({name:on.Yj().required(this.t("le_nom_de_l_org_60618")),adminName:on.Yj().required(this.t("le_nom_du_respo_43823")),adminEmail:on.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 lr(this.parent.adminEmail)}),street:on.Yj().required(this.t("l_adresse_est_r_40489")),postalCode:on.Yj().required(this.t("le_code_postal_43189")),city:on.Yj().required(this.t("la_ville_est_re_35239")),country:on.Yj().oneOf(this.countriesService.countriesCodes).required(this.t("le_pays_est_req_33749")),emailSenderId:on.ai().nullable(),dateFormat:on.Yj().required(this.t("le_format_est_r_17097")),datetimeFormat:on.Yj().required(this.t("le_format_est_r_17097")),timeFormat:on.Yj().required(this.t("le_format_est_r_17097"))})}updateOrganizationGeneralSchema(){return on.Ik().shape({organization:this.organizationInfosInputSchema()})}};Zr=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Ur,Yr,Wt])],Zr);let Jr=class extends Zo{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??xi.c9.invalid("Invalid"),endAt:e?.endAt??xi.c9.invalid("Invalid"),languages:e?.languages??[t.user.language],timeZone:e?.timeZone??xi.c9.local().zoneName,country:e?.country??t.user.country,layer:e?.layer??se.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}}eventInputSchema(){return on.Ik().shape({name:on.Yj().required(this.t("nom_de_l_v_nem_58512")),description:on.Yj(),startAt:Qo.required(this.t("la_date_d_but_d_30022")).typeError(this.t("la_date_d_but_d_30022")),endAt:Qo.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 xi.c9.isDateTime(this.parent.startAt)&&this.parent.startAt.isValid&&xi.c9.isDateTime(this.parent.endAt)&&this.parent.endAt.isValid&&this.parent.endAt>=this.parent.startAt}),languages:on.YO().of(on.Yj().oneOf(Wr,this.t("les_langues_doi_27712"))).required(this.t("les_langues_son_53717")).min(1,this.t("vous_devez_s_le_16610")),timeZone:on.Yj().required(this.t("le_fuseau_horai_37109")).oneOf(Hr,this.t("le_fuseau_horai_37109")),latitude:on.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:on.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:on.ai().nullable(),dayStartTime:on.Yj().required(this.t("l_heure_laque_87748")),isWeezeventSynchronized:on.zM().required()})}eventOrganizationInputSchema(e){return on.Ik().shape({event:this.eventInputSchema(),organization:this.organizationInputService.organizationInputSchema(e)})}createUpdateEventSchema(){return on.Ik().shape({event:this.eventInputSchema()})}};Jr=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Ur,Zr,Wt])],Jr);var Xr=n(7231),Qr=n(2662);const es=/^[0-9]{11}$/i,ts=xi.c9.now().year-2e3;function ns(e){if(an(e)&&es.test(e)){const t=(0,Qr.A)(e.substring(0,2),10);let n=(0,Qr.A)(e.substring(0,9),10);const i=(0,Qr.A)(e.substring(9),10);return t<=ts&&(n=2e9+n),i===97-n%97}return!1}let is=class{translationService;constructor(e){this.translationService=e}now(){return xi.c9.utc()}invalid(){return xi.c9.invalid("Invalid")}toLocaleString(e,t){return e.toLocaleString(t,{locale:this.translationService.language.toString().toLowerCase()})}};is=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Wt])],is);let os=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 K.Text:case K.Textarea:case K.Time:case K.Address:return t[e.slug]||"";case K.Sex:return this.getSexValue(e,t);case K.Language:return this.getLanguageValue(e,t);case K.Nationality:return this.getNationalityValue(e,t);case K.Country:return this.getCountryValue(e,t);case K.Select:return this.getSelectValue(e,t);case K.Checkbox:case K.Validation:return this.getBooleanValue(e,t);case K.Date:return this.getDateValue(e,t,n.dateFormat);case K.Datetime:return this.getDatetimeValue(e,t,n.datetimeFormat);case K.File:return"name"===n.fileReturnValue?t[e.slug]?.name||"":t[e.slug]?.url||"";case K.Phone:return this.getPhoneValue(e,t);case K.Number:return this.getIntValue(e,t);default:return Br(e.fieldType)}}getValue(e,t){return t[e.slug]}getSelectValues(e,t){const n=s(this.getValue(e,t)??[]);return(0,Go.A)(n.map(t=>e.values.find(e=>e.id===t)?.value))}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 an(i)&&(i=xi.c9.fromISO(i,{zone:"utc"})),xi.c9.isDateTime(i)&&i.isValid?an(n)?i.toFormat(n):this.dateTimeService.toLocaleString(i,Bi.DateOnly.MonthLong):""}getDatetimeValue(e,t,n){let i=this.getValue(e,t);return an(i)&&(i=xi.c9.fromISO(i,{zone:"utc"})),xi.c9.isDateTime(i)&&i.isValid?an(n)?i.toFormat(n):this.dateTimeService.toLocaleString(i,Bi.DateTime):""}getPhoneValue(e,t){return this.getValue(e,t)?.internationalFormat??""}getIntValue(e,t){return this.getValue(e,t)?.toString()??""}getSelectValue(e,t){const n=s(this.getValue(e,t)??[]);return(0,Go.A)(n.map(t=>e.values.find(e=>e.id===t)?.value)).join(", ")}};os=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Ur,is,Wt])],os);const rs=[K.Country,K.Language,K.Nationality,K.Select];function ss(e,t,n){if(e.hasCondition&&e.conditionCustomField){const i=n.find(t=>t.id===e.conditionCustomField.id);if(i){if(ss(i,t,n)){const n=t[e.conditionCustomField.slug];return"boolean"==typeof n&&e.conditionCustomField.fieldType===K.Checkbox?n===e.conditionValue:!(!rs.includes(e.conditionCustomField.fieldType)||!a(e.conditionValue))&&(0,Xr.A)(s(n),e.conditionValue).length>0}return!1}return!1}return!0}const as=Wr.concat(Ct);let cs=class extends Jo{countriesService;documentInputService;phoneInputService;translationService;constructor(e,t,n,i){super(i),this.countriesService=e,this.documentInputService=t,this.phoneInputService=n,this.translationService=i}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)]}))}fieldSchema(e,t){const n=(n,i)=>{if(e.conditionCustomField)return on.Ik().when(e.conditionCustomField.slug,([o])=>t&&(e.conditionCustomField.fieldType===K.Checkbox&&o===e.conditionValue||rs.includes(e.conditionCustomField.fieldType)&&a(e.conditionValue)&&(0,Xr.A)(s(o),e.conditionValue).length>0)?n():i());{let e;return e=t?n():i(),e}};switch(e.fieldType){case K.File:return n(()=>this.documentInputService.documentInputSchema(e.name),()=>this.documentInputService.documentInputSchemaNotRequired());case K.Phone:return n(()=>this.phoneInputService.phoneInputSchema(),()=>this.phoneInputService.phoneInputSchemaNotRequired());case K.Text:case K.Textarea:case K.Time:case K.Address:return e.fieldProperty===H.Eid?n(()=>on.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"),ns),()=>on.Yj()):n(()=>on.Yj().required(this.t("_1_est_requis_99856",e.name)).typeError(this.t("_1_est_requis_99856",e.name)),()=>on.Yj());case K.Number:return n(()=>on.ai().required(this.t("_1_est_requis_99856",e.name)).typeError(this.t("_1_est_requis_99856",e.name)),()=>on.ai().nullable());case K.Checkbox:return n(()=>on.zM().required(this.t("_1_est_requis_99856",e.name)).typeError(this.t("_1_est_requis_99856",e.name)),()=>on.zM());case K.Validation:return n(()=>on.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)),()=>on.zM());case K.Select:return e.canSelectMultiple?n(()=>on.YO().of(on.ai().required()).required(this.t("_1_est_requis_99856",e.name)).min(1,this.t("vous_devez_s_le_55757",e.name)),()=>on.YO().of(on.ai())):n(()=>on.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)),()=>on.ai().oneOf(e.values.map(({id:e})=>e),this.oneOfMessage(e.name,e.values.map(({value:e})=>e))));case K.Date:case K.Datetime:return n(()=>Qo.required(this.t("_1_est_requis_99856",e.name)).typeError(this.t("la_date_est_inv_22002",e.name)),()=>on.gl().nullable());case K.Sex:return n(()=>on.Yj().oneOf(Ot,this.oneOfMessage(e.name,Ot)).required(this.t("_1_est_requis_99856",e.name)).typeError(this.t("_1_est_requis_99856",e.name)),()=>on.Yj().oneOf(Ot,this.oneOfMessage(e.name,Ot)));case K.Language:return n(()=>on.Yj().oneOf(as,this.oneOfMessage(e.name,as)).required(this.t("_1_est_requis_99856",e.name)).typeError(this.t("_1_est_requis_99856",e.name)),()=>on.Yj().oneOf(as,this.oneOfMessage(e.name,as)));case K.Nationality:case K.Country:return n(()=>on.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)),()=>on.Yj().oneOf(this.countriesService.countriesCodes,this.oneOfMessage(e.name,this.countriesService.countriesCodes)));default:return Br(e.fieldType)}}fieldUpdateInputDefault(e,t,n){switch(e.fieldType){case K.Checkbox:case K.Validation:return!!n&&void 0;case K.File:return this.documentInputService.documentInputDefault();case K.Phone:return this.phoneInputService.phoneInputDefault(t);case K.Select:return e.canSelectMultiple?[]:void 0;case K.Address:case K.Date:case K.Datetime:case K.Language:case K.Number:case K.Sex:case K.Text:case K.Textarea:case K.Time:return;case K.Country:return t.user.country;case K.Nationality:return t.user.nationality;default:return Br(e.fieldType)}}getFieldValue(e,t){const n=e[t.slug];return t.fieldType===K.Phone&&n?(0,En.A)(n,Kr):t.fieldType===K.File?(0,En.A)(n,yr):t.fieldType===K.Date&&n?xi.c9.fromISO(n,{zone:"UTC"}):n}};cs=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Ur,wr,Yr,Wt])],cs);let ls=class extends Jo{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 on.Ik().shape({input:on.Ik().shape({archive:this.archiveInputService.schema(),fieldId:on.Yj().required(this.t("le_champ_person_80074")).typeError(this.t("le_champ_person_80074"))})})}};ls=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[wr,rr,Wt])],ls);let ds=class extends sr{constructor(e){super(e)}step1Schema(){return on.Ik().shape({email:this.email()})}step2Schema(){return on.Ik().shape({email:this.email(),code:this.code(),password:this.passwordRules()})}};ds=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Wt])],ds);let us=class extends Jo{constructor(e){super(e)}formInputDefault(){return{name:""}}formInputSchema(){return on.Ik().shape({name:on.Yj().required(this.t("le_nom_est_requ_61536"))})}createFormSchema(){return on.Ik().shape({form:this.formInputSchema()})}};us=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Wt])],us);let hs=class extends Jo{constructor(e){super(e)}formParametersAccreditationsInputDefault(e){return{accreditationDisplay:e?.accreditationDisplay||ke.None,accreditationFilter:e?.accreditationFilter||ye.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 on.Ik().shape({accreditationDisplay:on.Yj().required(this.t("la_strat_gie_d_70458")).oneOf(jt,this.t("la_strat_gie_d_70458")),accreditationFilter:on.Yj().required(this.t("la_strat_gie_de_28051")).oneOf(Pt,this.t("la_strat_gie_de_28051")),hiddenAccreditationsIds:on.YO().of(on.ai()),showFullAccreditation:on.zM().required(),showAccreditationDescription:on.zM().required(),accreditationTitle:on.Yj(),accreditationSubtitle:on.Yj()})}updateFormParametersAccreditationsSchema(){return on.Ik().shape({form:this.formParametersAccreditationsInputSchema()})}};hs=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Wt])],hs);let ms=class extends Jo{constructor(e){super(e)}formParametersAvailabilitiesInputDefault(e){return{slotDisplay:e?.slotDisplay||we.Hide,daysDisplay:e?.daysDisplay||ve.AllDays,customSlotsPeriods:e?.customSlotsPeriods??[],slotTitle:e?.slotTitle||"",slotSubtitle:e?.slotSubtitle||""}}formParametersAvailabilitiesInputSchema(){return on.Ik().shape({slotDisplay:on.Yj().required(this.t("la_strat_gie_d_34961")).oneOf(Rt,this.t("la_strat_gie_d_34961")),daysDisplay:on.Yj().required(this.t("la_strat_gie_de_56435")).oneOf(Tt,this.t("la_strat_gie_de_56435"))})}updateFormParametersAvailabilitiesSchema(){return on.Ik().shape({form:this.formParametersAvailabilitiesInputSchema()})}};ms=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Wt])],ms);let gs=class extends Jo{constructor(e){super(e)}formParametersBroadcastInputDefault(e){return{segmentsIds:(e?.segments??[]).map(e=>e.segmentId),noAccessTitle:e?.noAccessTitle||"",noAccessMessage:e?.noAccessMessage||""}}formParametersBroadcastInputSchema(){return on.Ik().shape({segmentsIds:on.YO().of(on.ai())})}updateFormParametersBroadcastSchema(){return on.Ik().shape({form:this.formParametersBroadcastInputSchema()})}};gs=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Wt])],gs);let ps=class extends Jo{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||"",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}}formParametersGeneralInputSchema(){return on.Ik().shape({name:on.Yj().required(this.t("le_nom_est_requ_61536")),allowMultiProfiles:on.zM().required(),setAssignmentStateToWaiting:on.zM().required(),setAccreditationStateToWaiting:on.zM().required(),description:on.Yj(),successMessage:on.Yj(),areTeamsAllowed:on.zM().required(),maxTeamMembers:on.ai().nullable(),teamMemberFillFullForm:on.zM().required(),informationTitle:on.Yj(),registerButtonText:on.Yj()})}updateFormParametersGeneralSchema(){return on.Ik().shape({form:this.formParametersGeneralInputSchema()})}};ps=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Wt])],ps);let fs=class extends Jo{constructor(e){super(e)}formParametersMissionsInputDefault(e){return{positionDisplay:e?.positionDisplay||Ae.None,positionFilter:e?.positionFilter||ye.FilterWithSlots,positionRanking:e?.positionRanking||X.Unranked,positionLimit:e?.positionLimit||3,hiddenPositionsCategoriesIds:e?.hiddenPositionsCategoriesIds||[],hiddenPositionsIds:e?.hiddenPositionsIds||[],hiddenPositionsSlotsIds:e?.hiddenPositionsSlotsIds||[],displayedPositionsCategoriesIds:e?.displayedPositionsCategoriesIds||[],displayedPositionsIds:e?.displayedPositionsIds||[],displayedPositionsSlotsIds:e?.displayedPositionsSlotsIds||[],showFullPosition:e?.showFullPosition??!0,showPositionCategoryDescription:e?.showPositionCategoryDescription??!1,showPositionDescription:e?.showPositionDescription??!1,positionTitle:e?.positionTitle||"",positionSubtitle:e?.positionSubtitle||"",willAutoAssign:e?.willAutoAssign??!1}}formParametersMissionsInputSchema(){return on.Ik().shape({positionDisplay:on.Yj().required(this.t("la_strat_gie_d_44170")).oneOf(Dt,this.t("la_strat_gie_d_44170")),positionFilter:on.Yj().required(this.t("la_strat_gie_de_13294")).oneOf(Pt,this.t("la_strat_gie_de_13294")),positionRanking:on.Yj().required(this.t("le_type_de_clas_66819")).oneOf(vt,this.t("le_type_de_clas_66819")),positionLimit:on.ai().required(this.t("le_nombre_maxim_38249")).min(1,this.t("le_nombre_de_ch_27910")),hiddenPositionsCategoriesIds:on.YO().of(on.ai()),hiddenPositionsIds:on.YO().of(on.ai()),hiddenPositionsSlotsIds:on.YO().of(on.ai()),displayedPositionsCategoriesIds:on.YO().of(on.ai()),displayedPositionsIds:on.YO().of(on.ai()),displayedPositionsSlotsIds:on.YO().of(on.ai()),showFullPosition:on.zM().required(),showPositionCategoryDescription:on.zM().required(),showPositionDescription:on.zM().required(),positionTitle:on.Yj(),positionSubtitle:on.Yj(),willAutoAssign:on.zM().required()})}updateFormParametersMissionsSchema(){return on.Ik().shape({form:this.formParametersMissionsInputSchema()})}};fs=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Wt])],fs);let _s=class extends Jo{constructor(e){super(e)}formParametersStateInputDefault(e){return{state:e?.state||ee.Open,closedTitle:e?.closedTitle||"",closedMessage:e?.closedMessage||"",closedAt:e?.closedAt||null}}formParametersStateInputSchema(){return on.Ik().shape({state:on.Yj().required(this.t("cl_turer_le_for_10541")).oneOf(At,this.t("cl_turer_le_for_10541")),closedMessage:on.Yj(),closedAt:Qo.when("state",{is:ee.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 on.Ik().shape({form:this.formParametersStateInputSchema()})}};_s=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Wt])],_s);let bs=class extends Jo{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)}}formUserInfoInputSchema(e){return on.Ik().shape({fields:on.Ik().shape(Object.fromEntries(e.map(({isMandatory:e,customField:t})=>[t.slug,this.fieldInputService.fieldSchema(t,e)])))})}userInfoInputSchema(e,t){const n={};return e.forEach(e=>{const t=e.field,i=this.fieldInputService.fieldSchema(e.field,e.isMandatory);n[t.slug]=i}),t&&t.forEach(e=>{n[e.slug]=this.fieldInputService.fieldSchema(e,!1)}),on.Ik().shape({fields:on.Ik().shape({...n})})}userInfoProfileInputDefault(e){const t=this.countriesService.getDefaultCountryValues();return{email:e.email,fields:{firstName:e.userInfo?.fields?.firstName??"",lastName:e.userInfo?.fields?.lastName??"",language:e.userInfo?.fields?.language??e.language??t.user.language??Ee.En,picture:e.userInfo.fields.picture?(0,En.A)(e.userInfo.fields.picture,yr):this.documentInputService.documentInputDefault(),phone:e.userInfo.fields.phone?(0,En.A)(e.userInfo.fields.phone,Kr):this.phoneInputService.phoneInputDefault(t)}}}userInfoFields(){return{fields:on.Ik().shape({firstName:on.Yj().nullable(),lastName:on.Yj().nullable(),picture:this.documentInputService.documentInputSchemaNotRequired(),language:on.Yj().required(this.t("les_langues_doi_27712")).oneOf(Wr,this.t("les_langues_doi_27712")),phone:this.phoneInputService.phoneInputSchemaNotRequired()})}}userInfoProfileInputSchema(){return on.Ik().shape({email:on.Yj().email(this.t("l_e_mail_est_re_04856")).required(this.t("l_e_mail_est_re_04856")),...this.userInfoFields()})}updateUserInfoSchema(e){return on.Ik().shape({userInfo:this.formUserInfoInputSchema(e)})}updateProfileSchema(){return on.Ik().shape({userInfo:this.userInfoProfileInputSchema()})}userInfoAndTermsInputDefault(e){return{...(0,hn.A)(e.userInfo,["id"]),termsAccepted:!1}}userInfoAndTermsInputSchema(){return on.Ik().shape({firstName:on.Yj().nullable(),lastName:on.Yj().nullable(),phone:this.phoneInputService.phoneInputSchemaNotRequired(),termsAccepted:on.zM().oneOf([!0],this.t("il_est_n_cessai_83896")).required(this.t("il_est_n_cessai_83896"))})}updateUserInfoAndTermsSchema(){return on.Ik().shape({userInfoAndTerms:this.userInfoAndTermsInputSchema()})}};bs=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Wt,Ur,wr,cs,Yr])],bs);let ks=class extends Jo{constructor(e){super(e)}volunteersRegistrationsSlotInputDefault(e){return{startDate:e||xi.c9.invalid("Invalid"),startTime:"",endDate:e||xi.c9.invalid("Invalid"),endTime:""}}volunteersRegistrationsSlotInputSchema(e,t){const n=t.plus({day:1}).endOf("day");return on.Ik().shape({startDate:Qo.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:on.Yj().required(this.t("heure_de_d_but_90785")),endDate:Qo.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)=>xi.c9.isDateTime(t.parent.startDate)&&t.parent.startDate.isValid&&xi.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:on.Yj().required(this.t("l_heure_de_fin_78626"))})}};ks=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Wt])],ks);let vs=class extends Jo{translationService;userInfoInputService;volunteerRegistrationSlotInputService;constructor(e,t,n){super(e),this.translationService=e,this.userInfoInputService=t,this.volunteerRegistrationSlotInputService=n}slotsFields(e,t,n){switch(e){case we.Display:case we.DisplayDays:case we.Calendar:case we.Custom:return{slots:on.YO().of(this.volunteerRegistrationSlotInputService.volunteersRegistrationsSlotInputSchema(t,n)).min(1,this.t("vous_devez_ajou_68961"))};case we.Hide:return{};default:return Br()}}volunteersRegistrationsSlotsUpdateInputDefault(e){return a(e)?e.map(e=>({startDate:e.startDate,startTime:e.startTime,endDate:e.endDate,endTime:e.endTime})):[]}userInfoSlotsSchema(e,t,n){return on.Ik().shape({userInfo:on.Ik().shape({slots:on.YO().of(on.Ik().shape({formId:on.ai().required(),...this.slotsFields(e,t,n)}))})})}volunteersRegistrationsWishedPositionsInputDefault(){return{positionsCategoriesIds:[],positionsIds:[],positionsSlotsIds:[]}}volunteersRegistrationsWishedPositionsUpdateInputDefault(e){return e?{positionsCategoriesIds:e?.positionsCategoriesIds,positionsIds:e?.positionsIds,positionsSlotsIds:e?.positionsSlotsIds}:this.volunteersRegistrationsWishedPositionsInputDefault()}wishedPositionsFields(e,t){if(e===X.Ranked){if(t===Ae.Category)return{positionsCategoriesIds:on.YO().of(on.ai().typeError(this.t("s_lectionner_un_26253"))).min(1,this.t("vous_devez_s_le_32044")).test("different",this.t("les_missions_so_04441"),e=>{const t=(0,Go.A)((e||[]).filter(e=>-1!==e));return a(t)&&(0,Ei.A)(t).length===t.length})};if(t===Ae.Position)return{positionsIds:on.YO().of(on.ai().typeError(this.t("s_lectionner_un_26253"))).min(1,this.t("vous_devez_s_le_89603")).test("different",this.t("les_missions_so_04441"),e=>{const t=(0,Go.A)((e||[]).filter(e=>-1!==e));return a(t)&&(0,Ei.A)(t).length===t.length})};throw new Error("Should not happen")}switch(t){case Ae.Category:return{positionsCategoriesIds:on.YO().of(on.ai().typeError(this.t("s_lectionner_un_26253"))).min(1,this.t("vous_devez_s_le_32044"))};case Ae.Position:return{positionsIds:on.YO().of(on.ai().typeError(this.t("s_lectionner_un_26253"))).min(1,this.t("vous_devez_s_le_89603"))};case Ae.Slot:return{positionsSlotsIds:on.YO().of(on.ai()).min(1,this.t("vous_devez_s_le_89603"))};case Ae.None:return{};default:return Br()}}volunteerRegistrationWishedPositionsSchema(e,t){return on.Ik().shape({volunteerRegistration:on.Ik().shape({...this.wishedPositionsFields(e,t)})})}userInfoWishedPositionsSchema(e,t){return on.Ik().shape({userInfo:on.Ik().shape({missions:on.YO().of(on.Ik().shape({formId:on.ai().required(),...this.wishedPositionsFields(e,t)}))})})}volunteersRegistrationsWishedAccreditationsInputDefault(){return{accreditationsSlotsIds:[]}}volunteersRegistrationsWishedAccreditationsUpdateInputDefault(e){return e?{accreditationsSlotsIds:e.accreditationsSlotsIds}:this.volunteersRegistrationsWishedAccreditationsInputDefault()}accreditationsFields(e,t){if(t)return{};switch(e){case ke.Accreditation:return{accreditationsSlotsIds:on.YO().of(on.ai().typeError(this.t("s_lectionner_un_96571"))).min(1,this.t("vous_devez_s_le_72138"))};case ke.None:return{};default:return Br()}}volunteerRegistrationAccreditationsSchema(e){return on.Ik().shape({volunteerRegistration:on.Ik().shape({...this.accreditationsFields(e,null)})})}userInfoAccreditationsSchema(e){return on.Ik().shape({userInfo:on.Ik().shape({accreditations:on.YO().of(on.Ik().shape({formId:on.ai().required(),...this.accreditationsFields(e,null)}))})})}updateVolunteerRegistrationSchema(e,t,n,i,o,r,s){let a={userInfo:this.userInfoInputService.userInfoInputSchema(e,t)};return a={...a,...this.slotsFields(n,r,s),...this.wishedPositionsFields(i,o)},on.Ik().shape({email:on.Yj().required(this.t("l_e_mail_est_re_04856")).email(this.t("l_e_mail_est_re_04856")),volunteerRegistration:on.Ik().shape({...a})})}adminCreateSchema(){return on.Ik().shape({email:on.Yj().email(this.t("l_e_mail_n_est_57882")).required(this.t("l_e_mail_n_est_57882")),sendVolunteerRegistrationEmail:on.zM().required(),firstName:on.Yj(),lastName:on.Yj()})}adminAddSchema(){return on.Ik().shape({usersInfosIds:on.YO().of(on.ai()).min(1,this.t("vous_devez_s_le_83608")),sendVolunteerRegistrationEmail:on.zM().required()})}};vs=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Wt,bs,ks])],vs);let As=class extends Jo{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??[],accreditationsSlotsIds:(i.delegationAccreditations??[]).filter(e=>e.isDefault).map(e=>e.accreditationSlotId),userInfo:this.userInfoInputService.userInfoUpdateInputDefault(t,n,{countryCode:i.countryCode}),sendNotificationEmail:i.sendNotificationEmail,slots:i.slotDisplay===we.Display?[this.volunteerRegistrationSlotInputService.volunteersRegistrationsSlotInputDefault(i.eventStartDate)]:i.team?.slots??[],source:e}}formRegisterInformationsSchema(e){return on.Ik().shape({formRegister:on.Ik().shape({userInfo:this.userInfoInputService.formUserInfoInputSchema(e)})})}formRegisterSlotsSchema(e,t,n){return on.Ik().shape({formRegister:on.Ik().shape({...this.volunteerRegistrationInputService.slotsFields(e,t,n)})})}formRegisterPositionsSchema(e,t){return on.Ik().shape({formRegister:on.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 on.Ik().shape({formRegister:on.Ik().shape({...this.volunteerRegistrationInputService.accreditationsFields(e,i),userInfo:on.Ik().shape({fields:on.Ik().shape(Object.fromEntries(o.map(e=>{const n=e.isMandatory&&a((0,Xr.A)(e.accreditationsSlotsIds,t));return[e.customField.slug,this.fieldInputService.fieldSchema(e.customField,n)]})))})})})}formRegisterSchema(e,t,n,i,o,r,s,a){return on.Ik().shape({email:on.Yj().required(this.t("l_e_mail_est_re_04856")).email(this.t("l_e_mail_est_re_04856")),formRegister:on.Ik().shape({userInfo:this.userInfoInputService.formUserInfoInputSchema(e),...this.volunteerRegistrationInputService.slotsFields(t,n,i),...this.volunteerRegistrationInputService.wishedPositionsFields(o,r),...this.volunteerRegistrationInputService.accreditationsFields(s,a)})})}};As=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Wt,cs,bs,vs,ks])],As);let ys=class extends Jo{translationService;constructor(e){super(e),this.translationService=e}massAccreditStep1Schema(){return on.Ik().shape({massAccredit:on.Ik().shape({...this.massAccreditStep1Fields()})})}massAccreditStep2Schema(){return on.Ik().shape({massAccredit:on.Ik().shape({...this.massAccreditStep2Fields()})})}massAccreditSchema(){return on.Ik().shape({...this.massAccreditStep1Fields(),...this.massAccreditStep2Fields()})}massAccreditStep1Fields(){return{strategy:on.Yj().required(this.t("la_strat_gie_es_82287")).oneOf(xt,this.t("la_strat_gie_es_82287"))}}massAccreditStep2Fields(){return{accreditationsSlotsIds:on.YO().of(on.ai()).required(this.t("vous_devez_s_le_72138")).min(1,this.t("vous_devez_s_le_72138"))}}};ys=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Wt])],ys);let ws=class extends Jo{constructor(e){super(e)}massAddEventInputSchema(){return on.Ik().shape({massAddEvent:on.Ik().shape({eventId:on.ai().required(this.t("l_v_nement_est_88155")).typeError(this.t("l_v_nement_est_88155"))})})}massAddEventSchema(){return on.Ik().shape({eventId:on.ai().required(this.t("l_v_nement_est_88155")).typeError(this.t("l_v_nement_est_88155"))})}};ws=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Wt])],ws);let Cs=class extends Jo{translationService;constructor(e){super(e),this.translationService=e}massAssignStep1Schema(){return on.Ik().shape({massAssign:on.Ik().shape({...this.massAssignStep1Fields()})})}massAssignStep2Schema(){return on.Ik().shape({massAssign:on.Ik().shape({...this.massAssignStep2Fields()})})}massAssignSchema(){return on.Ik().shape({...this.massAssignStep1Fields(),...this.massAssignStep2Fields()})}massAssignStep1Fields(){return{strategy:on.Yj().required(this.t("la_strat_gie_es_82287")).oneOf(xt,this.t("la_strat_gie_es_82287"))}}massAssignStep2Fields(){return{positionsSlotsIds:on.YO().of(on.ai()).required(this.t("vous_devez_s_le_28976")).min(1,this.t("vous_devez_s_le_28976"))}}};Cs=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Wt])],Cs);let Is=class extends Jo{translationService;constructor(e){super(e),this.translationService=e}massConditionsStep1Schema(){return on.Ik().shape({massConditions:on.Ik().shape({...this.massConditionsStep1Fields()})})}massConditionsStep2Schema(){return on.Ik().shape({massConditions:on.Ik().shape({...this.massConditionsStep2Fields()})})}massConditionsSchema(){return on.Ik().shape({...this.massConditionsStep1Fields(),...this.massConditionsStep2Fields()})}massConditionsStep1Fields(){return{strategy:on.Yj().required(this.t("la_strat_gie_es_82287")).oneOf(xt,this.t("la_strat_gie_es_82287"))}}massConditionsStep2Fields(){return{customFieldId:on.ai().required(this.t("le_champ_person_80074")),value:on.gl().required(this.t("la_valeur_est_r_70136"))}}};Is=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Wt])],Is);let xs=class extends Jo{translationService;constructor(e){super(e),this.translationService=e}massPreAssignStep1Schema(){return on.Ik().shape({massPreAssign:on.Ik().shape({...this.massPreAssignStep1Fields()})})}massPreAssignStep2Schema(){return on.Ik().shape({massPreAssign:on.Ik().shape({...this.massPreAssignStep2Fields()})})}massPreAssignSchema(){return on.Ik().shape({...this.massPreAssignStep1Fields(),...this.massPreAssignStep2Fields()})}massPreAssignStep1Fields(){return{strategy:on.Yj().required(this.t("la_strat_gie_es_82287")).oneOf(xt,this.t("la_strat_gie_es_82287")),level:on.Yj().required(this.t("le_niveau_est_r_81100")).oneOf(St,this.t("le_niveau_est_r_81100"))}}massPreAssignStep2Fields(){return{positionsCategoriesIds:on.YO().of(on.ai()).test("non-empty-categories",this.t("vous_devez_s_le_32044"),function(){return this.parent.level!==ce.Categories||this.parent.positionsCategoriesIds.length>0}),positionsIds:on.YO().of(on.ai()).test("non-empty-positions",this.t("vous_devez_s_le_89603"),function(){return this.parent.level!==ce.Positions||this.parent.positionsIds.length>0})}}};xs=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Wt])],xs);let Ss=class extends Jo{translationService;constructor(e){super(e),this.translationService=e}massStateUpdateSchema(){return on.Ik().shape({state:on.Yj().required(this.t("le_statut_est_r_13164")).oneOf([$e.NotApplicable,$e.PreAssigned,$e.Refused,$e.WaitingAssignment],this.t("le_statut_est_r_13164"))})}massAccreditationStateUpdateSchema(){return on.Ik().shape({state:on.Yj().required(this.t("le_statut_est_r_13164")).oneOf([f.NotApplicable,f.Refused,f.WaitingAccreditation],this.t("le_statut_est_r_13164"))})}};Ss=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Wt])],Ss);let Es=class{positionsCustomFieldInputSchema(){return on.Ik().shape({customFieldId:on.ai().required(),conditionValue:on.gl().required()})}};Es=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)()],Es);const js=/^\d{2}:\d{2}$/,Ts=/^\d{2}:\d{2}:\d{2}$/;function Ds(e){return an(e)&&(null!==e.match(js)||null!==e.match(Ts))}function Ps(e){if(Ds(e)){const[t,n]=e.split(":");return[parseInt(t,10),parseInt(n,10)]}return null}let Rs=class extends Jo{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 on.Ik().shape({slot:this.positionsSlotInputSchema()})}positionsSlotInputSchema(){return on.Ik().shape({name:on.Yj(),startDate:Qo.required(this.t("la_date_de_d_bu_05030")).typeError(this.t("la_date_de_d_bu_05030")),startTime:on.Yj().required(this.t("heure_de_d_but_90785")),endDate:Qo.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)=>xi.c9.isDateTime(t.parent.startDate)&&t.parent.startDate.isValid&&xi.c9.isDateTime(t.parent.endDate)&&t.parent.endDate.isValid&&t.parent.endDate>=t.parent.startDate),endTime:on.Yj().required(this.t("l_heure_de_fin_78626")).test("after-start-time",this.t("la_date_de_fin_00429"),(e,t)=>{const n=xi.c9.isDateTime(t.parent.startDate)&&t.parent.startDate.isValid,i=Ds(t.parent.startTime),o=xi.c9.isDateTime(t.parent.endDate)&&t.parent.endDate.isValid,r=Ds(t.parent.endTime);if(n&&i&&o&&r){const[e,n]=Ps(t.parent.startTime),[i,o]=Ps(t.parent.endTime);return t.parent.startDate.set({hours:e,minutes:n})=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Wt])],Rs);let Os=class extends Jo{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:r}){let s=e?.category.id??t;return Number.isInteger(s)||(s=null),{name:e?.name??"",positionCategoryId:s,description:e?.description??"",acronym:e?.acronym??"",color:e?.color??kn.colors.primary700.value,icon:e?.icon??te.LocationDot,privateNote:e?.privateNote??"",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(r)],conditionsOperator:e?.conditionsOperator??w.And,positionsCustomFields:e?.positionsCustomFields??[],tagsIds:e?.tagsIds??[],fields:e?.fields??{},leadersIds:e?.fields??[]}}createUpdatePositionSchema(){return on.Ik().shape({position:this.positionInputSchema()})}positionInputSchema(){return on.Ik().shape({name:on.Yj().required(this.t("le_nom_de_la_mi_74207")),positionCategoryId:on.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:on.Yj(),color:on.Yj().required(this.t("la_couleur_est_95740")),icon:on.Yj().required(this.t("l_ic_ne_est_req_15843")).oneOf(yt,this.t("l_ic_ne_est_req_15843")),description:on.Yj(),privateNote:on.Yj(),address:on.Yj().nullable(),latitude:on.ai().nullable().typeError(this.t("la_latitude_doi_43118")),longitude:on.ai().nullable().typeError(this.t("la_longitude_do_35170")),traces:on.YO().of(on.ai()),slots:on.YO().of(this.positionsSlotInputService.positionsSlotInputSchema()).required(this.t("vous_devez_avoi_26563")).min(1,this.t("vous_devez_avoi_26563")),positionsCustomFields:on.YO().of(this.positionsCustomFieldInputService.positionsCustomFieldInputSchema()),tagsIds:on.YO().of(on.ai())})}};Os=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Es,Rs,Wt])],Os);var Fs;let zs=class extends Rr{static{Fs=this}csvInputService;static IMPORT_COLUMNS_DEFAULT={...Rr.IMPORT_COLUMNS_DEFAULT,PositionName:"positionName",PositionCategoryName:"positionCategoryName",SlotStart:"slotStart",SlotEnd:"slotEnd",MaxResources:"slotMaxResources",SlotName:"slotName",Acronym:"acronym",Color:"color",Icon:"icon",Description:"description",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===ne.Update?[Fs.IMPORT_COLUMNS_DEFAULT.Id]:[],Fs.IMPORT_COLUMNS_DEFAULT.SlotStart,Fs.IMPORT_COLUMNS_DEFAULT.SlotEnd,Fs.IMPORT_COLUMNS_DEFAULT.MaxResources,Fs.IMPORT_COLUMNS_DEFAULT.PositionName,Fs.IMPORT_COLUMNS_DEFAULT.PositionCategoryName];constructor(e,t){super(e,t),this.csvInputService=e}};zs=Fs=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[br,Wt])],zs);let Ms=class{get(){return{[Ce.OrganizationAdmin]:{delegationCategoryPermissions:"11111",positionPermissions:"111111111",nameKey:"administrateur_11083",descriptionKey:"a_acc_s_toute_73520"},[Ce.OrganizationReader]:{delegationCategoryPermissions:"10000",positionPermissions:"100010000",nameKey:"acc_s_en_lectur_30252",descriptionKey:"a_acc_s_l_org_94388"},[Ce.EventAdmin]:{delegationCategoryPermissions:"11111",positionPermissions:"111111111",nameKey:"administrateur_24785",descriptionKey:"a_acc_s_toute_25473"},[Ce.EventReader]:{delegationCategoryPermissions:"10000",positionPermissions:"100010000",nameKey:"acc_s_en_lectur_33482",descriptionKey:"a_acc_s_l_v_17476"},[Ce.PositionEditor]:{delegationCategoryPermissions:"00000",positionPermissions:"110010011",nameKey:"responsable_de_95683",descriptionKey:"peut_modifier_s_82832"},[Ce.PositionReader]:{delegationCategoryPermissions:"00000",positionPermissions:"100010000",nameKey:"responsable_de_72569",descriptionKey:"a_acc_s_ses_m_09741"},[Ce.DelegationCategoryLeader]:{delegationCategoryPermissions:"11110",positionPermissions:"100010000",nameKey:"responsable_de_32820",descriptionKey:"a_acc_s_aux_d_l_87634"}}}};Ms=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)()],Ms);let $s=class extends Jo{baseRolesService;constructor(e,t){super(t),this.baseRolesService=e}default(){return{role:{delegationCategoryPermissions:"00000",positionPermissions:"000000000",name:"",description:""}}}schema(){return on.Ik().shape({role:on.Ik().shape({delegationCategoryPermissions:this.delegationPermissions().required(this.t("le_format_des_p_68818")),positionPermissions:this.positionPermissions().required(this.t("le_format_des_p_68818")),name:on.Yj().required(this.t("le_nom_est_requ_61536")),description:on.Yj().required(this.t("la_description_46559"))}).required()}).required()}delegationPermissions(){return on.Yj().matches(new RegExp(`^[01]{${this.baseRolesService.get().DelegationCategoryLeader.delegationCategoryPermissions.length}}$`),this.t("le_format_des_p_68818"))}positionPermissions(){return on.Yj().matches(new RegExp(`^[01]{${this.baseRolesService.get().PositionReader.positionPermissions.length}}$`),this.t("le_format_des_p_68818"))}};$s=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Ms,Wt])],$s);let Ns=class extends Jo{translationService;constructor(e){super(e),this.translationService=e}segmentFolderInputDefault(e,t){return{name:t?.name??"",segmentType:e}}};Ns=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Wt])],Ns);let Bs=class extends Jo{translationService;constructor(e){super(e),this.translationService=e}};Bs=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Wt])],Bs);let Ls=class extends sr{constructor(e){super(e)}step1Schema(){return on.Ik().shape({email:this.email()})}step2Schema(){return on.Ik().shape({email:this.email(),code:this.code()})}};Ls=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Wt])],Ls);let Vs=class extends sr{constructor(e){super(e)}step1Schema(){return on.Ik().shape({email:this.email(),password:this.passwordRules()})}step2Schema(){return on.Ik().shape({email:this.email(),code:this.code(),password:this.passwordRules()})}};Vs=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Wt])],Vs);let Us=class extends Jo{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??""}}};Us=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Wt])],Us);let Gs=class extends Jo{constructor(e){super(e)}associateTagsIdsSchema(){return on.Ik().shape({tagsIds:on.YO().of(on.ai())})}};Gs=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Wt])],Gs);let Ws=class extends Jo{constructor(e){super(e)}traceInputDefault(e){return{name:e?.name??"",color:e?.color??kn.colors.primary700.value,points:e?.points??[],direction:e?.direction??Pe.None}}traceInputSchema(){return on.Ik().shape({name:on.Yj().required(this.t("le_nom_du_trac_39859")),color:on.Yj().required(this.t("la_couleur_du_t_36646")),points:on.YO().required(this.t("le_trac_doit_c_20895")).min(2,this.t("le_trac_doit_c_20895"))})}createTraceSchema(){return on.Ik().shape({trace:this.traceInputSchema()})}updateNameSchema(){return on.Ik().shape({name:on.Yj().required(this.t("le_nom_du_trac_39859"))})}};Ws=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Wt])],Ws);let qs=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 Fe.String:return an(t)?t:"";case Fe.StringArray:return Array.isArray(t)?t:[];case Fe.RichText:return an(t)?t:"";default:return Br()}}};qs=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)()],qs);var Hs;let Ks=class extends Rr{static{Hs=this}csvInputService;static IMPORT_COLUMNS_DEFAULT={...Rr.IMPORT_COLUMNS_DEFAULT,Email:"email",TicketId:"ticketId"};static IMPORT_COLUMNS_REQUIRED=e=>e===ne.Update?[Hs.IMPORT_COLUMNS_DEFAULT.Id]:[Hs.IMPORT_COLUMNS_DEFAULT.Email];constructor(e,t){super(e,t),this.csvInputService=e}};Ks=Hs=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[br,Wt])],Ks);var Ys=n(8923);let Zs=class extends Jo{constructor(e){super(e)}workflowInputDefault(e){return{name:e?.name??"",state:e?.state??We.Active,frequency:e?.frequency??Ve.Every10Minutes,trigger:e?.trigger??qe.VolunteersSegment,action:e?.action??Le.SendCampaign,data:(0,Ys.A)({recipients:Ue.View},e?.data??{})}}workflowInputSchema(){return on.Ik().shape({name:on.Yj().required(this.t("le_nom_est_requ_61536")),state:on.Yj().required(this.t("le_statut_est_r_13164")).oneOf(Nt,this.t("le_statut_est_r_13164")),action:on.Yj().required(this.t("l_action_est_re_08934")).oneOf(Mt,this.t("l_action_est_re_08934")),trigger:on.Yj().required(this.t("le_d_clencheur_32555")).oneOf(Bt,this.t("le_d_clencheur_32555")),data:on.gl().required().test("positions-valid",this.t("les_missions_so_67594"),function(){return this.parent.trigger!==qe.Assigned||a(this.parent.data.positionsCategoriesIds)||a(this.parent.data.positionsIds)||a(this.parent.data.positionsSlotsIds)||a(this.parent.data.positionsSegmentsIds)}).test("volunteers-segment-id-valid",this.t("la_vue_est_requ_65480"),function(){return this.parent.trigger!==qe.VolunteersSegment||Number.isInteger(this.parent.data.volunteersSegmentId)}).test("form-id-valid",this.t("le_formulaire_e_77404"),function(){return this.parent.trigger!==qe.FormSubmit||Number.isInteger(this.parent.data.formId)}).test("campaign-id-valid",this.t("la_campagne_est_06708"),function(){return this.parent.trigger!==qe.VolunteersSegment||this.parent.action!==Le.SendCampaign||Number.isInteger(this.parent.data.campaignId)}).test("campaign-recipients-valid",this.t(this.t("les_destinatair_82420")),function(){return this.parent.trigger!==qe.VolunteersSegment||this.parent.action!==Le.SendCampaign||$t.includes(this.parent.data.recipients)}).test("campaign-recipients-users-infos",this.t("la_liste_des_me_55886"),function(){return this.parent.trigger!==qe.VolunteersSegment||this.parent.action!==Le.SendCampaign||this.parent.data.recipients!==Ue.UsersInfosIds||a(this.parent.data.usersInfosIds)}).test("custom-field-id-valid",this.t("le_champ_person_80074"),function(){return this.parent.trigger===qe.VolunteersSegment&&this.parent.action===Le.SetCustomField?Number.isInteger(this.parent.data.customFieldId):this.parent.trigger!==qe.FormSubmit||this.parent.action!==Le.CreateDelegation||Number.isInteger(this.parent.data.customFieldId)}).test("accreditations-valid",this.t("les_accr_ditati_27943"),function(){return this.parent.trigger!==qe.Assigned&&(this.parent.trigger!==qe.VolunteersSegment||this.parent.action!==Le.AddAccreditations&&this.parent.action!==Le.DeleteAccreditations)||a(this.parent.data.accreditationsSlotsIds)}).test("delegation-id-valid",this.t("la_d_l_gation_c_71684"),function(){return this.parent.trigger!==qe.FormSubmit||this.parent.action!==Le.CreateDelegation||Number.isInteger(this.parent.data.delegationId)}).test("event-id-valid",this.t("l_v_nement_est_88155"),function(){return this.parent.trigger!==qe.VolunteersSegment||this.parent.action!==Le.AddEvent||Number.isInteger(this.parent.data.eventId)})})}};Zs=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Wt])],Zs);let Js=class{translationService;constructor(e){this.translationService=e}minutesToHoursMinutesString(e){const t=xi.dw.fromObject({minutes:e},{locale:this.translationService.language.toString().toLowerCase()}).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"})}};Js=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Wt])],Js);var Xs=n(7773),Qs=n(9669),ea=n(6666);const ta=bn("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:"$textLg",fontWeight:"$medium",lineHeight:"1.55556"},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"}}),na=r.forwardRef(({children:e,...t},n)=>(0,o.jsx)(ta,{ref:n,...t,children:e}));na.displayName="Text";const ia=({children:e,dateTime:t,...n})=>{const i=an(t)?t:t.toISO();return(0,o.jsx)(na,{as:"time",textStyle:"inherit",dateTime:i,...n,children:e})};function oa(e,t){const n=t.formats?.localeFormat||Bi.DateOnly.MonthLong,i=Bi.TimeOnly,o=t.language?{locale:t.language.toString().toLowerCase()}:{};t.formats?.displayWeekday&&(n.weekday="long");const r=e.start,s=e.end;return{startDateString:an(t.formats?.dateFormat)?r.toFormat(t.formats.dateFormat):r.toLocaleString(n,o),startTimeString:an(t.formats?.timeFormat)?r.toFormat(t.formats.timeFormat):r.toLocaleString(i,o),endDateString:an(t.formats?.dateFormat)?s.toFormat(t.formats.dateFormat):s.toLocaleString(n,o),endTimeString:an(t.formats?.timeFormat)?s.toFormat(t.formats.timeFormat):s.toLocaleString(i,o)}}function ra(e){const t=e.filter(e=>e.isValid);if(a(t)){const e=(0,Uo.A)(t,e=>e.start.toMillis()),n=[e[0]];for(let t=1;t=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Wt])],sa);let aa=class{translationService;constructor(e){this.translationService=e}getFormatter(e={}){return Intl.NumberFormat(this.translationService.language.toString().toLowerCase(),{notation:e.notation||"compact",style:e.style||"unit",unit:e.unit||"byte",unitDisplay:e.unitDisplay||"narrow"})}toNumberOrInfinity(e){return"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`}};aa=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Wt])],aa);const ca=(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:ca(i,o,n)}),n),la="evenements.handicap-international.fr",da="www.partagetapassion.com",ua="communaute.rncb.fr",ha="mariage.ravey.fr",ma="registering.aso.fr",ga=[la,da,ua,ha,ma],pa={[la]:1792,[da]:858,[ua]:1773,[ha]:3306,[ma]:3136},fa=new Map([[1792,la],[858,da],[1773,ua],[3306,ha],[3136,ma]]),_a=e=>e.join("/"),ba=Ii.HEAVENT_APPLICATION_BASENAME,ka={FIELDS:{PLURAL:"fields",SINGLE:"field"}},va={AUTH:"auth",EDIT:"edit",CREATE:"create",EXPORT:"export",EXPORT_BASIC:"export/basic",EXPORT_API:"export/api",IMPORT:"import",INVITE:"invite"},Aa={INFORMATION:"information",DASHBOARD:"dashboard",REGISTRATION:"registration",DOCUMENTS:"documents",PROFILE:"profile",REPORTING:"reporting",FORMS:"forms",FORM:"form",MEMBER:"member",MEMBERS:"members",PREVIEW:"preview"},ya={LIST:"list"},wa=e=>_a([e,va.AUTH]),Ca=e=>_a([e,ya.LIST]),Ia=e=>_a([e,va.CREATE]),xa=e=>_a([e,va.EDIT]),Sa={PLURAL:"events",SINGLE:"event"},Ea={PLURAL:"teams",SINGLE:"team"},ja={EVENTS:Sa.PLURAL,EVENT:e=>_a([Sa.SINGLE,e]),TEAM:e=>_a([Ea.SINGLE,e])},Ta={EVENTS:e=>_a([Xa.ORGANIZATION(e),ja.EVENTS]),EVENT:({eventId:e,...t})=>_a([Xa.ORGANIZATION(t),ja.EVENT(e)]),EVENT_FORM:e=>_a([Wa.FORM(e)]),EVENT_TEAM_FORM:({teamCode:e,...t})=>_a([Ta.EVENT_FORM(t),ja.TEAM(e)])},Da={PLURAL:"forms",SINGLE:"form"},Pa="elements",Ra="emails",Oa="integration",Fa="parameters",za="preview",Ma="general",$a="design",Na="availabilities",Ba="missions",La="accreditations",Va="broadcast",Ua="state",Ga={FORMS:Da.PLURAL,FORM:e=>_a([Da.SINGLE,e])},Wa={FORMS:({eventId:e,...t})=>_a([e?Ta.EVENT({...t,eventId:e}):tc.COMMUNITY(t),Ga.FORMS]),FORM:({formId:e,...t})=>_a(["eventId"in t&&t.eventId?Ta.EVENT(t):tc.COMMUNITY(t),Ga.FORM(e)]),FORM_ELEMENTS:e=>_a([Wa.FORM(e),Pa]),FORM_INTEGRATION:e=>_a([Wa.FORM(e),Oa]),FORM_EMAILS:e=>_a([Wa.FORM(e),Ra]),FORM_PREVIEW:e=>_a([Wa.FORM(e),za]),FORM_PARAMETERS:e=>_a([Wa.FORM(e),Fa]),FORM_PARAMETERS_GENERAL:e=>_a([Wa.FORM_PARAMETERS(e),Ma]),FORM_PARAMETERS_DESIGN:e=>_a([Wa.FORM_PARAMETERS(e),$a]),FORM_PARAMETERS_AVAILABILITIES:e=>_a([Wa.FORM_PARAMETERS(e),Na]),FORM_PARAMETERS_MISSIONS:e=>_a([Wa.FORM_PARAMETERS(e),Ba]),FORM_PARAMETERS_ACCREDITATIONS:e=>_a([Wa.FORM_PARAMETERS(e),La]),FORM_PARAMETERS_BROADCAST:e=>_a([Wa.FORM_PARAMETERS(e),Va]),FORM_PARAMETERS_STATE:e=>_a([Wa.FORM_PARAMETERS(e),Ua])},qa={PLURAL:"/organizations",SINGLE:"/organization"},Ha="delegations",Ka={_BASE:"parameters",MEMBERS_SPACE:{_BASE:"members-space",DESIGN:"design",INTEGRATION:"integration",EMAIL_TEMPLATES:"emails",SETTINGS:"settings"},DELEGATION_SPACE:{_BASE:"delegation-space",DESIGN:"design",INTEGRATION:"integration",EMAIL_TEMPLATES:"emails",SETTINGS:"settings"}},Ya="blocked",Za="expired",Ja={ORGANIZATIONS:qa.PLURAL,ORGANIZATION:e=>_a([qa.SINGLE,e])},Xa={ORGANIZATIONS:Ja.ORGANIZATIONS,ORGANIZATION:({organizationId:e})=>Ja.ORGANIZATION(e),ORGANIZATION_SETTINGS:e=>_a([Xa.ORGANIZATION(e),Ka._BASE]),ORGANIZATION_SETTINGS_MEMBERS_SPACE:e=>_a([Xa.ORGANIZATION_SETTINGS(e),Ka.MEMBERS_SPACE._BASE]),ORGANIZATION_SETTINGS_MEMBERS_SPACE_DESIGN:e=>_a([Xa.ORGANIZATION_SETTINGS_MEMBERS_SPACE(e),Ka.MEMBERS_SPACE.DESIGN]),ORGANIZATION_SETTINGS_MEMBERS_SPACE_INTEGRATION:e=>_a([Xa.ORGANIZATION_SETTINGS_MEMBERS_SPACE(e),Ka.MEMBERS_SPACE.INTEGRATION]),ORGANIZATION_SETTINGS_MEMBERS_SPACE_EMAIL_TEMPLATES:e=>_a([Xa.ORGANIZATION_SETTINGS_MEMBERS_SPACE(e),Ka.MEMBERS_SPACE.EMAIL_TEMPLATES]),ORGANIZATION_SETTINGS_MEMBERS_SPACE_SETTINGS:e=>_a([Xa.ORGANIZATION_SETTINGS_MEMBERS_SPACE(e),Ka.MEMBERS_SPACE.SETTINGS]),ORGANIZATION_SETTINGS_DELEGATION_SPACE:e=>_a([Xa.ORGANIZATION_SETTINGS(e),Ka.DELEGATION_SPACE._BASE]),ORGANIZATION_SETTINGS_DELEGATION_SPACE_DESIGN:e=>_a([Xa.ORGANIZATION_SETTINGS_DELEGATION_SPACE(e),Ka.DELEGATION_SPACE.DESIGN]),ORGANIZATION_SETTINGS_DELEGATION_SPACE_INTEGRATION:e=>_a([Xa.ORGANIZATION_SETTINGS_DELEGATION_SPACE(e),Ka.DELEGATION_SPACE.INTEGRATION]),ORGANIZATION_SETTINGS_DELEGATION_SPACE_EMAIL_TEMPLATES:e=>_a([Xa.ORGANIZATION_SETTINGS_DELEGATION_SPACE(e),Ka.DELEGATION_SPACE.EMAIL_TEMPLATES]),ORGANIZATION_SETTINGS_DELEGATION_SPACE_SETTINGS:e=>_a([Xa.ORGANIZATION_SETTINGS_DELEGATION_SPACE(e),Ka.DELEGATION_SPACE.SETTINGS]),ORGANIZATION_DELEGATIONS:e=>_a([Xa.ORGANIZATION(e),Ha]),IS_BLOCKED:e=>_a([e,Ya]),IS_EXPIRED:e=>_a([e,Za]),ORGANIZATION_FORM:e=>Wa.FORM(e)},Qa="dashboard",ec="users",tc={COMMUNITY:e=>_a([Xa.ORGANIZATION(e),"community"]),COMMUNITY_DASHBOARD:e=>_a([tc.COMMUNITY(e),Qa]),COMMUNITY_USERS:e=>_a([tc.COMMUNITY(e),ec])},nc={PLURAL:"delegations-categories",SINGLE:"delegation-category"},ic={PLURAL:"delegations",SINGLE:"delegation"},oc="accreditations",rc="availabilities",sc="positions",ac={DELEGATIONS_CATEGORIES:nc.PLURAL,DELEGATION_CATEGORY:e=>_a([nc.SINGLE,e]),DELEGATIONS:ic.PLURAL,DELEGATION:e=>_a([ic.SINGLE,e])},cc={DELEGATION_CATEGORY:({delegationCategoryId:e,...t})=>_a(["eventId"in t&&t.eventId?Ta.EVENT(t):tc.COMMUNITY(t),ac.DELEGATION_CATEGORY(e)]),DELEGATION_CATEGORY_DASHBOARD:e=>_a([cc.DELEGATION_CATEGORY(e),Aa.DASHBOARD]),DELEGATION_CATEGORY_MEMBERS:e=>_a([cc.DELEGATION_CATEGORY(e),Aa.MEMBERS])},lc={DELEGATIONS:e=>_a(["eventId"in e&&e.eventId?Ta.EVENT(e):tc.COMMUNITY(e),ac.DELEGATIONS]),DELEGATION:({delegationId:e,...t})=>_a(["eventId"in t&&t.eventId?Ta.EVENT(t):tc.COMMUNITY(t),ac.DELEGATION(e)]),DELEGATION_DASHBOARD:e=>_a([lc.DELEGATION(e),Aa.DASHBOARD]),DELEGATION_MEMBERS:e=>_a([lc.DELEGATION(e),Aa.MEMBERS]),DELEGATION_ACCREDITATIONS:e=>_a([lc.DELEGATION(e),oc]),DELEGATION_REPORTING:e=>_a([lc.DELEGATION(e),Aa.REPORTING]),DELEGATION_DOCUMENTS:e=>_a([lc.DELEGATION(e),Aa.DOCUMENTS]),DELEGATION_MEMBERS_IMPORT:e=>_a([lc.DELEGATION(e),va.IMPORT]),DELEGATION_MEMBER:({userInfoId:e,...t})=>_a([lc.DELEGATION_MEMBERS(t),Aa.MEMBER,e]),DELEGATION_MEMBER_INFORMATION:e=>_a([lc.DELEGATION_MEMBER(e),Aa.INFORMATION]),DELEGATION_MEMBER_ACCREDITATIONS:e=>_a([lc.DELEGATION_MEMBER(e),oc]),DELEGATION_MEMBER_AVAILABILITIES:e=>_a([lc.DELEGATION_MEMBER(e),rc]),DELEGATION_MEMBER_POSITIONS:e=>_a([lc.DELEGATION_MEMBER(e),sc]),MEMBERS_INVITE:e=>_a([lc.DELEGATION(e),Aa.MEMBERS,va.INVITE]),MEMBER_CREATE:({formId:e,...t})=>Ia(_a([lc.DELEGATION(t),Aa.MEMBER,Aa.FORM,e])),MEMBER_EDIT:({formId:e,...t})=>xa(_a([lc.DELEGATION_MEMBER(t),Aa.FORM,e])),DELEGATION_PROFILE:e=>_a([lc.DELEGATION(e),Aa.PROFILE]),FIELDS_EDIT:e=>xa(_a([lc.DELEGATION(e),ka.FIELDS.PLURAL])),DELEGATION_FORM:({delegationId:e,...t})=>_a([Wa.FORM(t),ac.DELEGATION(e)])},dc={...cc,...lc},uc=({organizationId:e,eventId:t,delegationId:n,formId:i,teamCode:o,query:r})=>{const s=new ci(Ii.HEAVENT_PUBLIC_URL);return fa.has(e)&&(s.host=fa.get(e)),s.pathname+=`${(()=>{if(n)return"number"==typeof t?dc.DELEGATION_FORM({organizationId:e,delegationId:n,eventId:t,formId:i}):dc.DELEGATION_FORM({organizationId:e,delegationId:n,formId:i});{const n="number"==typeof t?Ta.EVENT_FORM({organizationId:e,eventId:t,formId:i}):Xa.ORGANIZATION_FORM({organizationId:e,formId:i});return an(o)?`${n}/team/${o}`:n}})()}`,r?.preview&&s.searchParams.set("preview",r?.preview?.toString()),r?.previewState&&s.searchParams.set("state",r?.previewState?.toString()),s.href};var hc,mc;(mc=hc||(hc={})).QR="qr",mc.Code39="code39";const gc=(e,t)=>{const n=new ci(Ii.HEAVENT_API_URL);return n.pathname+=`/barcode/${t?.barcodeType??hc.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 pc(e,t,n={}){const i=new ci(Ii.HEAVENT_API_URL);i.pathname+=`/documents/${e}.${t}`;const o=new URLSearchParams(Object.entries(n).filter(([e,t])=>an(t)));for(const[e,t]of o)i.searchParams.set(e,t);return i.href}function fc(e={}){const t=dn(e.firstName||"").trim();return`${dn(e.lastName||"").trim().toUpperCase()} ${t}`.trim()}const _c=(e,t)=>e.split(t).map(e=>e.trim().length>0?e.trim()[0]:"").join("").substring(0,3),bc=[kn.colors.success600.value,kn.colors.blueGray600.value,kn.colors.blueLight600.value,kn.colors.purple600.value,kn.colors.pink600.value,kn.colors.warning600.value];function kc(e){const t=e.charCodeAt(0);return bc[t%bc.length]}const vc=/(\{([\w\.]+)\})/g;let Ac=class{fieldService;constructor(e){this.fieldService=e}renderText(e,t={}){const n={organization:t.organization||void 0,event:t.event||void 0,delegation:t.delegation||void 0,invitedBy:t?.invitedBy?this.getUser(t.invitedBy,t):void 0,recipient:t?.recipient?this.getUser(t.recipient,t):void 0,user:t.userInfo?this.getUser(t.userInfo,t):void 0,...t.extraInfos},i=ca(n);return Object.entries(i).reduce((e,[t,n])=>e.replaceAll(`{${t}}`,n),e).replace(vc,(e,n,i)=>{const[o,r,s,a]=i.split("."),c=t?.userInfo?{lang:this.getLanguage(t.userInfo)}:{};if(8===a?.length?c.date=a:16===a?.length&&(c.date=a.substring(0,8),c.endDate=a.substring(8)),t.userInfo?.links){const e=t.userInfo.links;return i.includes("planningDays")?pc(e.userPlanningDaysLink,"pdf",c):i.includes("planningList")?pc(e.userPlanningListLink,"pdf",c):i.includes("planning")?pc(e.userPlanningLink,"pdf",c):i.includes("assignments")?pc(e.userAssignmentsLink,"pdf",c):i.includes("paris20kmassignment")&&e?.userCustomBadgeLinks[C.Paris20kmassignment]?pc(e.userCustomBadgeLinks[C.Paris20kmassignment],"pdf",c):""}return""})}getUser(e,t){const n=t.customFields||[],i=this.getFields(e,n),o=this.getLanguage(e),r=o?{lang:o.toString()}:{},s=e.links?pc(e.links.userAssignmentsLink,"pdf",r):"",a=e.links?pc(e.links.userPlanningLink,"pdf",r):"",c=e.links?pc(e.links.userPlanningListLink,"pdf",r):"",l=e.links?pc(e.links.userPlanningDaysLink,"pdf",r):"",d=e.links?{assignments:s,badge:pc(e.links.userBadgeLink,"pdf",r),certificate:pc(e.links.userCertificateLink,"pdf",r),planning:a,planningList:c,planningDays:l,...Object.fromEntries(Object.entries(e.links.userCustomBadgeLinks).map(([e,t])=>[e.toLowerCase(),pc(t,"pdf",r)])),...Object.fromEntries(Object.entries(e.links.userCustomDocumentLinks).map(([e,t])=>[e,pc(t,"pdf",r)]))}:{},u=t.volunteerRegistration?.ticketId??"",h=(e.fields.isExpanded?e.fields?.firstName?.value:e.fields.firstName)||"",m=(e.fields.isExpanded?e.fields?.lastName?.value:e.fields.lastName)||"",g=`
\n \n
`;return{id:e.id,localId:t.volunteerRegistration?.localId||"",email:e.email,...i,firstName:h,lastName:m,ticketId:u,qrcode:g,memberCode:t.volunteerRegistration?.weezevent?.memberCode||"",name:fc({firstName:h,lastName:m}),registrationDate:e.registrationDate?.toFormat(t.organization?.datetimeFormat??"yyyy-MM-dd HH:mm")??"",assignmentSheet:t.event?s:"",documents:d,delegation:{name:t.volunteerRegistration?.delegation?.name??"",leader:{firstName:t.volunteerRegistration?.delegation?.leaders?.[0]?.firstName??"",lastName:t.volunteerRegistration?.delegation?.leaders?.[0]?.lastName??"",phone:t.volunteerRegistration?.delegation?.leaders?.[0]?.phone?.internationalFormat??""}},weezevent:{barcode:u,qrcode:g,identificationNumber:""}}}getFields(e,t){return e.fields.isExpanded?Object.fromEntries(Object.entries(e.fields).map(([e,{value:t}])=>[e,a(t)?t.join(", "):an(t)?t:""])):Object.fromEntries(t.map(t=>[t.slug,this.fieldService.getValueString(t,e.fields)]))}getLanguage(e){return e.fields.isExpanded?e.fields?.language?.rawValue:e.fields?.language}};Ac=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[os])],Ac);var yc=n(7356);let wc=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){return e.inner.reduce((e,t)=>(0,yc.Oe)(e,t.path,t.message),{})}}}errorToObject(e){return e.inner.reduce((e,t)=>({...e,[t.path]:t.message}),{})}};wc=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)()],wc);const Cc=[K.Date,K.Number,K.Text,K.Textarea],Ic=[K.Phone,K.Select,K.Text,K.Textarea];function xc(e,t,n){const i=[],o=[];for(const r of t)if(!an(n)||r.name.trim().toLowerCase().includes(n.trim().toLowerCase())||an(r.label)&&r.label.trim().toLowerCase().includes(n.trim().toLowerCase())){const t=e.find(({slug:e})=>e===r.slug);t?i.push({filter:r,predicate:t}):o.push({filter:r,predicate:t})}return[i,o]}function Sc(e,t){return a(e.values)?e.values.map(({id:e,name:n})=>(0,o.jsx)("option",{value:e,children:t(n)},e)):a(e.valuesGroups)?e.valuesGroups.map(({name:e,values:t},n)=>(0,o.jsx)("optgroup",{label:e,children:t.map(e=>(0,o.jsx)("option",{value:e.id,children:e.name},e.id))},n)):[]}let Ec=class extends Zo{countriesService;dateTimeService;constructor(e,t,n){super(n),this.countriesService=e,this.dateTimeService=t}filterPredicateToText(e){const{filter:t,predicate:n}=e;if(!n)return"";{const i=xi.c9.isDateTime(n.value)?n.value:xi.c9.fromISO(n.value,{zone:"utc"}),o=!i.isValid||t.fieldType!==Z.DateTimeRange&&t.fieldType!==Z.Datetime?i.isValid&&t.fieldType===Z.Date?this.dateTimeService.toLocaleString(i,Bi.DateOnly.MonthLong):n.value:this.dateTimeService.toLocaleString(i,Bi.DateTime),r=xi.c9.isDateTime(n.value2)?n.value2:xi.c9.fromISO(n.value2,{zone:"utc"}),s=!r.isValid||t.fieldType!==Z.DateTimeRange&&t.fieldType!==Z.Datetime?r.isValid&&t.fieldType===Z.Date?this.dateTimeService.toLocaleString(r,Bi.DateOnly.MonthLong):n.value2:this.dateTimeService.toLocaleString(r,Bi.DateTime);switch(n.operator){case be.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 be.NotContains:return this.t("_1_ne_contient_14612",t.name,o);case be.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,Bi.DateOnly.MonthLong),s);if(t.fieldType===Z.Date)return this.t("_1_est_gal_43375",t.name,this.valueDateToString(n.valueDate));if(t.fieldType===Z.DateTimeRange){const e=i?.isValid?this.dateTimeService.toLocaleString(i,Bi.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 be.IsNot:return"isLeader"===t.slug?this.t("n_est_pas_respo_55625"):"isPositionLeader"===t.slug?this.t("n_est_pas_respo_35508"):"isPositionCategoryLeader"===t.slug?this.t("n_est_pas_respo_07811"):"isDelegationLeader"===t.slug?this.t("n_est_pas_respo_91275"):"privacy"===t.slug?this.t("visibilit_est_55411"):"condition"===t.slug?this.t("champ_d_pendant_33676"):"numberOfAssignmentsPerDay"===t.slug||"volunteersMinutesDays"===t.slug?this.t("_1_pour_la_jou_61197",t.name,this.dateTimeService.toLocaleString(i,Bi.DateOnly.MonthLong),s):t.fieldType===Z.Date?this.t("_1_n_est_pas_38478",t.name,this.valueDateToString(n.valueDate)):this.t("_1_n_est_pas_38478",t.name,this.valueToString(t,o));case be.IsEmpty:return this.t("_1_est_vide_08225",t.name);case be.IsNotEmpty:return this.t("_1_n_est_pas_v_31530",t.name);case be.IsValid:return this.t("_1_est_valide_45209",t.name);case be.IsNotValid:return this.t("_1_n_est_pas_v_05077",t.name);case be.GreaterThan:return"numberOfAssignmentsPerDay"===t.slug||"volunteersMinutesDays"===t.slug?this.t("_1_pour_la_jou_91055",t.name,this.dateTimeService.toLocaleString(i,Bi.DateOnly.MonthLong),s):this.t("_1_est_plus_gr_93527",t.name,n.value);case be.GreaterThanEqual:return"numberOfAssignmentsPerDay"===t.slug||"volunteersMinutesDays"===t.slug?this.t("_1_pour_la_jou_41388",t.name,this.dateTimeService.toLocaleString(i,Bi.DateOnly.MonthLong),s):this.t("_1_est_gal_ou_95771",t.name,n.value);case be.LessThan:return"numberOfAssignmentsPerDay"===t.slug||"volunteersMinutesDays"===t.slug?this.t("_1_pour_la_jou_99548",t.name,this.dateTimeService.toLocaleString(i,Bi.DateOnly.MonthLong),s):this.t("_1_est_plus_pe_18306",t.name,n.value);case be.LessThanEqual:return"numberOfAssignmentsPerDay"===t.slug||"volunteersMinutesDays"===t.slug?this.t("_1_pour_la_jou_37455",t.name,this.dateTimeService.toLocaleString(i,Bi.DateOnly.MonthLong),s):this.t("_1_est_gal_ou_39305",t.name,n.value);case be.Overlaps:return this.t("_1_chevauche_45834",t.name,o,s);case be.NotOverlaps:return this.t("_1_ne_chevauch_01846",t.name,o,s);case be.Engulfs:return this.t("_1_engloutis_32228",t.name,o,s);case be.NotEngulfs:return this.t("_1_n_engloutis_52951",t.name,o,s);case be.EngulfedBy:return this.t("_1_est_englout_36064",t.name,o,s);case be.NotEngulfedBy:return this.t("_1_n_est_pas_e_89161",t.name,o,s);case be.IsBefore:return"formsInsertedAt"===t.slug?this.t("_1_est_avant_l_83271",t.name,s):this.t("_1_est_avant_l_83271",t.name,o);case be.IsAfter:return"formsInsertedAt"===t.slug?this.t("_1_est_apr_s_l_63712",t.name,s):this.t("_1_est_apr_s_l_63712",t.name,o);case be.Between:return this.t("_1_est_entre_39871",t.name,o,s);case be.StartsWith:return this.t("_1_commence_pa_47720",t.name,o);case be.EndsWith:return this.t("_1_finit_par_65840",t.name,o);case be.Today:return this.t("_1_est_aujourd_42954",t.name);default:return Br(n.operator)}}}getValues(e){return e.fieldType===K.Sex?Ot.map(e=>({id:e,name:this.t(e)})):e.fieldType===K.Language?e.fieldProperty===H.Language?Wr.map(e=>({id:e,name:this.t(e)})):Ct.map(e=>({id:e,name:this.t(e)})):e.fieldType===K.Nationality?this.countriesService.getNationalitiesIdName():e.fieldType===K.Country?this.countriesService.getCountriesIdName():e.fieldType===K.Select&&a(e.values)?e.values.map(({id:e,value:t})=>({id:e,name:t})):[]}valueToString(e,t){const n=function(e){return a(e.values)?e.values:a(e.valuesGroups)?e.valuesGroups.flatMap(e=>e.values):[]}(e);return a(n)?s(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(xi.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})=>[Z.Address,Z.Checkbox,Z.Country,Z.Date,Z.Datetime,Z.File,Z.Language,Z.Nationality,Z.Number,Z.Phone,Z.Select,Z.Sex,Z.Text,Z.Textarea,Z.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:Ic.includes(e.fieldType),isSortable:!!Cc.includes(e.fieldType)||e.fieldType===K.Select&&e.isSelectV2&&!e.canSelectMultiple,sortAttribute:e.slug,width:"picture"===e.slug?80:void 0,minWidth:"picture"===e.slug?void 0:180}))}};Ec=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Ur,is,Wt])],Ec);var jc;!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.Resources="resources",e.SlotDate="slotDate",e.SlotName="slotName",e.Tags="tags",e.WeezeventChecklistId="weezeventChecklistId",e.WeezeventIsSynchronized="weezeventIsSynchronized"}(jc||(jc={}));let Tc=class extends Ec{constructor(e,t,n){super(e,t,n)}getAccreditationsFilters(e,t){return(0,Go.A)([{slug:"name",name:this.t("nom_de_l_accr_d_11908"),category:this.t("accr_ditations_39450"),fieldType:Z.Text,hideEmpty:!0},{slug:"accreditation",name:this.t("Accreditation"),category:this.t("accr_ditations_39450"),fieldType:Z.Select,hideEmpty:!0,needLoading:!0,eventId:e.id},{slug:jc.Description,name:this.t("Description"),category:this.t("accr_ditations_39450"),fieldType:Z.Text},{slug:jc.PrivateNote,name:this.t("note_priv_e_06303"),category:this.t("accr_ditations_39450"),fieldType:Z.Text},a(e.accreditationsCategories)?{slug:"accreditationCategory",name:this.t("cat_gorie_00291"),category:this.t("accr_ditations_39450"),fieldType:Z.Select,values:e.accreditationsCategories,hideEmpty:!0}:null,{slug:"slotName",name:this.t("nom_du_cr_neau_54351"),category:this.t("accr_ditations_39450"),fieldType:Z.Text},{slug:"slotDate",name:this.t("Date"),category:this.t("accr_ditations_39450"),fieldType:Z.Date},{slug:"tag",name:"Tag",category:this.t("accr_ditations_39450"),fieldType:Z.Select,needLoading:!0,organizationId:e.organizationId,eventId:e.id,tagContext:je.Accreditations},{slug:"accreditationCustomField",name:this.t("condition_61066"),category:this.t("accr_ditations_39450"),fieldType:Z.Select,needLoading:!0,organizationId:e.organizationId},{slug:"acronym",name:this.t("Acronym"),category:this.t("accr_ditations_39450"),fieldType:Z.Text},{slug:"color",name:this.t("Color"),category:this.t("accr_ditations_39450"),fieldType:Z.Text,hideEmpty:!0},{slug:"icon",name:this.t("ic_ne_55554"),category:this.t("accr_ditations_39450"),fieldType:Z.Select,values:yt.map(e=>({id:e,name:this.t(e)})),hideEmpty:!0},{slug:"address",name:this.t("Address"),category:this.t("accr_ditations_39450"),fieldType:Z.Text},{slug:"fillingRate",name:this.t("taux_de_remplis_11913"),category:this.t("accr_ditations_39450"),fieldType:Z.Number,hideEmpty:!0},{slug:jc.CreatedBy,name:this.t("cr_e_par_30622"),category:this.t("accr_ditations_39450"),fieldType:Z.Select,hideEmpty:!0,needLoading:!0,organizationId:e.organizationId,eventId:e.id},{slug:jc.CreatedAt,name:this.t("cr_e_le_02658"),category:this.t("accr_ditations_39450"),fieldType:Z.Datetime,hideEmpty:!0},...this.customFieldsToFilters(t)])}getAccreditationsPossibleColumns(e,t){const n=[{slug:jc.Id,name:this.t("id_51738"),isSearchable:!0,isSortable:!0,sortAttribute:p.Id,width:100},{slug:jc.Name,name:this.t("nom_de_l_accr_d_11908"),isSearchable:!0,isSortable:!0,sortAttribute:p.Name,minWidth:240},{slug:jc.Category,name:this.t("nom_de_la_cat_g_03860"),isSearchable:!0,isSortable:!0,sortAttribute:p.Category,minWidth:240},{slug:jc.SlotName,name:this.t("nom_du_cr_neau_54351"),isSearchable:!0,minWidth:240},{slug:jc.SlotDate,name:this.t("Date"),minWidth:180},{slug:jc.Resources,name:this.t("membres_11310"),minWidth:320},{slug:jc.Tags,name:this.t("tags_79499"),isSearchable:!0,minWidth:240},{slug:jc.Conditions,name:this.t("conditions_77756"),minWidth:320},{slug:jc.Address,name:this.t("Address"),isSearchable:!0,minWidth:240},{slug:jc.Latitude,name:this.t("latitude_46176"),isSearchable:!0,minWidth:180},{slug:jc.Longitude,name:this.t("longitude_01695"),isSearchable:!0,minWidth:180},{slug:jc.Acronym,name:this.t("Acronym"),isSearchable:!0,isSortable:!0,sortAttribute:p.Acronym,minWidth:180},{slug:jc.Color,name:this.t("Color"),isSearchable:!0,width:80},{slug:jc.Icon,name:this.t("ic_ne_55554"),width:80},{slug:jc.IconColor,name:this.t("ic_ne_et_couleu_54485"),width:80},{slug:jc.FillingRate,name:this.t("taux_de_remplis_11913"),minWidth:240},{slug:jc.CreatedBy,name:this.t("cr_e_par_30622"),isSearchable:!0,minWidth:180},{slug:jc.CreatedAt,name:this.t("cr_e_le_02658"),isSortable:!0,sortAttribute:p.CreatedAt,minWidth:180},{slug:jc.AutoAccredit,name:this.t("AutoAccredit"),minWidth:180},{slug:jc.Index,name:this.t("Index"),isSortable:!0,sortAttribute:p.Index,width:200}];return e&&n.push({slug:jc.WeezeventIsSynchronized,name:this.t("WeezeventIsSynchronized"),minWidth:180},{slug:jc.WeezeventChecklistId,name:this.t("WeezeventChecklistId"),minWidth:180}),n.concat(this.customFieldsToPossibleColumns(t))}};Tc=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Ur,is,Wt])],Tc);var Dc;!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"}(Dc||(Dc={}));let Pc=class extends Ec{constructor(e,t,n){super(e,t,n)}getFilters(){return[{slug:"features",name:this.t("fonctionnalit_s_47714"),category:this.t("organisation_71863"),fieldType:Z.Select,values:bt.map(e=>({id:e,name:e})),hideEmpty:!0},{slug:"isAdmin",name:this.t("est_admin_98471"),category:this.t("organisation_71863"),fieldType:Z.Checkbox,hideEmpty:!0},{slug:"isActive",name:this.t("est_active_05309"),category:this.t("organisation_71863"),fieldType:Z.Checkbox,hideEmpty:!0},{slug:"useOldBilling",name:this.t("utilise_l_ancie_27299"),category:this.t("organisation_71863"),fieldType:Z.Checkbox},{slug:"isOverLimit",name:this.t("d_passe_la_limi_27046"),category:this.t("organisation_71863"),fieldType:Z.Checkbox,hideEmpty:!0},{slug:Dc.MembersLimit,name:this.t("nombre_de_membr_16400"),category:this.t("organisation_71863"),fieldType:Z.Number},{slug:Dc.PricePerMember,name:this.t("prix_par_membre_20633"),category:this.t("organisation_71863"),fieldType:Z.Number}]}getPossibleColumns(){return[{slug:Dc.Id,name:this.t("id_51738"),isSortable:!0,sortAttribute:de.Id,width:100},{slug:Dc.Name,name:this.t("nom_de_l_organi_49583"),minWidth:240},{slug:Dc.InsertedAt,name:this.t("date_de_cr_atio_00749"),isSortable:!0,sortAttribute:de.InsertedAt,width:200},{slug:Dc.PeriodEndAt,name:this.t("date_de_fin_de_17750"),isSortable:!0,sortAttribute:de.PeriodEndAt,width:200},{slug:Dc.Features,name:this.t("fonctionnalit_s_47714"),minWidth:320},{slug:Dc.NumberOfEvents,name:this.t("nombre_d_v_nem_14214"),minWidth:180},{slug:Dc.NumberOfMembers,name:this.t("nombre_de_membr_49522"),minWidth:180},{slug:Dc.MembersLimit,name:this.t("nombre_de_membr_16400"),minWidth:180},{slug:Dc.PricePerMember,name:this.t("prix_par_membre_20633"),minWidth:180}]}};Pc=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Ur,is,Wt])],Pc);let Rc=class extends Ec{constructor(e,t,n){super(e,t,n)}getCampaignsFilters(e){return[{slug:"state",name:this.t("status_06428"),category:this.t("Campaigns"),fieldType:Z.Select,values:dt.map(e=>({id:e,name:e})),hideEmpty:!0},{slug:"campaign_type",name:this.t("type_35427"),category:this.t("Campaigns"),fieldType:Z.Select,values:ut.map(e=>({id:e,name:e})),hideEmpty:!0},{slug:"created_by",name:this.t("cr_e_par_30622"),category:this.t("Campaigns"),fieldType:Z.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:Z.Date,hideEmpty:!0}]}};function Oc(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 Br()}}Rc=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Ur,is,Wt])],Rc);let Fc=class extends Ec{constructor(e,t,n){super(e,t,n)}getCustomFieldsFilters(e,t){return[{slug:"name",name:this.t("nom_du_champ_48329"),category:this.t("champs_de_formu_64126"),fieldType:Z.Text,hideEmpty:!0},{slug:"label",name:this.t("label_08243"),category:this.t("champs_de_formu_64126"),fieldType:Z.Text},{slug:"customFieldCategory",name:this.t("cat_gorie_00291"),category:this.t("champs_de_formu_64126"),fieldType:Z.Select,values:t.customFieldsCategories.nodes,hideEmpty:!0},{slug:"fieldType",name:this.t("type_35427"),category:this.t("champs_de_formu_64126"),fieldType:Z.Select,values:kt.map(e=>({id:e,name:e})),hideEmpty:!0},{slug:"variety",name:this.t("typologie_34041"),category:this.t("champs_de_formu_64126"),fieldType:Z.Select,values:(0,Uo.A)(gt.map(e=>({id:e,name:Oc(this.t.bind(this),e)})),({name:e})=>e),hideEmpty:!0},{slug:"privacy",name:this.t("Privacy"),category:this.t("champs_de_formu_64126"),fieldType:Z.Checkbox,hideEmpty:!0},{slug:"condition",name:"Condition",category:this.t("champs_de_formu_64126"),fieldType:Z.Select,values:t.customFields.nodes},{slug:"createdBy",name:this.t("cr_e_par_30622"),category:this.t("champs_de_formu_64126"),fieldType:Z.Select,hideEmpty:!0,needLoading:!0,organizationId:e},{slug:"createdAt",name:this.t("cr_e_le_02658"),category:this.t("champs_de_formu_64126"),fieldType:Z.Datetime,hideEmpty:!0}]}getCustomFieldsPossibleColumns(){return[{slug:"id",name:this.t("id_51738"),isSortable:!0,sortAttribute:S.Id,width:100},{slug:"name",name:this.t("nom_du_champ_48329"),isSortable:!0,sortAttribute:S.Name,minWidth:240},{slug:"label",name:this.t("label_08243"),isSortable:!0,sortAttribute:S.Label,minWidth:180},{slug:"category",name:this.t("Category"),isSortable:!0,sortAttribute:S.Category,minWidth:240},{slug:"variety",name:this.t("typologie_34041"),minWidth:180},{slug:"fieldType",name:this.t("type_35427"),isSortable:!0,sortAttribute:S.Type,width:250},{slug:"numberOfTimesUsed",name:this.t("nombre_d_utilis_58389"),width:200},{slug:"state",name:this.t("Privacy"),isSortable:!0,sortAttribute:S.Status,width:200},{slug:"values",name:this.t("valeurs_34314"),minWidth:240},{slug:"variable",name:this.t("variable_pour_l_45711"),minWidth:180},{slug:"createdBy",name:this.t("cr_par_41994"),minWidth:180},{slug:"createdAt",name:this.t("cr_le_85046"),isSortable:!0,sortAttribute:S.CreatedAt,minWidth:180}]}};var zc,Mc,$c,Nc,Bc,Lc;function Vc(e){switch(e){case Mc.AccreditationsMatrix:case Bc.AccreditationsMatrix:return"table-cells";case Nc.Calendar:case Bc.Calendar:return"calendar";case $c.Card:return"rectangle-list";case zc.List:case Mc.List:case $c.List:case Nc.List:case Bc.List:return"table";case Nc.Map:return"map-location";case zc.SlotsList:case Nc.SlotsList:return"table";default:return Br()}}function Uc(e,t){switch(t){case Mc.AccreditationsMatrix:case Bc.AccreditationsMatrix:return e("matrice_des_acc_84939");case Nc.Calendar:case Bc.Calendar:return e("vue_planning_91663");case $c.Card:return e("vue_grille_37962");case zc.List:case Mc.List:case $c.List:case Nc.List:case Bc.List:return e("vue_liste_56882");case Nc.Map:return e("vue_carte_79064");case zc.SlotsList:case Nc.SlotsList:return e("vue_liste_cr_n_47406");default:return Br()}}Fc=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Ur,is,Wt])],Fc),function(e){e.List="List",e.SlotsList="SlotsList"}(zc||(zc={})),(Lc=Mc||(Mc={})).AccreditationsMatrix="AccreditationsMatrix",Lc.List="List",function(e){e.Card="Card",e.List="List"}($c||($c={})),function(e){e.Calendar="Calendar",e.List="List",e.Map="Map",e.SlotsList="SlotsList"}(Nc||(Nc={})),function(e){e.AccreditationsMatrix="AccreditationsMatrix",e.Calendar="Calendar",e.List="List"}(Bc||(Bc={}));var Gc;!function(e){e.AssignedResources="resources",e.Campaigns="campaigns",e.CanLeadersAddMembers="canLeadersAddMembers",e.CanLeadersDeleteMembers="canLeadersDeleteMembers",e.CanLeadersEditColumns="canLeadersEditColumns",e.CanLeadersEditCustomFields="canLeadersEditCustomFields",e.CanLeadersEditMembers="canLeadersEditMembers",e.CanLeadersImportMembers="canLeadersImportMembers",e.CanLeadersSeeHiddenAccreditationsSlots="canLeadersSeeHiddenAccreditationsSlots",e.CreatedAt="createdAt",e.CreatedBy="createdBy",e.DeadlineDate="deadlineDate",e.DelegationCategory="delegationCategory",e.DelegationSpaceLink="delegationSpaceLink",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.PrivateNote="privateNote",e.ShowFormLinkInDelegationSpace="showFormLinkInDelegationSpace",e.ShowInDelegation="showInDelegation",e.State="delegationState",e.UsedCustomFieldsFilled="usedCustomFieldsFilled",e.Tags="tags"}(Gc||(Gc={}));let Wc=class extends Ec{constructor(e,t,n){super(e,t,n)}getDelegationsFilters(e,t,n,i){return(0,Go.A)([{slug:Gc.Name,name:this.t("nom_de_la_d_l_g_28087"),category:this.t("d_l_gations_78318"),fieldType:Z.Text,hideEmpty:!0},{slug:Gc.Description,name:this.t("Description"),category:this.t("d_l_gations_78318"),fieldType:Z.Text},{slug:Gc.PrivateNote,name:this.t("note_priv_e_06303"),category:this.t("d_l_gations_78318"),fieldType:Z.Text},a(i)?{slug:Gc.DelegationCategory,name:this.t("cat_gorie_00291"),category:this.t("d_l_gations_78318"),fieldType:Z.Select,values:i,hideEmpty:!0}:null,{slug:"delegationState",name:this.t("status_06428"),category:this.t("d_l_gations_78318"),fieldType:Z.Select,values:pt.map(e=>({id:e,name:e})),hideEmpty:!0},{slug:Gc.Leaders,name:this.t("reponsable_82458_plural"),category:this.t("d_l_gations_78318"),fieldType:Z.Select,needLoading:!0,organizationId:e,eventId:t},{slug:"form",name:this.t("Form"),category:this.t("d_l_gations_78318"),fieldType:Z.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:Z.Date},{slug:"tag",name:this.t("Tag"),category:this.t("d_l_gations_78318"),fieldType:Z.Select,needLoading:!0,organizationId:e,eventId:t,tagContext:je.Delegations},{slug:"resources",name:this.t("nombre_de_membr_08851"),category:this.t("d_l_gations_78318"),fieldType:Z.Number,hideEmpty:!0},{slug:"fillingRate",name:this.t("taux_de_remplis_11913"),category:this.t("d_l_gations_78318"),fieldType:Z.Number,hideEmpty:!0},{slug:Gc.ShowInDelegation,name:this.t("ShowInDelegationSpace"),category:this.t("d_l_gations_78318"),fieldType:Z.Checkbox,hideEmpty:!0},{slug:Gc.CanLeadersAddMembers,name:this.t("CanLeadersAddMembers"),category:this.t("d_l_gations_78318"),fieldType:Z.Checkbox,hideEmpty:!0},{slug:Gc.CanLeadersDeleteMembers,name:this.t("CanLeadersAddMembers"),category:this.t("d_l_gations_78318"),fieldType:Z.Checkbox,hideEmpty:!0},{slug:Gc.CanLeadersEditMembers,name:this.t("CanLeadersEditMembers"),category:this.t("d_l_gations_78318"),fieldType:Z.Checkbox,hideEmpty:!0},{slug:Gc.CanLeadersEditColumns,name:this.t("CanLeadersAddMembers"),category:this.t("d_l_gations_78318"),fieldType:Z.Checkbox,hideEmpty:!0},{slug:Gc.CanLeadersEditCustomFields,name:this.t("CanLeadersEditCustomFields"),category:this.t("d_l_gations_78318"),fieldType:Z.Checkbox,hideEmpty:!0},{slug:Gc.CanLeadersImportMembers,name:this.t("CanLeadersImportMembers"),category:this.t("d_l_gations_78318"),fieldType:Z.Checkbox,hideEmpty:!0},{slug:Gc.CanLeadersSeeHiddenAccreditationsSlots,name:this.t("CanLeadersSeeHiddenAccreditationsSlots"),category:this.t("d_l_gations_78318"),fieldType:Z.Checkbox,hideEmpty:!0},{slug:Gc.ShowFormLinkInDelegationSpace,name:this.t("afficher_le_lie_05841"),category:this.t("d_l_gations_78318"),fieldType:Z.Checkbox,hideEmpty:!0},t?{slug:"accreditation",name:this.t("accr_ditations_39450"),category:this.t("d_l_gations_78318"),fieldType:Z.Select,needLoading:!0,eventId:t}:null,{slug:Gc.CreatedBy,name:this.t("cr_e_par_30622"),category:this.t("d_l_gations_78318"),fieldType:Z.Select,hideEmpty:!0,needLoading:!0,organizationId:e,eventId:t},{slug:Gc.CreatedAt,name:this.t("cr_e_le_02658"),category:this.t("d_l_gations_78318"),fieldType:Z.Datetime,hideEmpty:!0},t?null:{slug:"event",name:this.t("_v_nement_22345"),category:this.t("d_l_gations_78318"),fieldType:Z.Select,hideEmpty:!0,needLoading:!0,organizationId:e},{slug:Gc.UsedCustomFieldsFilled,name:this.t("champs_personna_27238"),category:this.t("d_l_gations_78318"),fieldType:Z.Checkbox,hideEmpty:!0},...this.customFieldsToFilters(n)])}getDelegationsPossibleColumns(e){return[{slug:Gc.Id,name:this.t("id_51738"),isSearchable:!0,isSortable:!0,sortAttribute:P.Id,width:100},{slug:Gc.Name,name:this.t("nom_de_la_d_l_g_28087"),isSearchable:!0,isSortable:!0,sortAttribute:P.Name,minWidth:240},{slug:Gc.DelegationCategory,name:this.t("cat_gorie_00291"),isSearchable:!0,isSortable:!0,sortAttribute:P.Category,minWidth:240},{slug:Gc.State,name:this.t("status_06428"),minWidth:180},{slug:Gc.Leaders,name:this.t("reponsable_82458_plural"),isSearchable:!0,minWidth:320},{slug:Gc.Form,name:this.t("Form"),isSearchable:!0,minWidth:180},{slug:Gc.FormLink,name:this.t("FormLink"),minWidth:240},{slug:Gc.DelegationSpaceLink,name:this.t("DelegationSpaceLink"),minWidth:240},{slug:Gc.DeadlineDate,name:this.t("date_limite_d_i_79779"),minWidth:180},{slug:Gc.MaxResources,name:this.t("MaxResources"),minWidth:180},{slug:Gc.AssignedResources,name:this.t("membres_11310"),minWidth:240},{slug:Gc.Tags,name:this.t("tags_79499"),isSearchable:!0,minWidth:240},{slug:Gc.FillingRate,name:this.t("taux_de_remplis_11913"),minWidth:240},{slug:Gc.CreatedBy,name:this.t("cr_e_par_30622"),isSearchable:!0,minWidth:180},{slug:Gc.CreatedAt,name:this.t("cr_e_le_02658"),isSortable:!0,sortAttribute:P.CreatedAt,minWidth:180},{slug:Gc.ShowInDelegation,name:this.t("ShowInDelegationSpace"),minWidth:180},{slug:Gc.CanLeadersAddMembers,name:this.t("CanLeadersAddMembers"),minWidth:180},{slug:Gc.CanLeadersEditMembers,name:this.t("CanLeadersEditMembers"),minWidth:180},{slug:Gc.CanLeadersDeleteMembers,name:this.t("CanLeadersDeleteMembers"),minWidth:180},{slug:Gc.CanLeadersEditColumns,name:this.t("CanLeadersEditColumns"),minWidth:180},{slug:Gc.CanLeadersEditCustomFields,name:this.t("CanLeadersEditCustomFields"),minWidth:180},{slug:Gc.CanLeadersImportMembers,name:this.t("CanLeadersImportMembers"),minWidth:180},{slug:Gc.CanLeadersSeeHiddenAccreditationsSlots,name:this.t("CanLeadersSeeHiddenAccreditationsSlots"),minWidth:180},{slug:Gc.ShowFormLinkInDelegationSpace,name:this.t("afficher_le_lie_05841"),minWidth:180},{slug:Gc.IsLocked,name:this.t("IsLocked"),minWidth:180},{slug:Gc.Events,name:this.t("_v_nements_53672"),minWidth:320},{slug:Gc.Campaigns,name:this.t("campagnes_que_l_81468"),minWidth:320},{slug:Gc.Documents,name:this.t("documents_que_l_18755"),minWidth:320},{slug:Gc.UsedCustomFieldsFilled,name:this.t("champs_personna_27238"),minWidth:180},...this.customFieldsToPossibleColumns(e)]}};Wc=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Ur,is,Wt])],Wc);var qc;!function(e){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"}(qc||(qc={}));let Hc=class extends Ec{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:Z.Text,hideEmpty:!0},{slug:qc.Description,name:this.t("Description"),category:this.t("Event"),fieldType:Z.Text},{slug:"startAt",name:this.t("date_de_d_but_43380"),category:this.t("Event"),fieldType:Z.Date,hideEmpty:!0},{slug:"endAt",name:this.t("date_de_fin_86920"),category:this.t("Event"),fieldType:Z.Date,hideEmpty:!0},{slug:"state",name:this.t("status_06428"),category:this.t("Event"),fieldType:Z.Select,values:[{id:U.Ongoing,name:this.t(U.Ongoing)},{id:U.Upcoming,name:this.t(U.Upcoming)},{id:U.Done,name:this.t(U.Done)}],hideEmpty:!0},{slug:"tag",name:this.t("Tag"),category:this.t("Event"),fieldType:Z.Select,needLoading:!0,organizationId:e,tagContext:je.Events},...this.customFieldsToFilters(t)]}getEventPossibleColumns(e){return[{slug:qc.Id,name:this.t("id_51738"),isSearchable:!0,isSortable:!0,sortAttribute:V.Id,width:100},{slug:qc.Name,name:this.t("nom_de_l_v_nem_08711"),isSearchable:!0,isSortable:!0,sortAttribute:V.Name,minWidth:240},{slug:qc.StartAt,name:this.t("date_de_d_but_43380"),isSortable:!0,sortAttribute:V.StartAt,minWidth:180},{slug:qc.EndAt,name:this.t("date_de_fin_86920"),isSortable:!0,sortAttribute:V.EndAt,minWidth:180},{slug:qc.State,name:this.t("status_06428"),minWidth:180},{slug:qc.Tags,name:this.t("tags_79499"),minWidth:320},{slug:qc.NumberOfMembers,name:this.t("nombre_de_membr_08851"),minWidth:180},{slug:qc.NumberOfMembersAssigned,name:this.t("nombre_de_membr_87779_plural"),minWidth:180},{slug:qc.NumberOfMembersAccredited,name:this.t("nombre_de_membr_25913"),minWidth:180}].concat(this.customFieldsToPossibleColumns(e))}};Hc=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Ur,is,Wt])],Hc);var Kc;!function(e){e.Acronym="acronym",e.Address="address",e.Category="category",e.CategoryLeaders="categoryLeaders",e.CheckedInRate="checkedInRate",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.Leaders="leaders",e.Longitude="longitude",e.Name="name",e.PrivateNote="privateNote",e.Resources="resources",e.Slot="slot",e.SlotName="slotName",e.State="state",e.Tags="tags"}(Kc||(Kc={}));let Yc=class extends Ec{constructor(e,t,n){super(e,t,n)}getPositionsFilters(e,t){return(0,Go.A)([{slug:Kc.Name,name:this.t("nom_de_la_missi_64605"),category:this.t("missions_63972"),fieldType:Z.Text,hideEmpty:!0},{slug:"position",name:this.t("Position"),category:this.t("missions_63972"),fieldType:Z.Select,hideEmpty:!0,needLoading:!0,eventId:e.id},{slug:Kc.Description,name:this.t("Description"),category:this.t("missions_63972"),fieldType:Z.Text},{slug:Kc.PrivateNote,name:this.t("note_priv_e_06303"),category:this.t("missions_63972"),fieldType:Z.Text},a(e.positionsCategories)?{slug:"positionCategory",name:this.t("cat_gorie_00291"),category:this.t("missions_63972"),fieldType:Z.Select,values:e.positionsCategories,hideEmpty:!0}:null,{slug:"positionSlot",name:this.t("cr_neau_11117"),category:this.t("missions_63972"),fieldType:Z.DateTimeRange,startAt:e.startAt,endAt:e.endAt},{slug:"positionSlotName",name:this.t("nom_du_cr_neau_54351"),category:this.t("missions_63972"),fieldType:Z.Text},{slug:"tag",name:this.t("Tag"),category:this.t("missions_63972"),fieldType:Z.Select,needLoading:!0,organizationId:e.organizationId,eventId:e.id,tagContext:je.Positions},{slug:"positionCustomField",name:this.t("condition_61066"),category:this.t("missions_63972"),fieldType:Z.Select,needLoading:!0,organizationId:e.organizationId},{slug:"acronym",name:this.t("Acronym"),category:this.t("missions_63972"),fieldType:Z.Text},{slug:"color",name:this.t("Color"),category:this.t("missions_63972"),fieldType:Z.Text,hideEmpty:!0},{slug:"icon",name:this.t("ic_ne_55554"),category:this.t("missions_63972"),fieldType:Z.Select,values:yt.map(e=>({id:e,name:this.t(e)})),hideEmpty:!0},{slug:"address",name:this.t("Address"),category:this.t("missions_63972"),fieldType:Z.Text},{slug:"latitude",name:this.t("Latitude"),category:this.t("missions_63972"),fieldType:Z.Number},{slug:"longitude",name:this.t("Longitude"),category:this.t("missions_63972"),fieldType:Z.Number},{slug:"state",name:this.t("statut_des_ress_73550"),category:this.t("missions_63972"),fieldType:Z.Select,hideEmpty:!0,values:Et.map(e=>({id:e,name:this.t(e)}))},{slug:"fillingRate",name:this.t("taux_de_remplis_11913"),category:this.t("missions_63972"),fieldType:Z.Number,hideEmpty:!0},{slug:"checkedInRate",name:this.t("taux_de_pointag_87285"),category:this.t("missions_63972"),fieldType:Z.Number,hideEmpty:!0},{slug:Kc.Leaders,name:this.t("nombre_de_respo_19772"),category:this.t("missions_63972"),fieldType:Z.Number,hideEmpty:!0},{slug:Kc.CategoryLeaders,name:this.t("nombre_de_respo_01994"),category:this.t("missions_63972"),fieldType:Z.Number,hideEmpty:!0},{slug:Kc.CreatedBy,name:this.t("cr_e_par_30622"),category:this.t("missions_63972"),fieldType:Z.Select,hideEmpty:!0,needLoading:!0,organizationId:e.organizationId,eventId:e.id},{slug:Kc.CreatedAt,name:this.t("cr_e_le_02658"),category:this.t("missions_63972"),fieldType:Z.Datetime,hideEmpty:!0},...this.customFieldsToFilters(t)])}getPositionsPossibleColumns(e){return[{slug:Kc.Id,name:this.t("id_51738"),isSearchable:!0,isSortable:!0,sortAttribute:fe.Id,width:100},{slug:Kc.Name,name:this.t("nom_de_la_missi_64605"),isSearchable:!0,isSortable:!0,sortAttribute:fe.Name,minWidth:120},{slug:Kc.Category,name:this.t("cat_gorie_00291"),isSearchable:!0,isSortable:!0,sortAttribute:fe.Category,minWidth:240},{slug:Kc.SlotName,name:this.t("nom_du_cr_neau_54351"),isSearchable:!0,minWidth:180},{slug:Kc.Slot,name:this.t("cr_neau_11117"),isSortable:!0,sortAttribute:fe.Slot,minWidth:240},{slug:Kc.Resources,name:this.t("membres_11310"),minWidth:320},{slug:Kc.Tags,name:this.t("tags_79499"),isSearchable:!0,minWidth:320},{slug:Kc.Conditions,name:this.t("conditions_77756"),minWidth:320},{slug:Kc.Address,name:this.t("Address"),isSearchable:!0,minWidth:240},{slug:Kc.Latitude,name:this.t("latitude_46176"),isSearchable:!0,minWidth:180},{slug:Kc.Longitude,name:this.t("longitude_01695"),isSearchable:!0,minWidth:180},{slug:Kc.Acronym,name:this.t("Acronym"),isSearchable:!0,minWidth:180},{slug:Kc.Color,name:this.t("Color"),isSearchable:!0,width:80},{slug:Kc.Icon,name:this.t("ic_ne_55554"),width:80},{slug:Kc.IconColor,name:this.t("ic_ne_et_couleu_54485"),width:80},{slug:Kc.State,name:this.t("statut_des_ress_73550"),minWidth:240},{slug:Kc.FillingRate,name:this.t("taux_de_remplis_11913"),minWidth:240},{slug:Kc.CheckedInRate,name:this.t("taux_de_pointag_87285"),minWidth:240},{slug:Kc.CreatedBy,name:this.t("cr_e_par_30622"),isSearchable:!0,minWidth:180},{slug:Kc.CreatedAt,name:this.t("cr_e_le_02658"),isSortable:!0,sortAttribute:fe.CreatedAt,minWidth:180},{slug:Kc.Leaders,name:this.t("responsables_de_54941"),isSearchable:!0,minWidth:320},{slug:Kc.CategoryLeaders,name:this.t("responsables_de_22220"),isSearchable:!0,minWidth:320}].concat(this.customFieldsToPossibleColumns(e))}};Yc=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Ur,is,Wt])],Yc);function Zc(e){return{includeDelegations:e.includes("delegations")||e.includes("delegations_categories"),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 Jc=class extends Ec{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(),{slug:"tag",name:this.t("Tag"),category:this.t("autres_99130"),fieldType:Z.Select,needLoading:!0,organizationId:e,tagContext:je.UsersInfos},{slug:"sameEmail",name:this.t("nombre_de_profi_42316"),category:this.t("autres_99130"),fieldType:Z.Number,hideEmpty:!0},{slug:"segments",name:this.t("fait_partie_de_44650"),category:this.t("autres_99130"),fieldType:Z.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:Z.Checkbox},{slug:"isLeader",name:this.t("est_responsable_27270"),category:this.t("autres_99130"),fieldType:Z.Checkbox}]}getDelegationMembersFilters(e){return this.getBaseFilters(e)}getOrganizationUsersPossibleColumns(e){return[...this.getBaseColumns(),{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:Me.InsertedAt,width:230},{slug:"tags",name:this.t("tags_79499"),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:Me.Name,minWidth:240},{slug:"email",name:this.t("e_mail_du_membr_69509"),isSearchable:!0,minWidth:180},{slug:"id",name:this.t("id_51738"),isSearchable:!0,isSortable:!0,sortAttribute:Me.Id,width:100}]}getBaseFilters(e){return[{slug:"email",name:this.t("Email"),category:this.t("champs_de_formu_64126"),fieldType:Z.Text},{slug:"registrationDate",name:this.t("date_d_inscript_31369"),category:this.t("champs_de_formu_64126"),fieldType:Z.Date,hideEmpty:!0},...this.customFieldsToFilters(e)]}getEventsFilters(e){return[{slug:"event",name:this.t("_v_nement_22345"),category:this.t("Event"),fieldType:Z.Select,hideEmpty:!0,needLoading:!0,organizationId:e},{slug:"numberOfEvents",name:this.t("nombre_d_v_nem_14214"),category:this.t("Event"),fieldType:Z.Number,hideEmpty:!0}]}getFormsFilters(e){return[{slug:"forms",name:this.t("formulaires_rem_62495"),category:this.t("Form_plural"),fieldType:Z.Select,needLoading:!0,organizationId:e},{slug:"formsInsertedAt",name:this.t("dates_de_rempli_65075"),category:this.t("Form_plural"),fieldType:Z.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:Z.Text,hideEmpty:!0},{slug:"positionCategoryName",name:this.t("nom_de_la_cat_g_57279"),category:this.t("missions_63972"),fieldType:Z.Text,hideEmpty:!0},{slug:"numberOfAssignments",name:this.t("nombre_d_affect_31455"),category:this.t("missions_63972"),fieldType:Z.Number,hideEmpty:!0}]}getDelegationsFilters(e){return[{slug:"delegation",name:this.t("fait_partie_de_32196"),category:this.t("d_l_gations_78318"),fieldType:Z.Select,needLoading:!0,organizationId:e},{slug:"delegationCategory",name:this.t("inscrit_via_la_12241"),category:this.t("d_l_gations_78318"),fieldType:Z.Select,needLoading:!0,organizationId:e},{slug:"isDelegationLeader",name:this.t("est_responsable_87662"),category:this.t("d_l_gations_78318"),fieldType:Z.Checkbox}]}getEmailsFilters(e){return[{slug:"campaign",name:this.t("campagne_97871"),category:this.t("e_mails_09850"),fieldType:Z.Campaign,needLoading:!0,organizationId:e},{slug:"emailBlacklist",name:this.t("ne_souhaite_plu_08853"),category:this.t("e_mails_09850"),fieldType:Z.Checkbox,hideEmpty:!0}]}getCommentsFilters(){return[{slug:"comments",name:this.t("commentaires_96492"),category:this.t("commentaires_96492"),fieldType:Z.Text},{slug:"lastCommentAt",name:this.t("date_du_dernier_73554"),category:this.t("commentaires_96492"),fieldType:Z.Date,hideEmpty:!0}]}};Jc=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Ur,is,Wt])],Jc);var Xc;function Qc(e,t,n){return t===Bc.AccreditationsMatrix?{includeAccreditations:!1,includeAccreditationsMatrix:!0,includeAvailability:!1,includeComments:!1,includeEmails:!1,includeFormsUsersInfos:!1,includeForms:!1,includeDelegation:!1,includeNumberOfAccreditations:!1,includeNumberOfAssignments:!1,includeNumberOfAssignmentsDays:!1,includeNumberOfAvailableDays:!1,includePositions:!1,includeRoles:!1,includeTags:!1,includeTeam:!1,includeVolunteerMinutes:!1,includeWishedPositions:!1,includePreassignedPositions:!1,includeWeezeventChecklists:!1,includeWeezevent:!1,includeWeezeventUrls:!1}:{includeAccreditations:e.includes(Xc.Accreditations)||e.includes(Xc.AccreditationsCategories)||e.includes(Xc.AccreditationsSlots)||e.includes(Xc.WishedAccreditationSlots)||e.includes(Xc.ScannedAccreditations),includeAccreditationsMatrix:!1,includeAvailability:e.includes(Xc.Availability),includeComments:e.includes(Xc.Comments),includeDelegation:e.includes(Xc.Delegations)||e.includes(Xc.DelegationCategory),includeEmails:e.includes(Xc.CampaignsStates),includeFormsUsersInfos:e.includes(Xc.CompletedForms)||e.includes(Xc.FormsInsertedAt)||e.some(e=>e.startsWith("form_inserted_at"))||e.includes(Xc.Availability)||e.includes(Xc.TeamCode)||e.includes(Xc.TeamMembers),includeForms:e.includes(Xc.CompletedForms)||e.includes(Xc.FormsInsertedAt)||e.some(e=>e.startsWith("form_inserted_at"))||e.includes(Xc.Availability),includeNumberOfAccreditations:e.includes(Xc.NumberOfAccreditations),includeNumberOfAssignments:e.includes(Xc.NumberOfAssignments),includeNumberOfAssignmentsDays:e.includes(Xc.NumberOfAssignmentsDays),includeNumberOfAvailableDays:e.includes(Xc.NumberOfAvailableDays),includePositions:e.includes(Xc.Positions)||e.includes(Xc.PositionsCategories)||e.includes(Xc.WishedPositions)||e.includes(Xc.CheckedInPositions),includeRoles:e.includes(Xc.Roles),includeTags:e.includes(Xc.Tags),includeTeam:e.includes(Xc.TeamCode)||e.includes(Xc.TeamMembers),includeVolunteerMinutes:e.includes(Xc.VolunteerMinutes),includeWishedPositions:e.includes(Xc.WishedPositions),includePreassignedPositions:e.includes(Xc.PreassignedPositionsCategories)||e.includes(Xc.PreassignedPositions),includeWeezeventChecklists:e.includes(Xc.WeezaccessChecklists),includeWeezevent:e.includes(Xc.WeezeventBarcodeId)||e.includes(Xc.WeezeventPairedAt),includeWeezeventUrls:!0===n?.includeWeezeventUrls&&(e.includes(Xc.WeezeventBarcodeId)||e.includes(Xc.WeezeventShortTag))}}!function(e){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.DelegationCategory="delegation_category",e.Delegations="delegations",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.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.WeezeventPairedAt="weezevent_paired_at",e.WeezeventShortTag="weezevent_short_tag",e.WishedAccreditationSlots="wished_accreditation_slots",e.WishedPositions="wished_positions"}(Xc||(Xc={}));let el=class extends Ec{constructor(e,t,n){super(e,t,n)}getVolunteersFilters(e,t,n,i,o,{hasAccreditations:r,hasDelegations:s,isWeezeventConnected:a}){return[...this.getBaseFilters(i),...this.getAvailabilitiesFilters(t,o),...this.getPositionsFilters(e,t,o),...r?this.getAccreditationsFilters(e,t,o):[],...s?this.getDelegationsFilters(e,t):[],...this.getSegmentsFilters(e,t,n,o),...this.getFormsFilters(t),...this.getTeamsFilters(),...a?this.getWeezeventFilters(t):[],...this.getEmailsFilters(t),...this.getCommentsFilter(e,t),{slug:"tag",name:this.t("Tag"),category:this.t("autres_99130"),fieldType:Z.Select,needLoading:!0,organizationId:e,eventId:t,tagContext:je.UsersInfos},{slug:"sameEmail",name:this.t("nombre_de_profi_42316"),category:this.t("autres_99130"),fieldType:Z.Number,hideEmpty:!0},{slug:"possibleDuplicates",name:this.t("potentiel_doubl_87672"),category:this.t("autres_99130"),fieldType:Z.Checkbox,hideEmpty:!0},{slug:"isLeader",name:this.t("est_responsable_19679"),category:this.t("autres_99130"),fieldType:Z.Checkbox},{slug:"isPositionLeader",name:this.t("est_responsable_27270"),category:this.t("autres_99130"),fieldType:Z.Checkbox},{slug:"isPositionCategoryLeader",name:this.t("est_responsable_91796"),category:this.t("autres_99130"),fieldType:Z.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,r){return[...this.getBaseFilters(n),...this.getAccreditationsFilters(e,t,i),...o.positionDisplay===Ae.None?[]:this.getPositionMembersFilters(e,t,n,i),...r?this.getWeezeventFilters(t):[]]}getVolunteersPossibleColumns(e,t,{hasAccreditations:n,isWeezeventConnected:i}){return[...this.getBaseColumns(e),...this.getFormsColumns(t),...this.getPositionsColumns(),...i?this.getWeezeventColumns():[],...n?this.getAccreditationsColumns():[],...this.getAvailabilitiesColumns(),...this.getDelegationsColumns(),{slug:Xc.CampaignsStates,name:this.t("statut_des_camp_25280"),minWidth:320},{slug:Xc.Tags,name:this.t("tags_79499"),isSearchable:!0,minWidth:320},{slug:Xc.Comments,name:this.t("commentaires_96492"),isSearchable:!0,minWidth:320},{slug:Xc.Roles,name:this.t("r_les_61679"),minWidth:320}]}getPositionMembersPossibleColumns(e){return[...this.getBaseColumns(e),...this.getPositionsColumns()]}getAccreditationMembersPossibleColumns(e){return[...this.getBaseColumns(e),...this.getAccreditationsColumns(),...this.getDelegationsColumns()]}getDelegationCategoryMembersPossibleColumns(e,t){return[...this.getBaseColumns(e),...this.getAccreditationsColumns(),...t?this.getWeezeventColumns():[],{slug:Xc.CampaignsStates,name:this.t("statut_des_camp_25280")},{slug:Xc.Delegations,name:this.t("Delegation"),isSearchable:!0}]}getDelegationMembersPossibleColumns(e,{isWeezeventConnected:t,positionDisplay:n,slotDisplay:i}){return[...this.getBaseColumns(e),...this.getAccreditationsColumns(),...n===Ae.None?[]:this.getPositionsColumns(),...i===we.Hide?[]:this.getAvailabilitiesColumns(),...t?this.getWeezeventColumns():[],{slug:Xc.CampaignsStates,name:this.t("statut_des_camp_25280")}]}getBaseColumns(e){return[{slug:Xc.Email,name:this.t("e_mail_du_membr_69509"),isSearchable:!0,minWidth:180},{slug:Xc.Id,name:this.t("id_51738"),isSearchable:!0,isSortable:!0,sortAttribute:Be.Id,width:100},{slug:Xc.LocalId,name:this.t("id_sur_l_v_nem_01171"),isSearchable:!0,isSortable:!0,sortAttribute:Be.LocalId,width:100},{slug:Xc.Name,name:this.t("full_name"),isSearchable:!0,isSortable:!0,sortAttribute:Be.Name,minWidth:240},{slug:Xc.InsertedAt,name:this.t("date_d_inscript_31369"),isSortable:!0,sortAttribute:Be.InsertedAt,width:240},...this.customFieldsToPossibleColumns(e)]}getAvailabilitiesColumns(){return[{slug:Xc.Availability,name:this.t("disponibilit_s_49923"),minWidth:320}]}getFormsColumns(e){return[{slug:Xc.CompletedForms,name:this.t("formulaires_rem_62495"),minWidth:320},{slug:Xc.FormsInsertedAt,name:this.t("dates_de_rempli_65075"),minWidth:320},...(0,Uo.A)(e,e=>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:Xc.TeamCode,name:this.t("code_quipe_14296"),isSearchable:!0,isSortable:!0,sortAttribute:Be.TeamCode,minWidth:180},{slug:Xc.TeamMembers,name:this.t("membres_de_l_q_00891"),minWidth:240}]}getPositionsColumns(){return[{slug:Xc.NumberOfAssignments,name:this.t("nombre_d_affect_31455"),width:240},{slug:Xc.NumberOfAssignmentsDays,name:this.t("nombre_de_jours_86280"),width:240},{slug:Xc.NumberOfAvailableDays,name:this.t("nombre_de_jours_07962"),width:240},{slug:Xc.Positions,name:this.t("missions_affect_97811"),minWidth:320},{slug:Xc.PositionsCategories,name:this.t("cat_gories_de_m_93035"),minWidth:320},{slug:Xc.VolunteerMinutes,name:this.t("nombre_de_minut_50497"),width:240},{slug:Xc.VolunteerRegistrationState,name:this.t("status_d_affect_75769"),isSortable:!0,sortAttribute:Be.State,width:240},{slug:Xc.WishedPositions,name:this.t("missions_souhai_23225"),minWidth:320},{slug:Xc.PreassignedPositions,name:this.t("missions_pr_af_02950"),minWidth:320},{slug:Xc.PreassignedPositionsCategories,name:this.t("cat_gories_pr_83825"),minWidth:320},{slug:Xc.CheckedInPositions,name:this.t("missions_point_05292"),minWidth:320}]}getAccreditationsColumns(){return(0,Go.A)([{slug:Xc.Accreditations,name:this.t("accr_ditations_33155"),minWidth:320},{slug:Xc.AccreditationsCategories,name:this.t("cat_gories_d_ac_37678"),minWidth:320},{slug:Xc.AccreditationState,name:this.t("statut_d_accr_d_75527"),isSortable:!0,sortAttribute:Be.AccreditationState,width:240},{slug:Xc.NumberOfAccreditations,name:this.t("nombre_d_accr_d_02452"),width:240},{slug:Xc.WishedAccreditationSlots,name:this.t("accr_ditations_74375"),minWidth:320},{slug:Xc.ScannedAccreditations,name:this.t("accr_ditations_52153"),minWidth:320}])}getWeezeventColumns(){return[{slug:Xc.WeezeventBarcodeId,name:this.t("TicketId"),isSearchable:!0,minWidth:240},{slug:Xc.WeezeventShortTag,name:this.t("puce_50504"),isSearchable:!0,minWidth:180},{slug:Xc.WeezeventPairedAt,name:this.t("appair_le_70213"),minWidth:180},{slug:Xc.WeezaccessChecklists,name:this.t("listes_de_contr_55120"),minWidth:320}]}getDelegationsColumns(){return[{slug:Xc.Delegations,name:this.t("Delegation"),isSearchable:!0,isSortable:!0,sortAttribute:Be.Delegation,minWidth:240},{slug:Xc.DelegationCategory,name:this.t("cat_gorie_de_d_18027"),minWidth:240}]}getBaseFilters(e){return[{slug:"email",name:this.t("Email"),category:this.t("champs_de_formu_64126"),fieldType:Z.Text,hideEmpty:!0},{slug:"insertedAt",name:this.t("date_d_inscript_31369"),category:this.t("champs_de_formu_64126"),fieldType:Z.Date,hideEmpty:!0},...this.customFieldsToFilters(e)]}getAvailabilitiesFilters(e,t){return[{slug:"numberOfAvailableDays",name:this.t("nombre_de_jours_07962"),category:this.t("disponibilit_s_49923"),fieldType:Z.Number,hideEmpty:!0},{slug:"wishedSlots",name:this.t("disponibilit_s_49923"),category:this.t("disponibilit_s_49923"),fieldType:Z.DateTimeRange,startAt:t.startAt,endAt:t.endAt},{slug:"wishedSlotsCustom",name:this.t("disponibilit_s_26280"),category:this.t("disponibilit_s_49923"),fieldType:Z.Select,hideEmpty:!0,needLoading:!0,eventId:e},{slug:"numberOfWishedSlots",name:this.t("nombre_de_dispo_26405"),category:this.t("disponibilit_s_49923"),fieldType:Z.Number,hideEmpty:!0}]}getPositionsFilters(e,t,n){return[{slug:"volunteerRegistrationState",name:this.t("statut_d_affect_57444"),category:this.t("missions_63972"),fieldType:Z.Select,values:zt.map(e=>({id:e,name:e})),hideEmpty:!0},{slug:"position",name:this.t("missions_affect_97811"),category:this.t("missions_63972"),fieldType:Z.Select,hideEmpty:!0,needLoading:!0,eventId:t},{slug:"hasOtherEventPosition",name:this.t("has_shift_on_ot_92375"),category:this.t("missions_63972"),fieldType:Z.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:Z.Select,hideEmpty:!0,needLoading:!0,eventId:t},{slug:"positionSlot",name:this.t("date_d_affectat_98566"),category:this.t("missions_63972"),fieldType:Z.DateTimeRange,startAt:n.startAt,endAt:n.endAt},{slug:"positionCategory",name:this.t("cat_gories_de_m_93035"),category:this.t("missions_63972"),fieldType:Z.Select,hideEmpty:!0,needLoading:!0,eventId:t},{slug:"numberOfAssignments",name:this.t("nombre_d_affect_31455"),category:this.t("missions_63972"),fieldType:Z.Number,hideEmpty:!0},{slug:"numberOfAssignmentsPerDay",name:this.t("nombre_d_affect_22087"),category:this.t("missions_63972"),fieldType:Z.Number,hideEmpty:!0,startAt:n.startAt,endAt:n.endAt},{slug:"numberOfAssignmentsDays",name:this.t("nombre_de_jours_86280"),category:this.t("missions_63972"),fieldType:Z.Number,hideEmpty:!0,startAt:n.startAt,endAt:n.endAt},{slug:"preassignedPosition",name:this.t("missions_pr_af_02950"),category:this.t("missions_63972"),fieldType:Z.Select,hideEmpty:!0,needLoading:!0,eventId:t},{slug:"preassignedPositionCategory",name:this.t("cat_gories_pr_83825"),category:this.t("missions_63972"),fieldType:Z.Select,hideEmpty:!0,needLoading:!0,eventId:t},{slug:"wishedPositionsCategories",name:this.t("cat_gories_souh_80851"),category:this.t("missions_63972"),fieldType:Z.Select,needLoading:!0,eventId:t},{slug:"numberOfWishedPositionsCategories",name:this.t("nombre_de_cat_g_05961"),category:this.t("missions_63972"),fieldType:Z.Number,hideEmpty:!0},{slug:"wishedPositions",name:this.t("missions_souhai_23225"),category:this.t("missions_63972"),fieldType:Z.Select,needLoading:!0,eventId:t},{slug:"numberOfWishedPositions",name:this.t("nombre_de_missi_52579"),category:this.t("missions_63972"),fieldType:Z.Number,hideEmpty:!0},{slug:"wishedPositionsSlots",name:this.t("cr_neaux_souhai_90108"),category:this.t("missions_63972"),fieldType:Z.Select,needLoading:!0,eventId:t},{slug:"numberOfWishedPositionsSlots",name:this.t("nombre_de_cr_ne_28370"),category:this.t("missions_63972"),fieldType:Z.Number,hideEmpty:!0},{slug:"volunteersMinutes",name:this.t("nombre_de_minut_50497"),category:this.t("missions_63972"),fieldType:Z.Number,hideEmpty:!0},{slug:"volunteersMinutesDays",name:this.t("nombre_de_minut_89574"),category:this.t("missions_63972"),fieldType:Z.Number,hideEmpty:!0,startAt:n.startAt,endAt:n.endAt},{slug:"checkInAt",name:this.t("point_le_93167"),category:this.t("missions_63972"),fieldType:Z.Date},{slug:"checkOutAt",name:this.t("d_point_le_29289"),category:this.t("missions_63972"),fieldType:Z.Date},{slug:"checkInState",name:this.t("statut_de_point_44328"),category:this.t("missions_63972"),fieldType:Z.Select,values:ht.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:Z.Select,hideEmpty:!0,needLoading:!0,eventId:t},{slug:"checkOutAtPositionSlot",name:this.t("cr_neaux_d_poin_45477"),category:this.t("missions_63972"),fieldType:Z.Select,hideEmpty:!0,needLoading:!0,eventId:t},{slug:"overlappingAssignments",name:this.t("affectations_se_49339"),category:this.t("missions_63972"),fieldType:Z.Checkbox,hideEmpty:!0}]}getAccreditationsFilters(e,t,n){return(0,Go.A)([{slug:"accreditationState",name:this.t("statut_d_accr_d_75527"),category:this.t("accr_ditations_39450"),fieldType:Z.Select,values:lt.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:Z.Number,hideEmpty:!0},{slug:"accreditation",name:this.t("accr_ditations_39450"),category:this.t("accr_ditations_39450"),fieldType:Z.Select,hideEmpty:!0,needLoading:!0,eventId:t},{slug:"hasOtherEventAccreditation",name:this.t("has_accreditati_31831"),category:this.t("accr_ditations_39450"),fieldType:Z.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:Z.Select,hideEmpty:!0,needLoading:!0,eventId:t},{slug:"wishedAccreditationsSlots",name:this.t("accr_ditations_74375"),category:this.t("accr_ditations_39450"),fieldType:Z.Select,needLoading:!0,eventId:t},{slug:"numberOfWishedAccreditationsSlots",name:this.t("nombre_d_accr_d_92021"),category:this.t("accr_ditations_39450"),fieldType:Z.Number,hideEmpty:!0},{slug:"accreditationSlotId",name:this.t("cr_neaux_accr_d_70934"),category:this.t("accr_ditations_39450"),fieldType:Z.Select,hideEmpty:!0,needLoading:!0,eventId:t},{slug:"accreditationSlot",name:this.t("date_d_accr_dit_26214"),category:this.t("accr_ditations_39450"),fieldType:Z.Date,startAt:n.startAt,endAt:n.endAt},{slug:"scannedAccreditationsSlots",name:this.t("accr_ditations_52153"),category:this.t("accr_ditations_39450"),fieldType:Z.Select,hideEmpty:!0,needLoading:!0,eventId:t}])}getDelegationsFilters(e,t){return[{slug:"delegation",name:this.t("inscrit_via_la_86398"),category:this.t("d_l_gations_78318"),fieldType:Z.Select,needLoading:!0,eventId:t},{slug:"delegationCategory",name:this.t("inscrit_via_la_12241"),category:this.t("d_l_gations_78318"),fieldType:Z.Select,needLoading:!0,organizationId:e,eventId:t},{slug:"isDelegationCategoryLeader",name:this.t("est_responsable_36610"),category:this.t("d_l_gations_78318"),fieldType:Z.Checkbox},{slug:"isDelegationLeader",name:this.t("est_responsable_87662"),category:this.t("d_l_gations_78318"),fieldType:Z.Checkbox,needLoading:!0,eventId:t}]}getSegmentsFilters(e,t,n,i){return[{slug:"segments",name:this.t("fait_partie_de_44650"),category:this.t("vues_personnali_80652"),fieldType:Z.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:Z.Select,hideEmpty:!0,needLoading:!0,organizationId:e},{slug:"positionsSegments",name:this.t("affecter_une_10657"),category:this.t("vues_personnali_80652"),fieldType:Z.Select,hideEmpty:!0,needLoading:!0,eventId:t},{slug:"accreditationsSegments",name:this.t("affecter_une_91431"),category:this.t("vues_personnali_80652"),fieldType:Z.Select,hideEmpty:!0,needLoading:!0,eventId:t},{slug:"delegationsSegments",name:this.t("affecter_une_45240"),category:this.t("vues_personnali_80652"),fieldType:Z.Select,hideEmpty:!0,needLoading:!0,eventId:t}]}getFormsFilters(e){return[{slug:"forms",name:this.t("formulaires_rem_62495"),category:this.t("Form_plural"),fieldType:Z.Select,needLoading:!0,eventId:e},{slug:"formsInsertedAt",name:this.t("dates_de_rempli_65075"),category:this.t("Form_plural"),fieldType:Z.Date,hideEmpty:!0,needLoading:!0,eventId:e}]}getTeamsFilters(){return[{slug:"isTeam",name:this.t("est_inscrit_en_86193"),category:this.t("_quipes_18817"),fieldType:Z.Checkbox,hideEmpty:!0},{slug:"teamCode",name:this.t("code_quipe_14296"),category:this.t("_quipes_18817"),fieldType:Z.Text},{slug:"numberOfTeamMembers",name:this.t("nombre_de_membr_82302"),category:this.t("_quipes_18817"),fieldType:Z.Number},{slug:"isTeamLeader",name:this.t("est_chef_d_qui_73792"),category:this.t("_quipes_18817"),fieldType:Z.Checkbox,hideEmpty:!0}]}getWeezeventFilters(e){return[{slug:Xc.WeezeventBarcodeId,name:this.t("TicketId"),category:"Weezevent",fieldType:Z.Text,hideEmpty:!0},{slug:Xc.WeezeventShortTag,name:this.t("puce_50504"),category:"Weezevent",fieldType:Z.Text},{slug:Xc.WeezeventPairedAt,name:this.t("appair_le_70213"),category:"Weezevent",fieldType:Z.Datetime,useLocalZone:!0},{slug:Xc.WeezaccessChecklists,name:this.t("listes_de_contr_55120"),category:"Weezevent",fieldType:Z.Select,needLoading:!0,eventId:e}]}getEmailsFilters(e){return[{slug:"campaign",name:this.t("campagne_97871"),category:this.t("e_mails_09850"),fieldType:Z.Campaign,needLoading:!0,eventId:e},{slug:"assignmentEmailSentAt",name:this.t("date_d_envoi_de_01614"),category:this.t("e_mails_09850"),fieldType:Z.Date},{slug:"assignmentEmailState",name:this.t("statut_de_de_l_36346"),category:this.t("e_mails_09850"),fieldType:Z.Select,values:ft.filter(e=>e!==$.Queued).map(e=>({id:e,name:this.t(e)})),hideEmpty:!0},{slug:"accreditationEmailState",name:this.t("statut_de_l_e_m_97776"),category:this.t("e_mails_09850"),fieldType:Z.Select,values:ft.filter(e=>e!==$.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:Z.Checkbox,hideEmpty:!0},{slug:"campaignReply",name:this.t("r_ponse_une_c_32448"),category:this.t("e_mails_09850"),fieldType:Z.Text,needLoading:!0,eventId:e}]}getCommentsFilter(e,t){return[{slug:"comments",name:this.t("commentaires_96492"),category:this.t("commentaires_96492"),fieldType:Z.Text},{slug:"lastCommentAt",name:this.t("date_du_dernier_73554"),category:this.t("commentaires_96492"),fieldType:Z.Date,hideEmpty:!0},{slug:"commentWrittenBy",name:this.t("commentaire_cr_96610"),category:this.t("commentaires_96492"),fieldType:Z.Select,hideEmpty:!0,needLoading:!0,organizationId:e,eventId:t}]}};var tl;el=function(e,t,n,i){var o,r=arguments.length,s=r<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 a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,n,s):o(t,n))||s);return r>3&&s&&Object.defineProperty(t,n,s),s}([(0,at._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Ur,is,Wt])],el),function(e){e.Accreditations="accreditations",e.Action="Action",e.Campaign="campaign",e.CreatedAt="createdAt",e.CreatedBy="createdBy",e.CustomField="customField",e.ExecutedAt="executedAt",e.Id="id",e.Name="name",e.State="state",e.Trigger="trigger",e.VolunteersSegment="volunteersSegment"}(tl||(tl={}));class nl extends Ec{constructor(e,t,n){super(e,t,n)}getWorkflowsFilters(e,t){return[{slug:tl.State,name:this.t("status_06428"),category:this.t("automatisations_60045"),fieldType:Z.Select,hideEmpty:!0,values:Nt.map(e=>({id:e,name:this.t(e)}))},{slug:tl.Trigger,name:this.t("d_clencheur_73493"),category:this.t("automatisations_60045"),fieldType:Z.Select,hideEmpty:!0,values:Bt.map(e=>({id:e,name:this.t(e)}))},{slug:tl.Action,name:this.t("action_44224"),category:this.t("automatisations_60045"),fieldType:Z.Select,hideEmpty:!0,values:Mt.map(e=>({id:e,name:this.t(e)}))},{slug:tl.CreatedBy,name:this.t("cr_e_par_30622"),category:this.t("automatisations_60045"),fieldType:Z.Select,hideEmpty:!0,needLoading:!0,organizationId:e,eventId:t},{slug:tl.CreatedAt,name:this.t("cr_e_le_02658"),category:this.t("automatisations_60045"),fieldType:Z.Datetime,hideEmpty:!0}]}getWorkflowsPossibleColumns(){return[{slug:tl.Id,name:this.t("id_51738"),isSearchable:!0,isSortable:!0,width:100,sortAttribute:Ge.Id},{slug:tl.Name,name:this.t("nom_de_l_automa_04883"),isSearchable:!0,isSortable:!0,sortAttribute:Ge.Name,minWidth:240},{slug:tl.State,name:this.t("status_06428"),minWidth:180},{slug:tl.Trigger,name:this.t("d_clencheur_73493"),minWidth:180},{slug:tl.Action,name:this.t("action_44224"),minWidth:180},{slug:tl.CreatedBy,name:this.t("cr_e_par_30622"),isSearchable:!0,minWidth:180},{slug:tl.CreatedAt,name:this.t("cr_e_le_02658"),isSortable:!0,sortAttribute:Ge.CreatedAt,minWidth:180},{slug:tl.VolunteersSegment,name:this.t("vue_s_lectionn_21556"),isSortable:!0,sortAttribute:Ge.VolunteersSegment,minWidth:320},{slug:tl.ExecutedAt,name:this.t("ex_cut_e_le_99019"),isSortable:!0,sortAttribute:Ge.ExecutedAt,minWidth:180},{slug:tl.Accreditations,name:this.t("accr_ditations_39450"),minWidth:320},{slug:tl.Campaign,name:this.t("campagne_97871"),minWidth:240},{slug:tl.CustomField,name:this.t("CustomField"),minWidth:240}]}}const il=new at.i0(e=>{e(Ms).toSelf().inSingletonScope(),e(Ur).toSelf().inSingletonScope(),e(is).toSelf().inSingletonScope(),e(Js).toSelf().inSingletonScope(),e(sa).toSelf().inSingletonScope(),e(aa).toSelf().inSingletonScope(),e(Ac).toSelf().inSingletonScope(),e(wc).toSelf().inSingletonScope()}),ol=new at.i0(e=>{e(tr).toSelf().inSingletonScope(),e(Xo).toSelf().inSingletonScope(),e(er).toSelf().inSingletonScope(),e(rr).toSelf().inSingletonScope(),e(sr).toSelf().inSingletonScope(),e(ar).toSelf().inSingletonScope(),e(mr).toSelf().inSingletonScope(),e(gr).toSelf().inSingletonScope(),e(br).toSelf().inSingletonScope(),e(Ar).toSelf().inSingletonScope(),e(Cr).toSelf().inSingletonScope(),e(Ir).toSelf().inSingletonScope(),e(xr).toSelf().inSingletonScope(),e(Sr).toSelf().inSingletonScope(),e(Mr).toSelf().inSingletonScope(),e(Fr).toSelf().inSingletonScope(),e(Tr).toSelf().inSingletonScope(),e(wr).toSelf().inSingletonScope(),e($r).toSelf().inSingletonScope(),e(Lr).toSelf().inSingletonScope(),e(Vr).toSelf().inSingletonScope(),e(Jr).toSelf().inSingletonScope(),e(cs).toSelf().inSingletonScope(),e(ls).toSelf().inSingletonScope(),e(ds).toSelf().inSingletonScope(),e(us).toSelf().inSingletonScope(),e(hs).toSelf().inSingletonScope(),e(ms).toSelf().inSingletonScope(),e(gs).toSelf().inSingletonScope(),e(ps).toSelf().inSingletonScope(),e(fs).toSelf().inSingletonScope(),e(_s).toSelf().inSingletonScope(),e(As).toSelf().inSingletonScope(),e(Pr).toSelf().inSingletonScope(),e(Rr).toSelf().inSingletonScope(),e(ys).toSelf().inSingletonScope(),e(ws).toSelf().inSingletonScope(),e(Cs).toSelf().inSingletonScope(),e(Is).toSelf().inSingletonScope(),e(xs).toSelf().inSingletonScope(),e(Ss).toSelf().inSingletonScope(),e(Zr).toSelf().inSingletonScope(),e(Yr).toSelf().inSingletonScope(),e(Os).toSelf().inSingletonScope(),e(zs).toSelf().inSingletonScope(),e(Es).toSelf().inSingletonScope(),e(Rs).toSelf().inSingletonScope(),e($s).toSelf().inSingletonScope(),e(Ns).toSelf().inSingletonScope(),e(Bs).toSelf().inSingletonScope(),e(Ls).toSelf().inSingletonScope(),e(Vs).toSelf().inSingletonScope(),e(Us).toSelf().inSingletonScope(),e(Gs).toSelf().inSingletonScope(),e(Ws).toSelf().inSingletonScope(),e(qs).toSelf().inSingletonScope(),e(bs).toSelf().inSingletonScope(),e(vs).toSelf().inSingletonScope(),e(ks).toSelf().inSingletonScope(),e(Ks).toSelf().inSingletonScope(),e(Zs).toSelf().inSingletonScope()}),rl=new at.i0(e=>{e(os).toSelf().inSingletonScope(),e(Ec).toSelf().inSingletonScope(),e(Tc).toSelf().inSingletonScope(),e(Pc).toSelf().inSingletonScope(),e(Rc).toSelf().inSingletonScope(),e(Fc).toSelf().inSingletonScope(),e(Wc).toSelf().inSingletonScope(),e(Hc).toSelf().inSingletonScope(),e(Jc).toSelf().inSingletonScope(),e(Yc).toSelf().inSingletonScope(),e(el).toSelf().inSingletonScope(),e(nl).toSelf().inSingletonScope()});function sl(){const e=new at.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(!qr(n))throw new Error("window.HEAVENT_LANGUAGE is not valid");return e.bind(Wt).toConstantValue(new Wt(qr(n),t)),e.load(il,ol,rl),e}const al=e=>(0,o.jsx)(qt.Provider,{value:{container:sl(),useQuery:Mo,useMutation:Fo,useExecuteQuery:lo,useParams:No,useHistory:Bo,useLocation:Lo,useLocalStorage:Vo},children:e.children}),cl=()=>((0,r.useEffect)(()=>{to().then(e=>{"true"===Ii.LOG_TOKEN&&console.log(`"${Wi}": "${e||""}"`)})},[]),null),ll=e=>{const t=(0,r.useRef)(null),n=(0,r.useCallback)(e=>{e&&(t.current=e,setTimeout(()=>{e.style.right=kn.space[6].value},100))},[]),i=(0,r.useCallback)(()=>{t.current.style.right="-400px",e.onClose()},[e.onClose]);return(0,Kn.createPortal)((0,o.jsxs)(Dn,{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,o.jsx)(Dn,{align:"center",css:{color:"white"},justify:"center",children:(0,o.jsx)(Mn,{icon:"black"===e.color?"circle-exclamation":"error"===e.color?"circle-xmark":"circle-check",iconStyle:"solid"})}),(0,o.jsx)(xn,{color:"white",css:{flex:"1","& a":{color:"white",textDecoration:"underline"}},dangerouslySetInnerHTML:{__html:e.text},fontWeight:"medium"}),(0,o.jsx)(Dn,{align:"center",css:{color:"white",cursor:"pointer",fontSize:"$textMd"},height:32,justify:"center",width:32,onClick:i,children:(0,o.jsx)(Mn,{icon:"xmark"})})]}),document.body)},dl=r.createContext({}),ul=e=>{const t=Yt(),[n,i]=r.useState(!1),[s,a]=r.useState({color:"success",text:""}),c=r.useCallback(()=>{setTimeout(()=>{i(!1)},1200)},[i]),l=r.useCallback(e=>{i(!0),a(e),setTimeout(c,xi.dw.fromObject({seconds:30}).toMillis())},[i,a,c]),{mutate:d}=function(e={}){return Xt("mutation VolunteersImportResult(\n $organizationId: OrganizationId!\n $delegationId: DelegationId\n $jobId: UUID!\n) {\n volunteersImportResult(\n organizationId: $organizationId\n delegationId: $delegationId\n jobId: $jobId\n ) {\n state\n event {\n name\n }\n }\n}\n",e)}(),u=r.useRef(null),h=r.useCallback((e,n,i)=>{u.current=window.setInterval(async()=>{const{volunteersImportResult:{state:o,event:r}}=await d({organizationId:e,delegationId:n,jobId:i});o===Ne.Done&&(clearInterval(u.current),l({color:"success",text:r?t("votre_import_es_37822",r.name):t("votre_import_es_14145")}))},2e3)},[]);return(0,o.jsx)(dl.Provider,{value:{checkVolunteersImport:h,showNotification:l},children:(0,o.jsxs)(o.Fragment,{children:[n&&(0,o.jsx)(ll,{...s,onClose:c}),e.children]})})},hl=e=>{const t=Qt(),n=en();return(0,r.useEffect)(()=>{an(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,o.jsx)("div",{})},ml=e=>{const t=Qt(),{user:n}=Ro();return n&&e.shouldHaveUser||!n&&!e.shouldHaveUser?(0,o.jsx)(o.Fragment,{children:e.children}):(0,o.jsx)(hl,{path:e.getRedirectPath(t),replace:!0})};function gl(...e){console.log(...e)}const pl={PLURAL:"accreditation-categories",SINGLE:"accreditation-category"},fl={PLURAL:"accreditations",SINGLE:"accreditation"},_l={PLURAL:"slots",SINGLE:"slot"},bl="dashboard",kl="member",vl="members",Al={ACCREDITATION_CATEGORIES:pl.PLURAL,ACCREDITATION_CATEGORY:e=>_a([pl.SINGLE,e]),ACCREDITATIONS:fl.PLURAL,ACCREDITATION:e=>_a([fl.SINGLE,e]),ACCREDITATION_SLOTS:_l.PLURAL,ACCREDITATION_SLOT:e=>_a([_l.SINGLE,e])},yl={ACCREDITATION_CATEGORY:({accreditationCategoryId:e,...t})=>_a([Ta.EVENT(t),Al.ACCREDITATION_CATEGORY(e)]),ACCREDITATION_CATEGORY_DASHBOARD:e=>_a([yl.ACCREDITATION_CATEGORY(e),bl]),ACCREDITATION_CATEGORY_MEMBERS:e=>_a([yl.ACCREDITATION_CATEGORY(e),vl])},wl={ACCREDITATIONS:e=>_a([Ta.EVENT(e),Al.ACCREDITATIONS]),ACCREDITATION:({accreditationId:e,...t})=>_a([Ta.EVENT(t),Al.ACCREDITATION(e)]),ACCREDITATION_DASHBOARD:e=>_a([wl.ACCREDITATION(e),bl]),ACCREDITATION_MEMBERS:e=>_a([wl.ACCREDITATION(e),vl]),ACCREDITATION_MEMBER:({userInfoId:e,...t})=>_a([wl.ACCREDITATION_MEMBERS(t),kl,e]),ACCREDITATION_MEMBER_INFORMATION:e=>_a([wl.ACCREDITATION_MEMBER(e),Aa.INFORMATION])},Cl={ACCREDITATION_SLOT:({accreditationSlotId:e,...t})=>_a([Il.ACCREDITATION(t),Al.ACCREDITATION_SLOT(e)]),ACCREDITATION_SLOT_DASHBOARD:e=>_a([Cl.ACCREDITATION_SLOT(e),bl]),ACCREDITATION_SLOT_MEMBERS:e=>_a([Cl.ACCREDITATION_SLOT(e),vl])},Il={...yl,...wl,...Cl},xl={ITEMS:{POSITIONS_CATEGORIES:{PLURAL:"position-categories",SINGLE:"position-category"},POSITIONS:{PLURAL:"positions",SINGLE:"position"},POSITION_SLOTS:{PLURAL:"slots",SINGLE:"slot"}},ACTIONS:{IMPORT:{CSV:`${va.IMPORT}/csv`}},SECTIONS:{PREASSIGNED_MEMBERS:"preassigned-members"}},Sl={POSITION_CATEGORIES:xl.ITEMS.POSITIONS_CATEGORIES.PLURAL,POSITION_CATEGORY:e=>_a([xl.ITEMS.POSITIONS_CATEGORIES.SINGLE,e]),POSITIONS:xl.ITEMS.POSITIONS.PLURAL,POSITION:e=>_a([xl.ITEMS.POSITIONS.SINGLE,e]),POSITION_SLOTS:xl.ITEMS.POSITION_SLOTS.PLURAL,POSITION_SLOT:e=>_a([xl.ITEMS.POSITION_SLOTS.SINGLE,e])},El={POSITION_CATEGORY:({positionCategoryId:e,...t})=>_a([Ta.EVENT(t),Sl.POSITION_CATEGORY(e)]),POSITION_CATEGORY_DASHBOARD:e=>_a([El.POSITION_CATEGORY(e),Aa.DASHBOARD]),POSITION_CATEGORY_MEMBERS:e=>_a([El.POSITION_CATEGORY(e),Aa.MEMBERS]),POSITION_CATEGORY_PREASSIGNED_MEMBERS:e=>_a([El.POSITION_CATEGORY(e),xl.SECTIONS.PREASSIGNED_MEMBERS])},jl={POSITIONS:e=>_a([Ta.EVENT(e),Sl.POSITIONS]),POSITION:({positionId:e,positionCategoryId:t,...n})=>_a(t?[El.POSITION_CATEGORY({positionCategoryId:t,...n}),Sl.POSITION(e)]:[Ta.EVENT(n),Sl.POSITION(e)]),POSITION_DASHBOARD:e=>_a([jl.POSITION(e),Aa.DASHBOARD]),POSITION_MEMBERS:e=>_a([jl.POSITION(e),Aa.MEMBERS]),POSITION_PREASSIGNED_MEMBERS:e=>_a([jl.POSITION(e),xl.SECTIONS.PREASSIGNED_MEMBERS]),POSITION_MEMBER:({userInfoId:e,...t})=>_a([jl.POSITION_MEMBERS(t),Aa.MEMBER,e]),POSITION_MEMBER_INFORMATION:e=>_a([jl.POSITION_MEMBER(e),Aa.INFORMATION]),POSITION_IMPORT_CSV:e=>_a([Ta.EVENT(e),xl.ACTIONS.IMPORT.CSV])},Tl={POSITION_SLOTS:e=>_a([jl.POSITION(e),Sl.POSITION_SLOTS]),POSITION_SLOT:({positionSlotId:e,...t})=>_a([jl.POSITION(t),Sl.POSITION_SLOT(e)])},Dl={...El,...jl,...Tl},Pl="/auth",Rl=`${Pl}/sign-in`,Ol=`${Pl}/sign-up`,Fl="/backoffice",zl=e=>`${Xa.ORGANIZATION({organizationId:e})}/parameters`,Ml=(e,t,n,i)=>`${Dl.POSITION_SLOT({organizationId:e,eventId:t,positionId:n,positionSlotId:i})}/check-members`,$l=(e,t,n,i)=>`${Dl.POSITION_SLOT({organizationId:e,eventId:t,positionId:n,positionSlotId:i})}/members`,Nl=(e,t,n,i,o)=>`${Dl.POSITION_SLOT({organizationId:e,eventId:t,positionId:n,positionSlotId:i})}/assign-volunteers/${o}`,Bl=(e,t)=>`${Ta.EVENT({organizationId:e,eventId:t})}/volunteers`,Ll=(e,t)=>`${Bl(e,t)}/search`,Vl=(e,t,n)=>`${Ll(e,t)}/volunteer/${n}`,Ul=(e,t,n)=>`${Bl(e,t)}/${n}`,Gl=(e,t,n,i)=>`${Ul(e,t,n)}/volunteer/${i}`,Wl=(e,t,n,i)=>`${Ul(e,t,n)}/volunteer-panel/${i}`,ql=(e,t)=>`${Ta.EVENT({organizationId:e,eventId:t})}/emails`,Hl=(e,t)=>`${Ta.EVENT({organizationId:e,eventId:t})}/integration`,Kl=(e,t)=>`${Ta.EVENT({organizationId:e,eventId:t})}/documents`,Yl=(e,t)=>`${Ta.EVENT({organizationId:e,eventId:t})}/options`,Zl=(e,t)=>`${Ta.EVENT({organizationId:e,eventId:t})}/dashboard`,Jl={HOME:`/${ba}`,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}`,AUTH:Pl,AUTH_FORGOT_PASSWORD:`${Pl}/forgot-password`,AUTH_SIGN_IN:Rl,AUTH_SIGN_UP:Ol,AUTH_SIGN_IN_EMAIL:`${Rl}/email`,AUTH_SIGN_IN_CODE:`${Rl}/code`,AUTH_SIGN_UP_CREDENTIALS:`${Ol}/credentials`,AUTH_SIGN_UP_CODE:`${Ol}/code`,COGNITO_CALLBACK:"/cognito-callback",MAGIC_LINK:(e,t)=>`/magic-link/${e}/${t}`,ACCEPT_TERMS_AND_CONDITIONS:e=>`${Xa.ORGANIZATION({organizationId:e})}/accept-terms-and-conditions`,BACKOFFICE:Fl,BACKOFFICE_ORGANIZATIONS:`${Fl}/organizations`,EDIT_BACKOFFICE_ORGANIZATION:e=>`${Fl}/organization/${e}/edit`,BACKOFFICE_INVOICES:`${Fl}/invoices`,ORGANIZATION_PARAMETERS:zl,ORGANIZATION_PARAMETERS_PROFILE:e=>`${zl(e)}/profile`,ORGANIZATION_PARAMETERS_INFOS:e=>`${zl(e)}/general`,ORGANIZATION_PARAMETERS_TEAM:e=>`${zl(e)}/team`,ORGANIZATION_PARAMETERS_ROLES:e=>`${zl(e)}/roles`,CREATE_ORGANIZATION_PARAMETERS_ROLE:e=>`${zl(e)}/roles/create`,EDIT_ORGANIZATION_PARAMETERS_ROLE:(e,t)=>`${zl(e)}/roles/role/${t}/edit`,DUPLICATE_ORGANIZATION_PARAMETERS_ROLE:(e,t)=>`${zl(e)}/roles/role/${t}/duplicate`,ORGANIZATION_PARAMETERS_EMAILS:e=>`${zl(e)}/emails`,CREATE_ORGANIZATION_PARAMETERS_EMAILS_SENDERS:e=>`${zl(e)}/emails/senders/create`,EDIT_ORGANIZATION_PARAMETERS_EMAILS_SENDERS:(e,t)=>`${zl(e)}/emails/senders/${t}/edit`,ORGANIZATION_PARAMETERS_EMAILS_SENDERS:e=>`${zl(e)}/emails/senders`,ORGANIZATION_PARAMETERS_EMAILS_SENDERS_PREVIEW:(e,t)=>`${zl(e)}/emails/senders/${t}/preview`,ORGANIZATION_PARAMETERS_EMAILS_DNS:e=>`${zl(e)}/emails/dns`,ORGANIZATION_PARAMETERS_DELEGATIONS_SPACE:e=>`${zl(e)}/delegations-space`,ORGANIZATION_PARAMETERS_DELEGATIONS_SPACE_DESIGN:e=>`${zl(e)}/delegations-space/design`,ORGANIZATION_PARAMETERS_DELEGATIONS_SPACE_INTEGRATION:e=>`${zl(e)}/delegations-space/integration`,ORGANIZATION_PARAMETERS_DELEGATIONS_SPACE_EMAILS:e=>`${zl(e)}/delegations-space/emails`,ORGANIZATION_PARAMETERS_CATEGORIES:e=>`${zl(e)}/categories`,ORGANIZATION_PARAMETERS_CATEGORIES_CUSTOM_FIELDS:e=>`${zl(e)}/categories/custom-fields`,ORGANIZATION_PARAMETERS_CATEGORIES_POSITIONS:e=>`${zl(e)}/categories/positions`,ORGANIZATION_PARAMETERS_CATEGORIES_ACCREDITATIONS:e=>`${zl(e)}/categories/accreditations`,ORGANIZATION_PARAMETERS_CATEGORIES_DELEGATIONS:e=>`${zl(e)}/categories/delegations`,ORGANIZATION_PARAMETERS_TAGS:e=>`${zl(e)}/tags`,ORGANIZATION_PARAMETERS_TRANSLATIONS:e=>`${zl(e)}/translations`,ORGANIZATION_PARAMETERS_INVOICES:e=>`${zl(e)}/invoices`,ORGANIZATION_PARAMETERS_ACTIVITY:e=>`${zl(e)}/activity`,ORGANIZATION_PARAMETERS_SKIDATA:e=>`${zl(e)}/skidata`,ORGANIZATION_PARAMETERS_ORGANIZATION_SWITCH:e=>`${zl(e)}/organization-switch`,ORGANIZATION_PARAMETERS_DELETE_ACCOUNT:e=>`${zl(e)}/delete-account`,CUSTOM_FIELDS:e=>`${Xa.ORGANIZATION({organizationId:e})}/custom-fields`,CUSTOM_FIELDS_SEGMENT:(e,t)=>`${Xa.ORGANIZATION({organizationId:e})}/custom-fields/${t}`,CUSTOM_FIELD_USAGE:(e,t,n)=>`${Xa.ORGANIZATION({organizationId:e})}/custom-fields/${t}/usage/${n}`,CREATE_CUSTOM_FIELD:(e,t)=>`${Xa.ORGANIZATION({organizationId:e})}/custom-fields/${t}/create`,EDIT_CUSTOM_FIELD:(e,t,n)=>`${Xa.ORGANIZATION({organizationId:e})}/custom-fields/${t}/edit/${n}`,COMMUNITY_USERS_SEGMENT:(e,t)=>`${Xa.ORGANIZATION({organizationId:e})}/community/users/${t}`,COMMUNITY_USERS_USER:(e,t,n)=>`${Xa.ORGANIZATION({organizationId:e})}/community/users/${t}/user/${n}`,COMMUNITY_USERS_USER_INFORMATIONS:(e,t,n)=>`${Xa.ORGANIZATION({organizationId:e})}/community/users/${t}/user/${n}/${Aa.INFORMATION}`,COMMUNITY_USERS_DUPLICATES:e=>`${Xa.ORGANIZATION({organizationId:e})}/community/users-duplicates`,COMMUNITY_EDIT_USER:(e,t)=>`${Xa.ORGANIZATION({organizationId:e})}/community/user/${t}/edit`,COMMUNITY_EDIT_USER_FORM:(e,t,n)=>`${Xa.ORGANIZATION({organizationId:e})}/community/user/${t}/edit/form/${n}`,COMMUNITY_VOLUNTEERS_IMPORT:e=>`${Xa.ORGANIZATION({organizationId:e})}/community/import`,COMMUNITY_FILES_IMPORT:e=>`${Xa.ORGANIZATION({organizationId:e})}/community/documents-import`,COMMUNITY_DELEGATIONS:e=>`${Xa.ORGANIZATION({organizationId:e})}/community/delegations`,COMMUNITY_DELEGATIONS_SEGMENT:(e,t)=>`${Xa.ORGANIZATION({organizationId:e})}/community/delegations/${t}`,COMMUNITY_DELEGATION:(e,t)=>`${Xa.ORGANIZATION({organizationId:e})}/community/delegation/${t}`,COMMUNITY_CREATE_DELEGATION(e,t){let n=`${Xa.ORGANIZATION({organizationId:e})}/community/create-delegation`;return t&&(n=`${n}/${t}`),n},COMMUNITY_EDIT_DELEGATION:(e,t)=>`${Xa.ORGANIZATION({organizationId:e})}/community/delegation/${t}/edit`,COMMUNITY_EDIT_USER_DELEGATION:(e,t,n)=>`${Xa.ORGANIZATION({organizationId:e})}/community/delegation/${t}user/${n}/edit`,COMMUNITY_EDIT_USER_DELEGATION_FORM:(e,t,n,i)=>`${Xa.ORGANIZATION({organizationId:e})}/community/delegation/${t}/user/${n}/edit/form/${i}`,CREATE_EVENT_WITH_ORGANIZATION:"/create-event",CREATE_EVENT:e=>`${Xa.ORGANIZATION({organizationId:e})}/create-event`,EVENTS_SEGMENT:(e,t)=>`${Xa.ORGANIZATION({organizationId:e})}/events/${t}`,EVENT_DELEGATIONS_IMPORT:(e,t)=>`${Ta.EVENT({organizationId:e,eventId:t})}/delegations-import`,EVENT_VOLUNTEERS_IMPORT:(e,t)=>`${Ta.EVENT({organizationId:e,eventId:t})}/members-import`,EVENT_FILES_IMPORT:(e,t)=>`${Ta.EVENT({organizationId:e,eventId:t})}/documents-import`,EDIT_EVENT:(e,t)=>`${Ta.EVENT({organizationId:e,eventId:t})}/edit`,DASHBOARD:Zl,DASHBOARD_EVENT_SWITCH:(e,t)=>`${Zl(e,t)}/event-switch`,POSITION_MEMBERS_USER:(e,t,n,i,o)=>`${Dl.POSITION_MEMBERS({organizationId:e,eventId:t,positionCategoryId:n,positionId:i})}/${o}`,POSITION_MEMBERS_USER_INFORMATIONS:(e,t,n,i,o)=>`${Dl.POSITION_MEMBERS({organizationId:e,eventId:t,positionCategoryId:n,positionId:i})}/${o}/${Aa.INFORMATION}`,EXPORT_POSITIONS_MAP:(e,t)=>`/export/event/${e}/positions/${t}/map`,POSITIONS_SEARCH:(e,t)=>`${Dl.POSITIONS({organizationId:e,eventId:t})}/search`,POSITIONS_SEGMENT:(e,t,n)=>`${Dl.POSITIONS({organizationId:e,eventId:t})}/${n}`,CREATE_POSITION(e,t,n){let i=`${Ta.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)=>`${Dl.POSITION({organizationId:e,eventId:t,positionId:n})}/settings`,EDIT_POSITION:(e,t,n)=>`${Dl.POSITION({organizationId:e,eventId:t,positionId:n})}/edit`,POSITION_SLOT_ASSIGN_VOLUNTEERS:(e,t,n,i)=>`${Dl.POSITION_SLOT({organizationId:e,eventId:t,positionId:n,positionSlotId:i})}/assign-volunteers`,POSITION_SLOT_ASSIGN_VOLUNTEERS_USER:Nl,POSITION_SLOT_ASSIGN_VOLUNTEERS_USER_INFORMATIONS:(e,t,n,i,o)=>`${Nl(e,t,n,i,o)}/${Aa.INFORMATION}`,POSITION_SLOT_MEMBERS:$l,POSITION_SLOT_MEMBERS_USER:(e,t,n,i,o)=>`${$l(e,t,n,i)}/${o}`,POSITION_SLOT_MEMBERS_USER_INFORMATIONS:(e,t,n,i,o)=>`${$l(e,t,n,i)}/${o}/${Aa.INFORMATION}`,POSITION_SLOT_MEMBERS_CHECK_OPTIONS:(e,t,n,i)=>`${$l(e,t,n,i)}/check-options`,POSITION_SLOT_CHECK_MEMBERS_CHECK_IN:(e,t,n,i)=>`${Ml(e,t,n,i)}/check-in`,POSITION_SLOT_CHECK_MEMBERS_CHECK_OUT:(e,t,n,i)=>`${Ml(e,t,n,i)}/check-out`,POSITION_SLOT_CHECK_MEMBERS_RESET:(e,t,n,i)=>`${Ml(e,t,n,i)}/reset`,VOLUNTEERS:Bl,VOLUNTEERS_SEARCH:Ll,VOLUNTEERS_SEARCH_USER:Vl,VOLUNTEERS_SEARCH_USER_INFORMATIONS:(e,t,n)=>`${Vl(e,t,n)}/${Aa.INFORMATION}`,VOLUNTEERS_SEGMENT:(e,t,n)=>`${Bl(e,t)}/${n}`,VOLUNTEERS_LIST_USER:Gl,VOLUNTEERS_LIST_USER_INFORMATIONS:(e,t,n,i)=>`${Gl(e,t,n,i)}/${Aa.INFORMATION}`,VOLUNTEERS_LIST_USER_PANEL:Wl,VOLUNTEERS_LIST_USER_PANEL_ACCREDITATIONS:(e,t,n,i)=>`${Wl(e,t,n,i)}/accreditations`,VOLUNTEERS_LIST_USER_PANEL_AVAILABILITIES:(e,t,n,i)=>`${Wl(e,t,n,i)}/availabilities`,VOLUNTEERS_LIST_USER_PANEL_POSITIONS:(e,t,n,i)=>`${Wl(e,t,n,i)}/positions`,VOLUNTEERS_LIST_USER_PANEL_TEAM:(e,t,n,i,o)=>`${Wl(e,t,n,i)}/team/${o}`,EDIT_USER:(e,t,n)=>`${Ta.EVENT({organizationId:e,eventId:t})}/user/${n}/edit`,EDIT_USER_FORM:(e,t,n,i)=>`${Ta.EVENT({organizationId:e,eventId:t})}/user/${n}/edit/form/${i}`,EDIT_USER_MISSIONS:(e,t,n)=>`${Ta.EVENT({organizationId:e,eventId:t})}/user/${n}/edit-missions`,EDIT_USER_MISSIONS_FORM:(e,t,n,i)=>`${Ta.EVENT({organizationId:e,eventId:t})}/user/${n}/edit-missions/form/${i}`,EDIT_USER_SLOTS:(e,t,n)=>`${Ta.EVENT({organizationId:e,eventId:t})}/user/${n}/edit-slots`,EDIT_USER_SLOTS_FORM:(e,t,n,i)=>`${Ta.EVENT({organizationId:e,eventId:t})}/user/${n}/edit-slots/form/${i}`,EDIT_USER_ACCREDITATIONS:(e,t,n)=>`${Ta.EVENT({organizationId:e,eventId:t})}/user/${n}/edit-accreditations`,EDIT_USER_ACCREDITATIONS_FORM:(e,t,n,i)=>`${Ta.EVENT({organizationId:e,eventId:t})}/user/${n}/edit-accreditations/form/${i}`,ASSIGNMENTS:(e,t)=>`${Ta.EVENT({organizationId:e,eventId:t})}/assignments`,ASSIGNMENT:(e,t,n)=>`${Ta.EVENT({organizationId:e,eventId:t})}/assignment/${n}`,EDIT_ASSIGNMENT:(e,t,n)=>`${Ta.EVENT({organizationId:e,eventId:t})}/edit-assignment/${n}`,TEAM_ASSIGNMENT:(e,t,n)=>`${Ta.EVENT({organizationId:e,eventId:t})}/team-assignment/${n}`,PRE_ASSIGNMENT:(e,t,n)=>`${Ta.EVENT({organizationId:e,eventId:t})}/pre-assignment/${n}`,ACCREDITATIONS_ASSIGNMENTS:(e,t)=>`${Ta.EVENT({organizationId:e,eventId:t})}/accreditations-assignments`,ACCREDIT:(e,t,n)=>`${Ta.EVENT({organizationId:e,eventId:t})}/accredit/${n}`,EDIT_ACCREDIT:(e,t,n)=>`${Ta.EVENT({organizationId:e,eventId:t})}/edit-accredit/${n}`,EVENT_EMAILS:ql,EVENT_EMAILS_PARAMETERS:(e,t)=>`${ql(e,t)}/parameters`,EDIT_CUSTOM_DOCUMENT:(e,t,n)=>`${Ta.EVENT({organizationId:e,eventId:t})}/custom-document/${n}/edit`,INTEGRATION:Hl,INTEGRATION_LINKS:(e,t)=>`${Hl(e,t)}/links`,INTEGRATION_FIELDS:(e,t)=>`${Hl(e,t)}/fields`,INTEGRATION_PARAMETERS:(e,t)=>`${Hl(e,t)}/parameters`,INTEGRATION_DESIGN:(e,t)=>`${Hl(e,t)}/design`,DOCUMENTS:Kl,DOCUMENTS_USER_PLANNING:(e,t,n)=>`${Kl(e,t)}/user-planning/${n}`,DOCUMENTS_USER_PLANNING_LIST:(e,t,n)=>`${Kl(e,t)}/user-planning-list/${n}`,DOCUMENTS_USER_PLANNING_DAYS:(e,t,n)=>`${Kl(e,t)}/user-planning-days/${n}`,DOCUMENTS_ASSIGNMENTS:(e,t,n)=>`${Kl(e,t)}/assignments/${n}`,DOCUMENTS_VOLUNTEERS_LISTING:(e,t,n)=>`${Kl(e,t)}/volunteers-listing/${n}`,DOCUMENTS_BADGE:(e,t,n,i)=>`${Kl(e,t)}/user/${n}/badge/${i}`,DOCUMENTS_CERTIFICATE:(e,t,n)=>`${Kl(e,t)}/user/${n}/certificate`,DOCUMENTS_HOURS:(e,t,n)=>`${Kl(e,t)}/user/${n}/hours`,DOCUMENTS_POSITION_PLANNING:(e,t,n)=>`${Kl(e,t)}/position-planning/${n}`,DOCUMENTS_POSITIONS_VOLUNTEERS_PLANNING:(e,t,n)=>`${Kl(e,t)}/positions-volunteers-planning/${n}`,DOCUMENTS_POSITION:(e,t,n)=>`${Kl(e,t)}/position/${n}`,DOCUMENTS_PLANNING:(e,t,n)=>`${Kl(e,t)}/planning/${n}`,DOCUMENTS_USER_CUSTOM_DOCUMENT:(e,t,n,i)=>`${Kl(e,t)}/user/${n}/custom-document/${i}`,DOCUMENTS_USERS_PICTURES:(e,t,n)=>`${Kl(e,t)}/users-pictures/${n}`,OPTIONS:Yl,OPTIONS_API:(e,t)=>`${Yl(e,t)}/api`,OPTIONS_WEEZEVENT_V2:(e,t)=>`${Yl(e,t)}/weezevent-v2`,ACCREDITATIONS_SEGMENT:(e,t,n)=>`${Il.ACCREDITATIONS({organizationId:e,eventId:t})}/${n}`,CREATE_ACCREDITATION(e,t,n){let i=`${Ta.EVENT({organizationId:e,eventId:t})}/create-accreditation`;return n&&(i=`${i}/${n}`),i},EDIT_ACCREDITATION:(e,t,n)=>`${Il.ACCREDITATION({organizationId:e,eventId:t,accreditationId:n})}/edit`,ACCREDITATION_MAP:(e,t)=>`/accreditation/${e}-${t}/map`,DELEGATIONS_SEGMENT:(e,t,n)=>`${dc.DELEGATIONS({organizationId:e,eventId:t})}/${n}`,CREATE_DELEGATION(e,t,n){let i=`${Ta.EVENT({organizationId:e,eventId:t})}/create-delegation`;return n&&(i=`${i}/${n}`),i},EDIT_DELEGATION:(e,t,n)=>`${dc.DELEGATION({organizationId:e,eventId:t,delegationId:n})}/edit`,EDIT_USER_DELEGATION:(e,t,n,i)=>`${dc.DELEGATION({organizationId:e,eventId:t,delegationId:n})}/user/${i}/edit`,EDIT_USER_DELEGATION_FORM:(e,t,n,i,o)=>`${dc.DELEGATION({organizationId:e,eventId:t,delegationId:n})}/user/${i}/edit/form/${o}`},Xl=(e,t)=>`/volunteers/${e}-${t}`,Ql=(e,t)=>`${Xl(e,t)}/assignments`,ed=(e,t)=>`${Xl(e,t)}/auth`,td=(e,t,n,i)=>`/magic-link/${e}/${t}/${n}/${i}`,nd=(e,t)=>`${Xl(e,t)}/register`,id=Ql;function od(e,t){return e&&!t.startsWith("/embed")?`/embed${t}`:t}const rd=()=>{const{code:e,source:t,organizationId:n,eventId:i}=Qt();return(0,r.useEffect)(()=>{const o=localStorage.getItem(Zi),r=localStorage.getItem(Yi);if(an(o)&&an(r)&&an(e)&&an(t)){localStorage.removeItem(Zi),localStorage.removeItem(Yi);const s=new Ki.TU({Username:o,Pool:Qi()});s.Session=r,s.setAuthenticationFlowType("CUSTOM_AUTH"),s.sendCustomChallengeAnswer(e,{async onSuccess(e){const o=e.getIdToken().getJwtToken();await co(uo,{token:o}),n&&i&&t===re.VolunteerRegister?location.href=nd(n,i):n&&i&&t===re.VolunteerAssignments?location.href=id(n,i):t===re.App?location.href=Jl.HOME:location.href="/"},onFailure(e){gl("Could not sendCustomChallengeAnswer",e),location.href="/"}})}else location.href="/"},[]),null},sd={PLURAL:"members",SINGLE:"member"},ad={PLURAL:"profiles",SINGLE:"profile"},cd="accreditations",ld="actions",dd="availabilities",ud="campaigns",hd="comments",md="documents",gd="events",pd="history",fd="informations",_d="messages",bd="positions",kd="forms",vd="form",Ad="scans",yd=e=>_a([sd.SINGLE,e]),wd=e=>_a([ad.SINGLE,e]),Cd={USER_PROFILE:({userInfoId:e,...t})=>_a([Xa.ORGANIZATION(t),wd(e)]),USER_PROFILES:e=>_a([Xa.ORGANIZATION(e),ad.PLURAL]),MEMBERS:e=>_a(["delegationId"in e?dc.DELEGATION(e):"eventId"in e&&e.eventId?Ta.EVENT(e):tc.COMMUNITY(e),sd.PLURAL]),MEMBER:({userInfoId:e,...t})=>_a(["eventId"in t&&t.eventId?Ta.EVENT(t):tc.COMMUNITY(t),yd(e)]),MEMBER_INFORMATION:e=>_a([Cd.MEMBER(e),fd]),MEMBER_ACTIONS:e=>_a([Cd.MEMBER(e),ld]),MEMBER_AVAILABILITIES:e=>_a([Cd.MEMBER(e),dd]),MEMBER_COMMENTS:e=>_a([Cd.MEMBER(e),hd]),MEMBER_HISTORY:e=>_a([Cd.MEMBER(e),pd]),MEMBER_HISTORY_CAMPAIGNS:e=>_a([Cd.MEMBER(e),pd,ud]),MEMBER_HISTORY_EVENTS:e=>_a([Cd.MEMBER(e),pd,gd]),MEMBER_HISTORY_FORMS:e=>_a([Cd.MEMBER(e),pd,kd]),MEMBER_HISTORY_SCANS:e=>_a([Cd.MEMBER(e),pd,Ad]),MEMBER_POSITIONS:e=>_a([Cd.MEMBER(e),bd]),MEMBER_ACCREDITATIONS:e=>_a([Cd.MEMBER(e),cd]),MEMBER_FORMS:e=>_a([Cd.MEMBER(e),kd]),MEMBER_FORM:e=>_a([Cd.MEMBER(e),vd,e.formId]),MEMBER_FORM_EDIT:e=>xa(Cd.MEMBER_FORM(e)),MEMBER_MESSAGES:e=>_a([Cd.MEMBER(e),_d]),MEMBER_DOCUMENTS:e=>_a([Cd.MEMBER(e),md]),CREATE:e=>Ia(Cd.MEMBERS(e))};function Id(){return{history:en(),params:Qt(),translate:Yt()}}function xd(e){try{return location.host===da&&e===pa[da]}catch{return!1}}function Sd(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 Ed(e){const t=yn({colors:{...zr(e)}});document.getElementById("heavent-react-hook")?.classList.add(t.toString())}const jd=r.createContext({}),Td=e=>{const{data:t,isLoading:n}=Jt("query OrganizationPublic(\n $organizationId: OrganizationId!\n $loadDelegationsSpace: Boolean!\n $loadMembersSpace: Boolean!\n) {\n organization: organizationPublic(id: $organizationId) {\n delegationsSpaceDesign @include(if: $loadDelegationsSpace) {\n colors\n\n banner {\n url\n }\n\n logo {\n url\n }\n }\n\n membersSpaceDesign @include(if: $loadMembersSpace) {\n colors\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},[]);const[i,s]=r.useState(void 0),[a,c]=r.useState(void 0),[l,d]=r.useState(!0);return r.useEffect(()=>{t.organization&&(Ed(t.organization?.delegationsSpaceDesign?.colors??t.organization.membersSpaceDesign?.colors??{}),(async()=>{t.organization.delegationsSpaceDesign?(await Promise.all([Sd(t.organization.delegationsSpaceDesign?.banner?.url),Sd(t.organization.delegationsSpaceDesign?.logo?.url)]),s(t.organization.delegationsSpaceDesign?.banner?.url),c(t.organization.delegationsSpaceDesign?.logo?.url),d(!1)):t.organization.membersSpaceDesign?(await Promise.all([Sd(t.organization.membersSpaceDesign?.banner?.url),Sd(t.organization.membersSpaceDesign?.logo?.url)]),s(t.organization.membersSpaceDesign?.banner?.url),c(t.organization.membersSpaceDesign?.logo?.url),d(!1)):d(!1)})())},[t.organization]),(0,o.jsx)(jd.Provider,{value:{bannerUrl:i,logoUrl:a},children:n||l||!0===e.isLoading?e.skeleton:e.children})};var Dd=n(924),Pd=n(6996),Rd=n(952);const Od=(0,r.createContext)({}),Fd=bn("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 zd=n(2695);function Md(e,t){"production"!==i.Production&&console.warn(`Component ${e} is deprecated, use ${t} instead.`)}const $d=bn("div",{alignItems:"center",display:"grid",gap:"6px 8px",gridTemplateColumns:"min-content auto"}),Nd=bn(Dn,{alignItems:"center",borderRadius:"$2",fontWeight:"$medium",gap:"$3",padding:"$3 $4","& i":{fontSize:"$textMd"},variants:{color:{primary:{background:"$primary50",border:"1px solid $primary400",color:"$primary700",[`${$d}`]:{color:"$primary500"}},gray:{background:"$gray50",border:"1px solid $gray400",color:"$gray700",[`${$d}`]:{color:"$gray500"}},error:{background:"$error50",border:"1px solid $error400",color:"$error700",[`${$d}`]:{color:"$error500"}},warning:{background:"$warning50",border:"1px solid $warning400",color:"$warning700",[`${$d}`]:{color:"$warning500"}},success:{background:"$success50",border:"1px solid $success400",color:"$success700",[`${$d}`]:{color:"$success500"}}}},defaultVariants:{color:"primary"}}),Bd=e=>(Md("common-front/src/designSystem/components/alert.tsx","common-front/src/designSystem/components/alert/alert.tsx"),(0,o.jsxs)(Nd,{"aria-live":e["aria-live"]??"polite",color:e.color,role:"alert",width:e.width,children:[e.leftIcon&&(0,o.jsx)(Dn,{align:"center",children:(0,o.jsx)(Mn,{icon:e.leftIcon})}),(0,o.jsx)(xn,{css:{flex:"1"},children:e.children}),e.rightIcon&&(0,o.jsx)(Dn,{align:"center",css:{cursor:e.rightIconClick?"pointer":"default"},onClick:()=>{e.rightIconClick?.()},children:(0,o.jsx)(Mn,{icon:e.rightIcon})})]})),Ld=e=>{if("error"===e.iconStyle)return(0,o.jsx)(Mn,{icon:"circle-exclamation",iconStyle:"solid"});Br(e.iconStyle)},Vd=bn(Dn,{borderRadius:"$1",alignItems:"flex-start",gap:"$2",flex:"1 0 0",padding:"$4","& i":{fontSize:"$textMd"},variants:{alertStyle:{error:{background:"$error50",border:"1px solid $error500",color:"$gray800","& i":{color:"$error500"}}}},defaultVariants:{alertStyle:"error"}}),Ud=({min:e=2,max:t=6,textStyle:n="heading",children:i,...s})=>{t{const i=e?.parentElement;if(!i||n===t)return n;for(const e of Array(i.children))if(e[0]instanceof HTMLHeadingElement)return d(i,++n);return d(i,n)},[t]);return r.useEffect(()=>l(`h${d(a.current?.parentElement,e)}`),[e,t]),(0,o.jsx)(na,{ref:a,as:c,...s,textStyle:n,children:i})},Gd=e=>(0,o.jsxs)(Vd,{"aria-live":e["aria-live"]??"polite",role:"alert",width:e.width,children:[(0,o.jsx)(Dn,{align:"start",children:(0,o.jsx)(xn,{height:"20px",width:"20px",children:(0,o.jsx)(Ld,{iconStyle:"error"})})}),(0,o.jsx)(Dn,{align:"start",css:{gap:"2px"},direction:"column",children:e.children})]}),Wd=({children:e})=>(0,o.jsx)(Ud,{css:{color:"$gray900",fontWeight:"$medium",fontSize:"$textSm",lineHeight:"1.42857"},children:e}),qd=({children:e})=>(0,o.jsx)(na,{children:e});function Hd(e){return e?(0,Ei.A)(Object.values(e).map(e=>"string"==typeof e?e:Array.isArray(e)?(0,Go.A)(e).map(e=>Hd(e)).flat():Hd(e)).flat()):[]}const Kd=e=>{const{translate:t}=Id(),{errors:n,submitErrors:i,showErrors:s}=(0,r.useContext)(Od),c=Hd((0,zd.A)({},n,i));return s&&a(c)?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(({children:n})=>e.featureFlags?.isV4?(0,o.jsxs)(Gd,{alertStyle:"error","aria-live":"assertive",id:e.errorId,children:[(0,o.jsx)(Wd,{children:t("form_has_errors_14074")}),(0,o.jsx)(qd,{children:(0,o.jsx)("ul",{style:{margin:"0",paddingInlineStart:"var(--space-4)"},children:n})})]}):(0,o.jsx)(Bd,{"aria-live":"assertive",color:"error",id:e.errorId,leftIcon:"circle-exclamation",children:(0,o.jsx)(xn,{width:1,children:(0,o.jsx)("ul",{style:{margin:"0",paddingInlineStart:"var(--space-6)"},children:n})})}),{children:c.map((e,t)=>(0,o.jsx)("li",{children:e},t))}),!0!==e.hideSpacer&&(0,o.jsx)(Fd,{height:"6"})]}):null};function Yd(e,t){Object.values(t.fields).forEach(e=>{e.data={...e.data,forceDisplayError:!0}})}const Zd=bn("input",{left:"-9999px",position:"absolute",top:"-9999px",visibility:"hidden"}),Jd=e=>{const t=r.useRef(null),{setShowErrors:n}=r.useContext(Od),i=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?e.formRenderProps.handleSubmit():void 0):e.formRenderProps.handleSubmit());return(0,o.jsxs)(Dn,{ref:t,as:"form",onSubmit:i,...jn(e),children:[!e.hideDefaultErrors&&!e.customErrorRef&&(0,o.jsx)(Kd,{}),(0,o.jsx)(Zd,{type:"submit",value:"Submit"}),e.render({dirty:e.formRenderProps.dirty,errors:e.formRenderProps.errors,form:e.formRenderProps.form,handleSubmit:i,invalid:e.formRenderProps.invalid,submitErrors:e.formRenderProps.submitErrors,submitting:e.formRenderProps.submitting,values:e.formRenderProps.values})]})},Xd=e=>{const t=Kt(wc),[n,i]=r.useState(!1);return(0,o.jsx)(Rd.lV,{initialValues:e.initialValues,initialValuesEqual:e.initialValuesEqual??Pd.A,mutators:{...e.mutators,...Dd.A,forceErrors:Yd},render:t=>(0,o.jsx)(Od.Provider,{value:{errors:t.errors,showErrors:n,submitErrors:t.submitErrors,setShowErrors:i},children:(0,o.jsx)(Jd,{...(0,En.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,o)=>{const r=await e.onSubmit(t,n,o);return Object.keys(r||{}).length>0&&i(!0),r}})};var Qd=n(9008);function eu(e){return e.data?.forceDisplayError&&e.invalid||e.touched&&!e.pristine&&e.invalid||!1}var tu=n(5664);function nu(){const[e]=(0,r.useState)(()=>(0,tu.A)("forminput-")),[t]=(0,r.useState)(()=>(0,tu.A)("forminputlabel-")),[n]=(0,r.useState)(()=>(0,tu.A)("forminputdesc-")),[i]=(0,r.useState)(()=>(0,tu.A)("forminputerror-"));return{inputId:e,labelId:t,descId:n,errorId:i}}const iu=({children:e,id:t})=>e?(0,o.jsx)(xn,{color:"gray500",fontSize:"textXs",id:t,children:e}):null,ou=e=>e.children?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"1"}),(0,o.jsx)(xn,{color:"error"===e.state?"error500":"gray500",fontSize:"textXs",id:e.id,role:"error"===e.state?"alert":void 0,children:e.children})]}):null,ru=({id:e,children:t,htmlFor:n,isClickable:i=!0})=>t?(0,o.jsx)("label",{htmlFor:n,id:e,style:{display:"block",cursor:"inherit",fontWeight:"$medium",marginBlockEnd:0},onClick:e=>{i||e.preventDefault()},children:(0,o.jsx)(xn,{color:"gray700",fontWeight:"medium",children:t})}):null,su=bn("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 $primary700"},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"}}),au=r.forwardRef(({height:e,cursor:t,css:n,icon:i,children:r,state:s,onClick:a,rightIcon:c,rightText:l,onRightIconClick:d,...u},h)=>(0,o.jsxs)(su,{ref:h,className:"h-styled-input-container",css:n,cursor:t,height:e,role:"listbox",state:s,onClick:e=>{a?.(e)},...u,children:[i&&(0,o.jsx)(Dn,{css:{color:"$gray500"},role:"presentation",children:(0,o.jsx)(Mn,{icon:i})}),r,"error"===s&&(0,o.jsx)(Dn,{className:"styled-input-container-circle-exclamation",css:{color:"$error500"},children:(0,o.jsx)(Mn,{icon:"circle-exclamation"})}),c&&(0,o.jsx)(Dn,{css:{color:"$gray500",cursor:"function"==typeof d?"pointer":"inherit"},role:"presentation",onClick:e=>{d?.(e)},children:(0,o.jsx)(Mn,{icon:c})}),an(l)&&(0,o.jsx)(xn,{css:{userSelect:"none"},font:"gray500 textSm regular",children:l})]}));au.displayName="StyledInputContainer";const cu=r.forwardRef(({autoComplete:e,isEmail:t,shouldParseAsInt:n,css:i,label:s,description:a,hint:c,onRightIconClick:l,state:d,type:u,onChange:h,rightIcon:m,rightText:g,icon:p,...f},_)=>{const b=r.useRef(),k=r.useRef(),v=_??k,{inputId:A,descId:y,errorId:w}=nu();return(0,o.jsxs)(Dn,{ref:b,css:i,direction:"column",width:1,children:[(0,o.jsx)(ru,{htmlFor:A,children:s}),(0,o.jsx)(iu,{id:y,children:a}),(s||a)&&(0,o.jsx)(Fd,{height:"1"}),(0,o.jsx)(au,{cursor:"text",icon:p,rightIcon:m,rightText:g,state:d,onClick:()=>v.current?.focus(),onRightIconClick:e=>{Hn(e),l?.(e)},children:(0,o.jsx)(xn,{color:"inherit",css:{flex:"1",height:"100%","& input":{background:"transparent",border:"none",color:"$gray800",height:"100%",outline:"none",width:"100%"},"& input::placeholder":{color:"search"===d?"$gray400":"$gray500",opacity:1},"& input::-ms-input-placeholder ":{color:"search"===d?"$gray400":"$gray500",opacity:1}},children:(0,o.jsx)("input",{ref:v,"aria-describedby":a?y:void 0,"aria-errormessage":"error"===d?w:void 0,"aria-invalid":"error"===d,autoComplete:e??"off",disabled:"disabled"===d,id:A,type:u??(t?"email":n?"number":"text"),onChange:e=>{if(t&&an(e.target.value))h(e.target.value.toLowerCase());else if(!0===n){const t=parseInt(e.target.value,10);isNaN(t)?h(0):h(t)}else h(e.target.value)},...f})})}),(0,o.jsx)(ou,{id:w,state:d,children:c})]})});cu.displayName="TextInput";const lu=({autoComplete:e,hint:t,shouldParseAsInt:n,name:i,state:s,...a})=>{const c=(0,r.useCallback)(e=>{switch(e){case H.City:return"address-level1";case H.DateOfBirth:return"bday";case H.FirstName:return"given-name";case H.LastName:return"family-name";case H.PostalCode:return"postal-code";case H.Street:return"street-address";case H.Country:case H.Language:case H.Nationality:case H.Phone:case H.Picture:case H.Sex:default:return}},[]),l=(0,r.useMemo)(()=>i.startsWith("formRegister.userInfo.fields.")?c(i.split(".").pop())??e:e,[i,e,c]),d=(0,r.useCallback)(e=>{const i=eu(e.meta);return(0,o.jsx)(cu,{autoComplete:l,hint:i?e.meta.error||e.meta.submitError:t,shouldParseAsInt:n||!1,state:i?"error":s,value:e.input.value,onBlur:e.input.onBlur,onChange:t=>{e.input.onChange(t)},onFocus:e.input.onFocus,...a})},[t,n,s,l,a]);return(0,o.jsx)(Rd.D0,{name:i,parse:Qd.A,render:d})},du={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",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 uu=n(2302);const hu=e=>{const t=Yt(),n=tn(),i=Kt(wc),s=Kt(sr),{mutate:a}=vo(),[c,l]=(0,r.useState)(0),[d,u]=(0,r.useState)(null),h=location.pathname.includes("/delegations"),m=(0,r.useCallback)(async t=>{await co(uo,{token:t}),h?(n.removeItem(du.DELEGATIONS_SPACE_TAB),location.pathname=`${Ii.HEAVENT_PUBLIC_URL.pathname}${Ca(Xa.ORGANIZATION_DELEGATIONS({organizationId:e.organizationId}))}`):location.pathname=`${Ii.HEAVENT_PUBLIC_URL.pathname}${Ca(Cd.USER_PROFILES({organizationId:e.organizationId}))}`},[h]),[g,p]=(0,r.useState)(0),[f,_]=(0,r.useState)(!1),[b,k]=(0,r.useState)(Date.now()),v=()=>{location.reload()},{connectionTitle:A,connectionSubtitle:y}=jr(e.organizationId);return(0,o.jsx)(Xd,{css:e.css,direction:"column",initialValues:{email:"",code:""},render:({handleSubmit:e,submitting:n})=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(xn,{color:"gray900",fontSize:{"@initial":"textXl","@tablet":"displaySm"},fontWeight:"semiBold",textAlign:{"@initial":"center","@desktop":"start"},children:t(h?A:"connexion_mon_39916")}),(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(xn,{color:"gray500",textAlign:{"@initial":"center","@desktop":"start"},children:t(h?y:"connecter_vous_19749")}),(0,o.jsx)(Fd,{height:"7"}),(0,o.jsx)(lu,{autoComplete:"email",isEmail:!0,label:t("adresse_e_mail_60930"),name:"email",placeholder:t("entrez_votre_ad_42451"),state:1===c||f?"disabled":"active"}),1===c&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"4"}),(0,o.jsx)(lu,{autoComplete:"one-time-code",label:t("code_re_u_par_e_75150"),name:"code",placeholder:t("code_re_u_par_e_75150"),state:f?"disabled":void 0,type:"number"})]}),(0,o.jsx)(Fd,{height:"6"}),f?(0,o.jsx)(Un,{textAlign:"center",onClick:v,children:t("recommencer_14712")}):(0,o.jsx)(Un,{isLoading:n,textAlign:"center",onClick:e,children:t(0===c?"recevoir_un_cod_82139":"se_connecter_63820")})]}),validate:i.validateForForm(s.signInSchema()),onSubmit:async n=>{if(0!==c){const{user:e,callbacks:i}=d;return so({code:n.code,user:e,callbacks:i}).then(m,e=>{if("RETRY"===e.type)return p(g+1),{code:t("le_code_n_est_p_95065",3-(g+1))};{let i;return ao(e.message,n.email,b),_(!0),i=xi.dw.fromMillis(Date.now()-b).as("minutes")>3?t("le_code_a_expir_45975"):t("le_code_n_est_p_12317"),{FORM_ERROR:i}}})}{await a({loginCodeEmail:{email:n.email,organizationId:e.organizationId,source:h?re.DelegationsSpace:re.MembersSpace}}),k(Date.now());const t=await ro(n.email,uu.A,uu.A);u(t),l(1)}}})};function mu(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 gu(){return mu(fn.desktop)}function pu(){return mu(fn.tablet)}const fu={Aso:{Aso:n(8301),HomeBackground:n(8144),Logo:n(2388)},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),UserProfile:n(8264)},_u={Alert:n(2630),Check:n(3780),DnsBlank:n(1037),DnsWrongDomain:n(8184),Done:n(8652),Done2:n(3574),RecrewteerMarker:n(8798),Sad:n(5376),WeezeventBlankHandGlobe:n(2599),WeezeventBlankMessages:n(6687),WeezeventBlankPerson:n(7648),WeezeventBlankSwissArmyKnife:n(4362)},bu=bn("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"}}}}),ku=r.forwardRef((e,t)=>{const n={gridTemplate:e.gridtemplate,gridTemplateColumns:e.gridtemplatecolumns,gridTemplateRows:e.gridtemplaterows};return e.height&&(n.height=gn(e.height)),e.width&&(n.width=gn(e.width)),(0,o.jsx)(bu,{role:"grid",...e,ref:t,css:{...n,...e.css}})});ku.displayName="Grid";const vu=e=>{const t=gu(),n=pu(),i=t?"720px 1fr":"1fr";return(0,o.jsxs)(ku,{gridtemplatecolumns:i,gridtemplaterows:"1fr",height:1,width:1,children:[t&&(0,o.jsx)(xn,{css:{background:`url(${fu.Aso.HomeBackground}) no-repeat`,backgroundSize:"cover"}}),(0,o.jsxs)(Dn,{align:"center",css:{overflow:"hidden"},direction:"column",children:[(0,o.jsx)(Fd,{height:"12"}),(0,o.jsx)(xn,{height:t?160:n?133:96,width:t?383:n?272:231,children:(0,o.jsx)("img",{height:"100%",src:fu.Aso.Logo,width:"100%"})}),(0,o.jsx)(Fd,{height:{"@initial":"10","@tablet":"13"}}),e.children]})]})},Au=wn({"0%":{opacity:1},"50%":{opacity:.4},"100%":{opacity:1}}),yu=r.memo(function(e){const t="circular"===e.variant?e.size:e.height,n="circular"===e.variant?e.size:e.width;return(0,o.jsx)(xn,{css:{animation:`${Au} 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})}),wu=()=>(0,o.jsx)(vu,{children:(0,o.jsxs)(Dn,{direction:"column",width:"$modalMd",children:[(0,o.jsx)(yu,{height:28,width:1,borderRadius:"$1"}),(0,o.jsx)(Fd,{height:"1"}),(0,o.jsx)(yu,{height:42,width:1,borderRadius:"$1"}),(0,o.jsx)(Fd,{height:"7"}),(0,o.jsx)(yu,{height:38,width:1,borderRadius:"$1"}),(0,o.jsx)(Fd,{height:"6"}),(0,o.jsx)(yu,{height:40,width:1,borderRadius:"$1"})]})}),Cu=()=>{const{organizationId:e}=Qt();return(0,o.jsx)(Td,{loadDelegationsSpace:!1,loadMembersSpace:!0,organizationId:e,skeleton:(0,o.jsx)(wu,{}),children:(0,o.jsx)(vu,{children:(0,o.jsx)(hu,{css:{width:"100%",px:"$6","@tablet":{maxWidth:"100%",px:"$12"},"@desktop":{width:"$modalMd",px:"$3"}},organizationId:e})})})},Iu=e=>(0,o.jsxs)(Dn,{align:"center",css:{background:"white",paddingTop:"64px","@desktop":{paddingTop:"80px"}},direction:"column",height:1,width:1,children:[(0,o.jsx)(xn,{height:68,width:185,children:(0,o.jsx)("img",{height:"100%",src:fu.Aso.Aso,width:"100%"})}),(0,o.jsx)(xn,{css:{minHeight:"148px","@desktop":{minHeight:"98px"}}}),(0,o.jsx)(Dn,{css:{width:"100%",px:"$6","@tablet":{px:"0",width:"360px"},"@desktop":{px:"0",width:"640px"}},children:e.children}),(0,o.jsx)(xn,{css:{flex:"1"}}),(0,o.jsxs)(Dn,{css:{alignItems:"center",background:"#e20613",color:"white",fontWeight:"500",gap:"$4",py:"$4","@tablet":{gap:"$7",justifyContent:"center",py:"10px"}},direction:{"@initial":"column","@tablet":"row"},width:1,children:[(0,o.jsx)(xn,{children:"Conditions"}),(0,o.jsx)(xn,{children:"Conditions"})]})]}),xu=()=>{const{params:{organizationId:e}}=Id();return(0,o.jsx)(Td,{loadDelegationsSpace:!0,loadMembersSpace:!1,organizationId:e,skeleton:(0,o.jsx)("div",{children:"TODO"}),children:(0,o.jsx)(Iu,{children:(0,o.jsx)(hu,{css:{width:"100%"},organizationId:e})})})};function Su(e){return 3136===e}const Eu=()=>{const{params:{organizationId:e}}=Id(),{logoUrl:t}=r.useContext(jd);return t?(0,o.jsx)(xn,{css:{background:`url(${t})`,backgroundSize:"cover"},height:Su(e)?68:120,width:Su(e)?185:120}):null},ju=()=>(0,o.jsx)(Dn,{justify:"center",width:1,css:{marginBottom:"$9","@tablet":{marginBottom:"$10"}},children:(0,o.jsx)(yu,{height:140,width:140,borderRadius:"$1"})}),Tu=bn("div",{alignItems:"center",background:"$gray50",display:"flex",flexDirection:"column",height:"100%",overflowY:"auto",padding:"$4",gap:"$7",paddingTop:"$10",width:"100%","@tablet":{padding:"$10"}}),Du={bd:!0,background:"white",padding:"$7 $4",width:"100%","@tablet":{padding:"$7"},"@desktop":{width:"$modalMd"}},Pu=()=>(0,o.jsxs)(Tu,{children:[(0,o.jsx)(ju,{}),(0,o.jsxs)(Dn,{css:Du,direction:"column",children:[(0,o.jsx)(yu,{borderRadius:"$1",height:28,width:1}),(0,o.jsx)(Fd,{height:"1"}),(0,o.jsx)(yu,{borderRadius:"$1",height:42,width:1}),(0,o.jsx)(Fd,{height:"7"}),(0,o.jsx)(yu,{borderRadius:"$1",height:38,width:1}),(0,o.jsx)(Fd,{height:"6"}),(0,o.jsx)(yu,{borderRadius:"$1",height:40,width:1})]})]}),Ru=e=>{const{organizationId:t}=Qt();return(0,o.jsx)(Td,{loadDelegationsSpace:e.loadDelegationsSpace,loadMembersSpace:e.loadMembersSpace,organizationId:t,skeleton:(0,o.jsx)(Pu,{}),children:(0,o.jsxs)(Tu,{children:[(0,o.jsx)(Eu,{}),(0,o.jsx)(hu,{css:Du,organizationId:t})]})})},Ou=e=>{const{params:{organizationId:t}}=Id();return xd(t)?(0,o.jsx)(Cu,{}):function(e){try{return location.host===ma&&e===pa[ma]}catch{return!1}}(t)?(0,o.jsx)(xu,{}):(0,o.jsx)(Ru,{loadDelegationsSpace:e.loadDelegationsSpace,loadMembersSpace:e.loadMembersSpace})},Fu=e=>`/v2/organization/${e}`,zu=(e,t)=>`${Fu(e)}/member/${t}`,Mu=({organizationId:e,userInfoId:t,eventId:n})=>n?`${zu(e,t)}/event/${n}`:`${zu(e,t)}/community`,$u=e=>Fu(e),Nu=e=>`${Fu(e)}/profiles`,Bu=(e,t)=>`${zu(e,t)}/campaigns`,Lu=(e,t)=>`${zu(e,t)}/documents`,Vu=Mu,Uu=(e,t,n)=>`${Mu({organizationId:e,userInfoId:t,eventId:n})}/edit`,Gu=(e,t,n)=>`${Mu({organizationId:e,userInfoId:t,eventId:n})}/information`,Wu=(e,t,n)=>`${Mu({organizationId:e,userInfoId:t,eventId:n})}/availability`,qu=(e,t,n)=>`${Mu({organizationId:e,userInfoId:t,eventId:n})}/positions`,Hu=(e,t,n)=>`${Mu({organizationId:e,userInfoId:t,eventId:n})}/assignments`,Ku=(e,t,n)=>`${Mu({organizationId:e,userInfoId:t,eventId:n})}/desired-accreditations`,Yu=(e,t,n)=>`${Mu({organizationId:e,userInfoId:t,eventId:n})}/accreditations`,Zu=(e,t,n)=>`${Mu({organizationId:e,userInfoId:t,eventId:n})}/information/edit`,Ju=(e,t,n,i)=>`${Mu({organizationId:e,userInfoId:t,eventId:n})}/information/edit/${i}`,Xu=(e,t,n)=>`${Mu({organizationId:e,userInfoId:t,eventId:n})}/availability/edit`,Qu=(e,t,n,i)=>`${Mu({organizationId:e,userInfoId:t,eventId:n})}/availability/edit/${i}`,eh=(e,t,n)=>`${Mu({organizationId:e,userInfoId:t,eventId:n})}/positions/edit`,th=(e,t,n,i)=>`${Mu({organizationId:e,userInfoId:t,eventId:n})}/positions/edit/${i}`,nh=(e,t,n)=>`${Mu({organizationId:e,userInfoId:t,eventId:n})}/desired-accreditations/edit`,ih=(e,t,n,i)=>`${Mu({organizationId:e,userInfoId:t,eventId:n})}/desired-accreditations/edit/${i}`,oh=(e,t,n)=>`${Fu(e)}/event/${t}/form/${n}`,rh=(e,t)=>`${Fu(e)}/form/${t}`,sh=(e,t,n,i)=>t?`${Fu(e)}/event/${t}/form/${i}/delegation/${n}`:`${Fu(e)}/form/${i}/delegation/${n}`,ah=(e,t,n,i)=>`${Fu(e)}/event/${t}/form/${n}/team/${i}`,ch=()=>{const e=Cd.MEMBER({organizationId:":organizationId",userInfoId:":userInfoId",eventId:":eventId"}),t=Cd.MEMBER_FORM_EDIT({organizationId:":organizationId",userInfoId:":userInfoId",eventId:":eventId",formId:":formId"}),n=[Vu({organizationId:":organizationId",userInfoId:":userInfoId"}),Vu({organizationId:":organizationId",userInfoId:":userInfoId"}),Vu({organizationId:":organizationId",eventId:":eventId",userInfoId:":userInfoId"}),Uu(":organizationId",":userInfoId",null),Uu(":organizationId",":userInfoId",":eventId"),Gu(":organizationId",":userInfoId",null),Gu(":organizationId",":userInfoId",":eventId"),Zu(":organizationId",":userInfoId",null),Zu(":organizationId",":userInfoId",":eventId"),Wu(":organizationId",":userInfoId",":eventId"),Xu(":organizationId",":userInfoId",":eventId"),qu(":organizationId",":userInfoId",":eventId"),eh(":organizationId",":userInfoId",":eventId"),Ku(":organizationId",":userInfoId",":eventId"),nh(":organizationId",":userInfoId",":eventId")],i=[Ju(":organizationId",":userInfoId",null,":formId"),Ju(":organizationId",":userInfoId",":eventId",":formId"),Qu(":organizationId",":userInfoId",":eventId",":formId"),th(":organizationId",":userInfoId",":eventId",":formId"),ih(":organizationId",":userInfoId",":eventId",":formId")];return(0,o.jsxs)($o.dO,{children:[(0,o.jsx)($o.rd,{exact:!0,from:"/v2/organization/:organizationId/event/:eventId/form/:formId/delegation/:delegationId",to:dc.DELEGATION_FORM({organizationId:":organizationId",eventId:":eventId",delegationId:":delegationId",formId:":formId"})}),(0,o.jsx)($o.rd,{exact:!0,from:"/v2/organization/:organizationId/form/:formId/delegation/:delegationId",to:dc.DELEGATION_FORM({organizationId:":organizationId",delegationId:":delegationId",formId:":formId"})}),(0,o.jsx)($o.rd,{exact:!0,from:"/v2/organization/:organizationId/event/:eventId/form/:formId",to:Ta.EVENT_FORM({organizationId:":organizationId",eventId:":eventId",formId:":formId"})}),(0,o.jsx)($o.rd,{exact:!0,from:"/v2/organization/:organizationId/form/:formId",to:Xa.ORGANIZATION_FORM({organizationId:":organizationId",formId:":formId"})}),(0,o.jsx)($o.rd,{exact:!0,from:"/v2/organization/:organizationId/delegations/auth",to:wa(Xa.ORGANIZATION_DELEGATIONS({organizationId:":organizationId"}))}),(0,o.jsx)($o.rd,{exact:!0,from:Nu(":organizationId"),to:Ca(Cd.USER_PROFILES({organizationId:":organizationId"}))}),n.map(t=>(0,o.jsx)($o.rd,{exact:!0,from:t,to:e},t)),i.map(e=>(0,o.jsx)($o.rd,{exact:!0,from:e,to:t},e)),(0,o.jsx)($o.rd,{exact:!0,from:Hu(":organizationId",":userInfoId",":eventId"),to:Cd.MEMBER_POSITIONS({organizationId:":organizationId",eventId:":eventId",userInfoId:":userInfoId"})}),(0,o.jsx)($o.rd,{exact:!0,from:Yu(":organizationId",":userInfoId",":eventId"),to:Cd.MEMBER_ACCREDITATIONS({organizationId:":organizationId",eventId:":eventId",userInfoId:":userInfoId"})}),(0,o.jsx)($o.rd,{exact:!0,from:Bu(":organizationId",":userInfoId"),to:Cd.MEMBER_MESSAGES({organizationId:":organizationId",userInfoId:":userInfoId"})}),(0,o.jsx)($o.rd,{exact:!0,from:Lu(":organizationId",":userInfoId"),to:Cd.MEMBER_DOCUMENTS({organizationId:":organizationId",userInfoId:":userInfoId"})}),(0,o.jsx)($o.rd,{exact:!0,from:rh(":organizationId",":formId"),to:Xa.ORGANIZATION_FORM({organizationId:":organizationId",formId:":formId"})}),(0,o.jsx)($o.rd,{exact:!0,from:oh(":organizationId",":eventId",":formId"),to:Ta.EVENT_FORM({organizationId:":organizationId",eventId:":eventId",formId:":formId"})}),(0,o.jsx)($o.rd,{exact:!0,from:ah(":organizationId",":eventId",":formId",":teamCode"),to:Ta.EVENT_TEAM_FORM({organizationId:":organizationId",eventId:":eventId",formId:":formId",teamCode:":teamCode"})}),(0,o.jsx)($o.rd,{exact:!0,from:sh(":organizationId",null,":delegationId",":formId"),to:dc.DELEGATION_FORM({organizationId:":organizationId",delegationId:":delegationId",formId:":formId"})}),(0,o.jsx)($o.rd,{exact:!0,from:sh(":organizationId",":eventId",":delegationId",":formId"),to:dc.DELEGATION_FORM({organizationId:":organizationId",eventId:":eventId",delegationId:":delegationId",formId:":formId"})}),(0,o.jsx)($o.rd,{from:$u(":organizationId"),to:Xa.ORGANIZATION({organizationId:":organizationId"})})]})};var lh=n(6618),dh=n(6452),uh=n(8389),hh=n(8047),mh=n(4757);function gh(e,t,n,i={}){const o=an(t.name)?t.name:"",r=e.toDisplayString(t.range,i.interval?.options),s=(0,Go.A)([i.position?.includeName?n:"",o,i.slot?.includeRange||cn(o)?r:"",i.position?.includeNameAtEnd?n:""]).join(" - ");return an(s)?s:n}function ph(e,t,n){return!n.hiddenPositionsSlotsIds.includes(e.id)&&(0===n.displayedPositionsSlotsIds.length||n.displayedPositionsSlotsIds.includes(e.id))&&(n.showFullPosition||!e.isFull)&&(n.slotDisplay===we.Hide||n.positionFilter===ye.None||ra(t.map(Mi)).some(t=>t.engulfs(e.range)))}function fh(e,t){const n=t[e.customField.slug];return"boolean"==typeof n&&e.customField.fieldType===K.Checkbox?n===e.conditionValue:e.customField.fieldType===K.Select&&e.customField.canSelectMultiple&&a(n)?(0,Xr.A)(e.conditionValue,n??[]).length>0:e.customField.fieldType===K.Select&&"number"==typeof n&&e.conditionValue.includes(n)}function _h(e,t){if(!a(e?.conditionsCustomFields))return!0;switch(e.conditionsOperator){case w.Or:return e.conditionsCustomFields.some(e=>fh(e,t));case w.And:return e.conditionsCustomFields.every(e=>fh(e,t));default:return Br(e.conditionsOperator)}}function bh(e,t,n,i){return!i.hiddenPositionsIds.includes(e.id)&&(0===i.displayedPositionsIds.length||i.displayedPositionsIds.includes(e.id))&&_h(e,t)&&e.slots.some(e=>ph(e,n,i))}function kh(e){return an(e.address)}function vh(e){return Wo(e.latitude)&&Wo(e.longitude)}function Ah(e){return kh(e)||vh(e)}function yh(e){return(0,Uo.A)(Object.values((0,lh.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:an(n.acronym)?n.acronym:n.name,minDate:(0,dh.A)(i),color:n.color,count:e.length,icon:n.icon}}),({category:e,text:t,minDate:n})=>[e.toLowerCase(),t.toLowerCase(),n])}function wh(e,t,n,i={}){const o=an(t.name)?t.name:"",r=t.date?an(i?.date?.format)?t.date.toFormat(i?.date?.format??""):e.toLocaleString(t.date,i?.date?.localeFormat||Bi.DateOnly.Numeric):"",s=(0,Go.A)([i?.accreditation?.includeName?n:"",o,r,i?.accreditation?.includeNameAtEnd?n:""]).join(" - ");return an(s)?s:an(i?.defaultName)?i?.defaultName:n}function Ch(e,t,n,i){return!e.isBlocked&&n.accreditationDisplay!==ke.None&&!n.hiddenAccreditationsSlotsIds.includes(e.id)&&(0===n.displayedAccreditationsSlotsIds.length||n.displayedAccreditationsSlotsIds.includes(e.id))&&(n.showFullAccreditation||!e.isFull)&&(n.slotDisplay===we.Hide||n.accreditationFilter===ye.None||!e.date||ra(t.map(Mi)).some(t=>Ni(t,e.date)))||i.some(i=>i.accreditationSlotId===e.id&&!i.accreditationSlot.isBlocked&&(n.showFullAccreditation||!i.isFull&&!i.accreditationSlot.isFull)&&(n.slotDisplay===we.Hide||n.accreditationFilter===ye.None||!i.accreditationSlot?.date||ra(t.map(Mi)).some(e=>Ni(e,i.accreditationSlot.date))))}function Ih(e){return(0,Uo.A)(e,e=>[e.date?.toMillis()??1,e.name.toLowerCase()])}function xh(e){return`${e.name}${an(e.acronym)?` (${e.acronym})`:""}`}function Sh(e,t,n,i,o){return i.accreditationDisplay!==ke.None&&!i.hiddenAccreditationsIds.includes(e.id)&&(0===i.displayedAccreditationsIds.length||i.displayedAccreditationsIds.includes(e.id))&&_h(e,n)&&(!e.hasSlots||e.slots.some(e=>Ch(e,t,i,o)))||o.some(n=>n.accreditationId===e.id&&(!e.hasSlots||e.slots.some(e=>Ch(e,t,i,o))))}function Eh(e){return jh(e.map(({accreditationSlot:e})=>e))}function jh(e){return(0,Uo.A)(Object.values((0,lh.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:an(n.acronym)?n.acronym:n.name,minDate:(0,dh.A)(i),color:n.color,count:e.length,icon:n.icon}}),({category:e,index:t,text:n,minDate:i})=>[e.toLowerCase(),Th(t),n.toLowerCase(),i])}function Th(e){return"number"!=typeof e||isNaN(e)?"9999":e.toString(10).padStart(4,"0")}function Dh(e){return(0,Uo.A)(e,e=>[e.accreditationCategoryName||"",Th(e.index),e.name.toLowerCase()])}const Ph=e=>(0,o.jsx)(Dn,{css:{background:"$gray50",overflowX:"auto",padding:"$6",...e.css},direction:"column",gap:"4",height:1,width:1,children:e.children}),Rh=e=>(0,o.jsxs)(Dn,{align:"center",css:e.css,direction:"column",height:1,justify:"center",width:1,children:[(0,o.jsx)(xn,{css:{inlineSize:"70%","@tablet":{inlineSize:"50%",blockSize:"auto",maxInlineSize:"100px"}},children:(0,o.jsx)("img",{alt:"Blank image",className:"blank-image",height:"100%",src:e.imageSrc??_u.WeezeventBlankPerson,width:"100%"})}),(0,o.jsx)(Fd,{height:"7"}),(0,o.jsx)(xn,{css:{color:"$gray800",fontSize:"$textMd",fontWeight:"$semiBold","@tablet":{color:"$gray900",fontSize:"$textMd",fontWeight:"$medium"}},textAlign:"center",children:e.title}),an(e.subtitle)&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"2"}),(0,o.jsx)(xn,{color:"gray500",fontSize:"textSm",textAlign:"center",children:e.subtitle})]}),e.button&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"4"}),(0,o.jsx)(Dn,{justify:"center",children:e.button})]})]}),Oh=bn("div",{alignItems:"center",borderRadius:"12px",cursor:"pointer",display:"flex",position:"relative","& > div":{background:"white",boxShadow:"$sm",position:"absolute",transition:"left 200ms ease-in"},variants:{disabled:{true:{cursor:"auto"}},size:{sm:{height:"16px",width:"30px","& > div":{borderRadius:"12px",height:"12px",width:"12px"}},md:{height:"24px",width:"44px","& > div":{borderRadius:"20px",height:"20px",width:"20px"}}},state:{unchecked:{background:"$gray200","& > div":{left:"2px"}},checked:{background:"$primary600"}}},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"}}],defaultVariants:{size:"sm"}}),Fh=e=>(0,o.jsx)(Oh,{"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,o.jsx)("div",{})}),zh=e=>{const{inputId:t,descId:n,labelId:i}=nu(),r=an(e.subtext);return(0,o.jsxs)(Dn,{align:"center",css:{cursor:e.disabled?"auto":"pointer",userSelect:"none",...e.css},tabIndex:0,onClick:()=>{e.disabled||e.onChange(!e.value)},onKeyDown:t=>{e.disabled||"Space"!==t.code||(t.preventDefault(),e.onChange(!e.value))},children:[(0,o.jsx)(Fh,{descId:n,disabled:e.disabled,inputId:t,labelId:i,size:e.size,tabIndex:-1,value:e.value,onChange:uu.A}),(0,o.jsx)(Fd,{width:"2"}),(0,o.jsxs)(Dn,{css:{flex:"1",fontSize:"md"===e.size?"$3":"$2"},direction:"column",children:[(0,o.jsx)(ru,{htmlFor:t,id:i,children:(0,o.jsx)(xn,{color:"gray800",fontWeight:"medium",children:e.children})}),r&&(0,o.jsx)(xn,{color:"gray500",id:n,children:e.subtext})]})]})},Mh=e=>(0,o.jsx)(Rd.D0,{name:e.name,render:t=>(0,o.jsx)(zh,{disabled:e.disabled,size:e.size,subtext:e.subtext,value:t.input.value,onChange:t.input.onChange,children:e.children})}),$h=e=>(0,o.jsxs)(Dn,{direction:"column",gap:"2",children:[(0,o.jsx)(xn,{font:"gray800 textMd medium",children:e.category.name}),(0,o.jsx)(Dn,{direction:"column",gap:"3",children:e.children})]},e.category.id);var Nh=n(5315);const Bh=[0,50,100,200,300,400,500,600,700,800,900,950,1e3],Lh=Object.fromEntries(Object.keys(kn.colors).filter(e=>e.includes("700")).flatMap(e=>{const t=e.substring(0,e.length-3),n={50:kn.colors[`${t}50`].value,100:kn.colors[`${t}100`].value,500:kn.colors[`${t}500`].value,700:kn.colors[`${t}700`].value};return[[t,n],[n[700],n]]}));function Vh(e,t=700){const n=Lh[e.toLowerCase()];if(n)return n;{const n=(0,Nh.KI)(e),i=((e,t=700)=>Bh.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 Uh=bn(Dn,{borderRadius:"$2",fontSize:"$textSm",height:"32px",width:"32px","@tablet":{borderRadius:"$3",fontSize:"$textMd",height:"40px",width:"40px"}}),Gh=e=>{const t=(0,r.useMemo)(()=>Vh(e.color),[e.color]),n=(0,r.useMemo)(()=>yt.includes(e.icon)?zn(e.icon):e.icon,[e.icon]);return(0,o.jsx)(Uh,{role:"presentation",align:"center",css:{background:t[100],color:t[700]},justify:"center",children:(0,o.jsx)(Mn,{icon:n})})},Wh=e=>{const{translate:t}=Id(),n=r.useMemo(()=>xh(e.accreditation),[e.accreditation]),[i,s]=r.useState(!0),a=e.displaySlots||"function"==typeof e.renderCheckbox;return(0,o.jsxs)(Dn,{css:{background:"white",bd:!0,overflow:"hidden",userSelect:"none"},direction:"column",children:[(0,o.jsxs)(Dn,{align:"center",css:{cursor:a?"pointer":"default",padding:"$3 $4"},gap:"2",onClick:()=>{s(!i),e.onClick?.()},children:[e.displaySlots&&(0,o.jsx)(Dn,{align:"center",css:{fontSize:"$textXs"},height:20,justify:"center",width:20,children:(0,o.jsx)(Mn,{icon:i?"chevron-down":"chevron-right"})}),e.renderCheckbox?.(),(0,o.jsx)(Gh,{color:e.accreditation.color,icon:e.accreditation.icon}),(0,o.jsxs)(Dn,{css:{flex:"1"},direction:"column",gap:"1",children:[(0,o.jsx)(xn,{font:"gray800 textSm semiBold",children:n}),e.displayNumberOfSlots&&(0,o.jsx)(xn,{color:"gray500",children:t("creneau",e.numberOfSlots)})]}),e.renderActions?.()]}),(e.displayFormCustomFields||e.displaySlots&&i)&&(0,o.jsx)(Dn,{css:{borderTop:"1px solid $gray200"},direction:"column",children:e.children})]})},qh=({css:e,children:t,hideIcon:n,to:i,...r})=>{const s=new URL(i.toString(),Ii.HEAVENT_APP_URL),a=n?void 0:["http:","https:"].includes(s.protocol)&&s.origin!==location.origin?"arrow-up-right-from-square":r.download?"arrow-down-to-bracket":void 0;return(0,o.jsx)(Dn,{align:"center",css:{cursor:"pointer",fontWeight:"$medium","&:hover":{textDecoration:"underline"},...e},gap:"2",children:(0,o.jsxs)(Fn,{to:s,...r,children:[t,a&&(0,o.jsx)(xn,{children:(0,o.jsx)(Mn,{icon:a})})]})})};qh.displayName="LinkText";const Hh=e=>{const t=Yt();return(0,o.jsxs)(Dn,{align:"center",gap:"1",children:[e.children,(0,o.jsxs)(xn,{color:"gray500",fontSize:"textXs",fontWeight:"regular",children:["(",t("facultatif_76747"),")"]})]})},Kh=e=>{if(0===e.names.length)return e.render(e.fields);{const[t,...n]=e.names;return(0,o.jsx)(Rd.D0,{name:t,render:i=>(0,o.jsx)(Kh,{fields:{...e.fields||{},[t]:i},names:n,render:e.render,subscription:e.subscription}),subscription:e.subscription})}},Yh=({formattedAddressProps:e,latitudeProps:t,longitudeProps:n,placeProps:i,...s})=>{const a=(0,r.useRef)(null);return(0,r.useEffect)(()=>{const o=new google.maps.places.Autocomplete(a.current,{types:["geocode"]});o.addListener("place_changed",async()=>{const r=o.getPlace(),s=r.geometry.location.lat(),a=r.geometry.location.lng();e.input.onChange(r.formatted_address),t?.input.onChange(s),n?.input.onChange(a),i?.input.onChange(r)})},[]),(0,o.jsx)(cu,{ref:a,value:e.input.value,onBlur:e.input.onBlur,onChange:e.input.onChange,onFocus:e.input.onFocus,...s})},Zh=({addressName:e,latitudeName:t,longitudeName:n,placeName:i,...r})=>{const s=[e];return t&&s.push(t),n&&s.push(n),i&&s.push(i),(0,o.jsx)(Kh,{names:s,render:s=>(0,o.jsx)(Yh,{formattedAddressProps:s[e],latitudeProps:t?s[t]:void 0,longitudeProps:n?s[n]:void 0,placeProps:i?s[i]:void 0,...r})})},Jh=bn("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 $primary600"}},checked:{background:"$primary600",border:"none",color:"white"},indeterminate:{background:"$primary600",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"}}),Xh=({shouldPreventDefault:e=!0,...t})=>{const n=n=>{e&&Hn(n),!0!==t.disabled&&("unchecked"!==t.state&&t.state?t.onClick("unchecked",n):t.onClick("checked",n))};return(0,o.jsxs)(Jh,{"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)},children:["checked"===t.state&&(0,o.jsx)("i",{className:"far fa-check"}),"indeterminate"===t.state&&(0,o.jsx)("div",{})]})},Qh=({shouldPreventDefault:e=!0,...t})=>{const{descId:n,inputId:i,labelId:r}=nu(),s=void 0!==t.subtext&&null!==t.subtext,a=n=>{e&&n.preventDefault(),!0!==t.disabled&&("unchecked"!==t.state&&t.state?t.onClick("unchecked",n):t.onClick("checked",n))};return(0,o.jsxs)(Dn,{css:{cursor:t.disabled?"not-allowed":"pointer",userSelect:"none",...t.css},tabIndex:0,onClick:a,onKeyDown:e=>{"Space"===e.code&&a(e)},children:[(0,o.jsx)(Dn,{css:{alignItems:"center",height:"md"===t.size?"23px":"20px"},children:(0,o.jsx)(Xh,{descId:n,disabled:t.disabled,inputId:i,labelId:r,shouldPreventDefault:!1,size:t.size,state:t.state,tabIndex:-1,onClick:uu.A})}),(0,o.jsx)(Fd,{width:"2"}),(0,o.jsxs)(Dn,{css:{flexDirection:"column",fontSize:"md"===t.size?"$3":"$2"},children:[(0,o.jsx)(ru,{htmlFor:i,id:r,children:(0,o.jsx)(xn,{css:{color:t.disabled&&!s?"$gray300":"$gray800"},fontWeight:"medium",children:t.children})}),s&&(0,o.jsx)(xn,{color:"gray500",id:n,children:t.subtext})]})]})},em=({name:e,children:t,...n})=>(0,o.jsx)(Rd.D0,{name:e,render:e=>{const i=!0===e.input.checked?"checked":"unchecked";return(0,o.jsx)(Qh,{...n,state:i,onClick:()=>{e.input.onChange(!e.input.checked)},children:t})},type:"checkbox"});function tm(e){return an(e)?xi.c9.fromISO(e):e}const nm=({value:e,css:t,label:n,description:i,hint:r,icon:s,min:a,onChange:c,max:l,state:d,rightIcon:u,onRightIconClick:h,zone:m,...g})=>{const p=e?tm(e):null,f=p?.isValid?p.toFormat(Pi):"",{inputId:_,descId:b,errorId:k}=nu();return(0,o.jsxs)(Dn,{css:t,direction:"column",width:1,children:[(0,o.jsx)(ru,{htmlFor:_,children:n}),(0,o.jsx)(iu,{id:b,children:i}),(n||i)&&(0,o.jsx)(Fd,{height:"1"}),(0,o.jsx)(au,{cursor:"default",icon:s,rightIcon:u,state:d,onRightIconClick:h,children:(0,o.jsx)(xn,{css:{flex:"1",height:"100%","& input":{background:"transparent",border:"none",color:"$gray500",fontSize:"$textSm",height:"100%",lineHeight:"20px",outline:"none",width:"100%"}},children:(0,o.jsx)("input",{"aria-describedby":i?b:void 0,"aria-errormessage":"error"===d?k:void 0,"aria-invalid":"error"===d,disabled:"disabled"===d,id:_,max:l?.toFormat(Pi),min:a?.toFormat(Pi),type:"date",value:f,onChange:e=>{an(e.target.value)?c(xi.c9.fromFormat(e.target.value,Pi,{zone:m||"UTC"})):c(xi.c9.invalid("Invalid"))},...g})})}),(0,o.jsx)(ou,{id:k,state:d,children:r})]})},im=(0,r.memo)(function({name:e,hint:t,state:n,...i}){return(0,o.jsx)(Rd.D0,{name:e,render:({input:r,meta:s})=>{const a=s.data?.forceDisplayError&&s.invalid||s.touched&&s.invalid;return(0,o.jsx)(nm,{hint:a?s.error:t,name:e,state:a?"error":n,value:r.value,onBlur:r.onBlur,onChange:r.onChange,onFocus:r.onFocus,...i})}})}),om=({value:e,css:t,label:n,description:i,hint:r,icon:s,min:a,onChange:c,max:l,rightIcon:d,onRightIconClick:u,state:h,zone:m,...g})=>{const p=e?an(e)?xi.c9.fromISO(e,{zone:"utc"}):e:null,f=p?.isValid?p.toFormat(Ri):"",{inputId:_,descId:b,errorId:k}=nu();return(0,o.jsxs)(Dn,{css:t,direction:"column",width:1,children:[(0,o.jsx)(ru,{htmlFor:_,children:n}),(0,o.jsx)(iu,{id:b,children:i}),(n||i)&&(0,o.jsx)(Fd,{height:"1"}),(0,o.jsx)(au,{cursor:"default",icon:s,rightIcon:d,state:h,onRightIconClick:u,children:(0,o.jsx)(xn,{css:{flex:"1",height:"100%","& input":{background:"transparent",border:"none",color:"$gray800",height:"100%",outline:"none",width:"100%"}},children:(0,o.jsx)("input",{"aria-describedby":i?b:void 0,"aria-errormessage":"error"===h?k:void 0,"aria-invalid":"error"===h,disabled:"disabled"===h,id:_,max:l?.toFormat(Ri),min:a?.toFormat(Ri),type:"datetime-local",value:f,onChange:e=>{an(e.target.value)?c(xi.c9.fromFormat(e.target.value,Ri,{zone:m||"UTC"})):c(xi.c9.invalid("Invalid"))},...g})})}),(0,o.jsx)(ou,{id:k,state:h,children:r})]})},rm=({name:e,hint:t,state:n,...i})=>(0,o.jsx)(Rd.D0,{name:e,render:r=>{const s=r.meta.data?.forceDisplayError&&r.meta.invalid||r.meta.touched&&r.meta.invalid;return(0,o.jsx)(om,{hint:s?r.meta.error:t,name:e,state:s?"error":n,value:r.input.value,onBlur:r.input.onBlur,onChange:r.input.onChange,onFocus:r.input.onFocus,...i})}}),sm=({value:e,css:t,label:n,description:i,hint:r,icon:s,onChange:a,state:c,...l})=>{const d=an(e)&&e.length>5?e.substring(0,5):e,{inputId:u,descId:h,errorId:m}=nu();return(0,o.jsxs)(Dn,{css:t,direction:"column",width:1,children:[(0,o.jsx)(ru,{htmlFor:u,children:n}),(0,o.jsx)(iu,{id:h,children:i}),(n||i)&&(0,o.jsx)(Fd,{height:"1"}),(0,o.jsx)(au,{cursor:"default",icon:s,state:c,children:(0,o.jsx)(xn,{css:{flex:"1",height:"100%","& input":{background:"transparent",border:"none",color:"$gray800",height:"100%",outline:"none",width:"100%"}},children:(0,o.jsx)("input",{"aria-describedby":i?h:void 0,"aria-errormessage":"error"===c?m:void 0,"aria-invalid":"error"===c,disabled:"disabled"===c,id:u,type:"time",value:d,onChange:e=>{a(e.target.value)},...l})})}),(0,o.jsx)(ou,{id:m,state:c,children:r})]})},am=({name:e,hint:t,state:n,...i})=>(0,o.jsx)(Rd.D0,{name:e,render:r=>{const s=eu(r.meta);return(0,o.jsx)(sm,{hint:s?r.meta.error:t,name:e,state:s?"error":n,value:r.input.value,onBlur:r.input.onBlur,onChange:r.input.onChange,onFocus:r.input.onFocus,...i})}});function cm(e,t){const n=document.createElement("a");n.href=e,n.target="_blank",n.download=t,n.click()}async function lm(e,t,n,i){const o=await to(),{awsS3PostCredentials:{endpointUrl:r,policy:s,amzCredential:a,amzSignature:c,amzDate:l}}=await function(e,t){return co("query AwsS3PostCredentials($organizationId: OrganizationId!, $acl: String!) {\n awsS3PostCredentials(organizationId: $organizationId, acl: $acl) {\n endpointUrl\n policy\n amzSignature\n amzCredential\n amzDate\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({organizationId:e,acl:n},o),{name:d,extension:u}=nr(t.name),h=`organization/${e}/${qi()}/${function(e,t={}){const n=t.replacer??nn.Dash,i=rn(e).trim().toLowerCase().replace(/['"]+/gi,"");let o;return o=n===nn.Dash?i.replace(/[^a-z0-9\\-]+/gu,"-").replace(/-+$/,"").replace(/^-+/,""):n===nn.Underscore?i.replace(/[^a-z0-9_]+/gu,"_").replace(/_+$/,"").replace(/^_+/,""):i.replace(/[^a-z0-9]+/gu,"").trim(),t?.replaceStartingNumber?o.replace(/^(\d)/,"_$1"):o}(d)}.${u}`,m=new FormData;return m.append("key",h),m.append("acl",n),m.append("success_action_status","201"),m.append("X-Amz-Credential",a),m.append("X-Amz-Algorithm","AWS4-HMAC-SHA256"),m.append("X-Amz-Date",l),m.append("Policy",s),m.append("X-Amz-Signature",c),m.append("Content-Type",or(u)),m.append("file",t),new Promise((e,o)=>{const s=new XMLHttpRequest;s.upload.onprogress=e=>{if(e.lengthComputable){const t=Math.round(e.loaded/e.total*100);i?.(t)}},s.onerror=()=>{o(new Error("Could not upload file to S3"))},s.onreadystatechange=()=>{if(4===s.readyState){const i=s.responseXML?.querySelector("Error Code");null!==i?(gl("Could not upload file to S3",{code:i?.textContent??"",message:s.responseXML?.querySelector("Error Message")?.textContent??""}),o(new Error("Could not upload file to S3"))):e({acl:n,key:h,name:t.name,size:t.size})}},s.open("POST",r,!0),s.send(m)})}function dm(){return mu(fn.mobile)}function um(e,t){return`https://${t}.s3-eu-west-1.amazonaws.com/${e.key}`}var hm=n(4741);function mm(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 gm=bn("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"}}}}),pm=bn("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 fm;!function(e){e[e.EmptyFile=0]="EmptyFile",e[e.Pdf=1]="Pdf",e[e.Image=2]="Image"}(fm||(fm={}));class _m extends r.Component{contentRef;renderPagesDebounced;constructor(e){super(e);let t=fm.Image;"string"!=typeof this.props.fileUrl||0===this.props.fileUrl.trim().length?t=fm.EmptyFile:"pdf"===nr(this.props.fileUrl).extension&&(t=fm.Pdf),this.state={image:null,isLoading:!0,fileType:t,pdf:null,rotate:0,zoomLevel:100},this.renderPagesDebounced=(0,hm.A)(()=>{this.renderPdfPages()},200),this.contentRef=r.createRef()}componentDidMount(){var e;this.state.fileType===fm.Pdf?(e=this.props.fileUrl,(void 0===window.pdfjsLib?Si("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===fm.Image&&this.loaderImage()}renderPdfPages(){this.state.fileType===fm.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 r=await e.getPage(o),s=r.getViewport(n),a=document.createElement("div"),c=document.createElement("canvas"),l=c.getContext("2d"),d=mm(i,s.height,s.width);25===i||75===i?(a.style.height=`${s.width}px`,a.style.width=`${s.height}px`):(a.style.height=`${s.height}px`,a.style.width=`${s.width}px`),c.height=s.height,c.width=s.width,c.style.transform=d.transform||"",c.style.transformOrigin=d.transformOrigin||"",a.appendChild(c),t.appendChild(a),r.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===fm.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 r=100;o<1&&(r=100*(o-.1*o)),this.setState({image:e,isLoading:!1,zoomLevel:r})},e.onerror=()=>{this.setState({isLoading:!1,fileType:fm.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,o.jsx)(Ht,{children:({container:e})=>{const t=e.get(Wt);return(0,o.jsxs)(Dn,{css:{position:"relative"},direction:"column",height:1,width:1,children:[(0,o.jsx)(xn,{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===fm.Image&&!1===this.state.isLoading&&(0,o.jsx)(xn,{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,o.jsx)("img",{src:this.state.image.src,style:{height:`${this.imageHeight()}px`,width:`${this.imageWidth()}px`,...mm(this.state.rotate,this.imageHeight(),this.imageWidth())}})}),!0===this.state.isLoading&&(0,o.jsx)(xn,{css:{background:"white",height:"calc(100% - 50px)",left:"0",position:"absolute",top:"0",width:"100%",zIndex:"10"},children:(0,o.jsx)(Nn,{})}),this.state.fileType===fm.EmptyFile&&(0,o.jsx)(Dn,{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,o.jsxs)(Dn,{align:"center",css:{height:"50px",width:"100%"},justify:"center",children:[(0,o.jsxs)(gm,{controls:!0,children:[(0,o.jsx)("i",{className:"fas fa-minus",onClick:this.zoomMinus.bind(this)}),(0,o.jsx)(pm,{max:"200",min:"1",step:"1",type:"range",value:this.state.zoomLevel,onChange:this.rangeChange.bind(this)}),(0,o.jsx)("i",{className:"fas fa-plus",onClick:this.zoomPlus.bind(this)})]}),(0,o.jsx)(gm,{rotate:!0,onClick:this.rotate.bind(this),children:(0,o.jsx)("i",{className:"far fa-undo"})})]})]})}})}}const bm=bn("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"}}),km=e=>{const t=en();return(0,o.jsxs)(bm,{color:e.color,children:[(0,o.jsxs)(Dn,{align:"center",className:"fsp-header",gap:"4",height:65,width:1,children:[(0,o.jsx)(xn,{css:{flexShrink:3},width:300}),(0,o.jsxs)(Dn,{align:"center",css:{flex:"1"},direction:"column",children:[e.category&&(0,o.jsx)(xn,{className:"fsp-category",children:e.category}),(0,o.jsx)(xn,{className:"fsp-title",css:{maxWidth:"100%"},ellipsis:!0,children:e.title})]}),(0,o.jsxs)(Dn,{gap:"4",justify:"end",width:300,children:[e.button,(0,o.jsx)(Un,{color:"dark"===e.color?"gray":"white",css:{flexShrink:0},leftIcon:"xmark",onClick:()=>{"function"==typeof e.onClose?e.onClose():t.goBack(e.fallbackClosePath||Jl.HOME)}})]})]}),(0,o.jsx)(xn,{css:{height:"calc(100% - 65px)"},width:1,children:e.children})]})},vm=({acl:e,document:t,onDelete:n,...i})=>{const[s,a]=(0,r.useState)(!1),c=dm(),l="public-read"===e||an(t.url),d=an(t.url)?t.url:um(t,Ii.HEAVENT_AWS_UPLOADS_BUCKET);return(0,o.jsxs)(Dn,{align:"center",css:{background:"white",border:"1px solid $gray200",borderRadius:"$1",boxShadow:"$xs",fontSize:"$textSm",overflow:"hidden",padding:"$3",minHeight:"72px","@tablet":{border:"1px solid $gray300",borderRadius:"$2",fontSize:"$textMd",padding:"$3"}},gap:"4",width:1,...c&&{onClick:()=>{cm(d,t.name)}},...i,children:[(0,o.jsx)(Dn,{css:{flex:"1",minHeight:0,overflow:"hidden"},children:(0,o.jsx)(xn,{color:{"@initial":"gray800","@tablet":"gray700"},css:{ellipsis:!0},width:1,children:t.name})}),l&&(0,o.jsxs)(o.Fragment,{children:[!1===c&&(0,o.jsx)(xn,{css:{cursor:"pointer"},onClick:()=>{a(!0)},children:(0,o.jsx)(Mn,{icon:"eye"})}),(0,o.jsx)(xn,{css:{cursor:"pointer"},...!1===c&&{onClick:()=>{cm(d,t.name)}},children:(0,o.jsx)(Mn,{icon:"download"})})]}),n&&(0,o.jsx)(xn,{css:{cursor:"pointer"},onClick:n,children:(0,o.jsx)(Mn,{icon:"trash-can"})}),s&&(0,Kn.createPortal)((0,o.jsx)(Dn,{css:{background:"white",left:"0",position:"absolute",top:"0",zIndex:"250"},height:1,width:1,children:(0,o.jsx)(km,{title:t.name,onClose:()=>a(!1),children:(0,o.jsx)(_m,{fileUrl:d})})}),document.body)]})},Am=({name:e,progress:t,...n})=>{const i=Math.min(100,Math.max(0,t));return(0,o.jsxs)(Dn,{css:{border:"1px solid $gray300",borderRadius:"$2",padding:"$4"},direction:"column",width:1,...n,children:[(0,o.jsx)(xn,{color:"gray700",fontWeight:"regular",children:e}),(0,o.jsx)(Fd,{height:"2"}),(0,o.jsxs)(Dn,{align:"center",gap:"3",width:1,children:[(0,o.jsx)(xn,{css:{background:"$gray100",borderRadius:"$1",flex:"1",height:"8px",position:"relative"},children:(0,o.jsx)(xn,{css:{background:"$success500",borderRadius:"$1",height:"100%",left:0,position:"absolute",top:0,width:`${i}%`}})}),(0,o.jsxs)(xn,{color:"gray700",children:[i,"%"]})]})]})};var ym,wm=n(3112);function Cm(e){return s(e).flatMap(e=>{switch(e){case ym.Archives:return["zip"];case ym.Csv:return["csv"];case ym.Gpx:return["gpx"];case ym.Images:return["jpg","png","jpeg","gif"];case ym.Kml:return["kml"];case ym.Pdf:return["pdf"];default:return Br()}})}function Im(e){return s(e).flatMap(e=>e===ym.Images?"image/*":Cm(e).map(e=>`.${e}`)).join(",")}n(8181),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"}(ym||(ym={}));var xm=n(9618);const Sm=bn("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}}),Em=bn("div",{display:"flex",flexDirection:"column",overflow:"auto",width:"100%",variants:{mobile:{true:{flex:"1",px:"$4"},false:{px:"$8"}}}}),jm=bn("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"}}}}),Tm=({buttons:e,children:t,onClose:n,role:i,size:r})=>{const s=dm();return Yn(n),Md("common-front/src/components/modal.tsx","common-front/src/components/modal/modal.tsx"),(0,Kn.createPortal)((0,o.jsx)(Dn,{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,o.jsxs)(Sm,{mobile:s,open:!0,role:i,size:r,onClick:e=>Hn(e,!1),onMouseDown:e=>Hn(e,!1),children:[(0,o.jsx)(Em,{mobile:s,children:t}),e&&(0,o.jsx)(jm,{mobile:s,children:e})]})}),document.body)},Dm=({allowCrop:e,onChange:t,hint:n,label:i,...s})=>{const a=Yt(),c=(0,r.useRef)(null),[l,d]=(0,r.useState)(!1),[u,h]=(0,r.useState)(null),[m,g]=(0,r.useState)(!1),p=Cm(ym.Images),f=e=>{if(e&&e[0]){const t=URL.createObjectURL(e[0]),n=e[0].type,i=new FileReader;i.onload=i=>{h({src:t,type:(0,wm.h)(i.target?.result,n),name:e[0].name})},i.readAsArrayBuffer(e[0])}g(!0)};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(Dn,{gap:"4",width:1,children:[(0,o.jsx)(Dn,{align:"center",css:{background:l?"$primary50":"$gray50",border:l?"1px solid $primary300":"1px solid $gray200",borderRadius:"$1",cursor:"pointer"},height:126,justify:"center",width:126,onClick:()=>{c.current?.click()},onDragEnter:e=>{Hn(e),d(!0)},onDragLeave:e=>{Hn(e),d(!1)},onDragOver:e=>{Hn(e),l||d(!0)},onDrop:n=>{Hn(n),d(!1);const i=n.dataTransfer.files.item(0);i&&p.includes(nr(i.name).extension)&&(e?f(n.dataTransfer.files):t(i))},children:(0,o.jsx)(Dn,{align:"center",css:{background:l?"$primary100":"$gray100",borderRadius:"36px",color:l?"$primary600":"$gray600"},height:l?48:32,justify:"center",width:l?48:32,children:(0,o.jsx)(Mn,{icon:"plus"})})}),(0,o.jsxs)(Dn,{css:{flex:"1"},direction:"column",children:[(0,o.jsx)(xn,{color:"gray700",fontWeight:"medium",children:i}),n&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"1"}),(0,o.jsx)(xn,{color:"gray400",children:n})]}),(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(Dn,{children:(0,o.jsx)(Un,{onClick:()=>{c.current?.click()},children:a("s_lectionner_un_50712")})})]}),(0,o.jsx)(xn,{css:{display:"none"},children:(0,o.jsx)("input",{ref:c,accept:Im(ym.Images),type:"file",onChange:n=>{n.target.files?.[0]&&(e?f(n.target.files):t(n.target.files[0]))},...s})})]}),e&&m&&u&&(0,o.jsx)(Pm,{image:u,onChange:t,onClose:()=>g(!1)})]})},Pm=({image:e,onChange:t,onClose:n})=>{const i=Yt(),s=(0,r.useRef)(null);return(0,r.useEffect)(()=>()=>{e&&e.src&&URL.revokeObjectURL(e.src)},[e]),(0,o.jsx)(Tm,{size:"md",onClose:n,children:(0,o.jsxs)(Dn,{css:{overflow:"auto"},direction:"column",gap:"3",children:[(0,o.jsx)(xm.IOb,{ref:s,className:"cropper",defaultSize:({imageSize:e,visibleArea:t})=>({width:(t||e).width,height:(t||e).height}),src:e.src,stencilProps:{aspectRatio:1}}),(0,o.jsx)(Un,{size:"lg",textAlign:"center",onClick:()=>{const i=s.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:i("submit_21373")})]})})},Rm=({accept:e,allowCrop:t,capture:n,onChange:i,...s})=>{const a=Yt(),c=(0,r.useRef)(null),[l,d]=(0,r.useState)(!1),[u,h]=(0,r.useState)(null),[m,g]=(0,r.useState)(!1),p=Cm(e||[]),f=e=>{if(e&&e[0]){const t=URL.createObjectURL(e[0]),n=e[0].type,i=new FileReader;i.onload=i=>{h({src:t,type:(0,wm.h)(i.target?.result,n),name:e[0].name})},i.readAsArrayBuffer(e[0])}g(!0)};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(Dn,{align:"center",css:{background:l?"$primary50":"$gray50",border:l?"1px solid $primary300":"1px solid $gray200",borderRadius:"$2",cursor:"pointer",padding:"$4"},direction:"column",width:1,onClick:()=>{c.current?.click()},onDragEnter:e=>{Hn(e),d(!0)},onDragLeave:e=>{Hn(e),d(!1)},onDragOver:e=>{Hn(e),l||d(!0)},onDrop:n=>{Hn(n),d(!1);const o=n.dataTransfer.files.item(0);if(o&&(0===p.length||p.includes(nr(o.name).extension)))if(t){if(e!==ym.Images)throw new Error("Crop enabled on non-image file uploader");f(n.dataTransfer.files)}else i(o)},children:[(0,o.jsx)(Dn,{align:"center",css:{background:l?"$primary100":"$gray100",borderRadius:"36px",color:l?"$primary600":"$gray600"},height:l?48:32,justify:"center",width:l?48:32,children:(0,o.jsx)(Mn,{icon:"cloud-arrow-up"})}),(0,o.jsx)(Fd,{height:"3"}),(0,o.jsxs)(Dn,{gap:"1",justify:"center",wrap:"wrap",children:[(0,o.jsx)(xn,{color:"primary700",fontWeight:"regular",children:a("cliquez_pour_s_77962")}),(0,o.jsx)(xn,{color:l?"primary600":"gray500",children:a("ou_glissez_d_po_61590")})]}),p.length>0&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"1"}),(0,o.jsx)(xn,{color:l?"primary600":"gray500",css:{textTransform:"uppercase"},children:p.join(", ")})]}),(0,o.jsx)(xn,{css:{width:.1,height:.1,opacity:0,overflow:"hidden",position:"absolute",zIndex:-1},children:(0,o.jsx)("input",{ref:c,accept:e?Im(e):void 0,capture:n,type:"file",onChange:n=>{if(n.target.files?.[0])if(t){if(e!==ym.Images)throw new Error("Crop enabled on non-image file uploader");f(n.target.files)}else i(n.target.files[0])},...s})})]}),t&&m&&u&&(0,o.jsx)(Pm,{image:u,onChange:i,onClose:()=>g(!1)})]})};var Om;!function(e){e[e.File=0]="File",e[e.Uploader=1]="Uploader",e[e.Uploading=2]="Uploading"}(Om||(Om={}));const Fm=({acl:e,css:t,descId:n,description:i,errorId:s,inputId:a,label:c,labelId:l,hint:d,onChange:u,organizationId:h,state:m,value:g,...p})=>{const f=Yt(),[_,b]=(0,r.useState)(g?Om.File:Om.Uploader),[k,v]=(0,r.useState)(""),[A,y]=(0,r.useState)(0);return(0,o.jsxs)(Dn,{"aria-live":"polite",css:t,direction:"column",width:1,children:[(0,o.jsx)(ru,{htmlFor:a,id:l,children:c}),(0,o.jsx)(iu,{id:n,children:i}),(c||i)&&(0,o.jsx)(Fd,{height:"1"}),_===Om.File&&g?(0,o.jsx)(vm,{acl:e,"aria-label":f("delete_uploaded_14711"),document:g,id:a,role:"button",onDelete:()=>{u(null),b(Om.Uploader)}}):_===Om.Uploading?(0,o.jsx)(Am,{"aria-busy":!0,"aria-describedby":n,"aria-label":f("uploading_file_46483"),id:a,name:k,progress:A}):(0,o.jsx)(Rm,{"aria-describedby":n,"aria-errormessage":s,"aria-invalid":"error"===m,"aria-label":f("upload_file_97740"),id:a,onChange:async t=>{b(Om.Uploading),v(t.name),y(0);try{const n=await lm(h,t,e,y);u({...n,file:t}),b(Om.File)}catch{b(Om.Uploader)}},...p}),(0,o.jsx)(ou,{state:m,children:d})]})},zm=({onChange:e,prefix:t,state:n,withFileField:i,...r})=>{const s=`${t}key`,a=`${t}name`,c=`${t}acl`,l=[s,a,c];let d;return i&&(d=`${t}file`,l.push(d)),(0,o.jsx)(Kh,{names:l,render:t=>{let l=null;an(t[s].input.value)&&an(t[a].input.value)&&an(t[c].input.value)&&(l={key:t[s].input.value,name:t[a].input.value,acl:t[c].input.value});const{invalid:u,hint:h}=Object.values(t).reduce((e,t)=>e.invalid?e:eu(t.meta)?{invalid:!0,hint:t.meta.error||t.meta.submitError}:e,{invalid:!1,hint:void 0});return(0,o.jsx)(Fm,{hint:h,state:u?"error":n,value:l,onChange:n=>{t[s].input.onChange(n?.key??""),t[s].input.onBlur(),t[a].input.onChange(n?.name??""),t[a].input.onBlur(),t[c].input.onChange(n?.acl??""),t[c].input.onBlur(),i&&(t[d].input.onChange(n?.file),t[d].input.onBlur(),n?.file&&e?.(n.file))},...r})}})},Mm=e=>{const t=Yt();return(0,o.jsxs)(Dn,{gap:"4",width:1,children:[(0,o.jsx)(xn,{css:{border:"1px solid $gray200",borderRadius:"$1",overflow:"hidden"},height:126,width:126,children:(0,o.jsx)("img",{height:"126px",src:e.url,width:"126px"})}),(0,o.jsxs)(Dn,{direction:"column",children:[(0,o.jsx)(xn,{color:"gray700",fontWeight:"medium",children:e.label}),e.hint&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"1"}),(0,o.jsx)(xn,{color:"gray400",children:e.hint})]}),(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(xn,{color:"error700",css:{cursor:"pointer"},fontWeight:"medium",onClick:e.onDelete,children:t("supprimer_43083")})]})]})},$m=e=>(0,o.jsxs)(Dn,{gap:"4",width:1,children:[(0,o.jsx)(Dn,{align:"center",css:{background:"$gray50",border:"1px solid $gray200",borderRadius:"$1",cursor:"pointer"},height:126,justify:"center",width:126,children:(0,o.jsx)(Dn,{height:64,width:64,children:(0,o.jsx)($n,{color:kn.colors.gray900.value,height:"64px",strokeWidth:"4",width:"64px"})})}),(0,o.jsxs)(Dn,{direction:"column",children:[(0,o.jsx)(xn,{color:"gray700",fontWeight:"medium",children:e.label}),e.hint&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"1"}),(0,o.jsx)(xn,{color:"gray400",children:e.hint})]})]})]}),Nm=({value:e,onChange:t,label:n,hint:i,organizationId:s,...a})=>{const[c,l]=(0,r.useState)(e?Om.File:Om.Uploader);return c===Om.File&&e?(0,o.jsx)(Mm,{hint:i,label:n,url:um(e,Ii.HEAVENT_AWS_UPLOADS_BUCKET),onDelete:()=>{t(null),l(Om.Uploader)}}):c===Om.Uploading?(0,o.jsx)($m,{hint:i,label:n}):(0,o.jsx)(Dm,{hint:i,label:n,onChange:async e=>{l(Om.Uploading);try{const n=await lm(s,e,"public-read");t(n),l(Om.File)}catch{l(Om.Uploader)}},...a})},Bm=({prefix:e,...t})=>{const n=`${e}key`,i=`${e}name`,r=`${e}acl`;return(0,o.jsx)(Kh,{names:[n,i,r],render:e=>{let s=null;return an(e[n].input.value)&&an(e[i].input.value)&&an(e[r].input.value)&&(s={key:e[n].input.value,name:e[i].input.value,acl:e[r].input.value}),(0,o.jsx)(Nm,{value:s,onChange:t=>{e[n].input.onChange(t?.key??""),e[i].input.onChange(t?.name??""),e[r].input.onChange(t?.acl??"")},...t})}})},Lm="h-dropdown-open";function Vm(e,t){e.dispatchEvent(new CustomEvent(Lm,{bubbles:!0,detail:{uuid:t??""}}))}const Um=r.createContext({}),Gm=e=>{const t=r.useRef(qi()),[n,i]=r.useState(e.isOpen??!1),[s,a]=r.useState(null),[c,l]=r.useState(null),d=r.useCallback(n=>{e.disabled||(i(n),e.onStateChange&&e.onStateChange(n),!0===n&&s&&Vm(s,t.current))},[e.disabled,s,i,e.onStateChange]),u=r.useCallback(n=>{n.detail.uuid!==t.current&&!0!==e.doNotCloseOnOtherOpen&&d(!1)},[d]);return r.useEffect(()=>{e.isOpen!==n&&i(e.isOpen??!1)},[e.isOpen]),r.useEffect(()=>(document.addEventListener(Lm,u),()=>{document.removeEventListener(Lm,u)}),[u]),Yn(()=>{d(!1)}),function(){const e=r.useCallback(()=>{d(!1)},[]);r.useEffect(()=>(document.addEventListener("click",e,!1),()=>{document.removeEventListener("click",e,!1)}),[])}(),(0,o.jsx)(Um.Provider,{value:{isOpen:n,referenceElement:s,popperElement:c,setIsOpen:d,setReferenceElement:a,setPopperElement:l},children:e.children})};function Wm(){return r.useContext(Um)}const qm=bn("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:"$primary700"}},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"}}),Hm=({children:e,color:t,css:n,download:i,to:r,onClick:s,target:a,role:c})=>"disabled"!==t&&r?(0,o.jsx)(Fn,{download:i,target:a,to:r,onClick:e=>s?.(e),children:(0,o.jsx)(qm,{color:t||"default",css:n,children:e})}):(0,o.jsx)(qm,{color:t||"default",css:n,role:c??"menuitem",tabIndex:r?void 0:"presentation"!==c?0:void 0,onClick:e=>s?.(e),children:e}),Km=({css:e,children:t,color:n,download:i,icon:r,isDisabled:s=!1,onClick:a,to:c,target:l})=>(0,o.jsx)(Hm,{color:n,css:{cursor:s?"not-allowed":"pointer",opacity:s?"0.6":"inherit",...e},download:i,target:l,to:c,onClick:e=>{s||(Vm(e.target),a?.(e))},children:(0,o.jsxs)(Dn,{align:"center",gap:"3",height:1,width:1,children:[(0,o.jsx)(Dn,{align:"center",height:1,justify:"start",width:16,children:(0,o.jsx)(Mn,{icon:r})}),(0,o.jsx)(xn,{css:{flex:"1",ellipsis:""},children:t})]})});var Ym=n(832);const Zm=e=>{const{isOpen:t,referenceElement:n,popperElement:i,setPopperElement:s}=Wm(),{styles:a,attributes:c,update:l}=(0,Ym.E)(n,i,{placement:e.placement,modifiers:[{name:"offset",options:{offset:[0,e.offset??8]}}]}),d="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 uu.A},[l,n]);const u=(0,o.jsx)(Dn,{ref:s,"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:d,zIndex:"400",...e.css,...a.popper,"&:empty":{opacity:0}},direction:"column",id:e.id,role:"menu",onClick:e=>Hn(e,!1),...c.popper,tabIndex:-1,children:e.children});return t?e.renderOnPortal?(0,Kn.createPortal)(u,document.body):u:null},Jm=e=>{const{isOpen:t,setIsOpen:n,setReferenceElement:i}=Wm(),s=e.children,a=e=>{Hn(e),n(!t),s.props.onClick?.(e)},c=r.cloneElement(r.Children.only(s),{ref(e){i(e)},onClick(e){e.preventDefault(),a(e)},onKeyPress(e){a(e)},tabIndex:0});return(0,o.jsx)(o.Fragment,{children:c})},Xm=bn("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"}}),Qm=e=>(0,o.jsx)(Xm,{"aria-orientation":e.direction,color:e.color,css:e.css,direction:e.direction,role:"separator"}),eg=e=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:e.height}),(0,o.jsx)(Xm,{color:e.color,direction:"horizontal",role:"separator"}),(0,o.jsx)(Fd,{height:e.height})]}),tg=({value:e,onChange:t,css:n,label:i,state:a,description:c,hint:l,...d})=>{const u=Yt(),h=(0,r.useCallback)(e=>{e&&p(e.getBoundingClientRect().width)},[]),m=(0,r.useCallback)(e=>e?.focus({preventScroll:!0}),[]),[g,p]=(0,r.useState)(200),[f,_]=(0,r.useState)(!1),[b,k]=(0,r.useState)(""),v=Kt(Ur),A=(0,r.useMemo)(()=>(0,Uo.A)(v.countries.flatMap(e=>s(e.phoneCode).map(t=>({...e,phoneCode:t}))),({name:e})=>rn(e)),[]),y=(0,r.useMemo)(()=>A.find(({code:t,phoneCode:n})=>t===e.country&&n===e.code),[e.country,e.code]),w=(0,r.useMemo)(()=>A.filter(e=>!an(b)||e.name.toLowerCase().includes(b.trim().toLowerCase())||e.phoneCode.includes(b.trim())),[A,b]),C=(0,r.useMemo)(()=>w.map((n,i)=>(0,o.jsx)(Hm,{onClick:()=>{t({...e,country:n.code,code:n.phoneCode}),k(""),_(!1)},children:(0,o.jsxs)(Dn,{gap:"2",width:1,children:[(0,o.jsx)(xn,{children:n.emoji}),(0,o.jsx)(xn,{css:{ellipsis:!0},children:n.name}),(0,o.jsx)(xn,{color:"gray500",children:n.phoneCode})]})},i)),[w,e,t]),{inputId:I,descId:x,errorId:S}=nu();return(0,o.jsxs)(Dn,{ref:h,css:n,direction:"column",width:1,children:[(0,o.jsx)(ru,{htmlFor:I,children:i}),(0,o.jsx)(iu,{id:x,children:c}),(i||c)&&(0,o.jsx)(Fd,{height:"1"}),(0,o.jsxs)(Dn,{children:[(0,o.jsxs)(Gm,{isOpen:f,onStateChange:e=>_(e),children:[(0,o.jsx)(Jm,{children:(0,o.jsx)(au,{css:{borderRight:"none",borderBottomRightRadius:"0",borderTopRightRadius:"0",userSelect:"none",width:"100px","& .styled-input-container-circle-exclamation":{display:"none"}},cursor:"pointer",rightIcon:f?"chevron-up":"chevron-down",state:a,children:y&&(0,o.jsxs)(xn,{width:1,children:[y.emoji," ",y.phoneCode]})})}),(0,o.jsx)(Zm,{placement:"bottom-start",renderOnPortal:!0,width:g,children:(0,o.jsxs)(Dn,{direction:"column",height:Math.min(201,40*w.length+41),width:1,children:[(0,o.jsx)(xn,{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,o.jsx)("input",{ref:m,"aria-label":u("indicatif_t_l_p_02025"),placeholder:u("rechercher_un_p_04678"),type:"text",value:b,onChange:e=>{k(e.target.value)}})}),(0,o.jsx)(Qm,{color:"gray100",direction:"horizontal"}),(0,o.jsx)(Dn,{css:{height:"calc(100% - 41px)",overflowY:"auto"},direction:"column",children:C})]})})]}),(0,o.jsx)(au,{css:{borderBottomLeftRadius:"0",borderTopLeftRadius:"0",flex:"1"},cursor:"text",state:a,children:(0,o.jsx)(xn,{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,o.jsx)("input",{"aria-describedby":c?x:void 0,"aria-errormessage":"error"===a?S:void 0,"aria-invalid":"error"===a,autoComplete:"tel-national",disabled:"disabled"===a,id:I,type:"tel",value:e.number,onChange:n=>{t({...e,number:n.target.value})},...d})})})]}),(0,o.jsx)(ou,{id:S,state:a,children:l})]})},ng=(0,r.memo)(function({prefix:e,hint:t,state:n,...i}){const r=`${e}country`,s=`${e}code`,a=`${e}number`;return(0,o.jsx)(Kh,{names:[r,s,a],render:e=>{const c=eu(e[s].meta)||eu(e[a].meta);return(0,o.jsx)(tg,{hint:c?e[s].meta.error||e[a].meta.error:t,state:c?"error":n,value:{country:e[r].input.value,code:e[s].input.value,number:e[a].input.value},onChange:t=>{e[r].input.onChange(t.country),e[s].input.onChange(t.code),e[a].input.onChange(t.number)},...i})}})}),ig=bn("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"}}),og=r.forwardRef((e,t)=>{const n=r.useMemo(()=>{const t=e.color||"gray",n=Vh(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"}}:{background:n[50],color:n[700],"& > .h-badge-left-icon":{color:n[500]},"& > .h-badge-count":{background:n[100]}}},[e.color]);return(0,o.jsxs)(ig,{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,o.jsx)(Dn,{className:"h-badge-left-icon",css:{cursor:e.onLeftIconClick?"pointer":"inherit"},onClick:t=>{e.onLeftIconClick?.(t)},children:(0,o.jsx)(Mn,{icon:e.leftIcon,iconStyle:e.leftIconStyle})}),e.children&&(0,o.jsx)(xn,{className:"h-badge-content",css:{flex:"1",overflow:"hidden"},title:e.title,onClick:t=>{e.onContentClick?.(t)},children:(0,o.jsx)(xn,{css:{ellipsis:!0},title:"string"==typeof e.children?e.children:"",children:e.children})}),e.rightIcon&&(0,o.jsx)(Dn,{css:{cursor:e.onRightIconClick?"pointer":"inherit"},onClick:t=>{e.onRightIconClick?.(t)},children:(0,o.jsx)(Mn,{icon:e.rightIcon})}),("number"==typeof e.count||an(e.count))&&(0,o.jsx)(Dn,{align:"center",className:"h-badge-count",children:e.count})]})});og.displayName="Badge";var rg=n(9116),sg=n(7456);const ag=({children:e,index:t,...n})=>(0,o.jsxs)(o.Fragment,{children:[0!==t&&(0,o.jsx)(Fd,{height:"6"}),(0,o.jsx)(xn,{role:"group","aria-label":e?.toString(),font:"gray600 textXs semiBold",width:1,...n,children:e}),(0,o.jsx)(Fd,{height:"2"})]}),cg=bn("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"}}),lg=({shouldPreventDefault:e=!0,...t})=>{const n=n=>{e&&Hn(n),!0!==t.disabled&&("unchecked"!==t.state&&t.state?t.onClick("unchecked"):t.onClick("checked"))};return(0,o.jsx)(cg,{"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,o.jsx)("div",{})})},dg=({shouldPreventDefault:e=!0,...t})=>{const{inputId:n,descId:i,labelId:r}=nu(),s="string"==typeof t.subtext&&t.subtext.length>0,a=n=>{e&&Hn(n),!0!==t.disabled&&("unchecked"!==t.state&&t.state?t.onClick("unchecked"):t.onClick("checked"))};return(0,o.jsxs)(Dn,{css:{...t.css,cursor:t.disabled?"not-allowed":"pointer",userSelect:"none"},tabIndex:0,onClick:e=>{a(e)},onKeyDown:e=>{"Space"===e.key&&a(e)},children:[(0,o.jsx)(Dn,{css:{alignItems:"center",height:"md"===t.size?"23px":"20px"},children:(0,o.jsx)(lg,{descId:i,disabled:t.disabled,inputId:n,labelId:r,shouldPreventDefault:!1,size:t.size,state:t.state,tabIndex:-1,onClick:uu.A})}),(0,o.jsx)(Fd,{width:"2"}),(0,o.jsxs)(Dn,{css:{flexDirection:"column",fontSize:"md"===t.size?"$3":"$2","& div":{cursor:"pointer !important"}},children:[(0,o.jsx)(ru,{htmlFor:n,id:r,children:(0,o.jsx)(xn,{css:{color:t.disabled&&!s?"$gray300":"$gray800"},fontWeight:"medium",children:t.children})}),t.subtext&&(0,o.jsx)(xn,{color:"gray500",id:i,children:t.subtext})]})]})},ug=({children:e,css:t,disabled:n,isCheckbox:i,isRadio:s,isSelected:a,onClick:c,subtext:l,value:d,...u})=>{const h=r.useCallback(()=>{n||c?.()},[n,c]),m=r.useCallback(e=>{"Enter"===e.key&&h?.()},[h]);return(0,o.jsxs)(Dn,{align:"center","aria-checked":i?a:void 0,"aria-label":e,"aria-selected":a,css:{cursor:n?"default":"pointer",minHeight:"40px",padding:"$2 $3",userSelect:"none","&:hover":{background:"$gray100",borderRadius:"$1"},...t},gap:"3",role:"option",tabIndex:0,width:1,onClick:h,onKeyDown:m,...u,children:[i&&(0,o.jsx)(Xh,{disabled:n,shouldPreventDefault:!1,state:a?"checked":"unchecked",onClick:uu.A}),s&&(0,o.jsx)(lg,{shouldPreventDefault:!1,state:a?"checked":"unchecked",onClick:uu.A}),(0,o.jsxs)(Dn,{css:{flex:"1",overflow:"hidden"},direction:"column",gap:"1",children:[(0,o.jsx)(xn,{color:"gray800",css:{ellipsis:!0},title:e,width:1,children:e}),an(l)&&(0,o.jsx)(xn,{color:"gray500",css:{ellipsis:!0},title:l,width:1,children:l})]}),!i&&!s&&a&&(0,o.jsx)(xn,{color:"primary700",children:(0,o.jsx)(Mn,{icon:"check"})})]})};function hg(e){return r.Children.toArray(e).map(t=>{if("optgroup"===t.type)return[{id:(0,tu.A)(),type:"group",text:t.props.label}].concat(hg(t.props.children));if("option"===t.type)return{id:(0,tu.A)(),type:"option",text:t.props.children,value:t.props.value,disabled:t.props.disabled,selected:t.props.selected,radio:t.props["data-radio"],style:t.props.style};if(t.type===Symbol.for("react.fragment"))return hg(t.props.children);throw gl("Unexpected child type",t,e),new Error("Unexpected child type")}).flat()}function mg(e){return Object.fromEntries(e.filter(e=>"option"===e.type).map(e=>[e.value,e.text]))}const gg=({children:e,createText:t,css:n,description:i,hint:s,icon:c,isCreateVisible:l,isSearchLoading:d,isSearchVisible:u,isSelectAllVisible:h,label:m,menuWidth:g,multiple:p,onChange:f,onClick:_,onCreateClick:b,placeholder:k,renderOnPortal:v,renderValue:A,searchElement:y,searchPlaceholder:w,state:C,triggerElem:I,values:x})=>{const S=Yt(),E=r.useCallback(e=>e?.focus({preventScroll:!0}),[]),[j,T]=r.useState(!1),[D,P]=r.useState(""),{inputId:R,descId:O}=nu(),F=r.useMemo(()=>hg(e),[e]),z=r.useMemo(()=>F.flatMap(e=>"option"===e.type?[e.value]:[]),[F]),M=r.useMemo(()=>{const e=(D||"").trim().toLowerCase();return F.filter(t=>""===e||"group"===t.type||t.text.toLowerCase().includes(e)).filter((e,t,n)=>{const i=n[t+1];return"option"===e.type||"option"===i?.type})},[F,D]),$=r.useMemo(()=>(0,rg.A)((0,lh.A)(M.filter(e=>"option"===e.type&&an(e.radio)),e=>e.radio),e=>e.map(e=>e.value)),[M]),N=r.useMemo(()=>mg(F),[F]),B=r.useMemo(()=>(0,Pd.A)((0,Uo.A)(x),(0,Uo.A)(z)),[x,z]),L=r.useCallback(()=>{f(B?[]:z)},[f,z,B]),V=r.useMemo(()=>A?A(x[0],N[x[0]]):N[x[0]],[A,x,N]);return r.useEffect(()=>{j||P("")},[j]),(0,o.jsxs)(Dn,{css:n,direction:"column",width:1,children:[m&&(0,o.jsx)(ru,{htmlFor:R,children:m}),i&&(0,o.jsx)(iu,{id:O,children:i}),(m||i)&&(0,o.jsx)(Fd,{height:"1"}),(0,o.jsxs)(Gm,{disabled:"disabled"===C,isOpen:j,onStateChange:e=>T(e),children:[(0,o.jsx)(Jm,{children:I||(0,o.jsx)(au,{"aria-describedby":O,"aria-label":(m??k)+(N[x[0]]?` (currently: ${N[x[0]]})`:""),"aria-multiselectable":p,"aria-owns":M.map(e=>e.id).join(" "),"aria-placeholder":k,css:{maxHeight:"200px",overflowY:"auto",padding:"$2 $3",userSelect:"none"},cursor:"disabled"===C?"default":"pointer",height:"fluid",icon:c,id:R,rightIcon:j?"chevron-up":"chevron-down",state:C,children:a(x)?p?(0,o.jsx)(Dn,{css:{flex:"1",overflowY:"auto"},gap:"2",height:1,role:"presentation",wrap:"wrap",children:x.map((e,t)=>(0,o.jsx)(og,{ellipsis:!0,rightIcon:"xmark",onRightIconClick:t=>{Hn(t),f((0,sg.A)(x,e))},children:N[e]},t))}):(0,o.jsx)(xn,{color:"gray800",css:{flex:"1",overflow:"hidden"},role:"presentation",children:(0,o.jsx)(xn,{css:{ellipsis:!0},title:V,children:V})}):(0,o.jsx)(xn,{color:"gray500",css:{flex:"1"},role:"presentation",children:k})})}),(0,o.jsx)(Zm,{css:{padding:"0"},placement:"bottom-start",renderOnPortal:v,width:g??"match",children:(0,o.jsxs)(Dn,{direction:"column",width:1,children:[(0,o.jsxs)(Dn,{css:{padding:"$3"},direction:"column",width:1,children:[u&&(0,o.jsxs)(o.Fragment,{children:[y||(0,o.jsx)(cu,{ref:E,icon:"magnifying-glass",placeholder:w||S("rechercher_50038"),state:"search",value:D,onChange:P}),(0,o.jsx)(Fd,{height:"3"})]}),(0,o.jsx)(xn,{css:{maxHeight:"250px",overflowY:"auto"},children:d?(0,o.jsxs)(Dn,{direction:"column",gap:"1",children:[(0,o.jsx)(yu,{borderRadius:"$1",height:40}),(0,o.jsx)(yu,{borderRadius:"$1",height:40}),(0,o.jsx)(yu,{borderRadius:"$1",height:40})]}):M.map((e,t)=>{if("group"===e.type)return(0,o.jsx)(ag,{id:e.id,index:t,children:e.text},e.id);{const n=e.value,i=e.selected??x.includes(n),r=e.radio,s=!0===p&&cn(r),a=!0===p&&an(r);return(0,o.jsx)(ug,{css:e.style,disabled:e.disabled,id:e.id,isCheckbox:s,isRadio:a,isSelected:i,value:e.value,onClick:()=>{if(_)_(n,i);else if(p&&s)f(i?(0,sg.A)(x,n):x.concat(n));else if(p&&a){const e=(0,mh.A)(x,$[r]).concat(i?[]:[n]);f(e)}else f(i?[]:[n]),T(!1)},children:e.text},t)}})})]}),l&&(0,o.jsxs)(Dn,{css:{background:"$gray50",boxShadow:"0px -1px 3px rgba(16, 24, 40, 0.1), 0px -1px 2px rgba(16, 24, 40, 0.06)",color:"$primary700",cursor:"pointer",padding:"$3 $4",userSelect:"none"},width:1,onClick:()=>{b?.(),T(!1)},children:["+ ",t||S("cr_er_82895")]}),h&&(0,o.jsx)(Dn,{css:{background:"$gray50",boxShadow:"0px -1px 3px rgba(16, 24, 40, 0.1), 0px -1px 2px rgba(16, 24, 40, 0.06)",color:"$primary700",cursor:"pointer",padding:"$3 $4",userSelect:"none"},width:1,onClick:L,children:S(B?"tout_d_s_lectio_37372":"tout_s_lectionn_48027")})]})})]}),(0,o.jsx)(ou,{state:C,children:s})]})},pg=({name:e,hint:t,state:n,multiple:i,...r})=>(0,o.jsx)(Rd.D0,{name:e,render:s=>{const c=eu(s.meta);return(0,o.jsx)(gg,{hint:c?s.meta.error:t,multiple:i,name:e,state:c?"error":n,values:i?Array.isArray(s.input.value)?s.input.value:[]:"number"==typeof s.input.value||an(s.input.value)?[s.input.value]:[],onChange:e=>{i?s.input.onChange(e):a(e)?s.input.onChange(e[0]):s.input.onChange(null)},...r})}}),fg=bn("select",{backgroundColor:"$white",height:"100%",left:0,opacity:0,position:"absolute",top:0,width:"100%"}),_g=bn("div",{ellipsis:""}),bg=({autoComplete:e,children:t,css:n,label:i,description:s,shouldParseAsInt:a,shouldParseAsBoolean:c,onChange:l,hint:d,icon:u,state:h,value:m="",...g})=>{const p=r.useMemo(()=>mg(hg(t)),[t]),{inputId:f,descId:_,errorId:b}=nu();return(0,o.jsxs)(Dn,{css:n,direction:"column",width:1,children:[(0,o.jsx)(ru,{htmlFor:f,children:i}),(0,o.jsx)(iu,{id:_,children:s}),(i||s)&&(0,o.jsx)(Fd,{height:"1"}),(0,o.jsxs)(au,{cursor:"default",icon:u,state:h,children:[(0,o.jsx)(Dn,{align:"center",css:{flex:"1",overflow:"hidden"},height:1,width:1,children:(0,o.jsx)(_g,{children:p[m.toString()]})}),(0,o.jsx)(Dn,{css:{color:"$gray500"},children:(0,o.jsx)(Mn,{icon:"chevron-down"})}),(0,o.jsx)(fg,{"aria-describedby":s?_:void 0,"aria-errormessage":"error"===h?b:void 0,"aria-invalid":"error"===h,autoComplete:e??"off",css:{cursor:"disabled"===h?"not-allowed":"pointer"},disabled:"disabled"===h,id:f,value:m.toString(),onChange:e=>{l(a?parseInt(e.target.value,10):c?"true"===e.target.value:e.target.value)},...g,children:t})]}),(0,o.jsx)(ou,{id:b,state:h,children:d})]})},kg=({name:e,hint:t,state:n,...i})=>(0,o.jsx)(Rd.D0,{name:e,render:r=>{const s=eu(r.meta);return(0,o.jsx)(bg,{hint:s?r.meta.error:t,name:e,state:s?"error":n,value:r.input.value,onBlur:r.input.onBlur,onChange:e=>{r.input.onChange(e)},onFocus:r.input.onFocus,...i})}}),vg=({css:e,label:t,description:n,state:i,icon:r,hint:s,rightIcon:a,rightText:c,onChange:l,value:d,...u})=>{const{inputId:h,descId:m,errorId:g}=nu();return(0,o.jsxs)(Dn,{css:e,direction:"column",width:1,children:[(0,o.jsx)(ru,{htmlFor:h,children:t}),(0,o.jsx)(iu,{id:m,children:n}),(t||n)&&(0,o.jsx)(Fd,{height:"1"}),(0,o.jsx)(au,{cursor:"text",height:"fluid",icon:r,rightIcon:a,rightText:c,state:i,children:(0,o.jsxs)(ku,{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,o.jsx)("textarea",{"aria-describedby":n?m:void 0,"aria-errormessage":"error"===i?g:void 0,"aria-invalid":"error"===i,disabled:"disabled"===i,id:h,value:d,onChange:e=>{l(e.target.value)},...u}),(0,o.jsxs)(xn,{className:"replicated-text",children:[d," "]})]})}),(0,o.jsx)(ou,{id:g,state:i,children:s})]})},Ag=({name:e,hint:t,state:n,...i})=>(0,o.jsx)(Rd.D0,{name:e,render:r=>{const s=eu(r.meta);return(0,o.jsx)(vg,{hint:s?r.meta.error:t,name:e,state:s?"error":n,value:r.input.value,onBlur:r.input.onBlur,onChange:e=>{r.input.onChange(e)},onFocus:r.input.onFocus,...i})}});function yg(){const e=Yt();return t=>(0,Uo.A)(t.map(t=>({value:t,translation:e(t)})),({translation:e})=>sn(e)).map(({value:e,translation:t},n)=>(0,o.jsx)("option",{value:e,children:t},n))}const wg=e=>{const t=Yt(),n=yg(),i=Kt(Ur),s=Kt(cs),a=e.isMandatory?e.field.name:(0,o.jsx)(Hh,{children:e.field.name}),c=`${e.prefix}${e.field.slug}`,l=e.field.description,d=(0,r.useMemo)(()=>c.startsWith("formRegister.userInfo.fields."),[c]);if((0,r.useEffect)(()=>{e.display||e.change(c,s.fieldUpdateInputDefault(e.field,i.getDefaultCountryValues()))},[e.display,e.field,e.change]),!e.display)return null;switch(e.field.fieldType){case K.Text:return(0,o.jsx)(lu,{description:l,label:a,name:c});case K.Textarea:return(0,o.jsx)(Ag,{description:l,label:a,name:c});case K.Checkbox:return(0,o.jsx)(em,{name:c,subtext:l,children:a});case K.Validation:return(0,o.jsx)(em,{name:c,subtext:(0,o.jsxs)(o.Fragment,{children:[an(l)&&(0,o.jsx)("span",{children:l}),an(l)&&e.field.document&&(0,o.jsx)("br",{}),e.field.document&&(0,o.jsx)(qh,{css:{color:"$primary700"},download:e.field.document.name,to:e.field.document.url,onClick:e=>{e.stopPropagation(),e.nativeEvent.stopImmediatePropagation()},children:t("consulter_le_do_69928")})]}),children:a});case K.Select:return e.field.canSelectMultiple?(0,o.jsx)(pg,{description:l,isSearchVisible:!0,isSelectAllVisible:!0,label:a,multiple:!0,name:c,children:e.field.values.map(({id:e,value:t})=>(0,o.jsx)("option",{value:e,children:t},e))}):(0,o.jsx)(pg,{description:l,isSearchVisible:!0,label:a,name:c,placeholder:t("choisir_une_val_00277"),children:e.field.values.map(({id:e,value:t})=>(0,o.jsx)("option",{value:e,children:t},e))});case K.Date:return"dateOfBirth"===e.field.slug?(0,o.jsx)(im,{autoComplete:d?"bday":void 0,description:l,label:a,max:xi.c9.now(),name:c}):(0,o.jsx)(im,{description:l,label:a,name:c});case K.Datetime:return(0,o.jsx)(rm,{description:l,label:a,name:c});case K.Time:return(0,o.jsx)(am,{description:l,label:a,name:c});case K.Phone:return(0,o.jsx)(ng,{description:l,label:a,prefix:`${c}.`});case K.Number:return(0,o.jsx)(lu,{description:l,label:a,name:c,shouldParseAsInt:!0});case K.Sex:return(0,o.jsxs)(kg,{autoComplete:d?"sex":void 0,description:l,label:a,name:c,children:[(0,o.jsx)("option",{disabled:!0,value:"",children:t("choisir_une_val_00277")}),n(Ot)]});case K.Language:return e.field.fieldProperty===H.Language?(0,o.jsx)(pg,{autoComplete:d?"language":void 0,description:l,isSearchVisible:!0,label:a,name:c,placeholder:t("choisir_une_val_00277"),children:n(Wr)}):(0,o.jsx)(pg,{description:l,isSearchVisible:!0,label:a,name:c,placeholder:t("choisir_une_val_00277"),children:n(Ct)});case K.Nationality:return(0,o.jsx)(pg,{description:l,isSearchVisible:!0,label:a,name:c,placeholder:t("choisir_une_val_00277"),children:i.getNationalitiesIdName(e.countryCode).map(e=>(0,o.jsx)("option",{value:e.id,children:e.name},e.id))});case K.Address:return(0,o.jsx)(Zh,{addressName:c,autoComplete:d?"street-address":void 0,description:l,label:a,placeName:e.field.fieldProperty===H.Street?"place":void 0});case K.Country:return(0,o.jsx)(pg,{autoComplete:d?"country":void 0,description:l,isSearchVisible:!0,label:a,name:c,placeholder:t("choisir_une_val_00277"),children:i.getCountriesIdName(e.countryCode).map(e=>(0,o.jsx)("option",{value:e.id,children:e.name},e.id))});case K.File:return e.field.fieldProperty===H.Picture?(0,o.jsx)(Bm,{allowCrop:!0,hint:l,label:a,organizationId:e.organizationId,prefix:`${c}.`}):(0,o.jsx)(zm,{accept:[ym.Images,ym.Pdf],acl:e.fileAcl??"private",description:l,label:a,organizationId:e.organizationId,prefix:`${c}.`});default:return Br(e.field.fieldType)}};function Cg(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:"$primary700"},[`${e} blockquote`]:{borderLeft:"3px solid $gray200",fontStyle:"italic",marginLeft:0,marginRight:0,px:"$4","& p":{margin:0,paddingBottom:"$2",paddingTop:"$2"}}}}const Ig=e=>(0,o.jsx)(xn,{className:"h-rich-text",css:{...Cg("&"),"& > 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"))}}}),xg=e=>(0,o.jsx)(Dn,{align:"center",css:{background:`$${e.color}50`,borderRadius:"48px",color:`$${e.color}700`,...e.css||{}},height:48,justify:"center",width:48,children:(0,o.jsx)(Dn,{align:"center",css:{background:`$${e.color}100`,borderRadius:"32px"},height:32,justify:"center",width:32,children:(0,o.jsx)(Mn,{icon:e.icon})})}),Sg=e=>{const t=Yt();return(0,o.jsxs)(Tm,{buttons:(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(Un,{onClick:e.onClose,children:t("fermer_62479")})}),size:"md",onClose:e.onClose,children:[(0,o.jsx)(Dn,{justify:"center",width:1,children:(0,o.jsx)(xg,{color:"primary",icon:"circle-info"})}),(0,o.jsx)(Fd,{height:"4"}),(0,o.jsx)(xn,{font:"gray900 textLg medium",textAlign:"center",width:1,children:t("informations_su_86120",e.name)}),(0,o.jsx)(Fd,{height:"7"}),an(e.description)&&(0,o.jsxs)(Dn,{css:{overflowY:"auto"},direction:"column",gap:"2",children:[(0,o.jsx)(xn,{font:"gray900 textMd semiBold",children:t("description_58935")}),(0,o.jsx)(Ig,{text:e.description})]}),(0,o.jsx)(Fd,{height:"4"})]})};var Eg=n(9120);const jg=e=>(0,Uo.A)(e,e=>e.toMillis()),Tg=bn("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:"$primary700",color:"white"}}},isSelected:{true:{background:"$primary700",color:"white",cursor:"pointer"}}},compoundVariants:[{isSelectable:!0,isSelected:!0,css:{background:"$primary700",color:"white",cursor:"pointer"}}]}),Dg=({disabledDates:e,firstDayOfMonth:t,max:n,min:i,onChange:s,values:c})=>{const l=Yt(),d=Kt(is),u=(0,r.useMemo)(()=>t.minus({day:t.weekday-1}),[t]),h=(0,r.useMemo)(()=>t.endOf("month"),[t]),m=(0,r.useMemo)(()=>{const e=h.plus({day:7-h.weekday});return Math.ceil(e.diff(u,"days").days)},[h]),g=(0,r.useMemo)(()=>(0,Xs.A)(0,m).map(o=>{const r=u.plus({day:o}),s=r.toMillis(),l=c.some(e=>e.toMillis()===s),d=!!a(e)&&e.some(e=>e.toMillis()===s);return{day:r,isSelected:l,isDisabled:d,isSelectable:!d&&r.month===t.month&&r>=i&&r<=n}}),[u,m,c,e]),p=(0,r.useMemo)(()=>!g.some(({isSelectable:e,isSelected:t})=>e&&!t),[g]),f=(0,r.useCallback)(()=>{s(p?[]:g.flatMap(({day:e,isSelectable:t,isSelected:n})=>t||n?[e]:[]))},[g,p,s]);return(0,o.jsxs)(Dn,{css:{background:"white",bd:!0,padding:"$5 $4"},direction:"column",children:[(0,o.jsx)(xn,{css:{textTransform:"capitalize"},font:"gray800 textXl semiBold",textAlign:"center",width:1,children:d.toLocaleString(t,{month:"long",year:"numeric"})}),(0,o.jsx)(Fd,{height:"6"}),(0,o.jsx)(ku,{gap:"2",gridtemplatecolumns:"repeat(7, 32px)",gridtemplaterows:"auto",children:(0,Xs.A)(0,7).map(e=>{const t=u.plus({day:e});return(0,o.jsx)(xn,{css:{textTransform:"capitalize"},font:"gray500 textXs medium",width:32,children:d.toLocaleString(t,{weekday:"short"})},e)})}),(0,o.jsx)(Fd,{height:"5"}),(0,o.jsx)(ku,{gap:"2",gridtemplatecolumns:"repeat(7, 32px)",gridtemplaterows:"auto",children:g.map(({day:e,isSelected:t,isSelectable:n},i)=>(0,o.jsx)(Tg,{isSelectable:n,isSelected:t,onClick:i=>{if(n&&t)s(jg((0,Eg.A)(c,[e],e=>e.toMillis())));else if(n&&!t){const t=c.findLast(t=>tt.plus({day:e+1}));s(jg([...c,...i]))}else s(jg([...c,e]))}},children:e.day},i))}),(0,o.jsx)(Fd,{height:"6"}),(0,o.jsx)(Un,{color:"white",textAlign:"center",onClick:f,children:l(p?"tout_d_s_lectio_37372":"tout_s_lectionn_48027")})]})},Pg=e=>{const{minDate:t,maxDate:n,numberOfMonths:i,totalDaysDiff:s}=(0,r.useMemo)(()=>function(e){const t=e.filter(e=>e.date?.isValid),n=(0,uh.A)(t.map(e=>e.date),e=>e.toMillis()),i=(0,hh.A)(t.map(e=>e.date),e=>e.toMillis()),o=Math.ceil(i.endOf("month").diff(n.startOf("month"),"months").months),r=Math.ceil(i.diff(n,"days").days);return{minDate:n,maxDate:i,numberOfMonths:o,totalDaysDiff:r}}(e.slots),[e.slots]),a=(0,r.useMemo)(()=>e.slots.flatMap(t=>t.date?.isValid&&e.accreditationsSlotsIds.includes(t.id)?[t.date]:[]),[e.slots,e.accreditationsSlotsIds]),c=(0,r.useMemo)(()=>(0,Xs.A)(0,s).flatMap(n=>{const i=t.plus({day:n});return e.slots.some(e=>e.date?.isValid&&e.date.toMillis()===i.toMillis())?[]:[i]}),[t,s,e.slots]);return(0,o.jsx)(Dn,{gap:"4",wrap:"wrap",children:(0,Xs.A)(0,i).map(r=>{const s=t.plus({month:r}).startOf("month"),l=0===r?t:s,d=r===i-1?n:s.endOf("month"),u=a.filter(e=>e.startOf("month").equals(s));return(0,o.jsx)(Dg,{disabledDates:c,firstDayOfMonth:s,max:d,min:l,values:u,onChange:t=>{e.change(`${e.prefix}accreditationsSlotsIds`,function(e,t,n,i){const o=(0,mh.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))}},r)})})},Rg=e=>{const{translate:t}=Id(),n=(0,r.useMemo)(()=>e.slots.filter(e=>e.date?.isValid),[e.slots]);return a(n)?(0,o.jsx)(Pg,{...e,slots:n}):(0,o.jsx)(Rh,{imageSrc:_u.WeezeventBlankPerson,subtitle:t("this_may_be_bec_43194"),title:t("no_items_are_cu_47996")})},Og=e=>{const{translate:t}=Id(),n=Kt(is);return(0,o.jsx)(o.Fragment,{children:a(e.slots)?e.slots.map(t=>(0,o.jsx)(Qh,{state:e.accreditationsSlotsIds.includes(t.id)?"checked":"unchecked",onClick:n=>{e.change(`${e.prefix}accreditationsSlotsIds`,l(e.accreditationsSlotsIds,t.id,"checked"===n))},children:(0,o.jsx)(xn,{css:{textTransform:"capitalize"},children:wh(n,t,e.accreditation.name,{date:{localeFormat:Bi.DateOnly.WeekdayLongMonthLong}})})},t.id)):(0,o.jsx)(Rh,{imageSrc:_u.WeezeventBlankPerson,subtitle:t("this_may_be_bec_43194"),title:t("no_items_are_cu_47996")})})},Fg=e=>{const{translate:t}=Id(),n=Kt(is),i=(0,r.useMemo)(()=>e.slots.map(e=>e.id),[e.slots]);return(0,o.jsx)(o.Fragment,{children:a(e.slots)?e.slots.map(t=>(0,o.jsx)(dg,{state:e.accreditationsSlotsIds.includes(t.id)?"checked":"unchecked",onClick:n=>{const o=[...e.accreditationsSlotsIds.filter(e=>!i.includes(e)),..."checked"===n?[t.id]:[]];e.change(`${e.prefix}accreditationsSlotsIds`,o)},children:(0,o.jsx)(xn,{css:{textTransform:"capitalize"},children:wh(n,t,e.accreditation.name,{date:{localeFormat:Bi.DateOnly.WeekdayLongMonthLong}})})},t.id)):(0,o.jsx)(Rh,{imageSrc:_u.WeezeventBlankPerson,subtitle:t("this_may_be_bec_43194"),title:t("no_items_are_cu_47996")})})},zg=e=>{const{params:{organizationId:t},translate:n}=Id(),[i,s]=(0,r.useState)(!1),c=(0,r.useMemo)(()=>(0,Uo.A)(e.accreditation.slots.filter(t=>Ch(t,e.slots,e.options,e.delegationAccreditations)),e=>(0,Go.A)([e.date?.toMillis(),e.name.toLowerCase()])),[e.accreditation.slots,e.delegationAccreditations,e.slots,e.options]),d=(0,r.useMemo)(()=>an(e.accreditation.description)&&e.options.showAccreditationDescription,[e.accreditation,e.options]),h=(0,r.useMemo)(()=>{const t=e.accreditation.hasSlots?c.map(e=>e.id):[e.accreditation.hiddenSlotId];return e.displayFormCustomFields&&a(e.accreditation.formCustomFields)&&a((0,Xr.A)(t,e.accreditationsSlotsIds))},[e.accreditation,e.accreditationsSlotsIds,e.displayFormCustomFields,c]),m=e.accreditationsSlotsIds.includes(e.accreditation.hiddenSlotId)?"checked":"unchecked";return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Wh,{accreditation:e.accreditation,displayFormCustomFields:h,displayNumberOfSlots:!1,displaySlots:e.accreditation.hasSlots,numberOfSlots:0,renderActions:()=>d&&(0,o.jsx)(Un,{color:"white",onClick:e=>{e.stopPropagation(),e.nativeEvent.stopImmediatePropagation(),s(!0)},children:n("voir_la_descrip_62304")}),renderCheckbox:()=>!e.accreditation.hasSlots&&(0,o.jsx)(Xh,{shouldPreventDefault:!1,state:m,onClick:uu.A}),onClick:()=>{e.accreditation.hasSlots||e.change(`${e.prefix}accreditationsSlotsIds`,l(e.accreditationsSlotsIds,e.accreditation.hiddenSlotId,"unchecked"===m))},children:(0,o.jsxs)(Dn,{css:{background:"white",padding:"$4"},direction:"column",gap:"3",children:[e.accreditation.hasSlots?e.accreditation.accreditationDisplay===u.Calendar?(0,o.jsx)(Rg,{accreditationsSlotsIds:e.accreditationsSlotsIds,change:e.change,prefix:e.prefix,slots:c}):(0,o.jsx)(Dn,{css:{background:"white",bd:!0,padding:"$4"},direction:"column",gap:"3",width:1,children:e.accreditation.accreditationDisplay===u.Radio?(0,o.jsx)(Fg,{accreditation:e.accreditation,accreditationsSlotsIds:e.accreditationsSlotsIds,change:e.change,prefix:e.prefix,slots:c}):(0,o.jsx)(Og,{accreditation:e.accreditation,accreditationsSlotsIds:e.accreditationsSlotsIds,change:e.change,prefix:e.prefix,slots:c})}):null,h&&(0,o.jsx)(Dn,{css:{background:"white",bd:!0,padding:"$4"},direction:"column",gap:"3",width:1,children:e.accreditation.formCustomFields.map(({customField:n,isMandatory:i})=>(0,o.jsx)(wg,{change:e.change,display:!0,field:n,isMandatory:i,organizationId:t,prefix:`${e.prefix}userInfo.fields.`},n.id))})]})}),i&&(0,o.jsx)(Sg,{description:e.accreditation.description,name:e.accreditation.name,onClose:()=>{s(!1)}})]})},Mg=e=>{const{translate:t}=Id(),n=(0,r.useMemo)(()=>Dh(e.category.accreditations.filter(t=>Sh(t,e.slots,e.userInfoFields,e.options,e.delegationAccreditations))),[e.category,e.delegationAccreditations,e.slots,e.userInfoFields,e.options]);return(0,o.jsx)($h,{category:e.category,children:a(n)?n.map(t=>(0,o.jsx)(zg,{accreditation:t,accreditationsSlotsIds:e.accreditationsSlotsIds,change:e.change,delegationAccreditations:e.delegationAccreditations,displayFormCustomFields:e.displayFormCustomFields,options:e.options,prefix:e.prefix,slots:e.slots},t.id)):(0,o.jsx)(Rh,{imageSrc:_u.WeezeventBlankPerson,subtitle:t("this_may_be_bec_43194"),title:t("no_items_are_cu_47996")})})},$g=e=>{const{translate:t}=Id(),n=(0,r.useMemo)(()=>(0,Uo.A)(e.categories,e=>e.name.toLowerCase()),[e.categories]);return(0,o.jsx)(Ph,{css:{background:"transparent",padding:"0"},children:a(n)?(0,o.jsxs)(o.Fragment,{children:[n.map(t=>(0,o.jsx)(Mg,{accreditationsSlotsIds:e.accreditationsSlotsIds,category:t,change:e.change,delegationAccreditations:e.delegationAccreditations,displayFormCustomFields:e.displayFormCustomFields,options:e.options,prefix:e.prefix,slots:e.slots,userInfoFields:e.userInfoFields},t.id)),e.showAutoAccredit&&(0,o.jsxs)(Dn,{direction:"column",gap:"1",children:[(0,o.jsx)(xn,{font:"gray900 textSm medium",children:t("attribution_des_59896")}),(0,o.jsx)(Mh,{name:`${e.prefix}autoAccredit`,children:t("attribuer_les_a_75431")})]})]}):(0,o.jsx)(Rh,{imageSrc:_u.WeezeventBlankPerson,subtitle:t("this_may_be_bec_43194"),title:t("no_items_are_cu_47996")})})},Ng=e=>{const t=(0,r.useMemo)(()=>e.event.accreditationsCategories.filter(t=>{return n=t,i=e.slots,o=e.userInfosFields,r=e.options,s=e.delegationAccreditations,r.accreditationDisplay!==ke.None&&!r.hiddenAccreditationsCategoriesIds.includes(n.id)&&(0===r.displayedAccreditationsCategoriesIds.length||r.displayedAccreditationsCategoriesIds.includes(n.id))&&n.accreditations.some(e=>Sh(e,i,o,r,s))||s.some(e=>e.accreditationCategoryId===n.id&&n.accreditations.some(e=>Sh(e,i,o,r,s)));var n,i,o,r,s}),[e.event.accreditationsCategories,e.slots,e.userInfosFields,e.options]);return a(e.delegationAccreditations)||e.options.accreditationDisplay===ke.Accreditation?(0,o.jsx)($g,{accreditationsSlotsIds:e.accreditationsSlotsIds,categories:t,change:e.change,delegationAccreditations:e.delegationAccreditations,displayFormCustomFields:e.displayFormCustomFields,options:e.options,prefix:e.prefix,showAutoAccredit:e.showAutoAccredit,slots:e.slots,userInfoFields:e.userInfosFields}):null},Bg=e=>{const t=Yt(),{data:n,loader:i}=Jt("query FormAccreditations($eventId: EventId!) {\n event: eventPublic(id: $eventId) {\n accreditationsCategories {\n ...FormRegisterAccreditationCategory\n }\n }\n}\n",{eventId:e.eventId},[ji.FormRegisterAccreditationCategoryFragment]);return i||(0,o.jsxs)(o.Fragment,{children:[an(e.form.accreditationSubtitle)?(0,o.jsx)(Ig,{text:e.renderText(e.form.accreditationSubtitle,e.userInfoFields)}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(xn,{font:"gray800 textMd semiBold",children:t("s_lectionnez_vo_91873")}),(0,o.jsx)(Fd,{height:"1"}),(0,o.jsx)(xn,{color:"gray500",children:t("s_lectionnez_le_63924")})]}),(0,o.jsx)(Fd,{height:"6"}),(0,o.jsx)(Kd,{}),(0,o.jsx)(Ng,{accreditationsSlotsIds:e.accreditationsSlotsIds,change:e.change,delegationAccreditations:[],displayFormCustomFields:!0,event:n.event,options:e.form,prefix:"formRegister.",showAutoAccredit:!1,slots:e.slots,userInfosFields:e.userInfoFields}),(0,o.jsx)(Fd,{height:"7"}),(0,o.jsx)(Dn,{children:(0,o.jsx)(Un,{onClick:e.handleSubmit,children:e.registerButtonText})})]})},Lg=r.forwardRef((e,t)=>(0,o.jsxs)(Dn,{ref:t,css:{background:"white",bd:"white 1 sm",width:"100%","@tablet":{width:"$containerTablet"},"@desktop":{width:"$container"}},direction:"column",children:[(0,o.jsxs)(Dn,{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,o.jsx)(Dn,{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,o.jsx)(Mn,{icon:"check"}):e.number}),(0,o.jsx)(xn,{color:"gray800",fontSize:"textMd",fontWeight:"semiBold",children:e.title})]}),e.isOpen&&(0,o.jsx)(Dn,{css:{padding:"$6 $4","@tablet":{padding:"$6"},"@desktop":{padding:"$6 70px"}},direction:"column",children:e.children})]}));Lg.displayName="FormBox";var Vg=n(2096);const Ug=e=>{const t=Kt(Ur);return(0,o.jsx)(Vg.Yr,{name:e.name,children:n=>{e.change(`${e.prefix}street`,n.name);const i=n.geometry?.location?.lat(),o=n.geometry?.location?.lng(),r=n.address_components?.find(({types:e})=>e.includes("locality")),s=n.address_components?.find(({types:e})=>e.includes("postal_code")),a=n.address_components?.find(({types:e})=>e.includes("country"))?.short_name;"number"==typeof i&&"number"==typeof o&&e.changeLatLng&&(e.change(`${e.prefix}latitude`,i),e.change(`${e.prefix}longitude`,o)),r&&e.changeCity&&e.change(`${e.prefix}city`,r.long_name),s&&e.changePostalCode&&e.change(`${e.prefix}postalCode`,s.long_name),t.countryCodeExists(a)&&e.changeCountry&&e.change(`${e.prefix}country`,a)}})},Gg=e=>{const t=r.useMemo(()=>e.elements.flatMap(e=>e.elementType===J.Field?[e.customField]:e.hasCondition&&e.conditionCustomField?[e.conditionCustomField]:[]),[e.elements]);return(0,o.jsx)(xn,{children:e.elements.map((n,i)=>{switch(n.elementType){case J.Field:{const s=n.customField,a=ss(s,e.values,t);return(0,o.jsxs)(r.Fragment,{children:[s.fieldProperty===H.Street&&(0,o.jsx)(Ug,{change:e.change,changeCity:!0,changeCountry:!0,changeLatLng:!0,changePostalCode:!0,name:"place",prefix:e.prefix}),a&&0!==i&&(0,o.jsx)(Fd,{height:"4"}),(0,o.jsx)(wg,{change:e.change,countryCode:e.countryCode,display:a,field:s,isMandatory:!0===n.isMandatory,organizationId:e.organizationId,prefix:e.prefix},i)]},i)}case J.Section:return ss(n,e.values,t)?(0,o.jsx)(r.Fragment,{children:"function"==typeof e.renderSection?e.renderSection(n.section,i):(0,o.jsxs)(o.Fragment,{children:[e.featureFlags?.isV4?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"5"}),(0,o.jsx)(Qm,{direction:"horizontal"}),(0,o.jsx)(Fd,{height:"5"})]}):0!==i&&(0,o.jsx)(Fd,{height:"8"}),(0,o.jsx)(xn,{font:"gray800 textMd semiBold",children:"function"==typeof e.renderText?e.renderText(n.section):n.section})]})},i):null;case J.Text:return ss(n,e.values,t)?(0,o.jsx)(r.Fragment,{children:(0,o.jsxs)(o.Fragment,{children:[0!==i&&(0,o.jsx)(Fd,{height:"4"}),(0,o.jsx)(Ig,{text:"function"==typeof e.renderText?e.renderText(n.text):n.text})]})},i):null;default:return Br(n.elementType)}})})},Wg=e=>{const{translate:t,params:{organizationId:n}}=Id();return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Kd,{}),(0,o.jsx)(Gg,{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,o.jsx)(Fd,{height:{"@initial":"6","@tablet":"7"}}),(0,o.jsx)(Dn,{children:(0,o.jsx)(Un,{onClick:e.handleSubmit,children:e.isFinalStep?e.registerButtonText:t("suivant_62774")})})]})},qg=e=>{const[t,n]=(0,r.useState)(!1),i=an(e.category.description)&&e.options.showPositionCategoryDescription;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Qh,{css:{alignItems:"center"},state:e.positionsCategoriesIds.includes(e.category.id)?"checked":"unchecked",onClick:t=>{e.change(`${e.prefix}positionsCategoriesIds`,l(e.positionsCategoriesIds,e.category.id,"checked"===t))},children:(0,o.jsxs)(Dn,{align:"center",gap:"2",children:[(0,o.jsx)(xn,{children:e.category.name}),i&&(0,o.jsx)(xn,{onClick:e=>{Hn(e),n(!0)},children:(0,o.jsx)(Mn,{icon:"circle-info"})})]})}),t&&(0,o.jsx)(Sg,{description:e.category.description,name:e.category.name,onClose:()=>{n(!1)}})]})},Hg=e=>{const{translate:t}=Id(),n=(0,r.useMemo)(()=>(0,Uo.A)(e.categories,e=>e.name),[e.categories]);return(0,o.jsx)(o.Fragment,{children:a(n)?n.map((t,n)=>(0,o.jsxs)(r.Fragment,{children:[0!==n&&(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(qg,{category:t,change:e.change,options:e.options,positionsCategoriesIds:e.positionsCategoriesIds,prefix:e.prefix})]},t.id)):(0,o.jsx)(Rh,{imageSrc:_u.WeezeventBlankPerson,subtitle:t("this_may_be_bec_43194"),title:t("no_items_are_cu_47996")})})},Kg=e=>{const[t,n]=(0,r.useState)(!1),i=an(e.position.description)&&e.options.showPositionDescription;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Qh,{css:{alignItems:"center"},state:e.positionsIds.includes(e.position.id)?"checked":"unchecked",onClick:t=>{e.change(`${e.prefix}positionsIds`,l(e.positionsIds,e.position.id,"checked"===t))},children:(0,o.jsxs)(Dn,{align:"center",gap:"2",children:[(0,o.jsx)(xn,{children:e.position.name}),i&&(0,o.jsx)(xn,{onClick:e=>{Hn(e),n(!0)},children:(0,o.jsx)(Mn,{icon:"circle-info"})})]})}),t&&(0,o.jsx)(Sg,{description:e.position.description,name:e.position.name,onClose:()=>{n(!1)}})]})},Yg=e=>{const{translate:t}=Id(),n=(0,r.useMemo)(()=>(0,Uo.A)(e.category.positions.filter(t=>bh(t,e.userInfoFields,e.slots,e.options)),e=>e.name),[e.category,e.userInfoFields,e.slots,e.options]),[i,s]=(0,r.useState)(!1),c=an(e.category.description)&&e.options.showPositionCategoryDescription;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(Dn,{align:"center",gap:"2",children:[(0,o.jsx)(xn,{color:"gray900",fontWeight:"semiBold",children:e.category.name}),c&&(0,o.jsx)(xn,{color:"gray700",onClick:()=>{s(!0)},children:(0,o.jsx)(Mn,{icon:"circle-info"})})]}),(0,o.jsx)(Fd,{height:"2"}),a(n)?n.map((t,n)=>(0,o.jsxs)(r.Fragment,{children:[0!==n&&(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(Kg,{change:e.change,options:e.options,position:t,positionsIds:e.positionsIds,prefix:e.prefix})]},t.id)):(0,o.jsx)(Rh,{imageSrc:_u.WeezeventBlankPerson,subtitle:t("this_may_be_bec_43194"),title:t("no_items_are_cu_47996")}),i&&(0,o.jsx)(Sg,{description:e.category.description,name:e.category.name,onClose:()=>{s(!1)}})]})},Zg=e=>{const{translate:t}=Id(),n=(0,r.useMemo)(()=>(0,Uo.A)(e.categories,e=>e.name),[e.categories]);return(0,o.jsx)(o.Fragment,{children:a(n)?n.map((t,n)=>(0,o.jsxs)(r.Fragment,{children:[0!==n&&(0,o.jsx)(Fd,{height:"6"}),(0,o.jsx)(Yg,{category:t,change:e.change,options:e.options,positionsIds:e.positionsIds,prefix:e.prefix,slots:e.slots,userInfoFields:e.userInfoFields})]},t.id)):(0,o.jsx)(Rh,{imageSrc:_u.WeezeventBlankPerson,subtitle:t("this_may_be_bec_43194"),title:t("no_items_are_cu_47996")})})},Jg=e=>{const t=Yt(),n=(0,r.useMemo)(()=>(0,Uo.A)(e.categories,e=>e.name).map(e=>(0,o.jsx)("option",{value:e.id,children:e.name},e.id)),[e.categories]);return(0,o.jsxs)(o.Fragment,{children:[a(n)?(0,o.jsxs)(bg,{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,o.jsx)("option",{value:-1,children:t("choisir_une_mis_90627")}),n]}):(0,o.jsx)(Rh,{imageSrc:_u.WeezeventBlankPerson,subtitle:t("this_may_be_bec_43194"),title:t("no_items_are_cu_47996")}),e.index!==e.options.positionLimit-1&&(0,o.jsx)(Fd,{height:"4"})]})},Xg=e=>{const t=Yt(),n=(0,r.useMemo)(()=>e.categories.flatMap(t=>(0,Uo.A)(t.positions.filter(t=>bh(t,e.userInfoFields,e.slots,e.options)),e=>e.name).map(e=>(0,o.jsx)("option",{value:e.id,children:e.name},e.id))),[e.categories]);return(0,o.jsxs)(o.Fragment,{children:[a(n)?(0,o.jsxs)(bg,{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,o.jsx)("option",{value:-1,children:t("choisir_une_mis_90627")}),n]}):(0,o.jsx)(Rh,{imageSrc:_u.WeezeventBlankPerson,subtitle:t("this_may_be_bec_43194"),title:t("no_items_are_cu_47996")}),e.index!==e.options.positionLimit-1&&(0,o.jsx)(Fd,{height:"4"})]})},Qg=e=>{const{translate:t}=Id();return(0,o.jsx)(o.Fragment,{children:a(e.categories)?(0,Xs.A)(0,e.options.positionLimit).map(t=>e.options.positionDisplay===Ae.Category?(0,o.jsx)(Jg,{categories:e.categories,change:e.change,index:t,options:e.options,positionsCategoriesIds:e.positionsCategoriesIds,prefix:e.prefix},t):(0,o.jsx)(Xg,{categories:e.categories,change:e.change,index:t,options:e.options,positionsIds:e.positionsIds,prefix:e.prefix,slots:e.slots,userInfoFields:e.userInfoFields},t)):(0,o.jsx)(Rh,{imageSrc:_u.WeezeventBlankPerson,subtitle:t("this_may_be_bec_43194"),title:t("no_items_are_cu_47996")})})},ep=r.createContext({}),tp=e=>{const[t,n]=r.useState(!1),[i,s]=r.useState(null),[a,c]=r.useState(null);return(0,o.jsx)(ep.Provider,{value:{isVisible:t,referenceElement:i,popperElement:a,setIsVisible:n,setReferenceElement:s,setPopperElement:c},children:e.children})};function np(){return r.useContext(ep)}const ip=e=>{const{isVisible:t,referenceElement:n,popperElement:i,setPopperElement:s}=np(),{styles:a,attributes:c,update:l}=(0,Ym.E)(n,i,{placement:e.placement,modifiers:[{name:"offset",options:{offset:[0,4]}}]});r.useEffect(()=>{l?.()},[t,n]);const d=(0,o.jsx)(Dn,{ref:s,align:"center",css:{background:"$gray900",borderRadius:"$1",color:"white",display:t?"flex":"none",px:"$3",py:"6px",zIndex:1e3,...a.popper},justify:"center",...c.popper,children:e.children});return e.renderOnPortal?(0,Kn.createPortal)(d,document.body):d},op=e=>{const{setIsVisible:t,setReferenceElement:n}=np(),i=r.cloneElement(r.Children.only(e.children),{ref(e){n(e)},onMouseEnter(){t(!0)},onMouseLeave(){t(!1)},onFocus(){t(!0)},onBlur(){t(!1)}});return(0,o.jsx)(o.Fragment,{children:i})},rp=e=>{const{translate:t}=Id(),{rangeString:n,finalName:i,isRenamed:s}=function(e){const t=Kt(sa),n=(0,r.useMemo)(()=>t.toDisplayString(e.range,{formats:{displayWeekday:!0}}),[e]),i=an(e.name);return{isRenamed:i,finalName:i?e.name:n,rangeString:n}}(e.slot),a=(0,r.useMemo)(()=>{if(e.options.willAutoAssign){const t=e.allSlots.filter(t=>e.positionsSlotsIds.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]);return(0,o.jsxs)(r.Fragment,{children:[0!==e.index&&(0,o.jsx)(Fd,{height:"3"}),a?(0,o.jsxs)(tp,{children:[(0,o.jsx)(op,{children:(0,o.jsx)(xn,{children:(0,o.jsx)(Qh,{disabled:!0,shouldPreventDefault:!1,state:e.positionsSlotsIds.includes(e.slot.id)?"checked":"unchecked",subtext:s?n:void 0,onClick:uu.A,children:i})})}),(0,o.jsx)(ip,{placement:"top-start",children:t("ce_cr_neau_en_c_55775")})]}):(0,o.jsx)(Qh,{state:e.positionsSlotsIds.includes(e.slot.id)?"checked":"unchecked",subtext:s?n:void 0,onClick:t=>{e.change(`${e.prefix}positionsSlotsIds`,l(e.positionsSlotsIds,e.slot.id,"checked"===t))},children:i})]},e.slot.id)},sp=e=>{const{translate:t}=Id(),n=(0,r.useMemo)(()=>(0,Uo.A)(e.position.slots.filter(t=>ph(t,e.slots,e.options)),[e=>e.range.start.toMillis(),e=>e.nameOrRange]),[e.position,e.slots,e.options]),[i,s]=(0,r.useState)(!1),c=an(e.position.description)&&e.options.showPositionDescription;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"2"}),(0,o.jsxs)(Dn,{align:"center",gap:"2",children:[(0,o.jsx)(xn,{color:"gray900",fontWeight:"semiBold",children:e.position.name}),c&&(0,o.jsx)(xn,{color:"gray700",onClick:()=>{s(!0)},children:(0,o.jsx)(Mn,{icon:"circle-info"})})]}),(0,o.jsx)(Fd,{height:"2"}),a(n)?n.map((t,n)=>(0,o.jsx)(rp,{allSlots:e.allSlots,change:e.change,index:n,options:e.options,positionsSlotsIds:e.positionsSlotsIds,prefix:e.prefix,slot:t},t.id)):(0,o.jsx)(Rh,{imageSrc:_u.WeezeventBlankPerson,subtitle:t("this_may_be_bec_43194"),title:t("no_items_are_cu_47996")}),i&&(0,o.jsx)(Sg,{description:e.position.description,name:e.position.name,onClose:()=>{s(!1)}})]})},ap=e=>{const{translate:t}=Id(),n=(0,r.useMemo)(()=>(0,Uo.A)(e.category.positions.filter(t=>bh(t,e.userInfoFields,e.slots,e.options)),e=>e.name),[e.category,e.userInfoFields,e.slots,e.options]),[i,s]=(0,r.useState)(!1),c=an(e.category.description)&&e.options.showPositionCategoryDescription;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(Dn,{align:"center",gap:"2",children:[(0,o.jsx)(xn,{color:"gray500",css:{textTransform:"uppercase"},fontSize:"textXs",fontWeight:"semiBold",children:e.category.name}),c&&(0,o.jsx)(xn,{color:"gray700",onClick:()=>{s(!0)},children:(0,o.jsx)(Mn,{icon:"circle-info"})})]}),a(n)?n.map(t=>(0,o.jsx)(sp,{allSlots:e.allSlots,change:e.change,options:e.options,position:t,positionsSlotsIds:e.positionsSlotsIds,prefix:e.prefix,slots:e.slots},t.id)):(0,o.jsx)(Rh,{imageSrc:_u.WeezeventBlankPerson,subtitle:t("this_may_be_bec_43194"),title:t("no_items_are_cu_47996")}),i&&(0,o.jsx)(Sg,{description:e.category.description,name:e.category.name,onClose:()=>{s(!1)}})]})},cp=e=>{const{translate:t}=Id(),n=(0,r.useMemo)(()=>(0,Uo.A)(e.categories,e=>e.name),[e.categories]),i=(0,r.useMemo)(()=>e.categories.flatMap(e=>e.positions.flatMap(e=>e.slots)),[e.categories]);return(0,o.jsx)(o.Fragment,{children:a(n)?n.map((t,n)=>(0,o.jsxs)(r.Fragment,{children:[0!==n&&(0,o.jsx)(Fd,{height:"7"}),(0,o.jsx)(ap,{allSlots:i,category:t,change:e.change,options:e.options,positionsSlotsIds:e.positionsSlotsIds,prefix:e.prefix,slots:e.slots,userInfoFields:e.userInfoFields},t.id)]},t.id)):(0,o.jsx)(Rh,{imageSrc:_u.WeezeventBlankPerson,subtitle:t("this_may_be_bec_43194"),title:t("no_items_are_cu_47996")})})},lp=e=>{const t=(0,r.useMemo)(()=>(0,Uo.A)(e.event.positionsCategories.filter(t=>{return n=t,i=e.slots,o=e.userInfoFields,!(r=e.options).hiddenPositionsCategoriesIds.includes(n.id)&&(0===r.displayedPositionsCategoriesIds.length||r.displayedPositionsCategoriesIds.includes(n.id))&&n.positions.some(e=>bh(e,o,i,r));var n,i,o,r}),e=>(0,dh.A)(e.positions.flatMap(e=>e.slots.flatMap(e=>e.range.start.toMillis())))),[e.event.positionsCategories,e.slots,e.userInfoFields,e.options]);if(e.options.positionRanking===X.Ranked)return(0,o.jsx)(Qg,{categories:t,change:e.change,options:e.options,positionsCategoriesIds:e.positionsCategoriesIds,positionsIds:e.positionsIds,prefix:e.prefix,slots:e.slots,userInfoFields:e.userInfoFields});switch(e.options.positionDisplay){case Ae.Category:return(0,o.jsx)(Hg,{categories:t,change:e.change,options:e.options,positionsCategoriesIds:e.positionsCategoriesIds,prefix:e.prefix});case Ae.Position:return(0,o.jsx)(Zg,{categories:t,change:e.change,options:e.options,positionsIds:e.positionsIds,prefix:e.prefix,slots:e.slots,userInfoFields:e.userInfoFields});case Ae.Slot:return(0,o.jsx)(cp,{categories:t,change:e.change,options:e.options,positionsSlotsIds:e.positionsSlotsIds,prefix:e.prefix,slots:e.slots,userInfoFields:e.userInfoFields});case Ae.None:return null;default:return Br(e.options.positionDisplay)}},dp=e=>{const t=Yt(),{data:n,loader:i}=Jt("query FormMissions($eventId: EventId!) {\n event: eventPublic(id: $eventId) {\n positionsCategories {\n ...FormRegisterCategory\n }\n }\n}\n",{eventId:e.eventId},[ji.FormRegisterCategoryFragment]);return i||(0,o.jsxs)(o.Fragment,{children:[an(e.form.positionSubtitle)?(0,o.jsx)(Ig,{text:e.renderText(e.form.positionSubtitle,e.userInfoFields)}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(xn,{font:"gray800 textMd semiBold",children:t("s_lectionnez_vo_83925")}),(0,o.jsx)(Fd,{height:"1"}),(0,o.jsx)(xn,{color:"gray500",children:t("s_lectionnez_le_37648")})]}),(0,o.jsx)(Fd,{height:"6"}),(0,o.jsx)(Kd,{}),(0,o.jsx)(lp,{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,o.jsx)(Fd,{height:"7"}),(0,o.jsx)(Dn,{children:(0,o.jsx)(Un,{onClick:e.handleSubmit,children:e.isFinalStep?e.registerButtonText:t("suivant_62774")})})]})};function up(e,t,n,i){const o=t.diff(e,"days").days;return(0,Xs.A)(0,o+1).map(t=>e.plus({days:t})).filter(e=>i===ve.AllDays||n.some(t=>t.contains(e)||t.start.startOf("day").equals(e)||t.end.startOf("day").equals(e)))}function hp(e,t,n,i,o){const r=t.diff(e,"days").days;return(0,Xs.A)(0,r+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,r]=e.endTime.split(":").map(e=>parseInt(e,10)),s=i.set({hour:t,minute:n});let a=i.set({hour:o,minute:r});return(oo===ve.AllDays||i.some(t=>t.overlaps(e.interval)))}function mp(e,t){return an(e)?`${e} (${t.toFormat("HH:mm")})`:t.toFormat("HH:mm")}function gp(e,t,n){const i=e.filter(e=>!t.equals(zi(e)));return i.length===e.length&&n?[...e,$i(t)]:i.length===e.length||n?e:i}const pp=e=>{const t=(0,r.useMemo)(()=>up(e.startAt,e.endAt,e.ranges,e.daysDisplay),[e.startAt,e.endAt,e.ranges,e.daysDisplay]),n=(0,r.useMemo)(()=>(0,uh.A)(t,e=>e.toMillis()),[t]),i=(0,r.useMemo)(()=>(0,hh.A)(t,e=>e.toMillis()),[t]),s=(0,r.useMemo)(()=>Math.ceil(i.endOf("month").diff(n.startOf("month"),"months").months),[n,i]),a=(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=>$i(xi.IX.fromDateTimes(e,e.plus({day:1})))));e.change(`${e.prefix}slots`,i)},[e.currentSlots,e.prefix,e.change]);return(0,o.jsx)(Dn,{gap:"6",wrap:"wrap",children:(0,Xs.A)(0,s).map(t=>{const r=n.plus({month:t}).startOf("month"),c=0===t?n:r,l=t===s-1?i:r.endOf("month"),d=e.currentSlots.flatMap(e=>e.startDate.year===r.year&&e.startDate.month===r.month?[e.startDate.startOf("day")]:[]);return(0,o.jsx)(Dg,{firstDayOfMonth:r,max:l,min:c,values:d,onChange:e=>{a(r,e)}},t)})})},fp=e=>{const{intervals:t,minDate:n,maxDate:i,numberOfMonths:s}=(0,r.useMemo)(()=>{const t=e.intervalsGrouped.flatMap(([e,t])=>t.map(({interval:e})=>e)),n=(0,uh.A)(t,e=>e.start.toMillis()).start.startOf("day"),i=(0,hh.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]),a=t.flatMap(t=>e.isSelected(t)?[t.start.startOf("day")]:[]);return(0,o.jsx)(Dn,{gap:"6",wrap:"wrap",children:(0,Xs.A)(0,s).map(r=>{const c=n.plus({month:r}).startOf("month"),l=0===r?n:c,d=r===s-1?i:c.endOf("month"),u=a.filter(e=>e.month===c.month&&e.year===c.year);return(0,o.jsx)(Dg,{firstDayOfMonth:c,max:d,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[]}))})(c,n)}},r)})})},_p=e=>{const[t,n]=(0,r.useState)(e.intervals.some(({interval:t})=>e.isSelected(t))?"checked":"unchecked"),i=(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,o.jsxs)(Dn,{css:{border:"1px solid $gray200",borderRadius:"$1",boxShadow:"$xs"},direction:"column",children:[(0,o.jsxs)(Dn,{align:"center",css:{cursor:"pointer",padding:"$4 $5"},gap:"2",onClick:i,children:[(0,o.jsx)(xn,{color:"gray900",fontSize:"textXs",children:(0,o.jsx)(Mn,{icon:"checked"===t?"chevron-down":"chevron-right"})}),(0,o.jsx)(xn,{font:"gray800 textSm medium",children:e.day})]}),"checked"===t&&(0,o.jsx)(Dn,{css:{borderTop:"1px solid $gray200",padding:"$4 $5"},direction:"column",gap:"3",children:e.intervals.map(({name:t,interval:n},i)=>(0,o.jsx)(Qh,{state:e.isSelected(n)?"checked":"unchecked",onClick:t=>{e.setSelected(n,"checked"===t)},children:mp(t,n)},i))})]})},bp=e=>(0,o.jsx)(Dn,{css:{border:"1px solid $gray200",borderRadius:"$1",boxShadow:"$xs",padding:"$4 $5"},direction:"column",gap:"3",children:e.intervalsGrouped.map(([t,[{name:n,interval:i}]],r)=>{const s=`${n} ${i.toFormat("HH:mm")}`.trim(),a=`${t} ${e.hideNameDates?"":`(${s})`}`.trim();return(0,o.jsx)(Qh,{state:e.isSelected(i)?"checked":"unchecked",onClick:t=>{e.setSelected(i,"checked"===t)},children:a},r)})}),kp=({customSlotPeriod:e,daysDisplay:t,event:n,isSelected:i,setSelected:s,setSelectedBatch:a})=>{const c=Kt(is),l=(0,r.useMemo)(()=>hp(e.startDate??n.startAt,e.endDate??n.endAt,e.customSlots,n.ranges,t),[e,n,t]),d=(0,r.useMemo)(()=>(0,Uo.A)(Object.entries((0,lh.A)(l,({interval:e})=>c.toLocaleString(e.start.startOf("day"),Bi.DateOnly.WeekdayLongMonthLong))),([e,[{interval:t}]])=>t.start.startOf("day").toMillis()),[l]);return(0,o.jsxs)(Dn,{direction:"column",gap:"2",width:1,children:[an(e.name)&&(0,o.jsx)(xn,{font:"gray900 textSm semiBold",children:e.name}),1===e.customSlots.length?0===d.length?null:e.displayAsCalendar?(0,o.jsx)(fp,{intervalsGrouped:d,isSelected:i,setSelectedBatch:a}):(0,o.jsx)(bp,{hideNameDates:e.hideNameDates,intervalsGrouped:d,isSelected:i,setSelected:s}):d.map(([e,t],n)=>(0,o.jsx)(_p,{day:e,intervals:t,isSelected:i,setSelected:s},n))]})},vp=e=>{const t=(0,r.useMemo)(()=>e.customSlotsPeriods.flatMap(t=>hp(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,i]=(0,r.useState)(Object.fromEntries(t.map(t=>{const n=e.currentSlots.some(e=>zi(e).equals(t));return[t.toISO(),n]}))),s=(0,r.useCallback)(e=>n[e.toISO()],[n]),a=(0,r.useCallback)((t,n)=>{const o=t.toISO();i(e=>({...e,[o]:n})),e.change(`${e.prefix}slots`,gp(e.currentSlots,t,n))},[e.currentSlots,i]),c=(0,r.useCallback)(t=>{const n=t.reduce((e,{interval:t,isSelected:n})=>{const o=t.toISO();return i(e=>({...e,[o]:n})),gp(e,t,n)},e.currentSlots);e.change(`${e.prefix}slots`,n)},[e.currentSlots,i]);return(0,o.jsx)(o.Fragment,{children:e.customSlotsPeriods.map((t,n)=>(0,o.jsxs)(r.Fragment,{children:[0!==n&&(0,o.jsx)(Fd,{height:"6"}),(0,o.jsx)(kp,{customSlotPeriod:t,daysDisplay:e.daysDisplay,event:e.event,isSelected:s,setSelected:a,setSelectedBatch:c})]},n))})},Ap=e=>{const{translate:t}=Id(),n=(0,r.useMemo)(()=>up(e.startAt,e.endAt,e.ranges,e.daysDisplay),[e.startAt,e.endAt,e.ranges,e.daysDisplay]),i=(0,r.useMemo)(()=>n.filter(t=>(e.blockedSlots??[]).some(e=>Ni(e,t))),[e.blockedSlots,n]),s=Kt(is),[a,c]=(0,r.useState)(Object.fromEntries(n.map((t,n)=>{const i=xi.IX.fromDateTimes(t,t.plus({day:1}));return[`day${n}`,void 0!==e.currentSlots.find(e=>zi(e).equals(i))]})));return(0,o.jsx)(o.Fragment,{children:n.map((n,l)=>{const d=i.includes(n);return(0,o.jsxs)(r.Fragment,{children:[0!==l&&(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(Qh,{disabled:d,state:a[`day${l}`]?"checked":"unchecked",onClick:t=>{c({...a,[`day${l}`]:"checked"===t}),e.change(`${e.prefix}slots`,gp(e.currentSlots,xi.IX.fromDateTimes(n,n.plus({day:1})),"checked"===t))},children:d?(0,o.jsxs)(tp,{children:[(0,o.jsx)(op,{children:(0,o.jsx)(na,{children:s.toLocaleString(n,Bi.DateOnly.WeekdayLongMonthLong)})}),(0,o.jsx)(ip,{placement:"right",children:t("vous_avez_d_j_92810")})]}):s.toLocaleString(n,Bi.DateOnly.WeekdayLongMonthLong)})]},l)})})};var yp=n(3088);const wp=e=>(0,o.jsxs)(Dn,{css:{background:"$gray50",borderRadius:"$1",padding:"$6"},direction:"column",gap:"4",width:1,children:[(0,o.jsxs)(Dn,{align:"center",gap:"4",children:[(0,o.jsx)(xn,{css:{flex:"1",textTransform:"uppercase"},font:"gray800 textXs semiBold",children:e.title}),e.buttons]}),e.children]}),Cp=e=>{const t=Yt();return(0,o.jsx)(wp,{buttons:(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(xn,{children:(0,o.jsx)(Un,{color:"white",leftIcon:"trash-can",size:"sm",onClick:e.remove})})}),title:t("disponibilit_n_50484",e.index+1),children:(0,o.jsxs)(Dn,{direction:{"@initial":"column","@desktop":"row"},gap:"4",children:[(0,o.jsx)(im,{label:t("date_de_d_but_43380"),max:e.max,min:e.min,name:`${e.prefix}startDate`}),(0,o.jsx)(am,{label:t("heure_de_d_but_27566"),name:`${e.prefix}startTime`}),(0,o.jsx)(im,{label:t("date_de_fin_86920"),max:e.max,min:e.min,name:`${e.prefix}endDate`}),(0,o.jsx)(am,{label:t("heure_de_fin_95071"),name:`${e.prefix}endTime`})]})})},Ip=e=>{const t=Yt(),n=Kt(ks),i=(0,r.useMemo)(()=>e.max.endOf("day"),[e.max]);return(0,o.jsx)(yp.ED,{name:`${e.prefix}slots`,children:({fields:s})=>(0,o.jsxs)(o.Fragment,{children:[s.map((t,n)=>(0,o.jsxs)(r.Fragment,{children:[0!==n&&(0,o.jsx)(Fd,{height:"4"}),(0,o.jsx)(Cp,{index:n,max:i,min:e.min,prefix:`${t}.`,remove:()=>{s.remove(n)}})]},n)),(0,o.jsx)(Fd,{height:"4"}),(0,o.jsx)(Un,{color:"invisible",leftIcon:"plus",onClick:()=>{s.push(n.volunteersRegistrationsSlotInputDefault(e.min))},children:t("ajouter_une_dis_96540")})]})})},xp=e=>{switch(e.slotDisplay){case we.Display:return(0,o.jsx)(Ip,{max:e.event.endAt,min:e.event.startAt,prefix:e.prefix});case we.DisplayDays:return(0,o.jsx)(Ap,{blockedSlots:e.blockedSlots,change:e.change,currentSlots:e.currentSlots,daysDisplay:e.daysDisplay,endAt:e.event.endAt,prefix:e.prefix,ranges:e.event.ranges,startAt:e.event.startAt});case we.Calendar:return(0,o.jsx)(pp,{change:e.change,currentSlots:e.currentSlots,daysDisplay:e.daysDisplay,endAt:e.event.endAt,prefix:e.prefix,ranges:e.event.ranges,startAt:e.event.startAt});case we.Custom:return(0,o.jsx)(vp,{change:e.change,currentSlots:e.currentSlots,customSlotsPeriods:e.customSlotsPeriods,daysDisplay:e.daysDisplay,event:e.event,prefix:e.prefix});case we.Hide:return null;default:return Br(e.slotDisplay)}},Sp=e=>{const t=Yt(),{data:n,loader:i}=Jt("query FormSlots($organizationId: OrganizationId!, $eventId: EventId!, $formId: FormId!) {\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 ranges(formId: $formId)\n }\n}\n",{organizationId:e.organizationId,formId:e.formId,eventId:e.eventId},[ji.FormRegisterCustomSlotPeriodFragment]);return i||(0,o.jsxs)(o.Fragment,{children:[an(e.form.slotSubtitle)?(0,o.jsx)(Ig,{text:e.renderText(e.form.slotSubtitle,e.userInfoFields)}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(xn,{font:"gray800 textMd semiBold",children:t("s_lectionnez_vo_77037")}),(0,o.jsx)(Fd,{height:"1"}),(0,o.jsx)(xn,{color:"gray500",children:t("vos_disponibili_52929")})]}),(0,o.jsx)(Fd,{height:"6"}),(0,o.jsx)(Kd,{}),(0,o.jsx)(xp,{change:e.change,currentSlots:e.currentSlots,customSlotsPeriods:n.organization.form.customSlotsPeriods,daysDisplay:e.form.daysDisplay,event:n.event,prefix:"formRegister.",slotDisplay:e.form.slotDisplay}),(0,o.jsx)(Fd,{height:"7"}),(0,o.jsx)(Dn,{children:(0,o.jsx)(Un,{onClick:e.handleSubmit,children:e.isFinalStep?e.registerButtonText:t("suivant_62774")})})]})};function Ep(){const[e,t]=(0,r.useState)(!1);return{isLoading:e,copy:(0,r.useCallback)(e=>{t(!0),function(e){const t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="absolute",t.style.left="-9999px",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)}(e),setTimeout(()=>t(!1),500)},[])}}var jp=n(1932);const Tp=e=>{const t=Yt();return(0,o.jsxs)(Dn,{direction:"column",gap:"2",children:[(0,o.jsx)(xn,{font:"gray800 textSm semiBold",css:{textTransform:"uppercase"},children:t("invitation_n_1_64964",e.index+1)}),(0,o.jsx)(cu,{label:t("adresse_e_mail_60930"),isEmail:!0,value:e.email,onChange:e.onChange})]})},Dp=({eventId:e,form:t,formId:n,formRegisterResult:i,organizationId:s})=>{const a=Yt(),{mutate:c,isLoading:l}=function(e={}){return Xt("mutation EmailFormInviteSend(\n $organizationId: OrganizationId!\n $eventId: EventId!\n $formId: FormId!\n $teamCode: TeamCode!\n $emails: [UserEmail!]!\n) {\n emailFormInviteSend(\n organizationId: $organizationId\n eventId: $eventId\n formId: $formId\n teamCode: $teamCode\n emails: $emails\n )\n}\n",e)}(),{isLoading:d,copy:u}=Ep(),h=uc({organizationId:s,eventId:e,formId:n,teamCode:i?.teamCode}),[m,g]=(0,r.useState)([""]),p=t.maxTeamMembers&&m.length>=t.maxTeamMembers-1,f=gu(),_=(0,r.useCallback)(async()=>{await c({organizationId:s,eventId:e,formId:n,teamCode:i?.teamCode??"",emails:m})},[m,c,i]);return(0,o.jsxs)(Dn,{css:{background:"$gray50",bd:!0,padding:"$6"},direction:{"@initial":"column","@desktop":"row"},gap:"3",children:[(0,o.jsx)(xn,{color:"gray800",fontSize:"textXl",children:(0,o.jsx)(Mn,{icon:"circle-exclamation"})}),(0,o.jsxs)(Dn,{direction:"column",width:1,children:[(0,o.jsx)(xn,{font:"gray800 textMd semiBold",children:a("vous_souhaitez_73288")}),(0,o.jsx)(Fd,{height:"1"}),(0,o.jsx)(xn,{color:"gray800",children:a("inviter_vos_qu_82288")}),(0,o.jsx)(Fd,{height:"5"}),(0,o.jsx)(xn,{font:"gray800 textSm semiBold",children:a("FormLink")}),(0,o.jsx)(Fd,{height:"2"}),(0,o.jsxs)(Dn,{direction:{"@initial":"column","@desktop":"row"},gap:"2",width:1,children:[(0,o.jsx)(Dn,{align:"center",css:{background:"white",border:"1px solid $gray300",borderRadius:"$1",color:"$gray800",flex:f?"1":void 0,px:"$3"},height:40,children:(0,o.jsx)(xn,{css:{ellipsis:!0},width:1,children:h})}),(0,o.jsx)(Dn,{children:(0,o.jsx)(Un,{isLoading:d,leftIcon:"copy",onClick:()=>{u(h)},children:a("copier_le_lien_54974")})})]}),(0,o.jsx)(Fd,{height:"6"}),(0,o.jsx)(xn,{font:"gray800 textSm semiBold",children:a("invitations_32350")}),(0,o.jsx)(Fd,{height:"2"}),(0,o.jsxs)(Dn,{css:{background:"white",bd:!0,padding:"$6"},direction:"column",gap:"4",children:[m.map((e,t)=>(0,o.jsx)(Tp,{email:e,index:t,onChange:e=>{g((0,jp.jM)(n=>{n[t]=e}))}},t)),!p&&(0,o.jsxs)(xn,{color:"primary700",css:{cursor:"pointer"},onClick:()=>{g(m.concat([""]))},children:["+ ",a("ajouter_une_inv_21322")]})]}),(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(Dn,{children:(0,o.jsx)(Un,{isLoading:l,onClick:_,children:a("envoyer_les_inv_50560")})})]})]})},Pp=e=>{const t=Yt();return(0,o.jsxs)(o.Fragment,{children:[an(e.form.successMessage)?(0,o.jsx)(Ig,{text:e.renderText(e.form.successMessage,e.userInfoFields)}):(0,o.jsx)(xn,{height:250,width:1,children:(0,o.jsx)(Rh,{imageSrc:_u.Done,title:t("merci_70020")})}),e.form.areTeamsAllowed&&(0,o.jsx)(Dp,{eventId:e.eventId,form:e.form,formId:e.formId,formRegisterResult:e.formRegisterResult,organizationId:e.organizationId})]})};function Rp(e,t){return{flex:t?"1 1 0":e?"0 0 0":"1",minWidth:t?`${t}px`:e?`${e}px`:void 0}}const Op=r.forwardRef((e,t)=>(0,o.jsx)(Dn,{ref:t,align:"center",className:"table-cell",css:{...Rp(e.width,e.minWidth),color:"$gray800",overflow:"hidden",px:"$3",...e.css},height:1,role:"gridcell",onClick:t=>{e.onClick&&e.onClick(t)},...(0,En.A)(e,["direction","align","justify","wrap","gap"]),children:e.children}));Op.displayName="Cell";const Fp=e=>(0,o.jsx)(Dn,{align:"center",className:"table-header-cell",css:{...Rp(e.width,e.minWidth),color:"$gray500",overflow:"hidden",px:"$3",...e.css},height:1,role:"columnheader",tabIndex:0,onClick:()=>{e.onClick?.()},...(0,En.A)(e,["aria-label","direction","align","justify","wrap","gap"]),children:e.children}),zp=e=>(0,o.jsx)(Dn,{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}),Mp=r.createContext({}),$p=e=>{const[t,n]=r.useState(null);return(0,o.jsx)(Mp.Provider,{value:{clickedRowIndex:t,setClickedRowIndex:n},children:e.children})},Np=e=>{const{setClickedRowIndex:t}=r.useContext(Mp);return(0,o.jsx)(Dn,{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})},Bp=e=>(0,o.jsx)($p,{children:(0,o.jsx)(Dn,{className:!0===e.hideBorder?"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"},...e.css},direction:"column",children:e.children})}),Lp=e=>{const t=Yt(),n=Kt(is),i=Kt(sa),s=(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]),c=(0,r.useCallback)(t=>{switch(e.slotDisplay){case we.Calendar:case we.DisplayDays:return n.toLocaleString(t.start,Bi.DateOnly.WeekdayLongMonthLong);case we.Custom:case we.Display:return i.toDisplayString(t,{formats:{displayWeekday:!0}});case we.Hide:return null;default:return Br(e.slotDisplay)}},[e.slotDisplay]);return(0,o.jsxs)(o.Fragment,{children:[a(e.team.slots)&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Dn,{css:{background:"white",border:"1px solid $gray200",borderBottom:"none",borderTopLeftRadius:"$2",borderTopRightRadius:"$2",padding:"$5 $6"},children:(0,o.jsx)(xn,{font:"gray900 textMd medium",children:t("disponibilit_s_49923")})}),(0,o.jsxs)(Bp,{children:[(0,o.jsx)(zp,{css:{borderRadius:"0 !important"},children:(0,o.jsx)(Fp,{children:t("Date")})}),e.team.slots.map((e,t)=>(0,o.jsx)(Np,{children:(0,o.jsx)(Op,{css:{textTransform:"capitalize"},children:c(e.range)})},t))]}),(0,o.jsx)(Fd,{height:"6"})]}),a(s)&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Dn,{css:{background:"white",border:"1px solid $gray200",borderBottom:"none",borderTopLeftRadius:"$2",borderTopRightRadius:"$2",padding:"$5 $6"},children:(0,o.jsx)(xn,{font:"gray900 textMd medium",children:t("missions_souhai_23225")})}),(0,o.jsxs)(Bp,{children:[(0,o.jsx)(zp,{css:{borderRadius:"0 !important"},children:(0,o.jsx)(Fp,{children:t("Position")})}),s.map((e,t)=>(0,o.jsx)(Np,{children:(0,o.jsx)(Op,{children:e.name})},t))]}),(0,o.jsx)(Fd,{height:"6"})]}),(0,o.jsx)(Ag,{name:`formRegister.userInfo.fields.form${e.formId}`,label:(0,o.jsx)(Hh,{children:t("commentaire_r_12290")})})]})},Vp=e=>{const{data:t,loader:n}=Jt("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,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Lp,{formId:e.formId,slotDisplay:e.slotDisplay,team:t.event.team}),(0,o.jsx)(Fd,{height:"7"}),(0,o.jsx)(Dn,{children:(0,o.jsx)(Un,{onClick:e.handleSummit,children:e.registerButtonText})})]})},Up=r.forwardRef((e,t)=>{const n=gu(),i=Math.min(Math.round(360*window.screen.width/1170),360);return(0,o.jsx)(xn,{ref:t,css:{background:"$gray50",overflowY:"auto"},height:1,width:1,children:(0,o.jsxs)(Dn,{align:"center",direction:"column",width:1,children:[n&&(0,o.jsx)(Fd,{height:"10"}),e.bannerUrl&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(xn,{css:{background:`url(${e.bannerUrl}) no-repeat`,backgroundSize:"cover",height:`${i}px`,width:"100%","@desktop":{borderRadius:"$1",boxShadow:"$xs",width:"$container"}}}),(0,o.jsx)(Fd,{height:{"@initial":"6","@tablet":"7","@desktop":"9"}})]}),e.children]})})});Up.displayName="FormContainer";const Gp=e=>{const t=Yt();return(0,o.jsxs)(Up,{bannerUrl:e.bannerUrl,children:[(0,o.jsx)(Lg,{canSelect:!1,isCompleted:!1,isOpen:!0,number:1,title:an(e.closedTitle)?e.closedTitle:t("formulaire_cl_t_92617"),onSelect:uu.A,children:an(e.closedMessage)?(0,o.jsx)(Ig,{text:e.closedMessage}):(0,o.jsx)(xn,{height:250,width:1,children:(0,o.jsx)(Rh,{imageSrc:_u.Done,title:t("ce_formulaire_a_73045")})})}),(0,o.jsx)(Fd,{height:"9"})]})},Wp=e=>{const t=Yt(),{organizationId:n,eventId:i,formId:s}=Qt(),a=Kt(wc),c=Kt(sr),{user:l}=Ro(),{mutate:d}=vo(),u=(0,r.useCallback)(async t=>{if(!e.isPreview){const{userCreate:n}=await co(uo,{token:t});await e.onSuccess(n.email,t)}},[e.onSuccess]),[h,m]=(0,r.useState)(null),[g,p]=(0,r.useState)(!1),[f,_]=(0,r.useState)(0),[b,k]=(0,r.useState)(!1),[v,A]=(0,r.useState)(Date.now()),y=()=>{location.reload()};return(0,o.jsx)(Xd,{direction:"column",align:"center",width:1,hideDefaultErrors:!0,initialValues:{email:l?.email,emailConfirm:l?.email,code:""},validate:e=>g?a.validateForForm(c.emailCodeSchema())(e):a.validateForForm(c.emailConfirmSchema())(e),onSubmit:async o=>{if(!e.isPreview){if(an(o.code)){const{user:e,callbacks:n}=h;return so({code:o.code,user:e,callbacks:n}).then(u,e=>{if("RETRY"===e.type)return _(f+1),{code:t("le_code_n_est_p_95065",3-(f+1))};{let n;return ao(e.message,o.email,v),k(!0),n=xi.dw.fromMillis(Date.now()-v).as("minutes")>3?t("le_code_a_expir_45975"):t("le_code_n_est_p_12317"),{FORM_ERROR:n}}})}if(l?.email===o.email)await u(await to());else{await io().catch(()=>!0);const{userExists:t}=await(r={email:o.email},co("query UserExists($email: UserEmail!) {\n userExists(email: $email)\n}\n",{variables:r,token:void 0,fragments:[]}));if(t){await d({loginCodeEmail:{email:o.email,organizationId:n,eventId:i,formId:s,source:re.VolunteerRegister}}),A(Date.now());const e=await ro(o.email,uu.A,uu.A);m(e),p(!0)}else await e.onSuccess(o.email)}}var r},render:({handleSubmit:n,submitting:i,values:r})=>(0,o.jsxs)(Lg,{canSelect:!1,isCompleted:!e.isOpen,isOpen:e.isOpen,number:"1",title:an(e.emailTitle)?e.emailTitle:t("Email"),onSelect:uu.A,children:[(0,o.jsx)(Kd,{}),an(e.description)&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Ig,{text:e.description}),(0,o.jsx)(Fd,{height:"4"})]}),(0,o.jsx)(lu,{autoComplete:"email",label:t("Email"),name:"email",isEmail:!0,state:g||b?"disabled":void 0}),(0,o.jsx)(Fd,{height:"4"}),(0,o.jsx)(lu,{autoComplete:"email",label:t("confirmation_de_51185"),name:"emailConfirm",isEmail:!0,state:g||b?"disabled":void 0}),g&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"7"}),(0,o.jsxs)(Bd,{color:"gray",leftIcon:"circle-exclamation",children:[(0,o.jsx)(xn,{children:t("un_code_6_chi_33026",r.email)}),(0,o.jsx)(xn,{css:{fontStyle:"italic"},children:t("attention_ne_16312")})]}),(0,o.jsx)(Fd,{height:"4"}),(0,o.jsx)(lu,{autoComplete:"one-time-code",label:t("code_20843"),name:"code",state:b?"disabled":void 0,type:"number"})]}),(0,o.jsx)(Fd,{height:{"@initial":"6","@tablet":"7"}}),(0,o.jsx)(Dn,{children:b?(0,o.jsx)(Un,{onClick:y,children:t("recommencer_14712")}):(0,o.jsx)(Un,{onClick:n,isLoading:i,children:t("suivant_62774")})})]})})};function qp(e){const t=new URL(location.href);t.searchParams.set("lang",e.toLowerCase()),location.href=t.toString()}const Hp=e=>{const t=Yt();return(0,o.jsxs)(Dn,{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,o.jsx)(xn,{color:"gray800",fontSize:"textMd",fontWeight:"semiBold",children:t("langue_du_formu_66193")}),(0,o.jsx)(xn,{css:{"@mobile":{width:"100%"},"@tablet":{flex:"1"}},children:(0,o.jsx)(bg,{value:e.language,onChange:qp,children:e.languages.map(e=>(0,o.jsx)("option",{value:e,children:t(e)},e))})})]})},Kp=e=>{const t=Yt();return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"4"}),(0,o.jsx)(Lg,{canSelect:!1,isCompleted:!1,isOpen:!0,number:2,title:an(e.noAccessTitle)?e.noAccessTitle:t("acc_s_limit_69177"),onSelect:uu.A,children:an(e.noAccessMessage)?(0,o.jsx)(Ig,{text:e.noAccessMessage}):(0,o.jsx)(xn,{font:"gray800 textMd semiBold",textAlign:"center",width:1,children:t("vous_n_avez_pas_58193")})})]})},Yp=e=>{const t=Yt(),[n,i]=(0,r.useState)(e.userInfoId),[s,a]=(0,r.useState)(!e.userInfoId);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(xn,{font:"gray800 textSm semiBold",children:t("avec_quel_profi_89563")}),(0,o.jsx)(Fd,{height:"4"}),(0,o.jsxs)(Dn,{direction:"column",gap:"3",width:1,children:[e.usersInfos.map(e=>(0,o.jsx)(dg,{state:n===e.id?"checked":"unchecked",onClick:t=>{"checked"===t&&(i(e.id),a(!1))},children:e.nameOrEmail},e.id)),(0,o.jsx)(dg,{state:s?"checked":"unchecked",onClick:e=>{"checked"===e&&(i(null),a(!0))},children:t("s_inscrire_avec_00521")})]}),(0,o.jsx)(Fd,{height:{"@initial":"6","@tablet":"7"}}),(0,o.jsx)(Dn,{children:(0,o.jsx)(Un,{onClick:()=>{e.onSuccess(n,s)},children:t("suivant_62774")})})]})},Zp=e=>{const{translate:t,params:{organizationId:n,eventId:i,delegationId:s,formId:a}}=Id(),{mutate:c}=_o(),l=Kt(wc),d=Kt(As),u=Kt(Ac),h=function(e,{isOrganization:t}){const{user:n}=Ro();return(0,r.useMemo)(()=>{const i=new URL(location.href),o=(r=n?.language,(s=i.searchParams).has("lang")?qr(s.get("lang"))||Ee.En:r||qr(navigator.language)||Ee.En);var r,s;return t||e.includes(o)?o:(qp(e[0]),e[0])},[t,e,n])}(e.languages,{isOrganization:"number"!=typeof i}),m=(0,r.useRef)(null),g=(0,r.useCallback)(()=>{m.current&&(m.current.scrollTop=0)},[m]),p=(0,r.useMemo)(()=>e.form.elements.filter(e=>e.elementType===J.Field),[e.form]),f=(0,r.useMemo)(()=>p.map(e=>e.customField),[p]),[_,b]=(0,r.useState)(void 0),[k,v]=(0,r.useState)(void 0),[A,y]=(0,r.useState)(0===e.form.segments.length),[w,C]=(0,r.useState)({formRegister:d.formRegisterInputDefault(Q.Form,null,f,{countryCode:e.countryCode,eventStartDate:e.event?.startAt,forOther:!1,sendNotificationEmail:!0,slotDisplay:e.form.slotDisplay,team:e.team})}),[I,x]=(0,r.useState)(0),[S,E]=(0,r.useState)(null),[j,T]=(0,r.useState)([]),[D,P]=(0,r.useState)(null),R=(0,r.useCallback)((t,n)=>S?u.renderText(t,{userInfo:S?{...S,fields:{...S.fields,...n}}:{id:-1,email:_,fields:n,registrationDate:xi.c9.now()},event:e.event,customFields:f}):t,[e.event,_,S,f]),O=(0,r.useCallback)(async(t,o)=>{if(!e.isPreview){if(o){const{user:t}=await function(e,t){return co("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:[ji.UserInfoFormFragment]})}({organizationId:n,eventId:i,formId:a},o);e.form.allowMultiProfiles?(E(t.userInfo),T(t.usersInfos)):(E(t.userInfo),y(t.userInfo.canAccess),C({formRegister:d.formRegisterInputDefault(Q.Form,t.userInfo,f,{countryCode:e.countryCode,eventStartDate:e.event?.startAt,forOther:!1,sendNotificationEmail:!0,slotDisplay:e.form.slotDisplay,team:e.team})}))}b(t),v(o),setTimeout(()=>{x(I+1),g()},100)}},[I,f,e.form,e.countryCode,e.team,g]),F=(0,r.useCallback)((t,n)=>{if(!e.isPreview){const i=j.find(e=>e.id===t);E(i),y(i?.canAccess??0===e.form.segments.length),C({formRegister:d.formRegisterInputDefault(Q.Form,i,f,{countryCode:e.countryCode,eventStartDate:e.event?.startAt,forOther:n,sendNotificationEmail:!0,slotDisplay:e.form.slotDisplay,team:e.team})}),setTimeout(()=>{x(I+1),g()},100)}},[I,f,e.form,e.countryCode,e.team,g]),z=(0,r.useCallback)(async t=>{if(!e.isPreview){if(I===U-2){const o=await c({organizationId:n,eventId:i,delegationId:s,formId:a,email:_,formRegister:{...t.formRegister,teamCode:e.team?.teamCode}},k);P(o.formRegister)}x(I+1),g()}},[_,k,I,x,g]),M=(0,r.useMemo)(()=>e.form.areTeamsAllowed&&an(e.team?.teamCode),[e.form,e.team]),$=(0,r.useMemo)(()=>i&&M&&!e.form.teamMemberFillFullForm,[i,M,e.form]),N=(0,r.useMemo)(()=>e.form.allowMultiProfiles&&j.length>0,[e.form,j]),B=(0,r.useMemo)(()=>e.form.slotDisplay!==we.Hide&&i&&!$,[e.form,i,$]),L=(0,r.useMemo)(()=>e.form.positionDisplay!==Ae.None&&i&&!$,[e.form,i,$]),V=(0,r.useMemo)(()=>e.form.accreditationDisplay!==ke.None&&i&&!$,[e.form,i,$]),U=(0,r.useMemo)(()=>3+(N?1:0)+(B?1:0)+(L?1:0)+(V?1:0)+($?1:0),[N,B,L,V,$]),G=N?2:1,W=B?G+1:G,q=L?W+1:W,H=V?q+1:q,K=G+1,Y=(0,r.useCallback)(t=>I===G?l.validateForForm(d.formRegisterInformationsSchema(p))(t):B&&I===W?l.validateForForm(d.formRegisterSlotsSchema(e.form.slotDisplay,e.event.startAt,e.event.endAt))(t):L&&I===q?l.validateForForm(d.formRegisterPositionsSchema(e.form.positionRanking,e.form.positionDisplay))(t):V&&I===H?l.validateForForm(d.formRegisterAccreditationsSchema(e.form.accreditationDisplay,t.formRegister.accreditationsSlotsIds,e.form.accreditationsFormCustomFields,s))(t):{},[s,p,I,e.form,G,W,q]),Z=(0,r.useMemo)(()=>an(e.form.registerButtonText)?e.form.registerButtonText:t("s_inscrire_20304"),[e.form]),X=(0,r.useMemo)(()=>!e.hideFormLanguages&&e.languages.length>1,[e.hideFormLanguages,e.languages]),ee=e.isPreview?"opened"===e.formPreviewState:A,te=e.isPreview?"blocked"===e.formPreviewState:!A&&!(0===I||1===I&&N);return(0,o.jsxs)(Up,{ref:m,bannerUrl:e.form.design?.banner?.url,children:[X&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Hp,{language:h,languages:e.languages}),(0,o.jsx)(Fd,{height:"4"})]}),(0,o.jsx)(Wp,{description:e.form.description,emailTitle:e.form.emailTitle,isOpen:e.isPreview||0===I,isPreview:e.isPreview,onSuccess:O}),N&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"4"}),(0,o.jsx)(Lg,{canSelect:I>=1&&I!==U-1,isCompleted:I>=1,isOpen:e.isPreview||1===I,number:"2",title:t("choix_du_profil_50142"),onSelect:()=>x(1),children:(0,o.jsx)(Yp,{userInfoId:S?.id,usersInfos:j,onSuccess:F})})]}),ee&&(0,o.jsx)(Xd,{align:"center",customErrorRef:m,direction:"column",initialValues:w,render:({form:r,handleSubmit:s,values:c})=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"4"}),(0,o.jsx)(Lg,{canSelect:I>=G&&I!==U-1,isCompleted:I>=G+1,isOpen:e.isPreview||I===G,number:G+1,title:an(e.form.informationTitle)?e.form.informationTitle:t("informations_pe_37892"),onSelect:()=>x(G),children:(0,o.jsx)(Wg,{change:r.change,countryCode:e.countryCode,elements:e.form.elements,handleSubmit:s,isFinalStep:!(B||L||V||$),registerButtonText:Z,renderText:R,values:c.formRegister.userInfo.fields})}),(0,o.jsx)(Fd,{height:"4"}),B&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Lg,{canSelect:I>=W&&I!==U-1,isCompleted:I>=W+1,isOpen:e.isPreview||I===W,number:W+1,title:an(e.form.slotTitle)?e.form.slotTitle:t("disponibilit_s_49923"),onSelect:()=>x(W),children:(0,o.jsx)(Sp,{change:r.change,currentSlots:c.formRegister.slots,eventId:i,form:e.form,formId:a,handleSubmit:s,isFinalStep:!L&&!V,organizationId:n,registerButtonText:Z,renderText:R,userInfoFields:c.formRegister.userInfo.fields})}),(0,o.jsx)(Fd,{height:"4"})]}),L&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Lg,{canSelect:I>=q&&I!==U-1,isCompleted:I>=q+1,isOpen:e.isPreview||I===q,number:q+1,title:an(e.form.positionTitle)?e.form.positionTitle:t("missions_souhai_23225"),onSelect:()=>x(q),children:(0,o.jsx)(dp,{change:r.change,eventId:i,form:e.form,handleSubmit:s,isFinalStep:!V,positionsCategoriesIds:c.formRegister.positionsCategoriesIds,positionsIds:c.formRegister.positionsIds,positionsSlotsIds:c.formRegister.positionsSlotsIds,registerButtonText:Z,renderText:R,slots:c.formRegister.slots,userInfoFields:c.formRegister.userInfo.fields})}),(0,o.jsx)(Fd,{height:"4"})]}),V&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Lg,{canSelect:I>=H&&I!==U-1,isCompleted:I>=H+1,isOpen:e.isPreview||I===H,number:H+1,title:an(e.form.accreditationTitle)?e.form.accreditationTitle:t("accr_ditations_74375"),onSelect:()=>x(H),children:(0,o.jsx)(Bg,{accreditationsSlotsIds:c.formRegister.accreditationsSlotsIds,change:r.change,eventId:i,form:e.form,handleSubmit:s,registerButtonText:Z,renderText:R,slots:c.formRegister.slots,userInfoFields:c.formRegister.userInfo.fields})}),(0,o.jsx)(Fd,{height:"4"})]}),$&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Lg,{canSelect:I>=K&&I!==U-1,isCompleted:I>=U-1,isOpen:e.isPreview||I===K,number:K+1,title:t("r_capitulatif_d_48468"),onSelect:()=>x(K),children:(0,o.jsx)(Vp,{eventId:i,formId:a,handleSummit:s,registerButtonText:Z,slotDisplay:e.form.slotDisplay,teamCode:e.team.teamCode})}),(0,o.jsx)(Fd,{height:"4"})]}),(0,o.jsx)(Lg,{canSelect:!1,isCompleted:!1,isOpen:e.isPreview||I===U-1,number:U,title:t("confirmation_95122"),onSelect:()=>x(U-1),children:(0,o.jsx)(Pp,{eventId:i,form:e.form,formId:a,formRegisterResult:D,organizationId:n,renderText:R,userInfoFields:c.formRegister.userInfo.fields})}),(0,o.jsx)(Fd,{height:"9"})]}),validate:Y,width:1,onSubmit:z}),te&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Kp,{noAccessMessage:e.form.noAccessMessage,noAccessTitle:e.form.noAccessTitle}),(0,o.jsx)(Fd,{height:"9"})]})]})},Jp=()=>{const{organizationId:e,eventId:t,formId:n,delegationId:i,teamCode:s}=Qt(),{data:a,loader:c}=Jt("query FormInfos(\n $organizationId: OrganizationId!\n $eventId: EventId\n $formId: FormId!\n $delegationId: DelegationId\n $teamCode: TeamCode\n) {\n organization: organizationPublic(id: $organizationId) {\n country\n\n event(id: $eventId) {\n id\n name\n country\n languages\n startAt\n endAt\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 successMessage\n daysDisplay\n isOpen\n closedTitle\n closedMessage\n noAccessTitle\n noAccessMessage\n positionTitle\n positionSubtitle\n slotTitle\n slotSubtitle\n accreditationTitle\n accreditationSubtitle\n areTeamsAllowed\n maxTeamMembers\n teamMemberFillFullForm\n emailTitle\n informationTitle\n registerButtonText\n\n ...FormMissionsOptions\n ...FormAccreditationsOptions\n\n design {\n colors\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:i,teamCode:s},[ji.FormMissionsOptionsFragment,ji.FormAccreditationsOptionsFragment,ji.FormElementDisplayFragment]),{isPreview:l,formPreviewState:d,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")}},[]),h=(0,r.useMemo)(()=>{if(l)return"closed"===d;{const e=a.organization?.form.isOpen??!0,t=!a.organization?.delegation||a.organization?.delegation.state===R.Ongoing;return!(e&&t)}},[a.organization,d,l]);return(0,r.useEffect)(()=>{a.organization&&Ed(a.organization.form.design?.colors)},[a.organization]),c||(h?(0,o.jsx)(Gp,{bannerUrl:a.organization.form.design?.banner?.url,closedMessage:a.organization.form.closedMessage,closedTitle:a.organization.form.closedTitle}):(0,o.jsx)(Zp,{countryCode:a.organization.event?.country??a.organization.country,event:a.organization.event,form:a.organization.form,formPreviewState:d,hideFormLanguages:u,isPreview:l,languages:a.organization.event?.languages??[],team:a.organization?.event?.team}))},Xp=r.createContext({}),Qp=e=>{const{history:t,params:{organizationId:n}}=Id(),{data:i,loader:s,reload:a}=Jt('query CommonOrganization($organizationId: OrganizationId!) {\n organization(id: $organizationId) {\n features\n }\n\n user {\n email\n language\n\n userInfo(organizationId: $organizationId) {\n name\n firstName: fieldValue(slug: "firstName")\n picture {\n url\n }\n }\n }\n}\n',{organizationId:n},[]),c=r.useCallback(e=>!!i.organization&&function(e,t){return e.features.includes(t)}(i.organization,e),[i.organization]);return s||(s||i.organization?(0,o.jsx)(Xp.Provider,{value:{user:i.user,hasFeature:c,reload:a},children:e.children}):(setTimeout(()=>{t.replace(Jl.HOME)},100),null))},ef=r.createContext({}),tf=e=>(0,o.jsx)(ef.Provider,{value:{},children:e.children}),nf=bn("div",{alignItems:"center",background:"$gray50",display:"flex",flexDirection:"column",gap:"$10",height:"100%",overflowY:"auto",padding:"$4",paddingTop:"$10",width:"100%","@tablet":{padding:"$10"}}),of=()=>(Md("volunteers/src/v2/profiles/list/profilesListSkeleton.tsx","volunteers/src/v2/common/landingSkeleton.tsx"),(0,o.jsxs)(nf,{children:[(0,o.jsx)(ju,{}),(0,o.jsxs)(Dn,{css:{width:"100%","@desktop":{width:"$modalMd"}},direction:"column",gap:"3",children:[(0,o.jsx)(yu,{borderRadius:"$1",height:23,width:1}),(0,o.jsx)(yu,{borderRadius:"$2",height:74,width:1}),(0,o.jsx)(yu,{borderRadius:"$2",height:74,width:1}),(0,o.jsx)(yu,{borderRadius:"$2",height:74,width:1})]})]})),rf=({delegation:e})=>{const{params:{organizationId:t},translate:n}=Id(),i=pu(),{delegationsListButton:r}=jr(t);return(0,o.jsx)(Fn,{to:dc.DELEGATION({delegationId:e.id,eventId:e.eventId||void 0,organizationId:t}),children:(0,o.jsxs)(Dn,{align:"center",css:{background:"white",bd:!0,padding:"$4 $6"},gap:"3",children:[(0,o.jsx)(xn,{css:{flex:"1"},font:"gray800 textSm medium",children:e.name}),i?(0,o.jsx)(Un,{color:"white",size:"sm",children:n(r)}):(0,o.jsx)(Un,{color:"white",leftIcon:"arrow-right",size:"sm"})]})})},sf=()=>{const{history:e,translate:t,params:{organizationId:n}}=Id(),{data:i,isLoading:s}=Jt("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},[]),c=(0,r.useMemo)(()=>i.organization?.events.nodes??[],[i.organization]),{eventDelegationsGroupedByEvent:l,organizationDelegations:d}=(0,r.useMemo)(()=>{const e=(0,Uo.A)((i.organization?.delegations.nodes??[]).filter(e=>!e.eventId),e=>e.name.toLowerCase());return{eventDelegationsGroupedByEvent:(0,rg.A)((0,lh.A)((i.organization?.delegations.nodes??[]).filter(e=>e.eventId),e=>e.eventId),e=>(0,Uo.A)(e,e=>e.name.toLowerCase())),organizationDelegations:e}},[i.organization]);(0,r.useEffect)(()=>{if(1===i.organization?.delegations.nodes.length){const t=i.organization.delegations.nodes[0];e.replace(dc.DELEGATION({organizationId:n,eventId:t.eventId||void 0,delegationId:t.id}))}},[i.organization]);const{delegationsListTitle:u}=jr(n);return(0,r.useEffect)(()=>{document.title=i.organization?.name??Nr},[i.organization]),(0,o.jsx)(Td,{isLoading:s,loadDelegationsSpace:!0,loadMembersSpace:!1,organizationId:n,skeleton:(0,o.jsx)(of,{}),children:(0,o.jsxs)(nf,{children:[(0,o.jsx)(Eu,{}),(0,o.jsx)(Dn,{css:{width:"100%","@desktop":{width:"$modalMd"}},direction:"column",gap:"3",children:a(i.organization?.delegations.nodes)?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(xn,{color:"gray800",fontSize:"textMd",fontWeight:"semiBold",children:t(u)}),(0,o.jsx)(Fd,{width:"6"}),a(d)&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(xn,{color:"gray800",fontSize:"textSm",fontWeight:"semiBold",children:i.organization?.name}),d.map(e=>(0,o.jsx)(rf,{delegation:e},e.id))]}),a(Object.values(l))&&(0,o.jsxs)(o.Fragment,{children:[a(d)&&(0,o.jsx)(Qm,{direction:"horizontal"}),(0,o.jsx)(xn,{font:"gray800 textSm semiBold",children:t("_v_nements_53672")}),c.map(e=>{const t=l[e.id];return a(t)?(0,o.jsxs)(r.Fragment,{children:[(0,o.jsx)(xn,{font:"gray500 textXs semiBold",children:e.name}),t.map(e=>(0,o.jsx)(rf,{delegation:e},e.id))]},e.id):null})]})]}):(0,o.jsxs)(Dn,{align:"center",direction:"column",children:[(0,o.jsx)(Rh,{title:t("aucune_d_l_gati_85273")}),(0,o.jsx)(Dn,{children:(0,o.jsx)(Un,{color:"white",onClick:no,children:t("se_d_connecter_74151")})})]})})]})})},af=e=>(0,o.jsxs)(Dn,{as:"section",css:{bd:!0,inlineSize:"100%",backgroundColor:"$white",padding:"$6 $7",...e.css},direction:"column",gap:"6",children:[(e.title||e.subtitle)&&(0,o.jsx)(Dn,{align:"center",as:"header",gap:"3",children:(0,o.jsxs)(xn,{as:"hgroup",css:{flex:"1"},children:[e.title&&(0,o.jsx)(Ud,{textStyle:"heading",children:e.title}),e.subtitle&&(0,o.jsx)(na,{textStyle:"subtitle",children:e.subtitle})]})}),e.children]}),cf=e=>{const t=(0,r.useContext)(qt).useLocation().pathname.includes(e.basePath||e.path);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fn,{replace:!0,to:e.path,children:(0,o.jsx)(xn,{color:t?"primary700":"gray500",css:{borderBottom:t?"2px solid $primary700":"unset",cursor:t?"inherit":"pointer",paddingBlock:"$3","&:hover":{color:t?"$primary800":"$gray800"}},children:e.children})}),(0,o.jsx)(xn,{width:24})]})},lf=e=>(0,o.jsxs)(Dn,{"aria-orientation":"horizontal",as:Sn.Nav,css:{borderBottom:"1px solid $gray200",...e.css},role:"tablist",width:1,children:[e.center&&(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(xn,{css:{flex:"1"}})}),e.children,(0,o.jsx)(xn,{css:{flex:"1"}})]}),df=e=>(0,o.jsx)(o.Fragment,{children:e.children});df.displayName="TabPanel";const uf=e=>{const[t,n]=(0,Qs.A)(r.Children.toArray(e.children),e=>r.isValidElement(e)&&e.type===df);return(0,o.jsxs)(Dn,{direction:"column",width:1,...jn(e),children:[n,(0,o.jsx)($o.dO,{children:t.map((e,t)=>(0,o.jsx)($o.qh,{path:e.props.path,children:e},t))})]})},hf=e=>{const{history:t}=Id(),n=r.Children.toArray(e.children),i=gu(),s=pu(),a=i||s&&e.tabsOnTablet,c=(e,t)=>{const n=e(t);return an(n)?n:n[0]};return(0,o.jsx)(o.Fragment,{children:a?(0,o.jsxs)(uf,{height:1,children:[(0,o.jsx)(lf,{css:e.featureFlags?.isV4?{background:"$white",padding:"$2",borderRadius:"$2"}:void 0,children:n.map((e,t)=>(0,o.jsx)(cf,{path:c(e.props.getPath),children:e.props.title},t))}),(0,o.jsx)(Fd,{height:"7"}),n.map((e,t)=>(0,o.jsx)(df,{path:e.props.getPath(!0),children:e.props.featureFlags?.isV4?(0,o.jsx)(af,{subtitle:e.props.subtitle,title:e.props.title,children:e.props.children}):e.props.children},t))]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(bg,{css:{marginTop:"$4"},value:location.pathname,onChange:e=>t.replace(e),children:n.map((e,t)=>(0,o.jsx)("option",{value:c(e.props.getPath),children:e.props.title},t))}),(0,o.jsx)(Fd,{height:"5"}),(0,o.jsx)($o.dO,{children:n.map((e,t)=>(0,o.jsx)($o.qh,{path:e.props.getPath(!0),children:e.props.featureFlags?.isV4?(0,o.jsx)(af,{subtitle:e.props.subtitle,title:e.props.title,children:e.props.children}):e.props.children},t))})]})})},mf=e=>(0,o.jsx)(o.Fragment,{children:e.children}),gf=[25,50,100];var pf=n(6360);const ff=({children:e,css:t,onClose:n,returnToFallback:i,size:r})=>{const s=en(),a=()=>{n?n():s.goBack(i??Jl.HOME)};return Yn(a),Md("common-front/src/designSystem/components/rightPanel.tsx","common-front/src/designSystem/components/newRightPanel.rightPanel.tsx"),(0,Kn.createPortal)((0,o.jsx)(Dn,{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:a,children:(0,o.jsxs)(Dn,{css:{background:"white",height:"100%",position:"absolute",right:"0",top:"0",width:"sm"===r?"480px":"650px"},"data-testid":"right-panel-body",direction:"column",onClick:e=>Hn(e,!1),children:[(0,o.jsx)(xn,{color:"gray500",css:{cursor:"pointer",fontSize:"$textMd",position:"absolute",right:"$space$6",top:"$space$6"},onClick:a,children:(0,o.jsx)("i",{className:"far fa-xmark"})}),e]})}),document.body)},_f=r.forwardRef((e,t)=>(0,o.jsx)(Dn,{ref:t,css:{flex:"1",overflowY:"auto",px:"$6",...e.css},direction:"column",children:e.children}));_f.displayName="RightPanelBody";const bf=e=>(0,o.jsx)(xn,{color:"gray800",css:{borderTop:"1px solid $gray200",px:"$6",py:"$4"},children:e.children}),kf=e=>{const t=Yt(),[n,i]=(0,r.useState)(""),[s,a]=(0,r.useState)((0,Uo.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]));return(0,o.jsxs)(ff,{css:e.css,size:"sm",onClose:e.onClose,children:[(0,o.jsxs)(_f,{children:[(0,o.jsx)(Fd,{height:"6"}),(0,o.jsx)(xn,{color:"gray900",fontSize:"textXl",children:e.title}),(0,o.jsx)(xn,{color:"gray500",children:e.subtitle}),(0,o.jsx)(Fd,{height:"6"}),(0,o.jsx)(cu,{icon:"magnifying-glass",placeholder:e.searchPlaceholder,value:n,onChange:i}),(0,o.jsx)(Fd,{height:"6"}),(0,o.jsx)(xn,{color:"gray900",fontSize:"textMd",fontWeight:"semiBold",children:t("liste_des_champ_00325")}),(0,o.jsx)(Fd,{height:"2"}),(0,o.jsx)(pf.JY,{onDragEnd:({reason:e,source:t,destination:n})=>{"DROP"===e&&n&&t.index!==n.index&&a(function(e,t,n){const i=[...e],[o]=i.splice(t,1);return i.splice(n,0,o),i}(s,t.index,n.index))},children:(0,o.jsx)(pf.gL,{droppableId:"1",children:e=>(0,o.jsxs)(Dn,{direction:"column",gap:"2",...e.droppableProps,ref:e.innerRef,children:[s.map((e,t)=>(e=>{if(an(n)){const t=n.trim().toLowerCase();return e.name.trim().toLowerCase().includes(t)||an(e.label)&&e.label.trim().toLowerCase().includes(t)}return!0})(e)?(0,o.jsx)(pf.sx,{draggableId:e.slug,index:t,children:n=>(0,o.jsxs)(Dn,{css:{border:"1px solid $gray200",borderRadius:"$1",boxShadow:"$xs",padding:"$4"},gap:"4",...n.draggableProps,ref:n.innerRef,children:[(0,o.jsx)(xn,{color:"gray300",css:{cursor:"grab"},...n.dragHandleProps,children:(0,o.jsx)(Mn,{icon:"grip-vertical",iconStyle:"solid"})}),(0,o.jsxs)(Dn,{css:{flex:"1",overflow:"hidden"},direction:"column",gap:"1",children:[(0,o.jsx)(xn,{color:"gray800",css:{ellipsis:!0},title:e.name,width:1,children:e.name}),an(e.label)&&(0,o.jsx)(xn,{color:"gray500",css:{ellipsis:!0},title:e.label,width:1,children:e.label})]}),(0,o.jsx)(Fh,{value:e.isSelected,onChange:()=>{var n,i;n=e,i=t,a((0,jp.jM)(e=>{e[i].isSelected=!n.isSelected}))}})]})},e.slug):null),e.placeholder]})})}),(0,o.jsx)(Fd,{height:"6"})]}),(0,o.jsx)(bf,{children:(0,o.jsxs)(Dn,{gap:"3",justify:"end",children:[(0,o.jsx)(Un,{onClick:()=>{e.onSave(s.filter(e=>e.isSelected).map(e=>e.slug)),e.onClose()},children:e.saveButtonText}),(0,o.jsx)(Un,{color:"white",onClick:e.onClose,children:t("annuler_48254")})]})})]})};function vf(e,t=500){return(0,r.useCallback)((0,hm.A)(e,t),[])}function Af(e){return{numberOfPages:(0,r.useMemo)(()=>e?.numberOfPages??1,[e]),totalCount:(0,r.useMemo)(()=>e?.totalCount??0,[e])}}var yf=n(903);const wf=e=>{const t=Yt(),[n,i]=(0,r.useState)(e.filterPredicate.predicate?.value??[]),[s,c]=(0,r.useState)(e.filterPredicate.predicate?.value2??[]),l=e.filterPredicate.filter.campaigns??[],d=(0,Ei.A)(l.filter(({id:e})=>n.includes(e)).map(({campaignType:e})=>e)),u=(0,Ei.A)(["NotSent",...d.includes(v.Email)?ft.filter(e=>e!==$.Queued):[],...d.includes(v.Sms)?Ft:[]]),h=a(n)&&a(s);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(gg,{isSearchVisible:!0,isSelectAllVisible:!0,multiple:!0,placeholder:t("s_lectionner_un_28439"),values:n,onChange:i,children:l.map(e=>(0,o.jsx)("option",{value:e.id,children:e.name},e.id))}),n.length>0&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"2"}),(0,o.jsx)(gg,{isSearchVisible:!0,isSelectAllVisible:!0,multiple:!0,placeholder:t("s_lectionner_un_62901"),values:s,onChange:c,children:u.map(e=>(0,o.jsx)("option",{value:e,children:t(e)},e))})]}),(0,o.jsx)(Fd,{height:"7"}),(0,o.jsx)(Dn,{children:(0,o.jsx)(Un,{disabled:!h,onClick:()=>{e.onAdd({operator:be.Is,value:n,value2:s,slug:e.filterPredicate.filter.slug})},children:t("ajouter_le_filt_54222")})})]})},Cf=e=>{const t=Yt(),[n,i]=(0,r.useState)(e.filterPredicate.predicate?.value??[]),[s,c]=(0,r.useState)(e.filterPredicate.predicate?.operator??be.Contains),[l,d]=(0,r.useState)(e.filterPredicate.predicate?.value2??[]),u=e.filterPredicate.filter.campaigns??[],h=a(n)&&(s===be.Contains&&an(l)||s===be.IsEmpty||s===be.IsNotEmpty);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(gg,{isSearchVisible:!0,isSelectAllVisible:!0,multiple:!0,placeholder:t("s_lectionner_un_28439"),values:n,onChange:i,children:u.map(e=>(0,o.jsx)("option",{value:e.id,children:e.name},e.id))}),n.length>0&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"contains"===s?"checked":"unchecked",onClick:()=>{c(be.Contains)},children:t("contient_34012")}),"contains"===s&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"1"}),(0,o.jsxs)(Dn,{children:[(0,o.jsx)(Fd,{width:"6"}),(0,o.jsx)(cu,{value:l,onChange:d})]}),(0,o.jsx)(Fd,{height:"1"})]}),(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"isEmpty"===s?"checked":"unchecked",onClick:()=>{c(be.IsEmpty)},children:t("est_vide_96759")}),(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"isNotEmpty"===s?"checked":"unchecked",onClick:()=>{c(be.IsNotEmpty)},children:t("n_est_pas_vide_45804")})]}),(0,o.jsx)(Fd,{height:"7"}),(0,o.jsx)(Dn,{children:(0,o.jsx)(Un,{disabled:!h,onClick:()=>{e.onAdd({operator:s,value:n,value2:l,slug:e.filterPredicate.filter.slug})},children:t("ajouter_le_filt_54222")})})]})},If=e=>{const t=Yt(),[n,i]=(0,r.useState)(e.filterPredicate.predicate?.operator??be.Is),[s,a]=(0,r.useState)(e.filterPredicate.predicate?.value??!0);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(dg,{state:"is"===n?"checked":"unchecked",onClick:()=>{i(be.Is)},children:t("est_25967")}),"is"===n&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"1"}),(0,o.jsxs)(Dn,{children:[(0,o.jsx)(Fd,{width:"6"}),(0,o.jsxs)(bg,{shouldParseAsBoolean:!0,value:s,onChange:a,children:[(0,o.jsx)("option",{value:"true",children:t("true")}),(0,o.jsx)("option",{value:"false",children:t("false")})]})]}),(0,o.jsx)(Fd,{height:"1"})]}),(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"isNot"===n?"checked":"unchecked",onClick:()=>{i(be.IsNot)},children:t("n_est_pas_97826")}),"isNot"===n&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"1"}),(0,o.jsxs)(Dn,{children:[(0,o.jsx)(Fd,{width:"6"}),(0,o.jsxs)(bg,{shouldParseAsBoolean:!0,value:s,onChange:a,children:[(0,o.jsx)("option",{value:"true",children:t("true")}),(0,o.jsx)("option",{value:"false",children:t("false")})]})]}),(0,o.jsx)(Fd,{height:"1"})]}),!0!==e.filterPredicate.filter.hideEmpty&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"isEmpty"===n?"checked":"unchecked",onClick:()=>{i(be.IsEmpty)},children:t("est_vide_96759")}),(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"isNotEmpty"===n?"checked":"unchecked",onClick:()=>{i(be.IsNotEmpty)},children:t("n_est_pas_vide_45804")})]}),(0,o.jsx)(Fd,{height:"7"}),(0,o.jsx)(Dn,{children:(0,o.jsx)(Un,{onClick:()=>{e.onAdd({operator:n,value:s,slug:e.filterPredicate.filter.slug})},children:t("ajouter_le_filt_54222")})})]})},xf=e=>{const t=Yt(),[n,i]=(0,r.useState)(e.filterPredicate.predicate?.operator??be.Is),s=e.filterPredicate.filter.values??[],[c,l]=(0,r.useState)(a(e.filterPredicate.predicate?.value)?e.filterPredicate.predicate.value:[]),d="is"===n||"isNot"===n||a(c);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(dg,{state:"is"===n?"checked":"unchecked",onClick:()=>{i(be.Is)},children:t("champ_dont_un_a_44854")}),(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"isNot"===n?"checked":"unchecked",onClick:()=>{i(be.IsNot)},children:t("champ_d_pendant_33676")}),s.length>0&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"contains"===n?"checked":"unchecked",onClick:()=>{i(be.Contains)},children:t("d_pends_du_cham_39787")}),"contains"===n&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"1"}),(0,o.jsxs)(Dn,{children:[(0,o.jsx)(Fd,{width:"6"}),(0,o.jsx)(gg,{isSearchVisible:!0,isSelectAllVisible:!0,multiple:!0,placeholder:t("s_lectionner_de_52380"),values:c,onChange:l,children:s.map(({id:e,name:t})=>(0,o.jsx)("option",{value:e,children:t},e))})]}),(0,o.jsx)(Fd,{height:"1"})]})]}),(0,o.jsx)(Fd,{height:"7"}),(0,o.jsx)(Dn,{children:(0,o.jsx)(Un,{disabled:!d,onClick:()=>{e.onAdd({operator:n,value:c,slug:e.filterPredicate.filter.slug})},children:t("ajouter_le_filt_54222")})})]})};var Sf=n(3551);const Ef=e=>{const t=Yt(),n=Kt(is),i=(0,r.useMemo)(()=>xi.c9.now().startOf("year"),[]);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"1"}),(0,o.jsxs)(Dn,{children:[(0,o.jsx)(Fd,{width:"6"}),(0,o.jsxs)(bg,{shouldParseAsInt:!0,value:e.value.day,onChange:t=>{e.setValue({...e.value,day:t})},children:[(0,o.jsx)("option",{value:"-1",children:t("jour_74089")}),(0,Xs.A)(1,32).map(e=>(0,o.jsx)("option",{value:e,children:e},e))]})]}),(0,o.jsx)(Fd,{height:"1"}),(0,o.jsxs)(Dn,{children:[(0,o.jsx)(Fd,{width:"6"}),(0,o.jsxs)(bg,{shouldParseAsInt:!0,value:e.value.month,onChange:t=>{e.setValue({...e.value,month:t})},children:[(0,o.jsx)("option",{value:"-1",children:t("mois_10165")}),(0,Xs.A)(1,13).map(e=>{const t=n.toLocaleString(i.set({month:e}),{month:"long"});return(0,o.jsx)("option",{value:e,children:t},e)})]})]}),(0,o.jsx)(Fd,{height:"1"}),(0,o.jsxs)(Dn,{children:[(0,o.jsx)(Fd,{width:"6"}),(0,o.jsxs)(bg,{shouldParseAsInt:!0,value:e.value.year,onChange:t=>{e.setValue({...e.value,year:t})},children:[(0,o.jsx)("option",{value:"-1",children:t("ann_e_38546")}),(0,Sf.A)(1900,i.year+2).map(e=>(0,o.jsx)("option",{value:e,children:e},e))]})]}),(0,o.jsx)(Fd,{height:"1"})]})},jf=e=>{const t=Yt(),[n,i]=(0,r.useState)(e.filterPredicate.predicate?.operator??be.Is),[s,a]=(0,r.useState)(e.filterPredicate.predicate?.value??""),[c,l]=(0,r.useState)(e.filterPredicate.predicate?.value2??""),[d,u]=(0,r.useState)(e.filterPredicate.predicate?.valueDate??{day:-1,month:-1,year:-1}),h=["is","isNot"].includes(n)?"number"==typeof d.day&&-1!==d.day||"number"==typeof d.month&&-1!==d.month||"number"==typeof d.year&&-1!==d.year:["isBefore","isAfter"].includes(n)?xi.c9.isDateTime(s)&&s.isValid:"between"!==n||xi.c9.isDateTime(s)&&s.isValid&&xi.c9.isDateTime(c)&&c.isValid;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(dg,{state:"is"===n?"checked":"unchecked",onClick:()=>{i(be.Is)},children:t("est_25967")}),"is"===n&&(0,o.jsx)(Ef,{setValue:u,value:d}),(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"isNot"===n?"checked":"unchecked",onClick:()=>{i(be.IsNot)},children:t("n_est_pas_97826")}),"isNot"===n&&(0,o.jsx)(Ef,{setValue:u,value:d}),(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"isBefore"===n?"checked":"unchecked",onClick:()=>{i(be.IsBefore)},children:t("est_avant_le_16689")}),"isBefore"===n&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"1"}),(0,o.jsxs)(Dn,{children:[(0,o.jsx)(Fd,{width:"6"}),(0,o.jsx)(nm,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,value:s,onChange:a})]}),(0,o.jsx)(Fd,{height:"1"})]}),(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"isAfter"===n?"checked":"unchecked",onClick:()=>{i(be.IsAfter)},children:t("est_apr_s_le_79703")}),"isAfter"===n&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"1"}),(0,o.jsxs)(Dn,{children:[(0,o.jsx)(Fd,{width:"6"}),(0,o.jsx)(nm,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,value:s,onChange:a})]}),(0,o.jsx)(Fd,{height:"1"})]}),(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"between"===n?"checked":"unchecked",onClick:()=>{i(be.Between)},children:t("est_entre_born_59665")}),"between"===n&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"1"}),(0,o.jsxs)(Dn,{children:[(0,o.jsx)(Fd,{width:"6"}),(0,o.jsx)(nm,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,value:s,onChange:a}),(0,o.jsx)(Fd,{width:"3"}),(0,o.jsx)(nm,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,value:c,onChange:l})]}),(0,o.jsx)(Fd,{height:"1"})]}),(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"today"===n?"checked":"unchecked",onClick:()=>{i(be.Today)},children:t("est_aujourd_hui_82571")}),!0!==e.filterPredicate.filter.hideEmpty&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"isEmpty"===n?"checked":"unchecked",onClick:()=>{i(be.IsEmpty)},children:t("est_vide_96759")}),(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"isNotEmpty"===n?"checked":"unchecked",onClick:()=>{i(be.IsNotEmpty)},children:t("n_est_pas_vide_45804")})]}),(0,o.jsx)(Fd,{height:"7"}),(0,o.jsx)(Dn,{children:(0,o.jsx)(Un,{disabled:!h,onClick:()=>{e.onAdd({operator:n,value:s,value2:c,valueDate:d,slug:e.filterPredicate.filter.slug})},children:t("ajouter_le_filt_54222")})})]})},Tf=e=>{const t=Yt(),n=(0,r.useMemo)(()=>e.filterPredicate.filter.useLocalZone?Li():void 0,[e.filterPredicate]),[i,s]=(0,r.useState)(e.filterPredicate.predicate?.operator??be.Is),[a,c]=(0,r.useState)(e.filterPredicate.predicate?.value??""),[l,d]=(0,r.useState)(e.filterPredicate.predicate?.value2??""),u=["isBefore","isAfter"].includes(i)?xi.c9.isDateTime(a)&&a.isValid:"between"!==i||xi.c9.isDateTime(a)&&a.isValid&&xi.c9.isDateTime(l)&&l.isValid;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(dg,{state:"isBefore"===i?"checked":"unchecked",onClick:()=>{s(be.IsBefore)},children:t("est_avant_le_16689")}),"isBefore"===i&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"1"}),(0,o.jsxs)(Dn,{children:[(0,o.jsx)(Fd,{width:"6"}),(0,o.jsx)(om,{value:a,zone:n,onChange:c})]}),(0,o.jsx)(Fd,{height:"1"})]}),(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"isAfter"===i?"checked":"unchecked",onClick:()=>{s(be.IsAfter)},children:t("est_apr_s_le_79703")}),"isAfter"===i&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"1"}),(0,o.jsxs)(Dn,{children:[(0,o.jsx)(Fd,{width:"6"}),(0,o.jsx)(om,{value:a,zone:n,onChange:c})]}),(0,o.jsx)(Fd,{height:"1"})]}),(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"between"===i?"checked":"unchecked",onClick:()=>{s(be.Between)},children:t("est_entre_born_59665")}),"between"===i&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"1"}),(0,o.jsxs)(Dn,{children:[(0,o.jsx)(Fd,{width:"6"}),(0,o.jsx)(om,{value:a,zone:n,onChange:c})]}),(0,o.jsx)(Fd,{height:"1"}),(0,o.jsxs)(Dn,{children:[(0,o.jsx)(Fd,{width:"6"}),(0,o.jsx)(om,{value:l,zone:n,onChange:d})]}),(0,o.jsx)(Fd,{height:"1"})]}),(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"today"===i?"checked":"unchecked",onClick:()=>{s(be.Today)},children:t("est_aujourd_hui_82571")}),!0!==e.filterPredicate.filter.hideEmpty&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"isEmpty"===i?"checked":"unchecked",onClick:()=>{s(be.IsEmpty)},children:t("est_vide_96759")}),(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"isNotEmpty"===i?"checked":"unchecked",onClick:()=>{s(be.IsNotEmpty)},children:t("n_est_pas_vide_45804")})]}),(0,o.jsx)(Fd,{height:"7"}),(0,o.jsx)(Dn,{children:(0,o.jsx)(Un,{disabled:!u,onClick:()=>{e.onAdd({operator:i,value:a,value2:l,slug:e.filterPredicate.filter.slug})},children:t("ajouter_le_filt_54222")})})]})},Df=e=>{const t=Yt(),[n,i]=(0,r.useState)(e.filterPredicate.predicate?.operator??be.Contains),[s,a]=(0,r.useState)(e.filterPredicate.predicate?.value??""),[c,l]=(0,r.useState)(e.filterPredicate.predicate?.value2??""),d=!!(xi.c9.isDateTime(s)&&s.isValid&&["contains","notContains","is"].includes(n))||xi.c9.isDateTime(c)&&c.isValid;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(dg,{state:"contains"===n?"checked":"unchecked",onClick:()=>{i(be.Contains)},children:t("contient_34012")}),"contains"===n&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"1"}),(0,o.jsxs)(Dn,{children:[(0,o.jsx)(Fd,{width:"6"}),(0,o.jsx)(om,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,value:s,onChange:a})]}),(0,o.jsx)(Fd,{height:"1"})]}),(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"is"===n?"checked":"unchecked",onClick:()=>{i(be.Is)},children:t("contient_date_89885")}),"is"===n&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"1"}),(0,o.jsxs)(Dn,{children:[(0,o.jsx)(Fd,{width:"6"}),(0,o.jsx)(nm,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,value:s,onChange:a})]})]}),(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"notContains"===n?"checked":"unchecked",onClick:()=>{i(be.NotContains)},children:t("ne_contient_pas_85399")}),"notContains"===n&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"1"}),(0,o.jsxs)(Dn,{children:[(0,o.jsx)(Fd,{width:"6"}),(0,o.jsx)(om,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,value:s,onChange:a})]}),(0,o.jsx)(Fd,{height:"1"})]}),(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"overlaps"===n?"checked":"unchecked",onClick:()=>{i(be.Overlaps)},children:t("chevauche_49445")}),"overlaps"===n&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"1"}),(0,o.jsxs)(Dn,{children:[(0,o.jsx)(Fd,{width:"6"}),(0,o.jsx)(om,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,placeholder:t("d_but_41840"),value:s,onChange:a})]}),(0,o.jsx)(Fd,{height:"1"}),(0,o.jsxs)(Dn,{children:[(0,o.jsx)(Fd,{width:"6"}),(0,o.jsx)(om,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,placeholder:t("fin_60104"),value:c,onChange:l})]}),(0,o.jsx)(Fd,{height:"1"})]}),(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"notOverlaps"===n?"checked":"unchecked",onClick:()=>{i(be.NotOverlaps)},children:t("ne_chevauche_pa_17307")}),"notOverlaps"===n&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"1"}),(0,o.jsxs)(Dn,{children:[(0,o.jsx)(Fd,{width:"6"}),(0,o.jsx)(om,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,placeholder:t("d_but_41840"),value:s,onChange:a})]}),(0,o.jsx)(Fd,{height:"1"}),(0,o.jsxs)(Dn,{children:[(0,o.jsx)(Fd,{width:"6"}),(0,o.jsx)(om,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,placeholder:t("fin_60104"),value:c,onChange:l})]}),(0,o.jsx)(Fd,{height:"1"})]}),(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"engulfs"===n?"checked":"unchecked",onClick:()=>{i(be.Engulfs)},children:t("engloutis_42346")}),"engulfs"===n&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"1"}),(0,o.jsxs)(Dn,{children:[(0,o.jsx)(Fd,{width:"6"}),(0,o.jsx)(om,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,placeholder:t("d_but_41840"),value:s,onChange:a})]}),(0,o.jsx)(Fd,{height:"1"}),(0,o.jsxs)(Dn,{children:[(0,o.jsx)(Fd,{width:"6"}),(0,o.jsx)(om,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,placeholder:t("fin_60104"),value:c,onChange:l})]}),(0,o.jsx)(Fd,{height:"1"})]}),(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"notEngulfs"===n?"checked":"unchecked",onClick:()=>{i(be.NotEngulfs)},children:t("n_engloutis_pas_42363")}),"notEngulfs"===n&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"1"}),(0,o.jsxs)(Dn,{children:[(0,o.jsx)(Fd,{width:"6"}),(0,o.jsx)(om,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,placeholder:t("d_but_41840"),value:s,onChange:a})]}),(0,o.jsx)(Fd,{height:"1"}),(0,o.jsxs)(Dn,{children:[(0,o.jsx)(Fd,{width:"6"}),(0,o.jsx)(om,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,placeholder:t("fin_60104"),value:c,onChange:l})]}),(0,o.jsx)(Fd,{height:"1"})]}),(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"engulfedBy"===n?"checked":"unchecked",onClick:()=>{i(be.EngulfedBy)},children:t("est_englouti_pa_47852")}),"engulfedBy"===n&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"1"}),(0,o.jsxs)(Dn,{children:[(0,o.jsx)(Fd,{width:"6"}),(0,o.jsx)(om,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,placeholder:t("d_but_41840"),value:s,onChange:a})]}),(0,o.jsx)(Fd,{height:"1"}),(0,o.jsxs)(Dn,{children:[(0,o.jsx)(Fd,{width:"6"}),(0,o.jsx)(om,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,placeholder:t("fin_60104"),value:c,onChange:l})]}),(0,o.jsx)(Fd,{height:"1"})]}),(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"notEngulfedBy"===n?"checked":"unchecked",onClick:()=>{i(be.NotEngulfedBy)},children:t("n_est_pas_englo_08733")}),"notEngulfedBy"===n&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"1"}),(0,o.jsxs)(Dn,{children:[(0,o.jsx)(Fd,{width:"6"}),(0,o.jsx)(om,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,placeholder:t("d_but_41840"),value:s,onChange:a})]}),(0,o.jsx)(Fd,{height:"1"}),(0,o.jsxs)(Dn,{children:[(0,o.jsx)(Fd,{width:"6"}),(0,o.jsx)(om,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,placeholder:t("fin_60104"),value:c,onChange:l})]}),(0,o.jsx)(Fd,{height:"1"})]}),(0,o.jsx)(Fd,{height:"7"}),(0,o.jsx)(Dn,{children:(0,o.jsx)(Un,{disabled:!d,onClick:()=>{e.onAdd({operator:n,value:s,value2:c,slug:e.filterPredicate.filter.slug})},children:t("ajouter_le_filt_54222")})})]})},Pf=e=>{const t=Yt(),[n,i]=(0,r.useState)(e.filterPredicate.predicate?.operator??be.IsEmpty);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(dg,{state:"isEmpty"===n?"checked":"unchecked",onClick:()=>{i(be.IsEmpty)},children:t("est_vide_96759")}),(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"isNotEmpty"===n?"checked":"unchecked",onClick:()=>{i(be.IsNotEmpty)},children:t("n_est_pas_vide_45804")}),(0,o.jsx)(Fd,{height:"7"}),(0,o.jsx)(Dn,{children:(0,o.jsx)(Un,{onClick:()=>{e.onAdd({operator:n,value:"",slug:e.filterPredicate.filter.slug})},children:t("ajouter_le_filt_54222")})})]})},Rf=e=>{const t=Yt(),n=(0,r.useMemo)(()=>(e.filterPredicate.filter.values||[]).map(({id:e,name:t})=>(0,o.jsx)("option",{value:e,children:t},e)),[e.filterPredicate.filter]),[i,s]=(0,r.useState)(e.filterPredicate.predicate?.operator??be.Is),[c,l]=(0,r.useState)(e.filterPredicate.predicate?.value??[]),[d,u]=(0,r.useState)(e.filterPredicate.predicate?.value2??""),[h,m]=(0,r.useState)(e.filterPredicate.predicate?.valueDate??{day:-1,month:-1,year:-1}),g=a(c)&&["is","isNot"].includes(i)?"number"==typeof h.day&&-1!==h.day||"number"==typeof h.month&&-1!==h.month||"number"==typeof h.year&&-1!==h.year:!!["isBefore","isAfter"].includes(i)&&xi.c9.isDateTime(d)&&d.isValid;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(gg,{isSearchVisible:!0,isSelectAllVisible:!0,multiple:!0,placeholder:t("s_lectionner_un_13356"),values:c,onChange:l,children:n}),c.length>0&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"is"===i?"checked":"unchecked",onClick:()=>{s(be.Is)},children:t("est_25967")}),"is"===i&&(0,o.jsx)(Ef,{setValue:m,value:h}),(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"isNot"===i?"checked":"unchecked",onClick:()=>{s(be.IsNot)},children:t("n_est_pas_97826")}),"isNot"===i&&(0,o.jsx)(Ef,{setValue:m,value:h}),(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"isBefore"===i?"checked":"unchecked",onClick:()=>{s(be.IsBefore)},children:t("est_avant_le_16689")}),"isBefore"===i&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"1"}),(0,o.jsxs)(Dn,{children:[(0,o.jsx)(Fd,{width:"6"}),(0,o.jsx)(nm,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,value:d,onChange:u})]}),(0,o.jsx)(Fd,{height:"1"})]}),(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"isAfter"===i?"checked":"unchecked",onClick:()=>{s(be.IsAfter)},children:t("est_apr_s_le_79703")}),"isAfter"===i&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"1"}),(0,o.jsxs)(Dn,{children:[(0,o.jsx)(Fd,{width:"6"}),(0,o.jsx)(nm,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,value:d,onChange:u})]}),(0,o.jsx)(Fd,{height:"1"})]})]}),(0,o.jsx)(Fd,{height:"7"}),(0,o.jsx)(Dn,{children:(0,o.jsx)(Un,{disabled:!g,onClick:()=>{e.onAdd({operator:i,value:c,value2:d,valueDate:h,slug:e.filterPredicate.filter.slug})},children:t("ajouter_le_filt_54222")})})]})},Of=e=>{const t=Yt(),[n,i]=(0,r.useState)(e.filterPredicate.predicate?.operator??be.Is);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(dg,{state:"is"===n?"checked":"unchecked",onClick:()=>{i(be.Is)},children:t("est_administrat_15766")}),(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"isNot"===n?"checked":"unchecked",onClick:()=>{i(be.IsNot)},children:t("n_est_pas_admin_58612")}),(0,o.jsx)(Fd,{height:"7"}),(0,o.jsx)(Dn,{children:(0,o.jsx)(Un,{onClick:()=>{e.onAdd({operator:n,value:"",slug:e.filterPredicate.filter.slug})},children:t("ajouter_le_filt_54222")})})]})},Ff=e=>{const t=Yt(),[n,i]=(0,r.useState)(e.filterPredicate.predicate?.operator??be.Is),s=(0,r.useMemo)(()=>Sc(e.filterPredicate.filter,t),[e.filterPredicate.filter]),[c,l]=(0,r.useState)(a(e.filterPredicate.predicate?.value)?e.filterPredicate.predicate.value:[]),d="contains"!==n||a(c),u=(0,r.useMemo)(()=>Array.isArray(c)?c.length:0,[c]);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(dg,{state:"is"===n?"checked":"unchecked",onClick:()=>{i(be.Is)},children:t("est_responsable_47377")}),(0,o.jsx)(Fd,{height:"3"}),"isDelegationLeader"===e.filterPredicate.filter.slug&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(dg,{state:"contains"===n?"checked":"unchecked",onClick:()=>{i(be.Contains)},children:t("est_responsable_00281")}),"contains"===n&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"1"}),(0,o.jsx)(Dn,{css:{paddingLeft:"$6"},children:(0,o.jsx)(gg,{hint:t("_1_s_lectionn_51286",u),isSearchVisible:!0,isSelectAllVisible:!0,multiple:!0,placeholder:t("s_lectionner_de_52380"),values:c,onChange:l,children:s})}),(0,o.jsx)(Fd,{height:"1"})]}),(0,o.jsx)(Fd,{height:"3"})]}),(0,o.jsx)(dg,{state:"isNot"===n?"checked":"unchecked",onClick:()=>{i(be.IsNot)},children:t("n_est_pas_respo_55625")}),(0,o.jsx)(Fd,{height:"7"}),(0,o.jsx)(Dn,{children:(0,o.jsx)(Un,{disabled:!d,onClick:()=>{e.onAdd({operator:n,value:c,slug:e.filterPredicate.filter.slug})},children:t("ajouter_le_filt_54222")})})]})},zf=e=>{const t=Yt(),[n,i]=(0,r.useState)(e.filterPredicate.predicate?.operator??be.Is);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(dg,{state:"is"===n?"checked":"unchecked",onClick:()=>{i(be.Is)},children:t("est_inscrit_en_86193")}),(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"isNot"===n?"checked":"unchecked",onClick:()=>{i(be.IsNot)},children:t("n_est_pas_inscr_25311")}),(0,o.jsx)(Fd,{height:"7"}),(0,o.jsx)(Dn,{children:(0,o.jsx)(Un,{onClick:()=>{e.onAdd({operator:n,value:"",slug:e.filterPredicate.filter.slug})},children:t("ajouter_le_filt_54222")})})]})},Mf=e=>{const t=Yt(),[n,i]=(0,r.useState)(e.filterPredicate.predicate?.operator??be.Is),[s,a]=(0,r.useState)(e.filterPredicate.predicate?.value??""),[c,l]=(0,r.useState)(e.filterPredicate.predicate?.value2??""),[d,u]=(0,r.useState)(tm(e.filterPredicate.predicate?.value3??"")),[h,m]=(0,r.useState)(tm(e.filterPredicate.predicate?.value4??"")),[g,p]=(0,r.useState)(xi.c9.isDateTime(d)&&d.isValid&&xi.c9.isDateTime(h)&&h.isValid?"checked":"unchecked"),f=("checked"!==g||xi.c9.isDateTime(d)&&d.isValid&&xi.c9.isDateTime(h)&&h.isValid)&&["is","isNot","greaterThan","greaterThanEqual","lessThan","lessThanEqual"].includes(n)?"number"==typeof s:"between"!==n||"number"==typeof s&&"number"==typeof c;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(dg,{state:"is"===n?"checked":"unchecked",onClick:()=>{i(be.Is)},children:t("est_25967")}),"is"===n&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"1"}),(0,o.jsxs)(Dn,{children:[(0,o.jsx)(Fd,{width:"6"}),(0,o.jsx)(cu,{shouldParseAsInt:!0,value:s,onChange:a})]}),(0,o.jsx)(Fd,{height:"1"})]}),(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"isNot"===n?"checked":"unchecked",onClick:()=>{i(be.IsNot)},children:t("n_est_pas_97826")}),"isNot"===n&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"1"}),(0,o.jsxs)(Dn,{children:[(0,o.jsx)(Fd,{width:"6"}),(0,o.jsx)(cu,{shouldParseAsInt:!0,value:s,onChange:a})]}),(0,o.jsx)(Fd,{height:"1"})]}),(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"greaterThan"===n?"checked":"unchecked",onClick:()=>{i(be.GreaterThan)},children:t("plus_grand_que_28412")}),"greaterThan"===n&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"1"}),(0,o.jsxs)(Dn,{children:[(0,o.jsx)(Fd,{width:"6"}),(0,o.jsx)(cu,{shouldParseAsInt:!0,value:s,onChange:a})]}),(0,o.jsx)(Fd,{height:"1"})]}),(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"greaterThanEqual"===n?"checked":"unchecked",onClick:()=>{i(be.GreaterThanEqual)},children:t("_gal_ou_plus_gr_76897")}),"greaterThanEqual"===n&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"1"}),(0,o.jsxs)(Dn,{children:[(0,o.jsx)(Fd,{width:"6"}),(0,o.jsx)(cu,{shouldParseAsInt:!0,value:s,onChange:a})]}),(0,o.jsx)(Fd,{height:"1"})]}),(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"lessThan"===n?"checked":"unchecked",onClick:()=>{i(be.LessThan)},children:t("plus_petit_que_35846")}),"lessThan"===n&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"1"}),(0,o.jsxs)(Dn,{children:[(0,o.jsx)(Fd,{width:"6"}),(0,o.jsx)(cu,{shouldParseAsInt:!0,value:s,onChange:a})]}),(0,o.jsx)(Fd,{height:"1"})]}),(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"lessThanEqual"===n?"checked":"unchecked",onClick:()=>{i(be.LessThanEqual)},children:t("_gal_ou_plus_pe_38400")}),"lessThanEqual"===n&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"1"}),(0,o.jsxs)(Dn,{children:[(0,o.jsx)(Fd,{width:"6"}),(0,o.jsx)(cu,{shouldParseAsInt:!0,value:s,onChange:a})]}),(0,o.jsx)(Fd,{height:"1"})]}),(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"between"===n?"checked":"unchecked",onClick:()=>{i(be.Between)},children:t("est_entre_born_59665")}),"between"===n&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"1"}),(0,o.jsxs)(Dn,{children:[(0,o.jsx)(Fd,{width:"6"}),(0,o.jsx)(cu,{shouldParseAsInt:!0,value:s,onChange:a}),(0,o.jsx)(Fd,{width:"3"}),(0,o.jsx)(cu,{shouldParseAsInt:!0,value:c,onChange:l})]}),(0,o.jsx)(Fd,{height:"1"})]}),!0!==e.filterPredicate.filter.hideEmpty&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"isEmpty"===n?"checked":"unchecked",onClick:()=>{i(be.IsEmpty)},children:t("est_vide_96759")}),(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"isNotEmpty"===n?"checked":"unchecked",onClick:()=>{i(be.IsNotEmpty)},children:t("n_est_pas_vide_45804")})]}),"numberOfAssignmentsDays"===e.filterPredicate.filter.slug&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(eg,{height:"3"}),(0,o.jsx)(Qh,{state:g,onClick:p,children:t("filtrer_sur_une_06420")}),"checked"===g&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"3"}),(0,o.jsxs)(Dn,{gap:"3",children:[(0,o.jsx)(nm,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,value:d,onChange:u}),(0,o.jsx)(nm,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,value:h,onChange:m})]})]})]}),(0,o.jsx)(Fd,{height:"7"}),(0,o.jsx)(Dn,{children:(0,o.jsx)(Un,{disabled:!f,onClick:()=>{e.onAdd({operator:n,value:s,value2:c,value3:d,value4:h,slug:e.filterPredicate.filter.slug})},children:t("ajouter_le_filt_54222")})})]})},$f=e=>{const t=Yt(),[n,i]=(0,r.useState)(e.filterPredicate.predicate?.operator??be.Is),[s,a]=(0,r.useState)(e.filterPredicate.predicate?.value??""),[c,l]=(0,r.useState)(e.filterPredicate.predicate?.value2??""),d=!!(xi.c9.isDateTime(s)&&s?.isValid&&["is","isNot","greaterThan","greaterThanEqual","lessThan","lessThanEqual"].includes(n))&&"number"==typeof c;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(nm,{label:t("jour_d_affectat_27334"),max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,value:s,onChange:a}),(0,o.jsx)(Fd,{height:"6"}),(0,o.jsx)(ru,{children:e.filterPredicate.filter.name}),(0,o.jsx)(Fd,{height:"1"}),(0,o.jsx)(dg,{state:"is"===n?"checked":"unchecked",onClick:()=>{i(be.Is)},children:t("est_25967")}),"is"===n&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"1"}),(0,o.jsxs)(Dn,{children:[(0,o.jsx)(Fd,{width:"6"}),(0,o.jsx)(cu,{min:0,shouldParseAsInt:!0,value:c,onChange:l})]}),(0,o.jsx)(Fd,{height:"1"})]}),(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"isNot"===n?"checked":"unchecked",onClick:()=>{i(be.IsNot)},children:t("n_est_pas_97826")}),"isNot"===n&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"1"}),(0,o.jsxs)(Dn,{children:[(0,o.jsx)(Fd,{width:"6"}),(0,o.jsx)(cu,{min:0,shouldParseAsInt:!0,value:c,onChange:l})]}),(0,o.jsx)(Fd,{height:"1"})]}),(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"greaterThan"===n?"checked":"unchecked",onClick:()=>{i(be.GreaterThan)},children:t("plus_grand_que_28412")}),"greaterThan"===n&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"1"}),(0,o.jsxs)(Dn,{children:[(0,o.jsx)(Fd,{width:"6"}),(0,o.jsx)(cu,{min:0,shouldParseAsInt:!0,value:c,onChange:l})]}),(0,o.jsx)(Fd,{height:"1"})]}),(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"greaterThanEqual"===n?"checked":"unchecked",onClick:()=>{i(be.GreaterThanEqual)},children:t("_gal_ou_plus_gr_76897")}),"greaterThanEqual"===n&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"1"}),(0,o.jsxs)(Dn,{children:[(0,o.jsx)(Fd,{width:"6"}),(0,o.jsx)(cu,{min:0,shouldParseAsInt:!0,value:c,onChange:l})]}),(0,o.jsx)(Fd,{height:"1"})]}),(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"lessThan"===n?"checked":"unchecked",onClick:()=>{i(be.LessThan)},children:t("plus_petit_que_35846")}),"lessThan"===n&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"1"}),(0,o.jsxs)(Dn,{children:[(0,o.jsx)(Fd,{width:"6"}),(0,o.jsx)(cu,{min:0,shouldParseAsInt:!0,value:c,onChange:l})]}),(0,o.jsx)(Fd,{height:"1"})]}),(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"lessThanEqual"===n?"checked":"unchecked",onClick:()=>{i(be.LessThanEqual)},children:t("_gal_ou_plus_pe_38400")}),"lessThanEqual"===n&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"1"}),(0,o.jsxs)(Dn,{children:[(0,o.jsx)(Fd,{width:"6"}),(0,o.jsx)(cu,{min:0,shouldParseAsInt:!0,value:c,onChange:l})]}),(0,o.jsx)(Fd,{height:"1"})]}),(0,o.jsx)(Fd,{height:"7"}),(0,o.jsx)(Dn,{children:(0,o.jsx)(Un,{disabled:!d,onClick:()=>{e.onAdd({operator:n,value:s,value2:c,slug:e.filterPredicate.filter.slug})},children:t("ajouter_le_filt_54222")})})]})},Nf=e=>{const t=Yt(),[n,i]=(0,r.useState)(e.filterPredicate.predicate?.operator??be.Is);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(dg,{state:"is"===n?"checked":"unchecked",onClick:()=>{i(be.Is)},children:t("Public")}),(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"isNot"===n?"checked":"unchecked",onClick:()=>{i(be.IsNot)},children:t("Private")}),(0,o.jsx)(Fd,{height:"7"}),(0,o.jsx)(Dn,{children:(0,o.jsx)(Un,{onClick:()=>{e.onAdd({operator:n,value:"",slug:e.filterPredicate.filter.slug})},children:t("ajouter_le_filt_54222")})})]})},Bf=e=>{const t=Yt(),[n,i]=(0,r.useState)(e.filterPredicate.predicate?.operator??be.Is),s=(0,r.useMemo)(()=>Sc(e.filterPredicate.filter,t),[e.filterPredicate.filter]),[c,l]=(0,r.useState)(a(e.filterPredicate.predicate?.value)?e.filterPredicate.predicate.value:[]),d="is"!==n&&"isNot"!==n||a(c),u=(0,r.useMemo)(()=>Array.isArray(c)?c.length:0,[c]);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(dg,{state:"is"===n?"checked":"unchecked",onClick:()=>{i(be.Is)},children:t("est_25967")}),"is"===n&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"1"}),(0,o.jsx)(Dn,{css:{paddingLeft:"$6"},children:(0,o.jsx)(gg,{hint:t("_1_s_lectionn_51286",u),isSearchVisible:!0,isSelectAllVisible:!0,multiple:!0,placeholder:t("s_lectionner_de_52380"),values:c,onChange:l,children:s})}),(0,o.jsx)(Fd,{height:"1"})]}),(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"isNot"===n?"checked":"unchecked",onClick:()=>{i(be.IsNot)},children:t("n_est_pas_97826")}),"isNot"===n&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"1"}),(0,o.jsx)(Dn,{css:{paddingLeft:"$6"},children:(0,o.jsx)(gg,{hint:t("_1_s_lectionn_51286",u),isSearchVisible:!0,isSelectAllVisible:!0,multiple:!0,placeholder:t("s_lectionner_de_52380"),values:c,onChange:l,children:s})}),(0,o.jsx)(Fd,{height:"1"})]}),!0!==e.filterPredicate.filter.hideEmpty&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"isEmpty"===n?"checked":"unchecked",onClick:()=>{i(be.IsEmpty)},children:t("est_vide_96759")}),(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"isNotEmpty"===n?"checked":"unchecked",onClick:()=>{i(be.IsNotEmpty)},children:t("n_est_pas_vide_45804")})]}),(0,o.jsx)(Fd,{height:"7"}),(0,o.jsx)(Dn,{children:(0,o.jsx)(Un,{disabled:!d,onClick:()=>{e.onAdd({operator:n,value:c,slug:e.filterPredicate.filter.slug})},children:t("ajouter_le_filt_54222")})})]})},Lf=e=>{const t=Yt(),[n,i]=(0,r.useState)(e.filterPredicate.predicate?.operator??(e.filterPredicate.filter.isEncrypted?be.IsEmpty:be.Contains)),[s,a]=(0,r.useState)(e.filterPredicate.predicate?.value??""),c="contains"!==n&&"notContains"!==n||an(s);return(0,o.jsxs)(o.Fragment,{children:[!0!==e.filterPredicate.filter.isEncrypted&&(0,o.jsx)(dg,{state:"contains"===n?"checked":"unchecked",onClick:()=>{i(be.Contains)},children:t("contient_34012")}),"contains"===n&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"1"}),(0,o.jsxs)(Dn,{children:[(0,o.jsx)(Fd,{width:"6"}),(0,o.jsx)(cu,{value:s,onChange:a})]}),(0,o.jsx)(Fd,{height:"1"})]}),!0!==e.filterPredicate.filter.isEncrypted&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"notContains"===n?"checked":"unchecked",onClick:()=>{i(be.NotContains)},children:t("ne_contient_pas_85399")})]}),"notContains"===n&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"1"}),(0,o.jsxs)(Dn,{children:[(0,o.jsx)(Fd,{width:"6"}),(0,o.jsx)(cu,{value:s,onChange:a})]}),(0,o.jsx)(Fd,{height:"1"})]}),!0!==e.filterPredicate.filter.isEncrypted&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"startsWith"===n?"checked":"unchecked",onClick:()=>{i(be.StartsWith)},children:t("commence_par_11056")})]}),"startsWith"===n&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"1"}),(0,o.jsxs)(Dn,{children:[(0,o.jsx)(Fd,{width:"6"}),(0,o.jsx)(cu,{value:s,onChange:a})]}),(0,o.jsx)(Fd,{height:"1"})]}),!0!==e.filterPredicate.filter.isEncrypted&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"endsWith"===n?"checked":"unchecked",onClick:()=>{i(be.EndsWith)},children:t("finit_par_79657")})]}),"endsWith"===n&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"1"}),(0,o.jsxs)(Dn,{children:[(0,o.jsx)(Fd,{width:"6"}),(0,o.jsx)(cu,{value:s,onChange:a})]}),(0,o.jsx)(Fd,{height:"1"})]}),!0!==e.filterPredicate.filter.hideEmpty&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"isEmpty"===n?"checked":"unchecked",onClick:()=>{i(be.IsEmpty)},children:t("est_vide_96759")}),(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"isNotEmpty"===n?"checked":"unchecked",onClick:()=>{i(be.IsNotEmpty)},children:t("n_est_pas_vide_45804")})]}),e.showIsValid&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"isValid"===n?"checked":"unchecked",onClick:()=>{i(be.IsValid)},children:t("est_valide_72630")}),(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"isNotValid"===n?"checked":"unchecked",onClick:()=>{i(be.IsNotValid)},children:t("n_est_pas_valid_75405")})]}),(0,o.jsx)(Fd,{height:"7"}),(0,o.jsx)(Dn,{children:(0,o.jsx)(Un,{disabled:!c,onClick:()=>{e.onAdd({operator:n,value:s,slug:e.filterPredicate.filter.slug})},children:t("ajouter_le_filt_54222")})})]})},Vf=e=>{const t=Yt(),[n,i]=(0,r.useState)(e.filterPredicate.predicate?.operator??be.Is),s=(0,r.useMemo)(()=>Sc(e.filterPredicate.filter,t),[e.filterPredicate.filter]),[c,l]=(0,r.useState)(a(e.filterPredicate.predicate?.value)?e.filterPredicate.predicate.value:[]),[d,u]=(0,r.useState)(e.filterPredicate.predicate?.value2??1),h=a(c);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(dg,{state:"is"===n?"checked":"unchecked",onClick:()=>{i(be.Is)},children:t("est_25967")}),"is"===n&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"1"}),(0,o.jsxs)(Dn,{children:[(0,o.jsx)(Fd,{width:"6"}),(0,o.jsx)(gg,{isSearchVisible:!0,isSelectAllVisible:!0,multiple:!0,placeholder:t("s_lectionner_de_52380"),values:c,onChange:l,children:s})]}),(0,o.jsx)(Fd,{height:"1"})]}),(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"isNot"===n?"checked":"unchecked",onClick:()=>{i(be.IsNot)},children:t("n_est_pas_97826")}),"isNot"===n&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"1"}),(0,o.jsxs)(Dn,{children:[(0,o.jsx)(Fd,{width:"6"}),(0,o.jsx)(gg,{isSearchVisible:!0,isSelectAllVisible:!0,multiple:!0,placeholder:t("s_lectionner_de_52380"),values:c,onChange:l,children:s})]}),(0,o.jsx)(Fd,{height:"1"})]}),(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"contains"===n?"checked":"unchecked",onClick:()=>{i(be.Contains)},children:t("est_le_choix_07450")}),"contains"===n&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"1"}),(0,o.jsxs)(Dn,{children:[(0,o.jsx)(Fd,{width:"6"}),(0,o.jsx)(cu,{shouldParseAsInt:!0,value:d,onChange:u})]}),(0,o.jsx)(Fd,{height:"1"}),(0,o.jsxs)(Dn,{children:[(0,o.jsx)(Fd,{width:"6"}),(0,o.jsx)(gg,{isSearchVisible:!0,isSelectAllVisible:!0,multiple:!0,placeholder:t("s_lectionner_de_52380"),values:c,onChange:l,children:s})]}),(0,o.jsx)(Fd,{height:"1"})]}),(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"isEmpty"===n?"checked":"unchecked",onClick:()=>{i(be.IsEmpty)},children:t("est_vide_96759")}),(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:"isNotEmpty"===n?"checked":"unchecked",onClick:()=>{i(be.IsNotEmpty)},children:t("n_est_pas_vide_45804")}),(0,o.jsx)(Fd,{height:"7"}),(0,o.jsx)(Dn,{children:(0,o.jsx)(Un,{disabled:!h,onClick:()=>{e.onAdd({operator:n,value:c,value2:d,slug:e.filterPredicate.filter.slug})},children:t("ajouter_le_filt_54222")})})]})},Uf=async(e,t,n)=>{const i=await to();if("createdBy"===n.slug&&n.organizationId){const{organization:e}=await function(e,t){return co("query Admins($organizationId: OrganizationId!, $eventId: EventId) {\n organization(id: $organizationId) {\n usersInfos(eventId: $eventId, roleTypes: [OrganizationAdmin, EventAdmin]) {\n nodes {\n userId\n email\n name\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({organizationId:n.organizationId,eventId:n.eventId},i);n.values=e.usersInfos.nodes.map(({userId:e,email:t,name:n})=>({id:e,name:`${an(n)?n:"-"} - ${t}`})),n.needLoading=!1}else if("leaders"===n.slug&&n.organizationId){const{organization:e}=await function(e,t){return co('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:n.organizationId,eventId:n.eventId},i);n.values=e.usersInfos.nodes,n.needLoading=!1}else if("delegationCategory"===n.slug&&n.organizationId){const{organization:e}=await function(e,t){return co("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:n.organizationId,level:n.eventId?le.Event:le.Organization,eventId:n.eventId},i);n.values=(0,Uo.A)(e.delegationsCategories.nodes,e=>e.name.toLowerCase()),n.needLoading=!1}else if("tag"===n.slug&&n.organizationId){const{organization:e}=await function(e,t){return co("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:n.organizationId,eventId:n.eventId,context:n.tagContext},i);n.values=(0,Uo.A)(e.tags.nodes,e=>e.name.toLowerCase()),n.needLoading=!1}else if(n.eventId){if(["preassignedPosition","position","wishedPositions"].includes(n.slug)){const{event:e}=await function(e,t){return co("query VolunteersSegmentsPositions($eventId: EventId!) {\n event(id: $eventId) {\n positions {\n nodes {\n id\n name\n positionCategoryName\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({eventId:n.eventId},i);n.valuesGroups=(0,Uo.A)(Object.entries((0,lh.A)(e.positions.nodes,e=>e.positionCategoryName)).map(([e,t])=>({name:t[0].positionCategoryName,values:(0,Uo.A)(t,e=>e.name.toLowerCase())})),({name:e})=>e.toLowerCase()),n.needLoading=!1}else if("hasOtherEventPosition"===n.slug&&n.organizationId){const{organization:{positions:e}}=await function(e,t){return co("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:n.organizationId,eventId:n.eventId},i);n.valuesGroups=(0,Uo.A)(Object.entries((0,lh.A)(e.nodes,e=>e.positionCategoryName)).map(([e,t])=>({name:`${t[0].event.name}: ${t[0].positionCategoryName}`,values:(0,Uo.A)(t,e=>e.name.toLowerCase())})),({name:e})=>e.toLowerCase()),n.needLoading=!1}else if(["positionSlotId","wishedPositionsSlots","checkInAtPositionSlot","checkOutAtPositionSlot"].includes(n.slug)){const{event:e}=await function(e,t){return co("query VolunteersSegmentsPositionsSlots($eventId: EventId!) {\n event(id: $eventId) {\n positionsSlots {\n nodes {\n id\n name\n range\n\n position {\n name\n }\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({eventId:n.eventId},i);n.valuesGroups=((e,t)=>(0,Uo.A)(Object.values((0,lh.A)(t,e=>e.position.name)).map(t=>({name:t[0].position.name,values:(0,Uo.A)(t.map(t=>({id:t.id,name:gh(e,t,t.position.name,{position:{includeNameAtEnd:!0}}),startTime:t.range.start.toMillis()})),({startTime:e})=>e)})),({name:e})=>e))(t,e.positionsSlots.nodes),n.needLoading=!1}else if(["positionCategory","preassignedPositionCategory","wishedPositionsCategories"].includes(n.slug)){const{event:e}=await function(e,t){return co("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:n.eventId},i);n.values=(0,Uo.A)(e.positionsCategories,e=>e.name.toLowerCase()),n.needLoading=!1}else if("wishedSlotsCustom"===n.slug){const{event:t}=await function(e,t){return co("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:n.eventId},i);n.valuesGroups=((e,t)=>{const n=t.customSlotsPeriods.flatMap(e=>hp(e.startDate??t.startAt,e.endDate??t.endAt,e.customSlots,t.ranges,ve.AllDays));return(0,Uo.A)(Object.values((0,lh.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"),Bi.DateOnly.WeekdayLongMonthLong),values:t.map(({name:e,interval:t})=>({id:t.toISO(),name:mp(e,t)}))}})})(e,t),n.needLoading=!1}else if("accreditation"===n.slug){const{event:e}=await function(e,t){return co("query VolunteersSegmentsAccreditations($eventId: EventId!) {\n event(id: $eventId) {\n accreditations {\n nodes {\n id\n name\n accreditationCategoryName\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({eventId:n.eventId},i);n.valuesGroups=(0,Uo.A)(Object.entries((0,lh.A)(e.accreditations.nodes,e=>e.accreditationCategoryName)).map(([e,t])=>({name:t[0].accreditationCategoryName,values:(0,Uo.A)(t,e=>e.name.toLowerCase())})),({name:e})=>e.toLowerCase()),n.needLoading=!1}else if("hasOtherEventAccreditation"===n.slug&&n.organizationId){const{organization:{accreditations:e}}=await function(e,t){return co("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:n.organizationId,eventId:n.eventId},i);n.valuesGroups=(0,Uo.A)(Object.entries((0,lh.A)(e.nodes,e=>e.accreditationCategoryName)).map(([e,t])=>({name:`${t[0].event.name}: ${t[0].accreditationCategoryName}`,values:(0,Uo.A)(t,e=>e.name.toLowerCase())})),({name:e})=>e.toLowerCase()),n.needLoading=!1}else if("accreditationCategory"===n.slug){const{event:e}=await function(e,t){return co("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:n.eventId},i);n.values=(0,Uo.A)(e.accreditationsCategories,e=>e.name.toLowerCase()),n.needLoading=!1}else if("positionsSegments"===n.slug){const{event:e}=await function(e,t){return co("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:n.eventId},i);n.valuesGroups=(0,Uo.A)(e.segmentsFolders,e=>e.index).map(e=>({name:e.name,values:(0,Uo.A)(e.segments,e=>e.index)})),n.needLoading=!1}else if("accreditationsSegments"===n.slug){const{event:e}=await function(e,t){return co("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:n.eventId},i);n.valuesGroups=(0,Uo.A)(e.segmentsFolders,e=>e.index).map(e=>({name:e.name,values:(0,Uo.A)(e.segments,e=>e.index)})),n.needLoading=!1}else if("delegationsSegments"===n.slug||"isDelegationLeader"===n.slug){const{event:e}=await function(e,t){return co("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:n.eventId},i);n.valuesGroups=(0,Uo.A)(e.segmentsFolders,e=>e.index).map(e=>({name:e.name,values:(0,Uo.A)(e.segments,e=>e.index)})),n.needLoading=!1}else if("forms"===n.slug||"form"===n.slug||"formsInsertedAt"===n.slug){const{event:e}=await function(e,t){return co("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:[ji.SegmentFormFragment]})}({eventId:n.eventId},i);n.values=(0,Uo.A)(e.forms.nodes,e=>e.name.toLowerCase()),n.needLoading=!1}else if("campaign"===n.slug||"campaignReply"===n.slug){const{event:e}=await function(e,t){return co("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:[ji.SegmentCampaignFragment]})}({eventId:n.eventId},i);n.campaigns=(0,Uo.A)(e.campaigns.nodes,e=>e.name.toLowerCase()),n.needLoading=!1}else if("delegation"===n.slug){const{event:e}=await function(e,t){return co("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:n.eventId},i);n.values=(0,Uo.A)(e.delegations.nodes,e=>e.name.toLowerCase()),n.needLoading=!1}else if(["accreditationSlotId","scannedAccreditationsSlots","wishedAccreditationsSlots"].includes(n.slug)){const{event:t}=await function(e,t){return co("query VolunteersSegmentsAccreditationsSlots($eventId: EventId!) {\n event(id: $eventId) {\n accreditationsSlots(includeHidden: true) {\n nodes {\n id\n name\n date\n\n accreditation {\n name\n }\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({eventId:n.eventId},i);n.valuesGroups=((e,t)=>(0,Uo.A)(Object.values((0,lh.A)(t,e=>e.accreditation.name)).map(t=>({name:t[0].accreditation.name,values:(0,Uo.A)(t.map(t=>({id:t.id,name:wh(e,t,t.accreditation.name,{accreditation:{includeNameAtEnd:!0}})})),e=>e.name)})),({name:e})=>e))(e,t.accreditationsSlots.nodes),n.needLoading=!1}else if(n.slug===Xc.WeezaccessChecklists){const{event:e}=await function(e,t){return co("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:n.eventId},i);n.values=(0,Uo.A)(e.weezaccessChecklists,e=>e.name.toLowerCase()),n.needLoading=!1}else if("commentWrittenBy"===n.slug){const{organization:e}=await function(e,t){return co("query VolunteersSegmentsLoaders($organizationId: OrganizationId!, $eventId: EventId!) {\n organization(id: $organizationId) {\n admins: usersInfos(roleTypes: [OrganizationAdmin, EventAdmin]) {\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:n.organizationId,eventId:n.eventId},i);n.values=(0,Uo.A)((0,Er.A)(e.admins.nodes.concat(e.usersInfos.nodes),e=>e.id),e=>e.nameOrEmail.toLowerCase()).map(({id:e,nameOrEmail:t})=>({id:e,name:t})),n.needLoading=!1}}else if(n.organizationId)if("event"===n.slug){const{organization:e}=await function(e,t){return co("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:[ji.SegmentEventFragment]})}({organizationId:n.organizationId},i);n.values=(0,Uo.A)(e.events.nodes,e=>e.name.toLowerCase()),n.needLoading=!1}else if("forms"===n.slug||"formsInsertedAt"===n.slug){const{organization:e}=await function(e,t){return co("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:[ji.SegmentFormFragment]})}({organizationId:n.organizationId},i);n.values=(0,Uo.A)(e.forms.nodes,e=>e.name.toLowerCase()),n.needLoading=!1}else if("campaign"===n.slug){const{organization:e}=await function(e,t){return co("query UsersSegmentsCampaigns($organizationId: OrganizationId!) {\n organization(id: $organizationId) {\n campaigns(level: Organization, states: [Done, Scheduled]) {\n nodes {\n ...SegmentCampaign\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[ji.SegmentCampaignFragment]})}({organizationId:n.organizationId},i);n.campaigns=(0,Uo.A)(e.campaigns.nodes,e=>e.name.toLowerCase()),n.needLoading=!1}else if("positionCustomField"===n.slug||"accreditationCustomField"===n.slug){const{organization:e}=await function(e,t){return co("query ConditionsCustomFields($organizationId: OrganizationId!) {\n organization(id: $organizationId) {\n customFields(variety: UserInfo, privacy: All, fieldTypes: [Checkbox, Select]) {\n nodes {\n id\n name\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({organizationId:n.organizationId},i);n.values=(0,Uo.A)(e.customFields.nodes,e=>e.name.toLowerCase()),n.needLoading=!1}else if("delegation"===n.slug){const{organization:e}=await function(e,t){return co("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:n.organizationId},i);n.valuesGroups=(0,Uo.A)(Object.entries((0,lh.A)(e.delegations.nodes,e=>e.event?.id||-1)).map(([t,n])=>({name:n[0].event?.name??e.name,values:(0,Uo.A)(n,e=>e.name.toLowerCase())})),({name:e})=>e.toLowerCase()),n.needLoading=!1}else if("usersSegments"===n.slug){const{organization:e}=await function(e,t){return co("query VolunteersSegmentsUsersSegments($organizationId: OrganizationId!) {\n organization(id: $organizationId) {\n segmentsFolders(level: Organization, 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:n.organizationId},i);n.valuesGroups=(0,Uo.A)(e.segmentsFolders,e=>e.index).map(e=>({name:e.name,values:(0,Uo.A)(e.segments,e=>e.index)})),n.needLoading=!1}},Gf=e=>{const t=Yt(),n=e.filterPredicate.filter.slug,i=e.filterPredicate.filter.fieldType,s=function(e){const t=Kt(is),n=Kt(sa),[i,o]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{e.needLoading&&(o(!0),Uf(t,n,e).then(()=>{o(!1)}))},[e.needLoading]),i}(e.filterPredicate.filter);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(Dn,{align:"center",css:{color:"$gray500",cursor:"pointer",fontSize:"$textXs",fontWeight:"$semiBold"},gap:"3",onClick:e.onBack,children:[(0,o.jsx)("i",{className:"fa-regular fa-arrow-left"}),t("retour_la_lis_63860")]}),(0,o.jsx)(Fd,{height:"4"}),(0,o.jsx)(xn,{color:"gray800",fontSize:"textMd",fontWeight:"semiBold",children:e.filterPredicate.filter.name}),(0,o.jsx)(Fd,{height:"3"}),s?(0,o.jsx)(Nn,{}):"condition"===n?(0,o.jsx)(xf,{filterPredicate:e.filterPredicate,onAdd:e.onAdd}):"isLeader"===n||"isPositionLeader"===n||"isPositionCategoryLeader"===n||"isDelegationLeader"===n?(0,o.jsx)(Ff,{filterPredicate:e.filterPredicate,onAdd:e.onAdd}):"isAdmin"===n?(0,o.jsx)(Of,{filterPredicate:e.filterPredicate,onAdd:e.onAdd}):"privacy"===n?(0,o.jsx)(Nf,{filterPredicate:e.filterPredicate,onAdd:e.onAdd}):"isTeam"===n?(0,o.jsx)(zf,{filterPredicate:e.filterPredicate,onAdd:e.onAdd}):"wishedPositions"===n||"wishedPositionsCategories"===n?(0,o.jsx)(Vf,{filterPredicate:e.filterPredicate,onAdd:e.onAdd}):"formsInsertedAt"===n?(0,o.jsx)(Rf,{filterPredicate:e.filterPredicate,onAdd:e.onAdd}):"numberOfAssignmentsPerDay"===n||"volunteersMinutesDays"===n?(0,o.jsx)($f,{filterPredicate:e.filterPredicate,onAdd:e.onAdd}):"campaignReply"===n?(0,o.jsx)(Cf,{filterPredicate:e.filterPredicate,onAdd:e.onAdd}):[Z.Address,Z.Text,Z.Textarea].includes(i)?(0,o.jsx)(Lf,{filterPredicate:e.filterPredicate,showIsValid:!1,onAdd:e.onAdd}):[Z.Country,Z.Language,Z.Nationality,Z.Select,Z.Sex].includes(i)?(0,o.jsx)(Bf,{filterPredicate:e.filterPredicate,onAdd:e.onAdd}):[Z.Checkbox,Z.Validation].includes(i)?(0,o.jsx)(If,{filterPredicate:e.filterPredicate,onAdd:e.onAdd}):i===Z.Phone?(0,o.jsx)(Lf,{filterPredicate:e.filterPredicate,showIsValid:!0,onAdd:e.onAdd}):i===Z.Number?(0,o.jsx)(Mf,{filterPredicate:e.filterPredicate,onAdd:e.onAdd}):i===Z.DateTimeRange?(0,o.jsx)(Df,{filterPredicate:e.filterPredicate,onAdd:e.onAdd}):i===Z.Date?(0,o.jsx)(jf,{filterPredicate:e.filterPredicate,onAdd:e.onAdd}):i===Z.Datetime?(0,o.jsx)(Tf,{filterPredicate:e.filterPredicate,onAdd:e.onAdd}):i===Z.File?(0,o.jsx)(Pf,{filterPredicate:e.filterPredicate,onAdd:e.onAdd}):i===Z.Campaign?(0,o.jsx)(wf,{filterPredicate:e.filterPredicate,onAdd:e.onAdd}):(0,o.jsx)("div",{children:"TODO"})]})};function Wf(e){switch(e){case Z.Address:return"map-location";case Z.Text:case Z.Textarea:return"text";case Z.Checkbox:return"square-check";case Z.Validation:return"check";case Z.Select:return"list-ul";case Z.Date:return"calendar";case Z.Datetime:return"calendar-day";case Z.Time:return"clock";case Z.File:return"file";case Z.Phone:return"phone";case Z.Language:return"language";case Z.Number:return"00";case Z.Sex:return"venus-mars";case Z.Nationality:case Z.Country:return"flag";case Z.DateTimeRange:return"calendar-range";case Z.Campaign:return"paper-plane";default:return Br()}}const qf=e=>{const t=(0,r.useMemo)(()=>(0,Ei.A)(e.filtersPredicates.map(({filter:e})=>e.category)),[e.filtersPredicates]),n=(0,r.useMemo)(()=>(0,lh.A)(e.filtersPredicates,({filter:e})=>e.category),[e.filtersPredicates]);return(0,o.jsx)(Dn,{css:{border:"1px solid $gray200",borderRadius:"$1",boxShadow:"$xs",px:"$4"},direction:"column",children:t.map((t,i)=>{const s=n[t];return(0,o.jsxs)(r.Fragment,{children:[!e.isEdit&&(0,o.jsxs)(o.Fragment,{children:[0!==i&&(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(xn,{css:{paddingBottom:"$2",paddingTop:"$3"},font:"gray500 textXs semiBold",children:t})]}),s.map(t=>{const{filter:n}=t;return(0,o.jsxs)(Dn,{align:"center",css:{py:"$2"},gap:"3",children:[(0,o.jsx)(Dn,{align:"center",css:{borderRadius:"$1",height:"32px",width:"32px"},justify:"center",children:(0,o.jsx)(Mn,{icon:Wf(n.fieldType)})}),(0,o.jsxs)(Dn,{css:{flex:"1",overflow:"hidden"},direction:"column",gap:"1",children:[(0,o.jsx)(xn,{color:"gray900",css:{ellipsis:!0},fontWeight:"medium",title:n.name,width:1,children:n.name}),an(n.label)&&(0,o.jsx)(xn,{color:"gray500",css:{ellipsis:!0},title:n.label,width:1,children:n.label})]}),e.isEdit?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Un,{color:"white",leftIcon:"pen",size:"sm",onClick:()=>{e.onEdit(t)}}),(0,o.jsx)(Un,{color:"white",leftIcon:"trash-can",size:"sm",onClick:()=>{e.onDelete(n.slug)}})]}):(0,o.jsx)(Un,{color:"white",leftIcon:"plus",size:"sm",onClick:()=>{e.onAdd(t)}})]},n.slug)})]},i)})})},Hf=e=>{const t=Yt(),[n,i]=(0,r.useState)(e.selectedFilterPredicate),[s,a]=(0,r.useState)((0,yf.A)(e.predicates)),c=(0,r.useCallback)(e=>{a((0,jp.jM)(t=>{const n=t.findIndex(t=>t.slug===e.slug);-1===n?t.push(e):t[n]=e})),i(null)},[a,i]),l=(0,r.useCallback)(e=>{a((0,jp.jM)(t=>{const n=t.findIndex(t=>t.slug===e);t.splice(n,1)}))},[a]),[d,u]=(0,r.useState)(""),[h,m]=xc(s,e.possibleFilters,d);return(0,o.jsxs)(ff,{size:"sm",onClose:e.onClose,children:[(0,o.jsxs)(_f,{children:[(0,o.jsx)(Fd,{height:"6"}),(0,o.jsx)(xn,{color:"gray900",fontSize:"textXl",children:t("filtres_64574")}),an(e.subtitle)&&(0,o.jsx)(xn,{color:"gray500",children:e.subtitle}),(0,o.jsx)(Fd,{height:"6"}),n?(0,o.jsx)(Gf,{filterPredicate:n,onAdd:c,onBack:()=>{i(null)}}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(cu,{placeholder:t("rechercher_un_f_22061"),value:d,onChange:u}),(0,o.jsx)(Fd,{height:"6"}),s.length>0&&h.length>0&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(xn,{color:"gray900",fontSize:"textMd",fontWeight:"semiBold",children:t("liste_des_filtr_29511")}),(0,o.jsx)(Fd,{height:"2"}),(0,o.jsx)(qf,{filtersPredicates:h,isEdit:!0,onDelete:l,onEdit:e=>{i(e)}}),(0,o.jsx)(Fd,{height:"8"})]}),(0,o.jsx)(xn,{color:"gray900",fontSize:"textMd",fontWeight:"semiBold",children:t("liste_des_filtr_37728")}),m.length>0&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"2"}),(0,o.jsx)(qf,{filtersPredicates:m,isEdit:!1,onAdd:e=>{i(e)}})]})]}),(0,o.jsx)(Fd,{height:"6"})]}),null===n&&(0,o.jsx)(bf,{children:(0,o.jsxs)(Dn,{gap:"3",justify:"end",children:[(0,o.jsx)(Un,{onClick:()=>{e.onFilter(s),e.onClose()},children:e.buttonText||t("filtrer_78031")}),(0,o.jsx)(Un,{color:"white",onClick:e.onClose,children:t("annuler_48254")})]})})]})},Kf=r.createContext({});function Yf(){return r.useContext(Kf)}const Zf=()=>{const e=Yt(),t=Kt(Ec),{filtersPredicates:n,clearNameCursors:i,setPredicates:s,setIsFilterOpen:c,setSelectedFilterPredicate:l,predicates:d}=Yf(),u=(0,r.useCallback)(()=>{i(),s([])},[i,s]),h=(0,r.useCallback)(e=>{l(e),c(!0)},[c,l]),m=(0,r.useCallback)(e=>{i(),s((0,sg.A)(d,e.predicate))},[d,i,s]);return function(e){const t=Kt(is),n=Kt(sa),[i,o]=(0,r.useState)(!1);(0,r.useEffect)(()=>{const i=e.filter(({filter:e})=>e.needLoading);a(i)&&(o(!0),Promise.all(i.map(({filter:e})=>Uf(t,n,e))).then(()=>{o(!1)}))},[e])}(n),a(n)?(0,o.jsxs)(Dn,{align:"center",gap:"3",width:1,wrap:"wrap",children:[n.map((e,n)=>e.filter.needLoading?(0,o.jsx)(og,{leftIcon:"loader"},n):(0,o.jsx)(og,{cursor:"pointer",ellipsis:!0,rightIcon:"xmark",onContentClick:()=>{h(e)},onRightIconClick:()=>{m(e)},children:t.filterPredicateToText(e)},n)),(0,o.jsx)(xn,{color:"gray700",css:{cursor:"pointer"},fontWeight:"medium",onClick:u,children:e("r_initialiser_l_66835")})]}):null};const Jf=e=>{const{translate:t}=Id(),{columnsSearch:n,setColumnsSearch:i}=Yf(),[s,a]=(0,r.useState)(""),c=(0,r.useMemo)(()=>an(s)?e.searchableColumns.filter(e=>e.name.toLowerCase().trim().includes(s.toLowerCase().trim())):e.searchableColumns,[e.searchableColumns,s]);return(0,o.jsxs)(Gm,{children:[(0,o.jsx)(Jm,{children:(0,o.jsx)(Un,{color:"white",css:{borderLeft:"none",borderBottomLeftRadius:"0",borderTopLeftRadius:"0"},leftIcon:"bars-filter"})}),(0,o.jsx)(Zm,{css:{padding:"0"},maxHeight:350,placement:"bottom-end",width:320,children:(0,o.jsxs)(Dn,{css:{padding:"$4 $6"},direction:"column",gap:"3",children:[(0,o.jsx)(xn,{font:"gray800 textMd medium",children:t("rechercher_sur_85243")}),(0,o.jsx)(cu,{icon:"magnifying-glass",placeholder:t("filtrer_78031"),state:"search",value:s,onChange:a}),(0,o.jsx)(Dn,{direction:"column",gap:"3",children:c.map(({slug:e,name:t})=>(0,o.jsx)(Qh,{state:n.includes(e)?"checked":"unchecked",onClick:t=>{i(l(n,e,"checked"===t))},children:t},e))})]})})]})},Xf=()=>{const e=Yt(),{isEditMode:t,massActions:n,name:i,possibleColumns:s,possibleRenderings:c,reload:l,renderActions:d,rendering:u,setAreColumnsOpen:h,setIsEditMode:m,setIsFilterOpen:g,setName:p,setNameDebounced:f,setRendering:_,showEditColumns:b,showEditMode:k,showFilters:v,showMassActions:A,showSearchColumns:y,totalCount:w}=Yf(),C=A&&n.numberOfSelected>0,I=(0,r.useMemo)(()=>(0,Uo.A)(s.filter(e=>e.isSearchable),e=>e.name),[s]),x=(0,r.useMemo)(()=>y?{"& .h-styled-input-container":{borderBottomRightRadius:"0",borderTopRightRadius:"0"}}:{},[y]);return function(e,t){const n=(0,r.useMemo)(()=>navigator.platform.toLowerCase().startsWith("mac"),[]),i=(0,r.useCallback)(i=>{i.key===e&&(n&&i.metaKey||!n&&i.ctrlKey)&&t(i)},[e,t]);(0,r.useEffect)(()=>(document.addEventListener("keydown",i,!1),()=>{document.removeEventListener("keydown",i,!1)}),[e,t,i])}("e",(0,r.useCallback)(()=>{k&&m(!t)},[t,k,m])),(0,o.jsxs)(Dn,{align:"center",gap:"4",children:[(0,o.jsxs)(Dn,{width:320,children:[(0,o.jsx)(cu,{css:x,icon:"magnifying-glass",placeholder:e("rechercher_50038"),value:i,onChange:e=>{p(e),f(e)}}),y&&(0,o.jsx)(Jf,{searchableColumns:I})]}),C?(0,o.jsx)(Dn,{css:{flex:"1"},gap:"4",children:"function"==typeof d?d(n,w,l):null}):(0,o.jsxs)(Dn,{css:{flex:"1"},gap:"4",children:[v&&(0,o.jsx)(Un,{color:"gray",leftIcon:"bars-filter",onClick:()=>{g(!0)},children:e("filtres_64574")}),(0,o.jsx)(xn,{css:{flex:"1"}}),a(c)&&(0,o.jsxs)(Gm,{children:[(0,o.jsx)(Jm,{children:(0,o.jsx)(Un,{color:"white",leftIcon:Vc(u),children:Uc(e,u)})}),(0,o.jsx)(Zm,{placement:"bottom-end",children:c.map(t=>(0,o.jsx)(Km,{icon:Vc(t),onClick:()=>_(t),children:Uc(e,t)},t))})]}),b&&(0,o.jsx)(Un,{color:"white",leftIcon:"gear",onClick:()=>{h(!0)},children:e("_diter_les_colo_39630")}),k&&(0,o.jsx)(zh,{value:t,onChange:m,children:e("mode_dition_93778")})]})]})},Qf=()=>(0,o.jsxs)(Dn,{css:{border:"1px solid $gray200",borderBottom:"none",borderTopLeftRadius:"$1",borderTopRightRadius:"$1",padding:"$3 $4"},direction:"column",gap:"4",width:1,children:[(0,o.jsx)(Xf,{}),(0,o.jsx)(Zf,{})]}),e_=e=>{const{translate:t}=Id(),[n,i]=r.useState(e.predicates),[s,c]=r.useState(e.columns),[l,d]=r.useState(e.columnsSearch),[u,h]=r.useState(e.rendering),[m,g]=r.useState(e.name||""),[p,f]=r.useState(e.name||""),[_,b]=r.useState(e.limit),[k,v]=r.useState(e.sort),[A,y]=r.useState(0),w=vf(e=>{f(e),C()}),C=r.useCallback(()=>{y(0)},[y]),I=r.useCallback(t=>{e.setName?.(t),g(t)},[e.setName,g]),x=r.useCallback(()=>{I(""),f(""),C()},[I,f,C]),S=r.useCallback(t=>{e.setPredicates?.(t),i(t)},[e.setPredicates,i]),E=r.useCallback(t=>{e.setColumns?.(t),c(t)},[e.setColumns,c]),j=r.useCallback(t=>{e.setColumnsSearch?.(t),d(t)},[e.setColumnsSearch,d]),T=r.useCallback(t=>{e.setRendering?.(t),h(t)},[e.setRendering,h]),D=r.useCallback(t=>{e.setLimit?.(t),b(t)},[e.setLimit,b]),P=r.useCallback(t=>{e.setSort?.(t),v(t),y(0)},[e.setSort,v,y]),R=r.useMemo(()=>JSON.stringify(e.predicates),[e.predicates]),O=r.useMemo(()=>JSON.stringify(e.columns),[e.columns]),F=r.useMemo(()=>JSON.stringify(e.columnsSearch),[e.columnsSearch]),z=r.useMemo(()=>JSON.stringify(e.rendering),[e.rendering]),M=r.useMemo(()=>JSON.stringify(e.sort),[e.sort]),$=r.useMemo(()=>JSON.stringify(n)!==R||JSON.stringify(s)!==O||JSON.stringify(l)!==F||JSON.stringify(u)!==z||JSON.stringify(k)!==M,[R,n,O,s,F,l,z,u,M,k]),N=r.useMemo(()=>e.columnsToIncludes?.(s,u)??{},[s,u,e.columnsToIncludes]),[B,L]=r.useState(null),[V,U]=r.useState(!1),G=r.useCallback(async()=>{U(!0);const t=await e.loadDataList({...N,...e.loadDataListParams||{},organizationId:e.organizationId||void 0,eventId:e.eventId||void 0,name:an(p)?p:null,columnsSearch:a(l)?l:null,predicates:n,limit:_,offset:A,sort:k},await to());L(t.data),U(!1)},[l,N,_,p,A,n,U,L,k,e.organizationId,e.eventId,e.loadDataList,e.loadDataListParams]),[W,q]=r.useState([]),{numberOfPages:H,totalCount:K}=Af(B?.rows),[Y,Z]=r.useState({}),J=r.useCallback(async t=>{Z(e=>({...e,[t]:!0}));const n=(await e.loadRow({...N,...e.loadRowParams||{},organizationId:e.organizationId||void 0,eventId:e.eventId||void 0,id:t},await to())).data.row;q(e=>e.map(e=>e.id===t?n:e)),Z(e=>({...e,[t]:!1}))},[N,Z,e.organizationId,e.eventId,e.loadRow,e.loadRowParams]),X=r.useCallback(t=>e.getMassActionId?.(t)??t.id,[e.getMassActionId]),Q=function(){const[e,t]=(0,r.useState)({}),[n,i]=(0,r.useState)(!1),o=(0,r.useMemo)(()=>{const t=Object.values(e).filter(e=>!0!==e.disabled),n=t.filter(e=>"checked"===e.state),i=n.map(e=>e.id),o=(0,Ei.A)(t.map(({state:e})=>e)),r=2===o.length?"indeterminate":"checked"===o[0]?"checked":"unchecked";return{numberOfSelected:n.length,selectAllState:r,selecteds:n,selectedsIds:i}},[e]),s=(0,r.useCallback)((e,n)=>{t(t=>({...t,[e]:{...t[e],state:n}})),"unchecked"===n&&i(!1)},[e,t,i]),a=(0,r.useCallback)(n=>{t(Object.fromEntries(Object.entries(e).filter(([e,t])=>!0!==t.disabled).map(([e,t])=>[e,{...t,state:n}]))),"unchecked"===n&&i(!1)},[e,t,i]);return{getSelectedsInput:(0,r.useCallback)((e,t)=>n?e?{ids:null,predicates:e,segmentId:null}:{ids:null,predicates:null,segmentId:t}:{ids:o.selectedsIds,predicates:null,segmentId:null},[n,o]),isAllSelected:n,numberOfSelected:o.numberOfSelected,selectAllState:o.selectAllState,selecteds:o.selecteds,selectedsIds:o.selectedsIds,setIsAllSelected:i,setStates:t,states:e,toggleRow:s,toggleSelectAll:a}}(),[ee]=r.useMemo(()=>xc(n,e.filters),[n,e.filters]),[te,ne]=r.useState(!1),[ie,oe]=r.useState(!1),[re,se]=r.useState(!1),[ae,ce]=r.useState(null);return r.useEffect(()=>{G()},[l,N,_,p,A,n,k,e.organizationId,e.eventId,e.loadDataList]),r.useEffect(()=>{q(B?.rows?.nodes??[])},[B]),r.useEffect(()=>{Q.setStates(Object.fromEntries(W.map(e=>[`r${X(e)}`,{id:X(e),state:"unchecked"}])))},[W,Q.setStates]),(0,o.jsxs)(Kf.Provider,{value:{areColumnsOpen:re,clearNameCursors:x,columns:s,columnsSearch:l,data:W,filtersPredicates:ee,getMassActionId:X,idToLoading:Y,isEditMode:te,isFilterOpen:ie,isLoading:V,isSaveVisible:$,limit:_,loadDataResult:B,massActions:Q,name:m,nameDebounced:p,numberOfPages:H,offset:A,possibleColumns:e.possibleColumns,possibleRenderings:e.possibleRenderings,predicates:n,reload:G,reloadRow:J,renderActions:e.renderActions,rendering:u,selectedFilterPredicate:ae,setAreColumnsOpen:se,setColumns:E,setColumnsSearch:j,setIsEditMode:ne,setIsFilterOpen:oe,setLimit:D,setName:I,setNameDebounced:w,setOffset:y,setPredicates:S,setRendering:T,setSelectedFilterPredicate:ce,setSort:P,showEditColumns:e.showEditColumns,showEditMode:e.showEditMode,showFilters:e.showFilters,showMassActions:e.showMassActions,showRowDropdown:e.showRowDropdown,showRowEdit:e.showRowEdit,showSearchColumns:e.showSearchColumns,sort:k,totalCount:K},children:[(0,o.jsxs)(Dn,{css:{background:"white"},direction:"column",height:1,width:1,children:[(0,o.jsx)(Qf,{}),e.children]}),ie&&(0,o.jsx)(Hf,{possibleFilters:e.filters,predicates:n,selectedFilterPredicate:ae,onClose:()=>{oe(!1)},onFilter:e=>{x(),S(e)}}),re&&(0,o.jsx)(kf,{columns:e.possibleColumns,initialSelectedColumns:s,saveButtonText:t("_diter_les_colo_39630"),searchPlaceholder:t("rechercher_un_c_86475"),subtitle:t("personnaliser_l_03763"),title:t("_dition_des_col_70300"),onClose:()=>{se(!1)},onSave:E})]})};var t_=n(5830);class n_ extends t_.Ay{events;forms;organizations;segmentsFolders;constructor(){super("recrewteer"),this.version(6).stores({events:"id",forms:"id",organizations:"id",segmentsFolders:"id"})}}const i_=new n_;function o_(e,t,n){const{getLocalOrganization:i,updateLocalOrganization:o}=function(e){const t=r.useCallback(async()=>{let t=await i_.organizations.get(e);return t||(t={id:e},await i_.organizations.put(t)),t},[e]),n=r.useCallback(async n=>{const i=await t(),o=(0,Ys.A)(i,{id:e},n);return await i_.organizations.put(o),o},[e,t]);return{getLocalOrganization:t,updateLocalOrganization:n}}(e),[s,a]=r.useState(n),[c,l]=r.useState(!0),d=r.useCallback(async e=>{a(e),await o({[t]:e})},[t,a,o]);return r.useEffect(()=>{(async()=>{const e=await i();e[t]&&a(e[t]),l(!1)})()},[e,i,a,l]),[s,d,c]}function r_(e){return(0,r.useMemo)(()=>new Map(e.map(e=>[e.slug,e])),[e])}const s_=e=>{return(0,o.jsxs)(Fp,{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:Se.Asc}:t.direction===Se.Asc?{attribute:n,direction:Se.Desc}:null))},children:[e.children,(0,o.jsx)(Fd,{width:"2"}),(0,o.jsx)(Mn,{icon:(t=e.sort,n=e.attribute,null===t||t.attribute!==n?"arrow-down-arrow-up":t.direction===Se.Asc?"arrow-up":"arrow-down")})]});var t,n},a_=e=>(0,o.jsx)(Dn,{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,o.jsx)(yu,{borderRadius:"$1",height:1,width:1})}),c_=e=>{const t=!!e.paginationRow;return(0,o.jsx)($p,{children:(0,o.jsxs)(Dn,{direction:"column",width:1,children:[(0,o.jsxs)(ku,{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,o.jsx)(xn,{css:{overflow:"auto"},children:e.children})]}),e.paginationRow]})})},l_=e=>(0,o.jsx)(Un,{css:{background:e.active?"$gray100":"white",border:0,borderInlineStart:"1px solid $gray300",color:e.disabled?"$gray400":"$gray700",cursor:e.cursor,fontWeight:"$medium",inlineSize:"40px",blockSize:"32px",alignItems:"center",justifyContent:"center",borderRadius:"unset"},color:"white",textAlign:"center",disabled:e.disabled,onClick:()=>{e.onClick()},children:e.children}),d_=e=>{const t=Yt(),n=dm(),i=e.limit??25,r=Zt(),s=e.offset/i,a=(0,Xs.A)(Math.max(0,s-2),Math.min(e.numberOfPages,s+3)),c=0===s,l=s===e.numberOfPages-1,d=Math.min(e.totalCount,(s+1)*i);return(0,o.jsxs)(Op,{css:{gap:"$6","@tablet":{justifyContent:"space-between"}},children:[(0,o.jsx)(xn,{width:150,css:{order:1,display:n?"none":void 0},children:!n&&e.showLimits&&(0,o.jsx)(Dn,{css:{border:"1px solid $gray300",borderRadius:"$1",overflow:"hidden",width:"fit-content","& > button:first-child":{borderLeft:"none"}},children:gf.map((t,n)=>(0,o.jsx)(l_,{active:i===t,cursor:"pointer",disabled:!1,onClick:()=>{e.setLimit?.(t)},children:t},n))})}),!n&&(e.totalCount>i?(0,o.jsxs)(Dn,{css:{border:"1px solid $gray300",borderRadius:"$1",overflow:"hidden",order:3,"& > button:first-child":{borderLeft:"none"}},children:[(0,o.jsx)(l_,{active:!1,cursor:c?"default":"pointer",disabled:c,onClick:()=>e.setOffset(e.offset-i),children:(0,o.jsx)(Mn,{icon:"arrow-left"})}),e.numberOfPages<=7?(0,Xs.A)(0,e.numberOfPages).map(t=>(0,o.jsx)(l_,{active:s===t,cursor:"pointer",disabled:!1,onClick:()=>e.setOffset(t*i),children:t+1},t)):(0,o.jsxs)(o.Fragment,{children:[!a.includes(0)&&(0,o.jsx)(l_,{active:!1,cursor:"pointer",disabled:!1,onClick:()=>e.setOffset(0),children:"1"}),!a.includes(1)&&(0,o.jsx)(l_,{active:!1,cursor:"default",disabled:!1,onClick:uu.A,children:(0,o.jsx)(Mn,{icon:"ellipsis"})}),a.map(t=>(0,o.jsx)(l_,{active:s===t,cursor:"pointer",disabled:!1,onClick:()=>e.setOffset(t*i),children:t+1},t)),!a.includes(e.numberOfPages-2)&&(0,o.jsx)(l_,{active:!1,cursor:"default",disabled:!1,onClick:uu.A,children:(0,o.jsx)(Mn,{icon:"ellipsis"})}),!a.includes(e.numberOfPages-1)&&(0,o.jsx)(l_,{active:!1,cursor:"pointer",disabled:!1,onClick:()=>e.setOffset((e.numberOfPages-1)*i),children:e.numberOfPages})]}),(0,o.jsx)(l_,{active:!1,cursor:l?"default":"pointer",disabled:l,onClick:()=>e.setOffset(e.offset+i),children:(0,o.jsx)(Mn,{icon:"arrow-right"})})]}):(0,o.jsx)(xn,{css:{order:3}})),n&&(0,o.jsx)(Dn,{css:{border:"1px solid $gray300",borderRadius:"$1",overflow:"hidden",order:1,width:"fit-content","& > button:first-child":{borderLeft:"none"}},children:(0,o.jsx)(l_,{active:!1,cursor:c?"default":"pointer",disabled:c,onClick:()=>e.setOffset(e.offset-i),children:(0,o.jsx)(Mn,{icon:"arrow-left"})})}),(0,o.jsx)(xn,{textAlign:n?"center":"end",width:150,css:{order:2,flex:"1","@tablet":{order:3,flex:"unset"}},children:n?[...r(t("page_1_of_2_92409"),(0,o.jsx)("b",{children:s+1}),(0,o.jsx)("b",{children:e.numberOfPages}))]:t("_1_2_sur_3_79592",s*i+1,d,e.totalCount)}),n&&(0,o.jsx)(Dn,{css:{border:"1px solid $gray300",order:3,borderRadius:"$1",overflow:"hidden",width:"fit-content","& > button:first-child":{borderLeft:"none"}},children:(0,o.jsx)(l_,{active:!1,cursor:l?"default":"pointer",disabled:l,onClick:()=>e.setOffset(e.offset+i),children:(0,o.jsx)(Mn,{icon:"arrow-right"})})})]})},u_=e=>(0,o.jsx)(Np,{css:{borderBottomLeftRadius:"$2",borderBottomRightRadius:"$2",height:"56px",...e.css},children:e.children}),h_=({children:e,css:t,gap:n,justify:i,width:r})=>(0,o.jsx)(Op,{width:r??100,children:(0,o.jsx)(Dn,{align:"center",className:"h-controls",css:{cursor:"pointer",display:"none",...t},gap:n??"6",height:1,justify:i,width:1,onClick:Hn,children:e})}),m_=e=>{const{translate:t}=Id(),{showRowEdit:n,getMassActionId:i,massActions:s,reload:a,reloadRow:c,showMassActions:l,showRowDropdown:d}=Yf(),u=s.states[`r${i(e.row)}`]?.state??"unchecked",h=r.useCallback(()=>{c(e.row.id)},[e.row.id,c]),m=d||n;return(0,o.jsxs)(Np,{css:{background:"checked"===u?"$primary100":"white","&:hover":{background:"checked"===u?"$primary100":"$gray100"}},onMouseLeave:e=>{Vm(e.target)},children:[l&&(0,o.jsx)(Op,{justify:"center",width:48,children:(0,o.jsx)(Xh,{state:u,onClick:t=>{s.toggleRow(`r${i(e.row)}`,t)}})}),e.selectedColumns.map(t=>(0,o.jsx)(r.Fragment,{children:e.renderCell(t,e.row,h)},t.slug)),m&&(0,o.jsxs)(h_,{justify:"center",children:[n&&e.getEditPath&&(0,o.jsxs)(tp,{children:[(0,o.jsx)(op,{children:(0,o.jsx)(xn,{children:(0,o.jsx)(Mn,{icon:"pen",to:e.getEditPath(e.row)})})}),(0,o.jsx)(ip,{placement:"top",children:t("_diter_62574")})]}),d&&e.renderRowDropdown?.(e.row,a)]}),e.renderRowPanels?.(e.row,h)]})},g_=e=>{const{columns:t,data:n,idToLoading:i,isLoading:s,limit:a,massActions:c,numberOfPages:l,offset:d,possibleColumns:u,setLimit:h,setOffset:m,setSort:g,showMassActions:p,showRowDropdown:f,showRowEdit:_,sort:b,totalCount:k}=Yf(),v=r.useMemo(()=>t.flatMap(e=>(0,Go.A)([u.find(t=>t.slug===e)])),[t,u]);return(0,o.jsx)(Dn,{css:{flex:"1",overflow:"hidden"},width:1,children:(0,o.jsx)(c_,{"aria-busy":s,headerRow:(0,o.jsxs)(zp,{children:[p&&(0,o.jsx)(Fp,{justify:"center",width:48,children:(0,o.jsx)(Xh,{state:c.selectAllState,onClick:c.toggleSelectAll})}),v.map(e=>e.isSortable?(0,o.jsx)(s_,{attribute:e.sortAttribute,minWidth:e.minWidth,setSort:g,sort:b,width:e.width,children:(0,o.jsx)(xn,{css:{ellipsis:!0},title:e.name,children:e.name})},e.slug):(0,o.jsx)(Fp,{minWidth:e.minWidth,width:e.width,children:(0,o.jsx)(xn,{css:{ellipsis:!0},title:e.name,children:e.name})},e.slug)),(f||_)&&(0,o.jsx)(Fp,{width:100})]}),paginationRow:(0,o.jsx)(u_,{children:(0,o.jsx)(d_,{limit:a,numberOfPages:l,offset:d,setLimit:h,setOffset:m,showLimits:!0,totalCount:k})}),children:s?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(a_,{}),(0,o.jsx)(a_,{}),(0,o.jsx)(a_,{})]}):n.map(t=>i[t.id]?(0,o.jsx)(a_,{},t.id):(0,o.jsx)(m_,{getEditPath:e.getEditPath,renderCell:e.renderCell,renderRowDropdown:e.renderRowDropdown,renderRowPanels:e.renderRowPanels,row:t,selectedColumns:v},t.id))})})},p_=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}},f_=e=>{const[t,n]=(0,r.useState)(an(e.image)?e.image:void 0);if((0,r.useEffect)(()=>{an(e.image)&&n(e.image)},[e.image]),an(t))return(0,o.jsx)("div",{style:{border:e.border,borderRadius:e.size+"px",height:`${e.size}px`,overflow:"hidden",width:`${e.size}px`},children:(0,o.jsx)("img",{alt:"Avatar",src:t,style:{height:`${e.size}px`,width:`${e.size}px`,verticalAlign:"baseline"}})});{const t=function(e,t){if(an(e))return _c(e," ");if(an(t)){const[e]=t.split("@");return _c(e,".")}return""}(e.name,e.email);return(0,o.jsx)("div",{style:{borderRadius:e.size+"px",height:e.size+"px",overflow:"hidden",width:e.size+"px"},children:(0,o.jsx)("div",{className:"h-avatar-initials",style:{alignItems:"center",background:kc(t),color:"white",display:"flex",fontSize:`${p_(e.size)}px`,height:"100%",justifyContent:"center",textTransform:"uppercase",width:"100%"},children:t})})}};function __(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(),Bi.DateTime):""}}return""}const b_=(0,r.createContext)({});function k_(){return(0,r.useContext)(b_)}const v_=e=>{const t=Kt(os),{isEditMode:n}=k_(),{isEditMode:i}=Yf(),r=n||i,s=t.getValue(e.customField,e.fields),a=t.getValueString(e.customField,e.fields),c=!0===s?"checked":!1===s?"unchecked":"indeterminate";return r&&e.updatable?(0,o.jsxs)(Op,{css:{border:"2px solid transparent","& > .h-checkbox-cell-hover":{display:"none"},"&:hover":{border:"2px solid $primary700"},"&:hover > .h-checkbox-cell-default":{display:"none"},"&:hover > .h-checkbox-cell-hover":{display:"block"}},minWidth:e.column.minWidth,width:e.column.width,onClick:Hn,children:[(0,o.jsx)(xn,{className:"h-checkbox-cell-default",children:a}),(0,o.jsx)(xn,{className:"h-checkbox-cell-hover",children:(0,o.jsx)(Xh,{state:c,onClick:async t=>{await e.mutate("checked"===t,e.customField.slug),e.reload()}})})]}):(0,o.jsx)(Op,{css:{border:"2px solid transparent"},minWidth:e.column.minWidth,width:e.column.width,children:a})},A_="h-update-cell-open",y_=e=>{const t=Yt(),n=r.useRef(qi()),[i,s]=r.useState(!1),[a,c]=r.useState(e.initialValue),l=r.useCallback(t=>{s(t),document.body.dispatchEvent(new CustomEvent(A_,{bubbles:!0,detail:{uuid:n.current}})),e.onStateChange?.(t)},[s,e.onStateChange]),d=r.useCallback(e=>{e.detail.uuid!==n.current&&s(!1)},[s]),u=r.useCallback(()=>{l(!1),c(e.initialValue)},[e.initialValue,l,c]);return r.useEffect(()=>(document.addEventListener(A_,d),()=>{document.removeEventListener(A_,d)}),[d]),(0,o.jsxs)(Gm,{doNotCloseOnOtherOpen:!0,isOpen:i,onStateChange:l,children:[(0,o.jsx)(Jm,{children:(0,o.jsx)(Op,{css:{...e.css,border:"2px solid transparent",cursor:"text","&:hover":{border:"2px solid $primary700"}},minWidth:e.column.minWidth,width:e.column.width,onClick:Hn,children:"string"==typeof e.renderValue?e.renderValue:e.renderValue()})}),(0,o.jsxs)(Zm,{css:{padding:"0"},placement:"bottom-start",width:380,children:[(0,o.jsx)(Dn,{css:{padding:"$4 $6"},onKeyDown:t=>{"Enter"===t.key&&e.onSave(a)},children:e.renderInput(a,c)}),(0,o.jsxs)(Dn,{align:"center",css:{borderTop:"1px solid $gray200",padding:"$4 $6"},gap:"4",justify:"end",children:[(0,o.jsx)(xn,{css:{cursor:"pointer"},font:"gray700 textSm medium",onClick:u,children:t("annuler_48254")}),(0,o.jsx)(Un,{size:"sm",onClick:()=>{e.onSave(a)},children:t("appliquer_05753")})]})]})]})},w_=e=>{const{isEditMode:t}=k_(),{isEditMode:n}=Yf();return(t||n)&&e.updatable?(0,o.jsx)(y_,{column:e.column,initialValue:e.initialValue,renderInput:e.renderInput,renderValue:e.renderValue,onSave:async t=>{await e.mutate(t),e.reload()}}):(0,o.jsx)(Op,{css:{border:"2px solid transparent"},minWidth:e.column.minWidth,width:e.column.width,children:"string"==typeof e.renderValue?e.renderValue:e.renderValue()})};function C_(e,t){return(0,r.useCallback)(n=>t(n,e.slug),[e,t])}const I_=e=>{const t=Kt(os),n=t.getValueString(e.customField,e.fields),i=(0,r.useMemo)(()=>{const n=t.getValue(e.customField,e.fields);return an(n)?xi.c9.fromISO(n,{zone:"utc"}):n},[]),s=C_(e.customField,e.mutate);return(0,o.jsx)(w_,{column:e.column,initialValue:i,mutate:s,reload:e.reload,renderInput:(t,n)=>(0,o.jsx)(nm,{label:e.customField.name,value:t,onChange:n}),renderValue:n,updatable:e.updatable})},x_=e=>{const t=Kt(os),n=t.getValueString(e.customField,e.fields),i=(0,r.useMemo)(()=>{const n=t.getValue(e.customField,e.fields);return an(n)?xi.c9.fromISO(n,{zone:"utc"}):n},[]),s=C_(e.customField,e.mutate);return(0,o.jsx)(w_,{column:e.column,initialValue:i,mutate:s,reload:e.reload,renderInput:(t,n)=>(0,o.jsx)(om,{label:e.customField.name,value:t,onChange:n}),renderValue:n,updatable:e.updatable})},S_=e=>{const{params:{organizationId:t}}=Id(),n=Kt(os),i=n.getValueString(e.customField,e.fields,{fileReturnValue:"name"}),s=n.getValueString(e.customField,e.fields,{fileReturnValue:"url"}),a=(0,r.useMemo)(()=>n.getValue(e.customField,e.fields),[e.customField,e.fields]),c=C_(e.customField,e.mutate);return(0,o.jsx)(w_,{column:e.column,initialValue:a,mutate:c,reload:e.reload,renderInput:(n,i)=>(0,o.jsx)(Fm,{accept:[ym.Images,ym.Pdf],acl:"private",label:e.customField.name,organizationId:t,value:n,onChange:i}),renderValue:()=>(0,o.jsx)(qh,{css:{fontWeight:"$regular"},to:s,children:i}),updatable:e.updatable})},E_=e=>{const t=Kt(os),n=t.getValueString(e.customField,e.fields),i=(0,r.useMemo)(()=>t.getValue(e.customField,e.fields)||0,[e.customField,e.fields]),s=C_(e.customField,e.mutate);return(0,o.jsx)(w_,{column:e.column,initialValue:i,mutate:s,reload:e.reload,renderInput:(t,n)=>(0,o.jsx)(cu,{label:e.customField.name,shouldParseAsInt:!0,value:t,onChange:n}),renderValue:n,updatable:e.updatable})},j_=e=>{const t=Kt(os),n=Kt(Yr),i=t.getValueString(e.customField,e.fields),s=(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]),a=C_(e.customField,e.mutate);return(0,o.jsx)(w_,{column:e.column,initialValue:s,mutate:a,reload:e.reload,renderInput:(t,n)=>(0,o.jsx)(tg,{label:e.customField.name,value:t,onChange:n}),renderValue:i,updatable:e.updatable})};let T_=null;function D_(e,{fontSize:t,fontWeight:n}={}){T_||=document.createElement("canvas");const i=T_.getContext("2d");return i.font=`${n||"400"} ${t||"14px"} 'Open Sans`,i.measureText(e).width}const P_=({badge:e})=>(0,o.jsx)(og,{color:e.color,count:e.count,css:{cursor:e.onClick?"pointer":"inherit"},leftIcon:e.icon?yt.includes(e.icon)?zn(e.icon):e.icon:void 0,size:"md",onClick:e.onClick,children:e.text}),R_=({badges:e})=>(0,o.jsxs)(Gm,{children:[(0,o.jsx)(Jm,{children:(0,o.jsx)(og,{cursor:"pointer",size:"md",children:`+${e.length}`})}),(0,o.jsx)(Zm,{css:{flexWrap:"wrap",gap:"$2",overflow:"auto",padding:"$4",zIndex:100},maxHeight:300,placement:"top-end",width:400,children:e.map(e=>(0,o.jsx)(Dn,{children:(0,o.jsx)(P_,{badge:e})},e.id))})]}),O_=({badges:e,doNotSort:t,onClick:n})=>{const[i,s]=(0,r.useState)(0),c=(0,r.useCallback)(e=>{e&&s(e.getBoundingClientRect().width)},[]),l=(0,r.useMemo)(()=>{const n=e.map(e=>({...e,textWidth:Math.floor(D_(e.text,{fontSize:"12px"}))+60}));return!0===t?n:(0,Uo.A)(n,({textWidth:e})=>e)},[e,t]),[d,u]=(0,r.useMemo)(()=>{let e=37;const t=[],n=[];for(const o of l)e+=o.textWidth+8,ea(u),[u]);return(0,o.jsxs)(Dn,{ref:c,align:"center",css:{cursor:n?"pointer":"inherit","&:hover":{color:"black"}},gap:"2",height:1,width:1,onClick:e=>{n&&a(l)&&(Hn(e),n())},children:[d.map(e=>(0,o.jsx)(P_,{badge:e},e.id)),h&&(n?(0,o.jsx)(og,{css:{cursor:"pointer"},size:"md",children:"+"+(l.length-d.length)}):(0,o.jsx)(R_,{badges:u}))]})},F_=e=>{const t=Yt(),n=Kt(os),i=(0,r.useMemo)(()=>{if(e.customField.canSelectMultiple){const t=n.getSelectValues(e.customField,e.fields).map(e=>({id:e,color:"gray",icon:null,text:e}));return()=>(0,o.jsx)(O_,{badges:t})}return n.getValueString(e.customField,e.fields)},[n,e.customField,e.fields]),s=(0,r.useMemo)(()=>{const t=n.getValue(e.customField,e.fields);return e.customField.canSelectMultiple?a(t)?t:[]:t||""},[]),c=function(e){const t=Kt(Ur),n=yg();return(0,r.useMemo)(()=>e?e.fieldType===K.Country?t.getCountriesIdName().map(({id:e,name:t})=>(0,o.jsx)("option",{value:e,children:t},e)):e.fieldType===K.Language?e.fieldProperty===H.Language?n(Wr):n(Ct):e.fieldType===K.Nationality?t.getNationalitiesIdName().map(({id:e,name:t})=>(0,o.jsx)("option",{value:e,children:t},e)):e.fieldType===K.Sex?n(Ot):e.values.map(({id:e,value:t})=>(0,o.jsx)("option",{value:e,children:t},e)):(0,o.jsx)(o.Fragment,{}),[e])}(e.customField),l=C_(e.customField,e.mutate);return(0,o.jsx)(w_,{column:e.column,initialValue:s,mutate:l,reload:e.reload,renderInput:(n,i)=>e.customField.canSelectMultiple?(0,o.jsx)(gg,{isSearchVisible:!0,isSelectAllVisible:!0,label:e.customField.name,multiple:!0,renderOnPortal:!0,values:n,onChange:i,children:c}):(0,o.jsx)(gg,{isSearchVisible:!0,label:e.customField.name,multiple:!1,placeholder:t("choisir_une_val_00277"),renderOnPortal:!0,values:[n],onChange:e=>{a(e)?i(e[0]):i(null)},children:c}),renderValue:i,updatable:e.updatable})},z_=e=>{const t=Kt(os).getValueString(e.customField,e.fields),n=C_(e.customField,e.mutate);return(0,o.jsx)(w_,{column:e.column,initialValue:t,mutate:n,reload:e.reload,renderInput:(t,n)=>(0,o.jsx)(vg,{label:e.customField.name,value:t,onChange:n}),renderValue:t,updatable:e.updatable})},M_=e=>{const t=Kt(os).getValueString(e.customField,e.fields),n=C_(e.customField,e.mutate);return(0,o.jsx)(w_,{column:e.column,initialValue:t,mutate:n,reload:e.reload,renderInput:(t,n)=>(0,o.jsx)(cu,{autoFocus:!0,label:e.customField.name,value:t,onChange:n}),renderValue:t,updatable:e.updatable})},$_=e=>{const t=Kt(os),n=t.getValueString(e.customField,e.fields),i=(0,r.useMemo)(()=>t.getValueString(e.customField,e.fields),[]),s=C_(e.customField,e.mutate);return(0,o.jsx)(w_,{column:e.column,initialValue:i,mutate:s,reload:e.reload,renderInput:(t,n)=>(0,o.jsx)(sm,{label:e.customField.name,value:t,onChange:n}),renderValue:n,updatable:e.updatable})},N_=e=>{const t=Kt(os);return e.customField?.fieldType===K.Checkbox?(0,o.jsx)(v_,{column:e.column,customField:e.customField,fields:e.fields,mutate:e.mutate,reload:e.reload,updatable:e.updatable}):e.customField?.fieldType===K.Date?(0,o.jsx)(I_,{column:e.column,customField:e.customField,fields:e.fields,mutate:e.mutate,reload:e.reload,updatable:e.updatable}):e.customField?.fieldType===K.Phone?(0,o.jsx)(j_,{column:e.column,customField:e.customField,fields:e.fields,mutate:e.mutate,reload:e.reload,updatable:e.updatable}):e.customField?.fieldType===K.Select||e.customField?.fieldType===K.Country||e.customField?.fieldType===K.Language||e.customField?.fieldType===K.Sex||e.customField?.fieldType===K.Nationality?(0,o.jsx)(F_,{column:e.column,customField:e.customField,fields:e.fields,mutate:e.mutate,reload:e.reload,updatable:e.updatable}):e.customField?.fieldType===K.Text?(0,o.jsx)(M_,{column:e.column,customField:e.customField,fields:e.fields,mutate:e.mutate,reload:e.reload,updatable:e.updatable}):e.customField?.fieldType===K.Textarea?(0,o.jsx)(z_,{column:e.column,customField:e.customField,fields:e.fields,mutate:e.mutate,reload:e.reload,updatable:e.updatable}):e.customField?.fieldType===K.Number?(0,o.jsx)(E_,{column:e.column,customField:e.customField,fields:e.fields,mutate:e.mutate,reload:e.reload,updatable:e.updatable}):e.customField?.fieldType===K.File?(0,o.jsx)(S_,{column:e.column,customField:e.customField,fields:e.fields,mutate:e.mutate,reload:e.reload,updatable:e.updatable}):e.customField?.fieldType===K.Datetime?(0,o.jsx)(x_,{column:e.column,customField:e.customField,fields:e.fields,mutate:e.mutate,reload:e.reload,updatable:e.updatable}):e.customField?.fieldType===K.Time?(0,o.jsx)($_,{column:e.column,customField:e.customField,fields:e.fields,mutate:e.mutate,reload:e.reload,updatable:e.updatable}):(0,o.jsx)(Op,{children:e.customField?t.getValueString(e.customField,e.fields,{fileReturnValue:"name"}):""})},B_=bn(Dn,{gap:"$3",variants:{avatarOnTop:{true:{flexDirection:"column",gap:"$2"},false:{alignItems:"center",flexDirection:"row"}}}}),L_=e=>{const{params:{organizationId:t,eventId:n}}=Id(),i=r.useMemo(()=>an(e.userInfo.name)?e.userInfo.name:"-",[e.userInfo.name]),s=()=>(0,o.jsx)(xn,{color:e.disabled?"gray300":"gray800",css:{ellipsis:""},disabled:e.disabled,fontWeight:"medium",title:i,children:i});return(0,o.jsxs)(B_,{avatarOnTop:{"@initial":!!e.badge,"@tablet":!1},width:1,children:[(0,o.jsx)(f_,{email:e.userInfo.email,image:e.userInfo.picture?.url,name:e.userInfo.name,size:e.size||40}),(0,o.jsxs)(Dn,{css:{flex:"1",overflow:"hidden"},direction:"column",justify:"center",children:[(0,o.jsxs)(Dn,{align:"center",gap:"2",children:[e.isClickDisabled?s():(0,o.jsx)(qh,{to:Cd.MEMBER_INFORMATION({organizationId:t,eventId:n,userInfoId:e.userInfo.id}),children:s()}),(0,o.jsx)(xn,{css:{flexShrink:0},children:e.badge})]}),(0,o.jsx)(xn,{color:e.disabled?"gray300":"gray500",css:{ellipsis:""},fontSize:"textSm",title:e.userInfo.email,children:e.areContactLinksEnabled?(0,o.jsx)(qh,{css:{fontWeight:"normal"},to:`mailto:${e.userInfo.email}`,children:e.userInfo.email}):(0,o.jsx)(o.Fragment,{children:e.userInfo.email})}),e.showPhoneNumber&&(0,o.jsx)(xn,{color:e.disabled?"gray300":"gray500",css:{ellipsis:""},fontSize:"textSm",title:e.userInfo.phone?.internationalFormat,children:e.areContactLinksEnabled?(0,o.jsx)(qh,{css:{fontWeight:"normal"},to:`tel:${e.userInfo.phone?.internationalFormat}`,children:e.userInfo.phone?.internationalFormat}):(0,o.jsx)(o.Fragment,{children:e.userInfo.phone?.internationalFormat})})]})]})},V_=e=>{const{translate:t}=Id(),{isEditMode:n}=k_(),{isEditMode:i}=Yf(),s=n||i,a=(0,r.useMemo)(()=>({firstName:e.userInfo.fields.firstName||"",lastName:e.userInfo.fields.lastName||""}),[e.userInfo]),c=(0,r.useCallback)(async t=>{await e.mutate(t.firstName,"firstName"),await e.mutate(t.lastName,"lastName"),e.reload()},[e.mutate,e.reload]);return s&&e.updatable?(0,o.jsx)(y_,{column:e.column,initialValue:a,renderInput:(e,n)=>(0,o.jsxs)(Dn,{direction:"column",gap:"2",width:1,children:[(0,o.jsx)(cu,{label:t("pr_nom_66988"),value:e.firstName,onChange:t=>{n({...e,firstName:t})}}),(0,o.jsx)(cu,{label:t("last_name"),value:e.lastName,onChange:t=>{n({...e,lastName:t})}})]}),renderValue:()=>(0,o.jsx)(L_,{isClickDisabled:!0,size:32,userInfo:e.userInfo}),onSave:c}):(0,o.jsx)(Op,{css:{border:"2px solid transparent"},minWidth:e.column.minWidth,width:e.column.width,children:(0,o.jsx)(L_,{isClickDisabled:!e.canClickMemberName,size:32,userInfo:e.userInfo})})},U_=e=>{const t=Yt(),n=(0,r.useMemo)(()=>e.userPermissions?function(e,t){return e?e.usersOrganizations.map(e=>({id:e.role.id,color:"gray",icon:e.role.type===Ce.OrganizationAdmin?"gem":"glasses-round",text:`${e.role.name}`})).concat(e.usersEvents.map(e=>({id:e.role.id,color:"gray",icon:e.role.type===Ce.EventAdmin?"gem":"glasses-round",text:`${e.event.name} - ${e.role.name}`}))).concat(e.usersDelegations.map((e,n)=>({id:`ud-${n}`,color:"gray",icon:"user-group",text:`${e.delegation.name} - ${t("responsable_de_70462")}`}))).concat(e.usersDelegationsCategories.map(e=>({id:e.role.id,color:"gray",icon:"user-group",text:`${e.delegationCategory.name} - ${e.role.name}`}))).concat(e.usersPositions.map(e=>({id:e.role.id,color:"gray",icon:"sitemap",text:`${e.position.name} - ${e.role.name}`}))).concat(e.usersPositionsCategories.map(e=>({id:e.role.id,color:"gray",icon:"sitemap",text:`${e.positionCategory.name} - ${e.role.name}`}))):[]}(e.userPermissions,t):[],[e.userPermissions]);return(0,o.jsx)(Op,{minWidth:e.minWidth,width:e.width,children:(0,o.jsx)(O_,{badges:n,doNotSort:!0})})},G_=({column:e,eventId:t,onClick:n,reload:i,updatable:s,volunteerRegistration:c})=>{const l=Yt(),{mutate:d}=ho(),{mutate:h}=function(e={}){return Xt("mutation VolunteersRegistrationsMassAccreditationStateUpdate(\n $eventId: EventId!\n $massStateUpdate: MassAccreditationStateUpdateInput!\n) {\n numberOfMembers: volunteersRegistrationsMassAccreditationStateUpdate(\n eventId: $eventId\n massStateUpdate: $massStateUpdate\n )\n}\n",e)}(),m=Kt(is),{isEditMode:g}=k_(),{isEditMode:p}=Yf(),_=g||p,[b,k]=(0,r.useState)(!0),[v,A]=(0,r.useState)(null),y=(0,r.useMemo)(()=>c?.accreditationsUsersInfos||[],[c]),w=(0,r.useMemo)(()=>Eh(y),[y]),C=(0,r.useMemo)(()=>y.map(e=>e.accreditationSlot.id),[y]),I=(0,r.useCallback)(async e=>{if(e&&b){const{event:e}=await(n={eventId:t},i=await to(),co("query UpdateCellAccreditationsSlots($eventId: EventId!) {\n event(id: $eventId) {\n accreditationsCategories {\n name\n\n accreditations {\n id\n name\n accreditationDisplay\n hasSlots\n index\n\n slots(includeHidden: true) {\n id\n name\n date\n isBlocked\n }\n }\n }\n }\n}\n",{variables:n,token:i||void 0,fragments:[]})),r=(0,Uo.A)(e.accreditationsCategories,e=>e.name.toLowerCase()).flatMap(e=>Dh(e.accreditations).map(t=>{const n=t.accreditationDisplay===u.Radio?t.name:void 0,i=Ih(t.slots);return(0,o.jsx)("optgroup",{label:`${e.name} - ${t.name}`,children:i.map(e=>{const i=wh(m,e,t.name,{accreditation:{includeNameAtEnd:!0}});return(0,o.jsx)("option",{"data-radio":n,disabled:e.isBlocked,value:e.id,children:i},e.id)})},t.id)}));A(r),k(!1)}var n,i},[b]),x=(0,r.useCallback)(async e=>{a(e)?await d({eventId:t,massAccredit:{accreditationsSlotsIds:e,selecteds:{ids:[c.userInfo.id]},strategy:ae.Replace}}):await h({eventId:t,massStateUpdate:{selecteds:{ids:[c.userInfo.id]},state:f.WaitingAccreditation}}),i()},[t,c,d,i]);return _&&s?(0,o.jsx)(y_,{column:e,css:{gap:"$2"},initialValue:C,renderInput:(e,t)=>b?(0,o.jsxs)(Dn,{direction:"column",gap:"1",width:1,children:[(0,o.jsx)(yu,{borderRadius:"$1",height:20,width:1}),(0,o.jsx)(yu,{borderRadius:"$1",height:40,width:1})]}):(0,o.jsx)(gg,{isSearchVisible:!0,label:l("accr_ditations_39450"),multiple:!0,renderOnPortal:!0,values:e,onChange:t,children:v}),renderValue:()=>(0,o.jsx)(O_,{badges:w,doNotSort:!0}),onSave:x,onStateChange:I}):(0,o.jsx)(Op,{css:{border:"2px solid transparent"},minWidth:e.minWidth,width:e.width,children:(0,o.jsx)(O_,{badges:w,doNotSort:!0,onClick:n})})},W_=e=>{const t=(0,r.useMemo)(()=>(0,Er.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,o.jsx)(Op,{minWidth:e.column.minWidth,width:e.column.width,children:(0,o.jsx)(O_,{badges:t})})};function q_(e){switch(e){case $e.Assigned:return{color:"success",leftIcon:"check"};case $e.Refused:return{color:"error",leftIcon:"xmark"};case $e.PreAssigned:return{color:"pink",leftIcon:"wand-magic-sparkles"};case $e.WaitingAssignment:return{color:"warning",leftIcon:"hourglass-empty"};case $e.NotApplicable:return{color:"gray",leftIcon:"infinity"};default:return Br()}}function H_(e){switch(e){case f.Accredited:return{color:"success",leftIcon:"check"};case f.AutoAccredited:return{color:"success",leftIcon:"bolt-auto"};case f.Refused:return{color:"error",leftIcon:"xmark"};case f.WaitingAccreditation:return{color:"warning",leftIcon:"hourglass-empty"};case f.NotApplicable:return{color:"gray",leftIcon:"infinity"};default:return Br()}}const K_=e=>{const t=Yt(),{mutate:n}=Co();return(0,o.jsx)(Dn,{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,o.jsx)(og,{...H_(e.state),children:t(e.state)})})},Y_=e=>{const t=Yt(),{isEditMode:n}=k_(),{isEditMode:i}=Yf(),s=n||i,[a,c]=(0,r.useState)(!1),l=(0,r.useCallback)(e=>{s&&c(e)},[s,c]),d=(0,r.useCallback)(()=>{l(!1)},[l]);return s&&e.updatable?(0,o.jsx)(Op,{css:{border:"2px solid transparent","&:hover":{border:"2px solid $primary700"}},minWidth:e.column.minWidth,width:e.column.width,onClick:Hn,children:(0,o.jsxs)(Gm,{isOpen:a,onStateChange:l,children:[(0,o.jsx)(Jm,{children:(0,o.jsxs)(Dn,{align:"center",gap:"3",height:1,justify:"between",width:1,children:[(0,o.jsx)(og,{...H_(e.state),cursor:"text",children:t(e.state)}),a&&(0,o.jsx)(xn,{children:(0,o.jsx)(Mn,{icon:"chevron-down"})})]})}),(0,o.jsxs)(Zm,{offset:2,placement:"bottom",width:240,children:[e.state!==f.WaitingAccreditation&&(0,o.jsx)(K_,{close:d,eventId:e.eventId,reload:e.reload,state:f.WaitingAccreditation,volunteerRegistrationId:e.volunteerRegistrationId}),e.state!==f.NotApplicable&&(0,o.jsx)(K_,{close:d,eventId:e.eventId,reload:e.reload,state:f.NotApplicable,volunteerRegistrationId:e.volunteerRegistrationId})]})]})}):(0,o.jsx)(Op,{css:{border:"2px solid transparent"},minWidth:e.column.minWidth,width:e.column.width,children:(0,o.jsx)(og,{...H_(e.state),children:t(e.state)})})},Z_=e=>{const t=Kt(is),n=Kt(sa),i=(0,r.useMemo)(()=>{const i=e.volunteerRegistration.userInfo.formsUsersInfos||[];return(0,Uo.A)(i.flatMap(e=>(e.slots||[]).map(t=>({range:t.range,display:e.form.slotDisplay}))),({range:e})=>e.start.toMillis()).map((e,i)=>({id:i,color:"gray",icon:null,text:e.display===we.Calendar||e.display===we.DisplayDays?t.toLocaleString(e.range.start,Bi.DateOnly.Numeric):n.toDisplayString(e.range,{formats:{localeFormat:Bi.DateOnly.Numeric}})}))},[e.volunteerRegistration.userInfo.formsUsersInfos]);return(0,o.jsx)(Op,{minWidth:e.column.minWidth,width:e.column.width,children:(0,o.jsx)(O_,{badges:i,doNotSort:!0,onClick:e.onClick})})},J_=e=>{const{translate:t}=Id();return(0,o.jsxs)(ti,{children:[(0,o.jsx)(ni,{children:(0,o.jsx)(xn,{css:{cursor:"pointer"},height:e.size,width:e.size,children:(0,o.jsx)("img",{height:"100%",src:gc(e.ticketId,{height:e.size,width:e.size}),width:"100%"})})}),(0,o.jsxs)(ei,{children:[(0,o.jsx)(Qn,{icon:"qrcode",children:t("code_barres_1_82428",e.nameOrEmail)}),(0,o.jsxs)(Xn,{align:"center",css:{padding:"$4"},gap:"3",justify:"center",children:[(0,o.jsx)(xn,{height:100,width:100,children:(0,o.jsx)("img",{height:"100%",src:gc(e.ticketId,{height:100,width:100}),width:"100%"})}),(0,o.jsx)(xn,{children:e.ticketId})]}),(0,o.jsx)(Jn,{})]})]})},X_=e=>{const t=e.volunteerRegistration.ticketId;return(0,o.jsxs)(Op,{align:"center",gap:"2",minWidth:e.column.minWidth,width:e.column.width,children:[(0,o.jsx)(J_,{nameOrEmail:e.volunteerRegistration.userInfo.nameOrEmail,size:30,ticketId:e.volunteerRegistration.ticketId}),an(e.volunteerRegistration.weezeventTicketUrl)?(0,o.jsx)(qh,{css:{fontWeight:"normal"},to:e.volunteerRegistration.weezeventTicketUrl,children:t}):t]})},Q_=e=>{const{translate:t}=Id(),n=(0,r.useMemo)(()=>(e.volunteerRegistration.userInfo.emails??[]).map(e=>{const{color:n,leftIcon:i}=function(e){switch(e){case $.Waiting:case $.Queued:return{color:"warning",leftIcon:"hourglass-empty"};case $.Bounced:return{color:"error",leftIcon:"circle-exclamation"};default:return{color:"success",leftIcon:"check"}}}(e.state);return{id:e.id,color:n,icon:i,text:`${e.campaign?.name??""} - ${t(e.state)}`}}),[e.volunteerRegistration]);return(0,o.jsx)(Op,{minWidth:e.column.minWidth,width:e.column.width,children:(0,o.jsx)(O_,{badges:n})})},eb=e=>{const t=(0,r.useMemo)(()=>(e.volunteerRegistration.positionsSlotsUsersInfos||[]).filter(e=>e.state!==A.Waiting),[e.volunteerRegistration]),n=(0,r.useMemo)(()=>yh(t),[t]);return(0,o.jsx)(Op,{minWidth:e.column.minWidth,width:e.column.width,children:(0,o.jsx)(O_,{badges:n,doNotSort:!0,onClick:e.onClick})})},tb=e=>{const{translate:t,params:{organizationId:n,eventId:i}}=Id(),{mutate:s}=wo(),{mutate:c}=mo(),{isEditMode:l}=k_(),{isEditMode:d}=Yf(),u=l||d,h=(0,r.useMemo)(()=>e.volunteerRegistration.delegation,[e.volunteerRegistration.delegation]),m=(0,r.useMemo)(()=>h?[h.id]:[],[h]),[g,p]=(0,r.useState)(!0),[f,_]=(0,r.useState)([]),b=(0,r.useCallback)(async e=>{if(e&&g){const{event:{delegations:e}}=await(t={eventId:i},n=await to(),co("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:[]}));_(e.nodes),p(!1)}var t,n},[g]),k=(0,r.useCallback)(async t=>{a(t)?await s({eventId:i,delegationId:t[0],selecteds:{ids:[e.volunteerRegistration.userInfo.id]}}):h&&await c({organizationId:n,eventId:i,delegationId:h.id,selecteds:{ids:[e.volunteerRegistration.userInfo.id]},deleteFromEvent:!1}),e.reload()},[i,e.volunteerRegistration]);return u&&e.updatable?(0,o.jsx)(y_,{column:e.column,css:{gap:"$2"},initialValue:m,renderInput:(e,n)=>g?(0,o.jsxs)(Dn,{direction:"column",gap:"1",width:1,children:[(0,o.jsx)(yu,{borderRadius:"$1",height:20,width:1}),(0,o.jsx)(yu,{borderRadius:"$1",height:40,width:1})]}):(0,o.jsx)(gg,{isSearchVisible:!0,label:t("Delegation"),renderOnPortal:!0,values:e,onChange:n,children:f.map(e=>(0,o.jsx)("option",{value:e.id,children:e.name},e.id))}),renderValue:()=>h?(0,o.jsx)(og,{cursor:"pointer",ellipsis:!0,children:h.name}):null,onSave:k,onStateChange:b}):(0,o.jsx)(Op,{css:{border:"2px solid transparent"},minWidth:e.column.minWidth,width:e.column.width,children:h&&(0,o.jsx)(og,{cursor:"pointer",ellipsis:!0,title:h.name,children:(0,o.jsx)(Fn,{to:dc.DELEGATION({organizationId:n,eventId:i,delegationId:h.id}),children:h.name})})})},nb=e=>{const{params:{organizationId:t,eventId:n}}=Id(),i=e.volunteerRegistration.delegation?.delegationCategory;return(0,o.jsx)(Op,{minWidth:e.column.minWidth,width:e.column.width,children:i&&(0,o.jsx)(og,{cursor:"pointer",ellipsis:!0,title:i.name,children:(0,o.jsx)(Fn,{to:dc.DELEGATION_CATEGORY({organizationId:t,eventId:n,delegationCategoryId:i.id}),children:i.name})})})},ib=e=>{const t=(0,r.useMemo)(()=>(e.volunteerRegistration.userInfo?.formsUsersInfos??[]).flatMap(e=>e.form?[{id:e.form.id,color:"gray",icon:null,text:e.form.name}]:[]),[e.volunteerRegistration.userInfo]);return(0,o.jsx)(Op,{minWidth:e.column.minWidth,width:e.column.width,children:(0,o.jsx)(O_,{badges:t})})},ob=e=>{const t=Yt(),{mutate:n}=yo(),{mutate:i}=function(e={}){return Xt("mutation VolunteersRegistrationsMassStateUpdate(\n $eventId: EventId!\n $massStateUpdate: MassStateUpdateInput!\n) {\n numberOfMembers: volunteersRegistrationsMassStateUpdate(\n eventId: $eventId\n massStateUpdate: $massStateUpdate\n )\n}\n",e)}(),s=Kt(sa),{isEditMode:c}=k_(),{isEditMode:l}=Yf(),d=c||l,u=(0,r.useMemo)(()=>e.volunteerRegistration?.positionsSlotsUsersInfos||[],[e.volunteerRegistration]),h=(0,r.useMemo)(()=>yh(u),[u]),m=(0,r.useMemo)(()=>u.map(e=>e.positionSlot.id),[u]),[g,p]=(0,r.useState)(!0),[f,_]=(0,r.useState)([]),b=(0,r.useCallback)(async t=>{if(t&&g){const{event:{positionsSlots:t}}=await(n={eventId:e.eventId},i=await to(),co("query UpdateCellPositionsSlots($eventId: EventId!) {\n event(id: $eventId) {\n positionsSlots {\n nodes {\n id\n name\n range\n\n position {\n name\n }\n }\n }\n }\n}\n",{variables:n,token:i||void 0,fragments:[]})),o=(0,Uo.A)(t.nodes,e=>[e.range.start.toMillis(),e.name]).map(e=>({id:e.id,positionName:e.position.name,name:gh(s,e,e.position.name,{position:{includeNameAtEnd:!0}})}));_((0,Uo.A)(Object.entries((0,lh.A)(o,e=>e.positionName)),([e])=>e)),p(!1)}var n,i},[g]),k=(0,r.useCallback)(async t=>{a(t)?await n({eventId:e.eventId,massAssign:{positionsSlotsIds:t,selecteds:{ids:[e.volunteerRegistration.userInfo.id]},strategy:ae.Replace}}):await i({eventId:e.eventId,massStateUpdate:{selecteds:{ids:[e.volunteerRegistration.userInfo.id]},state:$e.WaitingAssignment}}),e.reload()},[e.eventId,e.volunteerRegistration,n,e.reload]);return d&&e.updatable?(0,o.jsx)(y_,{column:e.column,css:{gap:"$2"},initialValue:m,renderInput:(e,n)=>g?(0,o.jsxs)(Dn,{direction:"column",gap:"1",width:1,children:[(0,o.jsx)(yu,{borderRadius:"$1",height:20,width:1}),(0,o.jsx)(yu,{borderRadius:"$1",height:40,width:1})]}):(0,o.jsx)(gg,{isSearchVisible:!0,label:t("missions_63972"),multiple:!0,renderOnPortal:!0,values:e,onChange:n,children:f.map(([e,t],n)=>(0,o.jsx)("optgroup",{label:e,children:t.map(e=>(0,o.jsx)("option",{value:e.id,children:e.name},e.id))},n))}),renderValue:()=>(0,o.jsx)(O_,{badges:h,doNotSort:!0}),onSave:k,onStateChange:b}):(0,o.jsx)(Op,{css:{border:"2px solid transparent"},minWidth:e.column.minWidth,width:e.column.width,children:(0,o.jsx)(O_,{badges:h,doNotSort:!0,onClick:e.onClick})})},rb=e=>{const t=(0,r.useMemo)(()=>(0,Er.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,o.jsx)(Op,{minWidth:e.column.minWidth,width:e.column.width,children:(0,o.jsx)(O_,{badges:t})})},sb=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,o.jsx)(Op,{minWidth:e.column.minWidth,width:e.column.width,children:(0,o.jsx)(O_,{badges:t})})},ab=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,o.jsx)(Op,{minWidth:e.column.minWidth,width:e.column.width,children:(0,o.jsx)(O_,{badges:t})})},cb=e=>{const t=(0,r.useMemo)(()=>(e.volunteerRegistration.accreditationsUsersInfos||[]).filter(e=>e.checkInAt?.isValid),[e.volunteerRegistration]),n=(0,r.useMemo)(()=>Eh(t),[t]);return(0,o.jsx)(Op,{minWidth:e.column.minWidth,width:e.column.width,children:(0,o.jsx)(O_,{badges:n,doNotSort:!0,onClick:e.onClick})})},lb=e=>(0,o.jsx)(Op,{minWidth:e.column.minWidth,width:e.column.width,children:an(e.volunteerRegistration.shortTag)&&an(e.volunteerRegistration.weezeventPayUrl)?(0,o.jsx)(qh,{css:{fontWeight:"normal"},to:e.volunteerRegistration.weezeventPayUrl,children:e.volunteerRegistration.shortTag}):e.volunteerRegistration.shortTag||""}),db=(...e)=>({name:"canRegistrationStateUpdateFn",args:e});async function ub(e){try{const t=await to(),n=await function(e,t){return co("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 hb=new Map;function mb({checks:e}){const t=e.map(e=>[e,JSON.stringify(e)]),n=t.filter(([e,t])=>!hb.has(t));if(n.length>0){const e=ub({checks:n.map(([e,t])=>e)});n.forEach(([t,n],i)=>{hb.set(n,e.then(e=>e[i]))})}return Promise.all(t.map(([e,t])=>hb.get(t)))}function gb({withCaching:e,checks:t}){const[{isLoading:n,permissions:i},o]=(0,r.useState)({isLoading:!0,permissions:new Array(t.length).fill(!1)}),s=e?mb:ub;return(0,r.useEffect)(()=>{s({checks:t}).then(e=>{o({isLoading:!1,permissions:e})},()=>{o({isLoading:!1,permissions:i})})},[]),{isLoading:n,permissions:i}}const pb=e=>{const t=Yt(),{mutate:n}=Co();return(0,o.jsx)(Dn,{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,o.jsx)(og,{cursor:"pointer",...q_(e.state),children:t(e.state)})})},fb=e=>{const{permissions:[t,n],isLoading:i}=function(...e){return gb({withCaching:!1,checks:e})}(db(e.eventId,$e.PreAssigned,e.volunteerRegistrationId),db(e.eventId,$e.Assigned,e.volunteerRegistrationId));return i?null:(0,o.jsxs)(o.Fragment,{children:[n&&e.state!==$e.WaitingAssignment&&(0,o.jsx)(pb,{close:e.close,eventId:e.eventId,reload:e.reload,state:$e.WaitingAssignment,volunteerRegistrationId:e.volunteerRegistrationId}),t&&(0,o.jsx)(pb,{close:e.close,eventId:e.eventId,reload:e.reload,state:$e.PreAssigned,volunteerRegistrationId:e.volunteerRegistrationId}),n&&e.state!==$e.Refused&&(0,o.jsx)(pb,{close:e.close,eventId:e.eventId,reload:e.reload,state:$e.Refused,volunteerRegistrationId:e.volunteerRegistrationId}),n&&e.state!==$e.NotApplicable&&(0,o.jsx)(pb,{close:e.close,eventId:e.eventId,reload:e.reload,state:$e.NotApplicable,volunteerRegistrationId:e.volunteerRegistrationId})]})},_b=e=>{const t=Yt(),{isEditMode:n}=k_(),{isEditMode:i}=Yf(),s=n||i,[a,c]=(0,r.useState)(!1),l=(0,r.useCallback)(e=>{s&&c(e)},[s,c]),d=(0,r.useCallback)(()=>{l(!1)},[l]);return s&&e.updatable?(0,o.jsx)(Op,{css:{border:"2px solid transparent","&:hover":{border:"2px solid $primary700"}},minWidth:e.column.minWidth,width:e.column.width,onClick:Hn,children:(0,o.jsxs)(Gm,{isOpen:a,onStateChange:l,children:[(0,o.jsx)(Jm,{children:(0,o.jsxs)(Dn,{align:"center",gap:"3",height:1,justify:"between",width:1,children:[(0,o.jsx)(og,{...q_(e.state),cursor:"text",ellipsis:!0,children:t(e.state)}),a&&(0,o.jsx)(xn,{children:(0,o.jsx)(Mn,{icon:"chevron-down"})})]})}),(0,o.jsx)(Zm,{offset:2,placement:"bottom",width:230,children:(0,o.jsx)(fb,{close:d,...e})})]})}):(0,o.jsx)(Op,{css:{border:"2px solid transparent"},minWidth:e.column.minWidth,width:e.column.width,children:(0,o.jsx)(og,{...q_(e.state),children:t(e.state)})})},bb=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,o.jsx)(Op,{minWidth:e.column.minWidth,width:e.column.width,children:(0,o.jsx)(O_,{badges:n})})},kb=e=>{const{history:t,params:{organizationId:n,eventId:i,segmentId:s}}=Id(),a=(0,r.useMemo)(()=>(e.volunteerRegistration.teams||[]).map(({teamCode:o})=>({id:o,color:"gray",icon:null,text:o,onClick(){t.push(Jl.VOLUNTEERS_LIST_USER_PANEL_TEAM(n,i,s,e.volunteerRegistration.userInfo.id,o))}})),[e.volunteerRegistration]);return(0,o.jsx)(Op,{minWidth:e.column.minWidth,width:e.column.width,children:(0,o.jsx)(O_,{badges:a})})},vb=e=>{const{params:{organizationId:t,eventId:n}}=Id(),i=(0,r.useMemo)(()=>(0,Uo.A)(e.teamMembers,e=>sn(e.name)),[e.teamMembers]);return(0,o.jsx)(Dn,{children:i.map((e,i)=>(0,o.jsxs)(tp,{children:[(0,o.jsx)(op,{children:(0,o.jsx)(xn,{css:{cursor:"pointer",position:"relative",left:-4*i+"px"},children:(0,o.jsx)(Fn,{to:Cd.MEMBER_INFORMATION({organizationId:t,eventId:n,userInfoId:e.id}),children:(0,o.jsx)(f_,{email:e.email,image:e.picture?.url,name:e.name,size:24})})})}),(0,o.jsx)(ip,{placement:"top",children:e.name})]},e.id))})},Ab=e=>{const t=(0,r.useMemo)(()=>(e.volunteerRegistration.userInfo.formsUsersInfos||[]).flatMap(e=>e.teamMembers||[]),[e.volunteerRegistration]);return(0,o.jsx)(Op,{minWidth:e.column.minWidth,width:e.column.width,children:(0,o.jsx)(vb,{teamMembers:t})})},yb=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,o.jsx)(Op,{minWidth:e.column.minWidth,width:e.column.width,children:(0,o.jsx)(O_,{badges:t})})},wb=e=>{const t=(0,r.useMemo)(()=>jh(e.volunteerRegistration?.accreditationsSlots||[]),[e.volunteerRegistration]);return(0,o.jsx)(Op,{minWidth:e.column.minWidth,width:e.column.width,children:(0,o.jsx)(O_,{badges:t,doNotSort:!0,onClick:e.onClick})})},Cb=e=>{const t=Kt(sa),n=(0,r.useMemo)(()=>function(e,t,n,i){return(0,Er.A)(t,e=>e.id).map(e=>({id:`c-${e.id}`,color:"gray",icon:null,text:e.name})).concat((0,Er.A)(n,e=>e.id).map(e=>({id:`p-${e.id}`,color:e.color,icon:e.icon,text:an(e.acronym)?e.acronym:e.name}))).concat((0,Er.A)(i,e=>e.id).map(t=>{const n=an(t.position.acronym)?t.position.acronym:t.position.name,i=gh(e,t,n,{interval:{options:{formats:{localeFormat:Bi.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,o.jsx)(Op,{minWidth:e.column.minWidth,width:e.column.width,children:(0,o.jsx)(O_,{badges:n,onClick:e.onClick})})},Ib=e=>{const{history:t}=Id(),n=Kt(is),i=Kt(Js),s=(0,r.useMemo)(()=>function(e,t){return t.flatMap(t=>t.form?[`${t.form.name} : ${e.toLocaleString(t.insertedAt.toLocal(),Bi.DateTime)}`]:[]).join(", ")}(n,e.row.userInfo.formsUsersInfos||[]),[e.row]),{mutate:c}=Co(),l=(0,r.useCallback)((t,n)=>c({eventId:e.eventId,volunteerRegistrationId:e.row.id,slug:n,value:t}),[e.eventId,e.row,c]),d=e.row.userInfo;switch(e.column.slug){case Xc.Accreditations:return(0,o.jsx)(G_,{column:e.column,eventId:e.eventId,reload:e.reloadRow,updatable:e.canAccredit,volunteerRegistration:e.row,onClick:an(e.accreditationsPanelPath)?()=>{t.push(`${e.accreditationsPanelPath}/assigned`)}:void 0});case Xc.AccreditationsCategories:return(0,o.jsx)(W_,{column:e.column,volunteerRegistration:e.row});case Xc.AccreditationState:return(0,o.jsx)(Y_,{column:e.column,eventId:e.eventId,field:e.column,reload:e.reloadRow,state:e.row.accreditationState,updatable:e.canAccredit,volunteerRegistrationId:e.row.id});case Xc.ScannedAccreditations:return(0,o.jsx)(cb,{column:e.column,volunteerRegistration:e.row,onClick:an(e.accreditationsPanelPath)?()=>{t.push(`${e.accreditationsPanelPath}/scanned`)}:void 0});case Xc.Availability:return(0,o.jsx)(Z_,{column:e.column,volunteerRegistration:e.row,onClick:an(e.availabilitiesPanelPath)?()=>{t.push(e.availabilitiesPanelPath)}:void 0});case Xc.Comments:return(0,o.jsx)(Op,{minWidth:e.column.minWidth,width:e.column.width,children:a(d.comments)?d.comments.flatMap(e=>e.content).join("; "):""});case Xc.CampaignsStates:return(0,o.jsx)(Q_,{column:e.column,volunteerRegistration:e.row});case Xc.CheckedInPositions:return(0,o.jsx)(eb,{column:e.column,volunteerRegistration:e.row,onClick:an(e.positionsPanelPath)?()=>{t.push(`${e.positionsPanelPath}/assigned`)}:void 0});case Xc.CompletedForms:return(0,o.jsx)(ib,{column:e.column,volunteerRegistration:e.row});case Xc.FormsInsertedAt:return(0,o.jsx)(Op,{minWidth:e.column.minWidth,width:e.column.width,children:(0,o.jsx)(xn,{css:{ellipsis:!0},title:s,children:s})});case Xc.Delegations:return(0,o.jsx)(tb,{column:e.column,reload:e.reloadRow,updatable:e.canChangeDelegation,volunteerRegistration:e.row});case Xc.DelegationCategory:return(0,o.jsx)(nb,{column:e.column,volunteerRegistration:e.row});case Xc.Email:return(0,o.jsx)(Op,{minWidth:e.column.minWidth,width:e.column.width,children:d.email});case Xc.Id:return(0,o.jsx)(Op,{minWidth:e.column.minWidth,width:e.column.width,children:d.id});case Xc.LocalId:return(0,o.jsx)(Op,{minWidth:e.column.minWidth,width:e.column.width,children:e.row.localId});case Xc.InsertedAt:return(0,o.jsx)(Op,{minWidth:e.column.minWidth,width:e.column.width,children:n.toLocaleString(e.row.insertedAt.toLocal(),Bi.DateTime)});case Xc.Name:return(0,o.jsx)(V_,{canClickMemberName:e.canClickMemberName,column:e.column,mutate:l,reload:e.reloadRow,updatable:e.row.userInfo.isEditable??!0,userInfo:e.row.userInfo});case Xc.NumberOfAccreditations:return(0,o.jsx)(Op,{minWidth:e.column.minWidth,width:e.column.width,children:e.row.numberOfAccreditations});case Xc.NumberOfAssignments:return(0,o.jsx)(Op,{minWidth:e.column.minWidth,width:e.column.width,children:e.row.numberOfAssignments});case Xc.NumberOfAssignmentsDays:return(0,o.jsx)(Op,{minWidth:e.column.minWidth,width:e.column.width,children:e.row.numberOfAssignmentsDays});case Xc.NumberOfAvailableDays:return(0,o.jsx)(Op,{minWidth:e.column.minWidth,width:e.column.width,children:e.row.numberOfAvailableDays});case"picture":return(0,o.jsx)(Op,{minWidth:e.column.minWidth,width:e.column.width,children:(0,o.jsx)(f_,{email:d.email,image:d.picture?.url,name:d.name,size:32})});case Xc.Positions:return(0,o.jsx)(ob,{column:e.column,eventId:e.eventId,reload:e.reloadRow,updatable:e.canAssign,volunteerRegistration:e.row,onClick:an(e.positionsPanelPath)?()=>{t.push(`${e.positionsPanelPath}/assigned`)}:void 0});case Xc.PositionsCategories:return(0,o.jsx)(rb,{column:e.column,volunteerRegistration:e.row});case Xc.PreassignedPositions:return(0,o.jsx)(sb,{column:e.column,volunteerRegistration:e.row});case Xc.PreassignedPositionsCategories:return(0,o.jsx)(ab,{column:e.column,volunteerRegistration:e.row});case Xc.Roles:return(0,o.jsx)(U_,{minWidth:e.column.minWidth,userPermissions:e.row.userInfo,width:e.column.width});case Xc.Tags:return(0,o.jsx)(bb,{column:e.column,volunteerRegistration:e.row});case Xc.TeamCode:return(0,o.jsx)(kb,{column:e.column,volunteerRegistration:e.row});case Xc.TeamMembers:return(0,o.jsx)(Ab,{column:e.column,volunteerRegistration:e.row});case Xc.VolunteerMinutes:return(0,o.jsx)(Op,{minWidth:e.column.minWidth,width:e.column.width,children:i.minutesToHoursMinutesString(e.row.volunteerMinutes)});case Xc.VolunteerRegistrationState:return(0,o.jsx)(_b,{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 Xc.WishedAccreditationSlots:return(0,o.jsx)(wb,{column:e.column,volunteerRegistration:e.row,onClick:an(e.accreditationsPanelPath)?()=>{t.push(`${e.accreditationsPanelPath}/wished`)}:void 0});case Xc.WishedPositions:return(0,o.jsx)(Cb,{column:e.column,volunteerRegistration:e.row,onClick:an(e.positionsPanelPath)?()=>{t.push(`${e.positionsPanelPath}/wished`)}:void 0});case Xc.WeezaccessChecklists:return(0,o.jsx)(yb,{column:e.column,volunteerRegistration:e.row});case Xc.WeezeventBarcodeId:return(0,o.jsx)(X_,{column:e.column,volunteerRegistration:e.row});case Xc.WeezeventPairedAt:return(0,o.jsx)(Op,{minWidth:e.column.minWidth,width:e.column.width,children:e.row.weezeventPairedAt?.isValid?n.toLocaleString(e.row.weezeventPairedAt.toLocal(),Bi.DateTime):""});case Xc.WeezeventShortTag:return(0,o.jsx)(lb,{column:e.column,volunteerRegistration:e.row});default:return Object.values(Xc).includes(e.column.slug)?(console.error(`003: Unhandled default column ${e.column.slug}`),(0,o.jsx)(Op,{children:"ERR"})):e.column.slug.startsWith("form_inserted_at")?(0,o.jsx)(Op,{minWidth:e.column.minWidth,width:e.column.width,children:__(n,e.column.slug,e.row.userInfo.formsUsersInfos||[])}):(0,o.jsx)(N_,{column:e.column,customField:e.customField,fields:e.row.userInfo.fields,mutate:l,reload:e.reloadRow,updatable:e.row.userInfo.isEditable??!0})}},xb=e=>(0,o.jsx)(xn,{color:"gray800",css:{borderBottom:"1px solid $gray200",padding:"$6"},fontSize:"textXl",fontWeight:"medium",children:e.children}),Sb=({title:e,subtitle:t})=>(0,o.jsx)(Np,{css:{height:"fit-content"},children:(0,o.jsx)(Op,{children:(0,o.jsxs)(Dn,{align:"center",css:{padding:"$8 0"},direction:"column",justify:"center",width:1,children:[(0,o.jsx)(xg,{color:"primary",icon:"magnifying-glass"}),(0,o.jsx)(Fd,{height:"4"}),(0,o.jsx)(xn,{color:"gray900",fontSize:"textMd",fontWeight:"medium",children:e}),(0,o.jsx)(Fd,{height:"1"}),(0,o.jsx)(xn,{color:"gray500",children:t})]})})}),Eb=r.createContext({}),jb=e=>{const{mutate:t}=ho(),{mutate:n}=So(),[i,s]=r.useState(e.volunteerRegistration.accreditationsUsersInfos.map(e=>e.accreditationSlot)),a=r.useMemo(()=>i.map(({id:e})=>e),[i]),[c,l]=r.useState(e.volunteerRegistration.accreditationsUsersInfos.flatMap(e=>e.checkInAt?.isValid?[e.accreditationSlot]:[])),[d,u]=r.useState(e.volunteerRegistration.accreditationsSlots),h=r.useMemo(()=>(0,Uo.A)((0,Er.A)(i.map(e=>e.accreditationCategory),e=>e.id),e=>e.name.toLowerCase()),[i]),m=r.useMemo(()=>(0,Uo.A)((0,Er.A)(c.map(e=>e.accreditationCategory),e=>e.id),e=>e.name.toLowerCase()),[c]),g=r.useMemo(()=>(0,Uo.A)((0,Er.A)(d.map(e=>e.accreditationCategory),e=>e.id),e=>e.name.toLowerCase()),[d]),p=r.useMemo(()=>(0,Er.A)(i.map(e=>e.accreditation),e=>e.id),[i]),f=r.useMemo(()=>(0,Er.A)(c.map(e=>e.accreditation),e=>e.id),[c]),_=r.useMemo(()=>(0,Er.A)(d.map(e=>e.accreditation),e=>e.id),[d]),b=r.useCallback(async n=>{await t({eventId:e.eventId,massAccredit:{accreditationsSlotsIds:[n],selecteds:{ids:[e.userInfoId]},strategy:ae.Delete}}),s(e=>e.filter(e=>e.id!==n)),l(e=>e.filter(e=>e.id!==n))},[e.eventId,e.userInfoId,s,l]),k=r.useCallback(async t=>{await n({eventId:e.eventId,delegationId:e.delegationId,massAccredit:{accreditationsSlotsIds:[t],selecteds:{ids:[e.userInfoId]},strategy:ae.Delete}}),u(e=>e.filter(e=>e.id!==t))},[e.eventId,e.delegationId,e.userInfoId]),v=r.useCallback(async n=>{await t({eventId:e.eventId,massAccredit:{accreditationsSlotsIds:[n],selecteds:{ids:[e.userInfoId]},strategy:ae.Add}});const i=d.find(e=>e.id===n);s(e=>[...e,i])},[e.eventId,e.volunteerRegistration,d,s]),A=r.useCallback(t=>e.volunteerRegistration.accreditationsUsersInfos.find(e=>e.accreditationSlot.id===t).checkInAt,[e.volunteerRegistration]);return(0,o.jsx)(Eb.Provider,{value:{assignedAccreditations:p,assignedCategories:h,assignedSlots:i,assignedSlotsIds:a,canAccredit:e.canAccredit,canEditWished:e.canEditWished,defaultHiddenAccreditationsSlotsIds:e.defaultHiddenAccreditationsSlotsIds,scannedCategories:m,scannedAccreditations:f,scannedSlots:c,wishedAccreditations:_,wishedCategories:g,wishedSlots:d,assignSlot:v,deleteAssignedSlot:b,deleteWishedSlot:k,getScannedAt:A},children:e.children})};function Tb(){return r.useContext(Eb)}const Db=e=>{const{translate:t}=Id(),n=Kt(is),{assignedSlotsIds:i,assignSlot:s,canAccredit:a,canEditWished:c,defaultHiddenAccreditationsSlotsIds:l,deleteAssignedSlot:d,deleteWishedSlot:u,getScannedAt:h}=Tb(),[m,g]=(0,r.useState)(!1);return"assigned"===e.state&&!e.isBlocked&&a?(0,o.jsx)(Dn,{css:{flex:"1",px:"$4"},justify:"end",children:m?(0,o.jsx)(yu,{borderRadius:"$1",height:20,children:t("retirer_05155")}):(0,o.jsx)(xn,{css:{cursor:"pointer"},font:"error700 textSm medium",onClick:async()=>{g(!0),await d(e.accreditationSlotId)},children:t("retirer_05155")})}):"wished"===e.state&&a?(0,o.jsx)(Dn,{css:{flex:"1",px:"$4"},justify:"end",children:i.includes(e.accreditationSlotId)?(0,o.jsxs)(Dn,{align:"center",gap:"1",children:[(0,o.jsx)(xn,{color:"success500",children:(0,o.jsx)(Mn,{icon:"badge-check",iconStyle:"solid"})}),(0,o.jsx)(xn,{font:"gray800 textXs medium",children:t("d_j_attribu_e_06450")})]}):e.isBlocked?null:(0,o.jsx)(Un,{isLoading:m,size:"sm",onClick:async()=>{g(!0),await s(e.accreditationSlotId),g(!1)},children:t("ajouter_97327")})}):"wished"!==e.state||!c||e.isBlocked||l.includes(e.accreditationSlotId)?"scanned"===e.state?(0,o.jsx)(Dn,{css:{flex:"1",px:"$4"},children:(0,o.jsx)(xn,{css:{ellipsis:!0},children:n.toLocaleString(h(e.accreditationSlotId),Bi.DateTime)})}):(0,o.jsx)(Dn,{css:{flex:"1",px:"$4"}}):(0,o.jsx)(Dn,{css:{flex:"1",px:"$4"},justify:"end",children:m?(0,o.jsx)(yu,{borderRadius:"$1",height:20,children:t("retirer_05155")}):(0,o.jsx)(xn,{css:{cursor:"pointer"},font:"error700 textSm medium",onClick:async()=>{g(!0),await u(e.accreditationSlotId)},children:t("retirer_05155")})})},Pb=e=>{const t=Kt(is),{canAccredit:n,canEditWished:i}=Tb(),r="assigned"===e.state&&n||"scanned"===e.state||"wished"===e.state&&(n||i),s=an(e.slot.name)?e.slot.name:"-";return(0,o.jsxs)(Np,{children:[(0,o.jsx)(Op,{css:{textTransform:"capitalize"},children:e.slot.date?t.toLocaleString(e.slot.date,Bi.DateOnly.WeekdayShortMonthShort):"-"}),(0,o.jsx)(Op,{children:(0,o.jsx)(xn,{css:{ellipsis:!0},title:s,width:1,children:s})}),r&&(0,o.jsx)(Db,{accreditationSlotId:e.slot.id,isBlocked:e.slot.isBlocked,state:e.state})]})},Rb=e=>{const{translate:t}=Id(),{assignedSlots:n,canAccredit:i,canEditWished:s,scannedSlots:a,wishedSlots:c}=Tb(),l=(0,r.useMemo)(()=>(0,Uo.A)(("assigned"===e.state?n:"scanned"===e.state?a:c).filter(t=>t.accreditationId===e.accreditation.id),e=>[e.date?.toMillis()??1,e.name?.toLowerCase()||""]),[n,a,c,e.accreditation,e.state]),d="assigned"===e.state&&i||"scanned"===e.state||"wished"===e.state&&(i||s);return(0,o.jsx)(Wh,{accreditation:e.accreditation,displayNumberOfSlots:!0,displaySlots:e.accreditation.hasSlots,numberOfSlots:l.length,renderActions:!e.accreditation.hasSlots&&d?()=>(0,o.jsx)(Db,{accreditationSlotId:e.accreditation.hiddenSlotId,isBlocked:!1,state:e.state}):void 0,children:(0,o.jsxs)(Bp,{hideBorder:!0,children:[(0,o.jsxs)(zp,{children:[(0,o.jsx)(Fp,{children:t("date_du_cr_neau_82295")}),(0,o.jsx)(Fp,{children:t("nom_du_cr_neau_54351")}),d&&(0,o.jsx)(Fp,{children:"scanned"===e.state&&t("scann_e_le_27812")})]}),l.map(t=>(0,o.jsx)(Pb,{slot:t,state:e.state},t.id))]})})},Ob=e=>{const{assignedAccreditations:t,scannedAccreditations:n,wishedAccreditations:i}=Tb(),s=(0,r.useMemo)(()=>Dh(("assigned"===e.state?t:"scanned"===e.state?n:i).filter(t=>t.accreditationCategoryId===e.category.id)),[t,i,e.category,e.state]);return(0,o.jsx)($h,{category:e.category,children:s.map(t=>(0,o.jsx)(Rb,{accreditation:t,state:e.state},t.id))})},Fb=e=>{const t=Yt(),{assignedCategories:n,scannedCategories:i,wishedCategories:r}=Tb(),s="assigned"===e.state?n:"scanned"===e.state?i:r;return(0,o.jsx)(Ph,{children:a(s)?s.map(t=>(0,o.jsx)(Ob,{category:t,state:e.state},t.id)):(0,o.jsx)(Sb,{title:t("no_accreditations")})})},zb=e=>{const{translate:t}=Id();return(0,o.jsx)(jb,{canAccredit:e.canAccredit,canEditWished:e.canEditWished,defaultHiddenAccreditationsSlotsIds:e.defaultHiddenAccreditationsSlotsIds,delegationId:e.delegationId,eventId:e.eventId,userInfoId:e.userInfoId,volunteerRegistration:e.volunteerRegistration,children:(0,o.jsxs)(ff,{size:"md",onClose:e.onClose,children:[(0,o.jsx)(xb,{children:t("accr_ditations_39450")}),(0,o.jsx)(_f,{css:{padding:"0"},children:(0,o.jsxs)(uf,{height:1,children:[(0,o.jsxs)(lf,{center:!0,children:[(0,o.jsx)(cf,{path:`${e.basePath}/assigned`,children:t("attribu_es_48167")}),(0,o.jsx)(cf,{path:`${e.basePath}/wished`,children:t("souhait_es_78101")}),(0,o.jsx)(cf,{path:`${e.basePath}/scanned`,children:t("scann_es_13169")})]}),(0,o.jsx)(df,{path:`${e.basePath}/assigned`,children:(0,o.jsx)(Fb,{state:"assigned"})}),(0,o.jsx)(df,{path:`${e.basePath}/wished`,children:(0,o.jsx)(Fb,{state:"wished"})}),(0,o.jsx)(df,{path:`${e.basePath}/scanned`,children:(0,o.jsx)(Fb,{state:"scanned"})})]})})]})})},Mb=e=>(0,o.jsxs)(Gm,{isOpen:e.isOpen,onStateChange:e.onStateChange,children:[(0,o.jsx)(Jm,{children:e.triggerElem||(0,o.jsx)(Dn,{align:"center",css:{cursor:"pointer"},height:20,justify:"center",width:20,children:(0,o.jsx)(Mn,{icon:"ellipsis-vertical"})})}),(0,o.jsx)(Zm,{placement:"bottom-end",children:e.children})]}),$b=e=>{const{translate:t,params:{organizationId:n}}=Id(),{mutate:i}=po(),[s,a]=(0,r.useState)(y.CheckInOut),[c,l]=(0,r.useState)(e.positionSlotUserInfo.checkInAt?.toLocal()),[d,u]=(0,r.useState)(e.positionSlotUserInfo.checkOutAt?.toLocal()),[h,m]=(0,r.useState)(e.positionSlotUserInfo.breakTime),g=(0,r.useMemo)(()=>Li(),[]),p=s===y.Reset||c?.isValid&&d?.isValid&&d>c||c?.isValid&&!d?.isValid;return(0,o.jsx)(ti,{isOpen:e.isOpen,onClose:e.onClose,children:(0,o.jsxs)(ei,{children:[(0,o.jsx)(Qn,{icon:"sliders",children:t("mise_jour_du_76261")}),(0,o.jsxs)(Xn,{gap:"2",children:[(0,o.jsx)(xn,{font:"gray700 textSm medium",children:t("que_souhaitez_v_87607")}),(0,o.jsx)(dg,{state:s===y.CheckInOut?"checked":"unchecked",onClick:()=>{a(y.CheckInOut)},children:t("mettre_jour_l_00128")}),s===y.CheckInOut&&(0,o.jsxs)(Dn,{css:{paddingBottom:"$3",paddingLeft:"$6"},gap:"6",children:[(0,o.jsx)(om,{hint:t("date_et_heure_d_93417"),rightIcon:"xmark",value:c,zone:g,onChange:l,onRightIconClick:()=>l(null)}),(0,o.jsx)(om,{hint:t("date_et_heure_d_65738"),rightIcon:"xmark",value:d,zone:g,onChange:u,onRightIconClick:()=>u(null)}),(0,o.jsx)(cu,{css:{visibility:2723===n?"hidden":"visible"},hint:t("temps_de_pause_00051"),shouldParseAsInt:!0,value:h,onChange:m})]}),(0,o.jsx)(dg,{state:s===y.Reset?"checked":"unchecked",onClick:()=>{a(y.Reset)},children:t("remettre_z_ro_11572")})]}),(0,o.jsx)(Jn,{children:n=>(0,o.jsx)(Un,{disabled:!p,onClick:async()=>{await i({eventId:e.positionSlotUserInfo.eventId,checkIn:{breakTime:h,checkInAt:c?.toUTC(),checkOutAt:d?.toUTC(),strategy:s,positionsSlotsUsersInfosIds:[e.positionSlotUserInfo.id]}}),n()},children:t("mettre_jour_85141")})})]})})},Nb=e=>{const{translate:t}=Id(),{mutate:n}=po(),{mutate:i}=yo(),[s,a]=r.useState(!1);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(Mb,{triggerElem:e.triggerElem,children:[e.canCheckIn&&(0,o.jsx)(Km,{icon:"circle-check",onClick:()=>{a(!0)},children:t("mettre_jour_l_00128")}),e.canCheckIn&&e.psui.state!==A.Waiting&&(0,o.jsx)(Km,{icon:"arrows-rotate",onClick:async()=>{await n({eventId:e.psui.eventId,checkIn:{strategy:y.Reset,positionsSlotsUsersInfosIds:[e.psui.id]}}),e.reloadCheckIn(e.psui.id)},children:t("remettre_z_ro_11572")}),e.canDelete&&(0,o.jsx)(Km,{color:"red",icon:"user-xmark",onClick:async()=>{await i({eventId:e.psui.eventId,massAssign:{positionsSlotsIds:[e.psui.positionSlot.id],selecteds:{ids:[e.psui.userInfoId]},strategy:ae.Delete}}),e.onDelete(e.psui.id)},children:t("d_saffecter_du_47122")})]}),(0,o.jsx)($b,{isOpen:s,positionSlotUserInfo:e.psui,onClose:()=>{e.reloadCheckIn(e.psui.id),a(!1)}})]})},Bb=e=>{const{translate:t}=Id(),n=Kt(is),i=Kt(Js),s=Kt(sa),{mutate:a}=po(),c=dm(),l=(0,r.useMemo)(()=>{const t=e.positionSlotUserInfo.positionSlot;return an(t.name)?`${t.name} - ${s.toDisplayString(t.range)}`:s.toDisplayString(t.range)},[e.positionSlotUserInfo.positionSlot]),d=()=>(0,o.jsxs)(Dn,{align:"center",css:{padding:"$3","@tablet":{padding:"$3 $4"}},gap:"3",width:1,wrap:"wrap",children:[(0,o.jsx)(Gh,{color:e.positionSlotUserInfo.position.color,icon:e.positionSlotUserInfo.position.icon}),(0,o.jsxs)(Dn,{css:{flex:"1",overflow:"hidden"},direction:"column",gap:"1",children:[(0,o.jsx)(xn,{color:"gray800",css:{fontWeight:"$medium",overflow:"hidden",textOverflow:"ellipsis","@tablet":{fontWeight:"$semiBold"}},children:e.positionSlotUserInfo.position.name}),(0,o.jsx)(xn,{color:"gray500",fontSize:"textSm",children:l})]})]});return(0,o.jsxs)(Dn,{css:{background:"white",border:"1px solid $gray200",borderRadius:"$1",boxShadow:"$xs","@tablet":{borderRadius:"$2"}},direction:"column",width:1,children:[e.canCheckIn?(0,o.jsx)(Fn,{to:Dl.POSITION({organizationId:e.positionSlotUserInfo.organizationId,eventId:e.positionSlotUserInfo.eventId,positionId:e.positionSlotUserInfo.position.id}),children:d()}):d(),(e.canCheckIn||e.canDelete)&&(0,o.jsxs)(Dn,{align:"center",css:{borderTop:"1px solid $gray200",padding:"$3","@tablet":{padding:"$3 $4"}},justify:"between",width:1,children:[e.positionSlotUserInfo.state===A.CheckedOut?(0,o.jsx)(og,{leftIcon:"clock",children:t("temps_total_79448",i.minutesToHoursMinutesString(e.positionSlotUserInfo.timeDifferenceMinutes))}):e.positionSlotUserInfo.state===A.CheckedIn?(0,o.jsx)(og,{color:"success",leftIcon:"circle",leftIconStyle:"solid",children:t("point_le_1_63576",n.toLocaleString(e.positionSlotUserInfo.checkInAt.toLocal(),c?Bi.ShortDateTime:Bi.DateTime))}):(0,o.jsx)(og,{color:"warning",leftIcon:"circle",leftIconStyle:"solid",children:t("non_point_42145")}),(0,o.jsxs)(Dn,{gap:"3",children:[e.canCheckIn&&e.positionSlotUserInfo.state===A.Waiting&&(0,o.jsx)(Un,{size:"sm",onClick:async()=>{await a({eventId:e.positionSlotUserInfo.eventId,checkIn:{strategy:y.CheckIn,positionsSlotsUsersInfosIds:[e.positionSlotUserInfo.id]}}),e.reloadCheckIn(e.positionSlotUserInfo.id)},children:t("pointer_80927")}),e.canCheckIn&&e.positionSlotUserInfo.state===A.CheckedIn&&(0,o.jsx)(Un,{color:"white",size:"sm",onClick:async()=>{await a({eventId:e.positionSlotUserInfo.eventId,checkIn:{strategy:y.CheckOut,positionsSlotsUsersInfosIds:[e.positionSlotUserInfo.id]}}),e.reloadCheckIn(e.positionSlotUserInfo.id)},children:t("d_pointer_25328")}),(0,o.jsx)(Nb,{canCheckIn:e.canCheckIn,canDelete:e.canDelete,psui:e.positionSlotUserInfo,reloadCheckIn:e.reloadCheckIn,triggerElem:(0,o.jsx)(xn,{children:(0,o.jsx)(Un,{color:"white",rightIcon:"ellipsis-vertical",size:"sm"})}),onDelete:e.onDelete})]})]})]})},Lb=r.createContext({}),Vb=e=>{const{data:t}=fo({organizationId:e.organizationId,eventId:e.eventId,userInfoId:e.volunteerRegistration.userInfo.id}),[n,i]=r.useState(e.volunteerRegistration.positionsSlotsUsersInfos),s=r.useMemo(()=>(0,Uo.A)((0,Er.A)(n.map(e=>e.positionCategory),e=>e.id),e=>e.name.toLowerCase()),[n]),a=r.useCallback(e=>{i(t=>t.filter(t=>t.id!==e))},[i]),c=r.useCallback(async t=>{const o=n.find(e=>e.id===t),{event:{volunteerRegistration:{positionSlotUserInfo:r}}}=await(s={eventId:e.eventId,volunteerRegistrationId:e.volunteerRegistration.id,positionSlotId:o.positionSlot.id},a=await to(),co("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:a||void 0,fragments:[ji.UserPositionSlotUserInfoFragment]}));var s,a;i(e=>e.map(e=>e.id===t?r:e))},[e.eventId,e.volunteerRegistration,n,i]);return(0,o.jsx)(Lb.Provider,{value:{assignedCategories:s,assignedPsuis:n,canCheckIn:e.canCheckIn,canDelete:e.canDelete,formsUsersInfos:t.organization?.userInfo.formsUsersInfos??[],onAssignedPsuiDelete:a,reloadCheckIn:c},children:e.children})};function Ub(){return r.useContext(Lb)}const Gb=()=>{const{assignedCategories:e,assignedPsuis:t,canCheckIn:n,canDelete:i,onAssignedPsuiDelete:s,reloadCheckIn:a}=Ub(),c=(0,r.useMemo)(()=>(0,lh.A)(t,e=>e.positionCategory.id),[t]);return(0,o.jsx)(Ph,{children:e.map(e=>{const t=c[e.id];return(0,o.jsx)($h,{category:e,children:t.map(e=>(0,o.jsx)(Bb,{canCheckIn:"function"==typeof n?n(e.positionCategoryId,e.position.id):n,canDelete:i(e.positionCategoryId,e.position.id),positionSlotUserInfo:e,reloadCheckIn:a,onDelete:s},e.id))},e.id)})})},Wb=({filters:e,headerCells:t,limit:n,numberOfPages:i,offset:r,rows:s,setLimit:a,setOffset:c,showLimits:l=!1,showPagination:d=!0,title:u,totalCount:h})=>{const m=(l||d)&&"number"==typeof i&&"number"==typeof r&&"function"==typeof c&&(h??0)>0;return(0,o.jsxs)(xn,{children:[(0,o.jsxs)(Dn,{align:"center",css:{background:"white",border:"1px solid $gray200",borderBottom:"none",borderTopLeftRadius:"$2",borderTopRightRadius:"$2",padding:"$3 $6"},gap:"3",children:[u&&(0,o.jsx)(xn,{color:"gray900",css:{flex:"1"},fontSize:"textLg",fontWeight:"medium",children:u}),e]}),(0,o.jsxs)(Bp,{children:[(0,o.jsx)(zp,{css:{borderRadius:"0 !important",borderTop:"1px solid $gray200"},children:t}),s,m&&(0,o.jsx)(u_,{children:(0,o.jsx)(d_,{limit:n,numberOfPages:i,offset:r,setLimit:a,setOffset:c,showLimits:l,totalCount:h??0})})]})]})},qb=({message:e,title:t})=>(0,o.jsxs)(Bd,{color:"warning",leftIcon:"triangle-exclamation",children:[(0,o.jsx)(Dn,{css:{fontWeight:"$medium"},direction:"column",children:t}),(0,o.jsx)(Fd,{height:"1"}),(0,o.jsx)(Dn,{css:{fontWeight:"normal"},children:e})]}),Hb=({editDisabled:e,editPath:t,eventId:n,form:i,organizationId:r,userInfoId:s})=>{const a=en();return(0,o.jsx)(og,{color:"primary",cursor:e?"default":"pointer",onContentClick:()=>{e||a.push(t?n?t(r,s,n,i.id):t(r,s,i.id):Wa.FORM({organizationId:r,eventId:n??void 0,formId:i.id}))},children:i.name})},Kb=({editFormPath:e,editPath:t,formsUsersInfos:n,isEditDisabled:i=!1})=>{const{history:s,params:{organizationId:c,eventId:l,userInfoId:d},translate:u}=Id(),h=Kt(sa),m=(0,r.useMemo)(()=>function(e,t,n,i){return(0,Uo.A)(e.map(e=>{const o=e.positions.map((o,r)=>({name:o.name,range:o.range?t.toDisplayString(o.range):"-",path:Dl.POSITION({organizationId:n,eventId:i,positionId:o.id}),form:e.form,rank:r+1})),r=e.positionsCategories.map((o,r)=>({name:o.name,range:o.range?t.toDisplayString(o.range):"-",path:Dl.POSITION_CATEGORY({organizationId:n,eventId:i,positionCategoryId:o.id}),form:e.form,rank:r+1})),s=e.positionsSlots.map(t=>({name:t.position.name,range:t.nameOrRange,path:Dl.POSITION({organizationId:n,eventId:i,positionId:t.position.id}),form:e.form,rank:-1}));return o.concat(r).concat(s)}).flat(),[e=>e.form.name,(e,t)=>t])}(n,h,c,l),[n]),g=dm();return(0,o.jsxs)(Dn,{direction:"column",gap:"6",width:1,children:[i&&(0,o.jsx)(qb,{message:u("you_are_already_assigned_to_missions"),title:u("wished_positions_can_no_longer_be_changed")}),(0,o.jsx)(Wb,{filters:an(t)&&(0,o.jsx)(Un,{color:"white",disabled:i,size:"sm",to:t,children:u("_diter_62574")}),headerCells:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fp,{children:u("nom_de_la_missi_64605")}),!g&&(0,o.jsx)(Fp,{children:u("Date")}),!g&&(0,o.jsx)(Fp,{children:u("Form")})]}),numberOfPages:0,offset:0,rows:(0,o.jsx)(o.Fragment,{children:a(m)?m.map((t,n)=>(0,o.jsxs)(Np,{children:[(0,o.jsxs)(Op,{align:"start",css:{color:"$gray800",fontWeight:"$medium",fontSize:"$textSm"},direction:"column",gap:"1",justify:"center",children:[(0,o.jsx)(xn,{color:"gray900",css:{cursor:"pointer"},fontWeight:"medium",onClick:()=>{s.push(t.path)},children:t.name}),t.form.positionRanking===X.Ranked&&(0,o.jsx)(xn,{color:"gray500",children:u("choix_n_1_00613",t.rank)}),g&&(0,o.jsx)(xn,{color:"gray500",css:{fontWeight:400,lineHeight:"20px"},fontSize:"textSm",children:t.range})]}),!g&&(0,o.jsx)(Op,{children:t.range}),!g&&(0,o.jsx)(Op,{children:(0,o.jsx)(Hb,{editDisabled:i,editPath:e,eventId:l,form:t.form,organizationId:c,userInfoId:d})})]},n)):(0,o.jsx)(Np,{css:{height:"200px"},children:(0,o.jsx)(Op,{children:(0,o.jsx)(Rh,{title:u("aucune_mission_61179")})})})}),setOffset:uu.A,title:u("missions_souhai_23225"),totalCount:0})]})},Yb=()=>{const{formsUsersInfos:e}=Ub();return(0,o.jsx)(Dn,{css:{background:"$gray50",padding:"$6"},height:1,width:1,children:(0,o.jsx)(Kb,{formsUsersInfos:e})})},Zb=e=>{const{translate:t}=Id();return(0,o.jsx)(Vb,{canCheckIn:e.canCheckIn,canDelete:e.canDelete,eventId:e.eventId,organizationId:e.organizationId,volunteerRegistration:e.volunteerRegistration,children:(0,o.jsxs)(ff,{size:"md",onClose:e.onClose,children:[(0,o.jsx)(xb,{children:t("missions_63972")}),(0,o.jsx)(_f,{css:{padding:"0"},children:(0,o.jsxs)(uf,{height:1,children:[(0,o.jsxs)(lf,{center:!0,children:[(0,o.jsx)(cf,{path:`${e.basePath}/assigned`,children:t("attribu_es_48167")}),(0,o.jsx)(cf,{path:`${e.basePath}/wished`,children:t("souhait_es_78101")})]}),(0,o.jsx)(df,{path:`${e.basePath}/assigned`,children:(0,o.jsx)(Gb,{})}),(0,o.jsx)(df,{path:`${e.basePath}/wished`,children:(0,o.jsx)(Yb,{})})]})})]})})},Jb=r.createContext({}),Xb=e=>{const{data:t,loader:n}=Jt("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},[ji.UserInfoTeamRightPanelFragment]);const{mutate:i}=yo(),[s,a]=r.useState([]),c=r.useMemo(()=>{const e=s.flatMap(e=>e.positionsCategories.flatMap(e=>e.positions.flatMap(e=>e.slots.map(t=>({...t,position:(0,En.A)(e,["id","name","icon","color"])}))))),t=s.flatMap(e=>e.positions.flatMap(e=>e.slots.map(t=>({...t,position:(0,En.A)(e,["id","name","icon","color"])})))),n=s.flatMap(e=>e.positionsSlots);return(0,Er.A)(e.concat(t).concat(n),e=>e.id)},[s]),l=r.useMemo(()=>(0,Er.A)(s.flatMap(e=>e.positionsSlotsUsersInfos.map(e=>({...e.positionSlot,position:e.position}))),e=>e.id),[s]),d=r.useMemo(()=>(0,Uo.A)((0,Er.A)(c.concat(l),e=>e.id),e=>[e.position.name.toLowerCase(),e.range.start.toMillis()]),[c,l]),u=r.useMemo(()=>Object.fromEntries(s.map(e=>{const t=(0,Ei.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]})),[s]),h=r.useMemo(()=>Object.fromEntries(s.map(e=>{const t=e.positionsSlotsUsersInfos.map(e=>e.positionSlot.id);return[e.userInfo.id,t]})),[s]),m=r.useCallback(async(t,n)=>{await i({eventId:e.eventId,massAssign:{positionsSlotsIds:[n],selecteds:{ids:[t]},strategy:ae.Add}});const{event:o}=await function(e,t){return co("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:[ji.UserInfoTeamRightPanelFragment]})}({eventId:e.eventId,userInfoId:t},await to());a(e=>e.map(e=>e.userInfo.id===t?o.volunteerRegistration:e))},[e.eventId,a]);return r.useEffect(()=>{a(t.event?.team?.members??[])},[t.event,a]),(0,o.jsx)(Jb.Provider,{value:{allSlots:d,form:t.event?.team?.form,loader:n,memberIdToAssignedSlotsIds:h,memberIdToWishedSlotsIds:u,members:s,assign:m},children:e.children})};function Qb(){return r.useContext(Jb)}const ek=e=>{const{translate:t}=Id(),{assign:n,memberIdToAssignedSlotsIds:i,memberIdToWishedSlotsIds:s}=Qb(),[a,c]=(0,r.useState)(!1),l=i[e.member.userInfo.id].includes(e.slot.id),d=s[e.member.userInfo.id].includes(e.slot.id);return(0,o.jsxs)(Np,{children:[(0,o.jsx)(Op,{children:(0,o.jsx)(L_,{size:32,userInfo:e.member.userInfo})}),(0,o.jsx)(Op,{justify:"end",children:l?(0,o.jsxs)(Dn,{align:"center",gap:"1",children:[(0,o.jsx)(xn,{color:"success500",children:(0,o.jsx)(Mn,{icon:"badge-check",iconStyle:"solid"})}),(0,o.jsx)(xn,{font:"gray800 textXs medium",children:t("d_j_affect_71706")})]}):d?(0,o.jsx)(Un,{isLoading:a,size:"sm",onClick:()=>{c(!0),n(e.member.userInfo.id,e.slot.id)},children:t("affecter_94255")}):(0,o.jsxs)(Dn,{align:"center",gap:"1",children:[(0,o.jsx)(xn,{color:"error500",children:(0,o.jsx)(Mn,{icon:"circle-xmark",iconStyle:"solid"})}),(0,o.jsx)(xn,{font:"gray800 textXs medium",children:t("non_souhait_46147")})]})})]})},tk=e=>{const{translate:t}=Id(),{members:n}=Qb(),i=Kt(sa),s=(0,r.useMemo)(()=>gh(i,e.slot,e.slot.position.name,{slot:{includeRange:!0}}),[e.slot]);return(0,o.jsxs)(Dn,{css:{background:"white",bd:!0,overflow:"hidden"},direction:"column",children:[(0,o.jsxs)(Dn,{css:{padding:"$3 $4"},gap:"3",children:[(0,o.jsx)(Gh,{color:e.slot.position.color,icon:e.slot.position.icon}),(0,o.jsxs)(Dn,{direction:"column",children:[(0,o.jsx)(xn,{font:"gray800 textSm semiBold",children:e.slot.position.name}),(0,o.jsx)(xn,{color:"gray500",children:s})]})]}),(0,o.jsxs)(Bp,{hideBorder:!0,children:[(0,o.jsxs)(zp,{children:[(0,o.jsx)(Fp,{children:t("full_name")}),(0,o.jsx)(Fp,{})]}),n.map(t=>(0,o.jsx)(ek,{member:t,slot:e.slot},t.userInfo.id))]})]})},nk=()=>{const{allSlots:e}=Qb();return(0,o.jsx)(Dn,{direction:"column",gap:"3",width:1,children:e.map(e=>(0,o.jsx)(tk,{slot:e},e.id))})},ik=e=>{const{translate:t}=Id(),{form:n,loader:i}=Qb();return(0,o.jsxs)(ff,{size:"md",onClose:e.onClose,children:[(0,o.jsx)(xb,{children:(0,o.jsxs)(Dn,{direction:"column",gap:"1",children:[(0,o.jsx)(xn,{children:t("_quipe_1_19590",e.teamCode)}),(0,o.jsx)(xn,{color:"gray500",fontSize:"textSm",children:t("formulaire_1_39637",n?.name)})]})}),(0,o.jsx)(_f,{css:{background:"$gray50",py:"$6"},children:i||(0,o.jsx)(nk,{})})]})},ok=e=>(0,o.jsx)(Xb,{eventId:e.eventId,teamCode:e.teamCode,children:(0,o.jsx)(ik,{...e})}),rk=({editFormPath:e,editPath:t,eventId:n,organizationId:i,formsUsersInfos:s,showEditButton:c,userInfoId:l,isEditDisabled:d=!1})=>{const{translate:u}=Id(),h=Kt(is),m=Kt(sa),g=(0,r.useMemo)(()=>(0,Uo.A)(s.flatMap(e=>e.slots.map(t=>({range:t.range,display:e.form.slotDisplay,form:e.form}))),({range:e})=>e.start.toMillis()),[s]),p=dm(),f=(0,r.useCallback)((e,t)=>{switch(t){case we.Calendar:case we.DisplayDays:return(0,o.jsx)(xn,{children:h.toLocaleString(e.start,Bi.DateOnly.MonthLong)});case we.Display:case we.Custom:return(0,o.jsxs)(Dn,{direction:"column",children:[(0,o.jsx)(xn,{css:{lineHeight:"20px"},children:m.toDisplayString(e,{hideTime:!0})}),(0,o.jsx)(xn,{color:"gray500",css:{fontWeight:400,lineHeight:"20px"},fontSize:"textSm",children:m.toDisplayString(e,{hideDate:!0})})]});case we.Hide:return null;default:return Br()}},[]);return(0,o.jsxs)(Dn,{direction:"column",gap:"6",children:[d&&(0,o.jsx)(qb,{message:u("you_are_already_assigned_to_missions"),title:u("availabilities_can_no_longer_be_changed")}),(0,o.jsx)(Wb,{filters:c&&(0,o.jsx)(Un,{color:"white",disabled:d,size:"sm",to:t,children:u("_diter_62574")}),headerCells:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fp,{children:u("Date")}),!p&&(0,o.jsx)(Fp,{children:u("Form")})]}),numberOfPages:0,offset:0,rows:(0,o.jsx)(o.Fragment,{children:a(g)?g.map((t,r)=>(0,o.jsxs)(Np,{children:[(0,o.jsx)(Op,{children:f(t.range,t.display)}),!p&&(0,o.jsx)(Op,{children:(0,o.jsx)(Hb,{editDisabled:d,editPath:e,eventId:n,form:t.form,organizationId:i,userInfoId:l})})]},r)):(0,o.jsx)(Np,{css:{height:"200px"},children:(0,o.jsx)(Op,{children:(0,o.jsx)(Rh,{title:u("aucune_disponib_15602")})})})}),setOffset:uu.A,title:u("disponibilit_s_49923"),totalCount:0})]})},sk=e=>{const t=Yt(),{data:n,loader:i}=Jt("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},[ji.FormsUsersInfosWishedFragment]);const{permissions:[r],isLoading:s}=function(...e){return gb({withCaching:!0,checks:e})}(((...e)=>({name:"canUserInfoSlotsUpdateFn",args:e}))({eventId:e.eventId,userInfoId:e.userInfoId}));return(0,o.jsxs)(ff,{returnToFallback:e.returnPathFallback,size:"md",children:[(0,o.jsx)(xb,{children:t("disponibilit_s_49923")}),(0,o.jsx)(_f,{children:i||s?i:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"6"}),(0,o.jsx)(rk,{editFormPath:(t,n,i,o)=>location.host.startsWith("app.")?Jl.EDIT_USER_SLOTS_FORM(t,i,n,o):e.delegationId?dc.MEMBER_EDIT({organizationId:t,userInfoId:n,delegationId:e.delegationId,eventId:i,formId:o}):Cd.MEMBER_FORM_EDIT({organizationId:t,userInfoId:n,eventId:i,formId:o}),editPath:Jl.EDIT_USER_SLOTS(e.organizationId,e.eventId,e.userInfoId),eventId:e.eventId,formsUsersInfos:n.organization.userInfo.formsUsersInfos,organizationId:e.organizationId,showEditButton:r,userInfoId:e.userInfoId}),(0,o.jsx)(Fd,{height:"6"})]})})]})},ak=e=>{const{history:t}=Id();return(0,o.jsxs)($o.dO,{children:[(0,o.jsx)($o.qh,{path:e.accreditationsPanelPath,children:(0,o.jsx)(zb,{basePath:e.accreditationsPanelPath,canAccredit:e.canAccredit,canEditWished:e.canEditWishedAccreditations,defaultHiddenAccreditationsSlotsIds:e.defaultHiddenAccreditationsSlotsIds,delegationId:e.delegationId,eventId:e.eventId,userInfoId:e.volunteerRegistration.userInfo.id,volunteerRegistration:e.volunteerRegistration,onClose:()=>{e.reloadRow(),t.goBack(e.returnPathFallback)}})}),(0,o.jsx)($o.qh,{path:e.availabilitiesPanelPath,children:(0,o.jsx)(sk,{delegationId:e.delegationId,eventId:e.eventId,organizationId:e.organizationId,returnPathFallback:e.availabilitiesPanelPath,userInfoId:e.volunteerRegistration.userInfo.id})}),(0,o.jsx)($o.qh,{path:e.positionsPanelPath,children:(0,o.jsx)(Zb,{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,i)=>(0,o.jsx)($o.qh,{path:n,children:(0,o.jsx)(ok,{eventId:e.eventId,teamCode:(e.volunteerRegistration.teams||[])[i].teamCode,onClose:()=>{e.reloadRow(),t.goBack(e.returnPathFallback)}})},i))]})},ck=bn("span",{variants:{color:{inherit:{color:"inherit"},cyan:{color:"$cyan"},gray25:{color:"$gray25"},gray50:{color:"$gray50"},gray100:{color:"$gray100"},gray200:{color:"$gray200"},gray300:{color:"$gray300"},gray400:{color:"$gray400"},gray500:{color:"$gray500"},gray600:{color:"$gray600"},gray700:{color:"$gray700"},gray800:{color:"$gray800"},gray900:{color:"$gray900"},primary25:{color:"$primary25"},primary50:{color:"$primary50"},primary100:{color:"$primary100"},primary200:{color:"$primary200"},primary300:{color:"$primary300"},primary400:{color:"$primary400"},primary500:{color:"$primary500"},primary600:{color:"$primary600"},primary700:{color:"$primary700"},primary800:{color:"$primary800"},primary900:{color:"$primary900"},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"},blueLight100:{color:"$blueLight100"},blueLight400:{color:"$blueLight400"},blueLight600:{color:"$blueLight600"},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"},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"},orange100:{color:"$orange100"},orange400:{color:"$orange400"},orange600:{color:"$orange600"},orange700:{color:"$orange700"},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"}}),lk=r.forwardRef((e,t)=>(0,o.jsx)(ck,{...(0,hn.A)(e,"font"),...mn(e.font),ref:t,css:e.css}));lk.displayName="Span",xi.IX.fromDateTimes(xi.c9.fromObject({year:2025,month:6,day:6}).startOf("day"),xi.c9.fromObject({year:2025,month:6,day:8}).endOf("day"));function dk(e){switch(e){case C.Animajeconvention:return"Animaje Convention";case C.Asoassignment:return"Fiche d'affectation ASO";case C.Cerclestaff:return"Cercle Staff & Visiteurs";case C.Cerclelivraison:return"Cercle Livraison";case C.Cerclepressandpartenaire:return"Cercle Press & Partenaire";case C.Cercleopcom:return"Cercle OPCom";case C.Delta:return"Badge Delta";case C.Dfcoa4:return"Badge Dijon DFCO A4";case C.Dfcosmall:return"Badge Dijon DFCO Carte";case C.Eurockeennes:return"Planning Les Eurockéennes";case C.Fcg:return"Accréditation FCG";case C.Garorockplanning:return"Planning Garorock";case C.Goldencoast:return"Badge Golden Coast";case C.Hbcldc:return"Badge HBC Ligue des Champions";case C.Hbclnh:return"Badge HBC LNH";case C.Lnh:return"Badge LNH";case C.Moorea:return"Badge Moorea";case C.Nuitssecretes:return"Badge Nuits Secrètes";case C.Openbrest:return"Badge Open de Brest";case C.P2nassignment:return"Fiche d'affectation P2N (Exploit)";case C.P2nassignmentmontagedemontage:return"Fiche d'affectation P2N (Montage/Démontage)";case C.P2nbadge:return"Badge P2N";case C.Paris20km:return"Badge 20km de Paris";case C.Paris20kmassignment:return"Fiche d'affectation 20km de Paris";case C.Paris20kmcontremarque:return"Contremarque 20km de Paris";case C.Pastourelle:return"Badge Pastourelle bénévoles";case C.Pastourelleexposant:return"Badge Pastourelle staffs";case C.Pec:return"Badge Paris Entertainment Company";case C.Playground:return"Fiche d'affectation Playground";case C.Roiarthur:return"Badge Roi Arthur";case C.Rose:return"Contremarque Rose Festival";case C.Roseparking:return"Rose Festival Pass Parking";case C.Salamandre:return"Badge Salamandre";case C.T24assignment:return"Fiche d'affectation T24";case C.Triathlonlarochellebadge:return"Badge Triathlon la Rochelle";case C.Utopialesimprimeur:return"Badge Utopiales (version imprimeur)";case C.Utopialesa4:return"Badge Utopiales (version A4)";case C.Vandbcontremarque:return"V and B Fest' Convocation";case C.Vannes:return"Badge Marathon de Vannes";case C.Vannesassignment:return"Fiche d'affectation Marathon de Vannes";case C.Vendanges:return"Badge Les Vendanges Musicales";case C.Vendeeglobebadge:return"Badge Vendée Globe";case C.Vendeeglobecontremarque:return"Contremarque Vendée Globe";default:return Br()}}Object.keys({cf25078:"Parcours",cf25079:"Plan village",cf25080:"Poste vélo",cf25511:"Poste course à pied",cf25512:"Plan d'accès"}),xi.IX.after(xi.c9.fromObject({day:23,month:8,year:2024}),xi.dw.fromObject({day:3}));const uk=e=>{const t=Yt(),[n,i]=r.useState(!1),a=r.useCallback(async()=>{let t=!0;return i(!0),await e.onDelete(),t&&i(!1),()=>{t=!1}},[e.onDelete,n,i]);return(0,o.jsxs)(Tm,{size:"md",onClose:e.onClose,children:[(0,o.jsx)(Dn,{justify:"center",children:(0,o.jsx)(Dn,{align:"center",css:{background:"$error100",borderRadius:"48px",color:"$error600",height:"48px",fontSize:"20px",width:"48px"},justify:"center",children:(0,o.jsx)(Mn,{icon:"circle-exclamation",iconStyle:"light"})})}),(0,o.jsx)(Fd,{height:"5"}),(0,o.jsx)(xn,{css:{ellipsis:!0},font:"gray900 textLg regular",textAlign:"center",title:e.text,children:e.text}),"subtext"in e&&s(e.subtext).map((e,t)=>(0,o.jsxs)(r.Fragment,{children:[(0,o.jsx)(Fd,{height:"2"}),(0,o.jsx)(xn,{color:"gray500",textAlign:"center",children:e})]},t)),"children"in e&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"2"}),(0,o.jsx)(xn,{color:"gray500",css:{alignSelf:"center"},children:e.children})]}),(0,o.jsx)(Fd,{height:"7"}),(0,o.jsxs)(Dn,{gap:"3",justify:"end",children:[(0,o.jsx)(Un,{color:"error",isLoading:n,onClick:a,children:e.buttonText}),(0,o.jsx)(Un,{color:"white",onClick:e.onClose,children:t("annuler_48254")})]})]})},hk=e=>{const{translate:t,params:{organizationId:n,eventId:i,delegationId:s}}=Id(),{mutate:c}=Ao(),{mutate:l}=mo(),{mutate:d}=function(e={}){return Xt("mutation VolunteersRegistrationsMassDelete(\n $eventId: EventId!\n $selecteds: MassActionSelectedsInput!\n) {\n numberOfMembers: volunteersRegistrationsMassDelete(eventId: $eventId, selecteds: $selecteds)\n}\n",e)}(),[u,h]=(0,r.useState)(!1),[m,g]=(0,r.useState)(!1),p=(0,r.useMemo)(()=>e.customDocuments.filter(t=>{return n=t.populationsIds,i=e.member.fields.population,0===n.length||n.includes(i);var n,i}),[e.customDocuments,e.member]),_=i&&e.canAccredit&&e.accreditationState===f.WaitingAccreditation,b=i&&e.showDocumentsDownload&&void 0!==e.member.links&&a(e.allowedCustomDocuments);return _||b||e.canDelete||e.showDeleteFromEvent?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(Mb,{children:[_&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Km,{icon:"check",onClick:async()=>{await c({eventId:i,delegationId:s,usersInfosIds:[e.member.id]}),e.reload()},children:t("valider_les_acc_80801")}),(0,o.jsx)(Km,{icon:"badge-check",to:Jl.ACCREDIT(n,i,e.member.id),children:t("accr_diter_70543")}),(0,o.jsx)(Qm,{color:"gray100",direction:"horizontal"})]}),b&&(0,o.jsx)(o.Fragment,{children:a(e.allowedCustomDocuments)&&(0,o.jsx)(o.Fragment,{children:e.allowedCustomDocuments.map((n,i)=>{const r=p.find(e=>e.slug===n);return r?(0,o.jsx)(Km,{download:`${e.member.nameOrEmail}-${r.name}`,icon:"arrow-down-to-bracket",target:"_blank",to:pc(e.member.links?.userCustomDocumentLinks[n],"pdf"),children:t("t_l_charger_1_80752",r.name)},i):mt.includes(n)?(0,o.jsx)(Km,{download:`${e.member.nameOrEmail}-custom-badge`,icon:"arrow-down-to-bracket",target:"_blank",to:pc(e.member.links?.userCustomBadgeLinks[n],"pdf"),children:t("t_l_charger_1_80752",dk(n))},i):null})})}),b&&e.canDelete&&(0,o.jsx)(Qm,{color:"gray100",direction:"horizontal"}),e.canDelete&&(0,o.jsx)(Km,{color:"red",icon:"user-xmark",onClick:()=>h(!0),children:t("retirer_de_la_d_64963")}),e.showDeleteFromEvent&&(0,o.jsx)(Km,{color:"red",icon:"trash-can",onClick:()=>g(!0),children:t("delete_from_eve_69290")})]}),u&&(0,o.jsx)(uk,{buttonText:t("supprimer_43083"),subtext:[t("_tes_vous_sur_d_88752")],text:t("suppression_de_73669",e.member.nameOrEmail),onClose:()=>h(!1),onDelete:async()=>{await l({organizationId:n,eventId:i,delegationId:s,selecteds:{ids:[e.member.id]},deleteFromEvent:e.deleteFromEvent}),e.reload()}}),m&&e.volunteerRegistrationId&&(0,o.jsx)(uk,{buttonText:t("supprimer_43083"),subtext:[t("are_you_sure_yo_46668")],text:t("suppression_de_73669",e.member.nameOrEmail),onClose:()=>g(!1),onDelete:async()=>{await d({eventId:i,selecteds:{ids:[e.member.id]}}),e.reload()}})]}):null},mk=({onChange:e,css:t,label:n,description:i,value:s,hint:a,state:c,initialValue:l,icon:d,...u})=>{const h=Yt(),m=(0,r.useRef)(null),g=(0,hm.A)(t=>{e(t)},500),{inputId:p,descId:f,errorId:_}=nu();return(0,o.jsxs)(Dn,{css:t,direction:"column",width:1,children:[(0,o.jsx)(ru,{htmlFor:p,isClickable:!1,children:n}),(0,o.jsx)(iu,{id:f,children:i}),(n||i)&&(0,o.jsx)(Fd,{height:"1"}),(0,o.jsxs)(au,{cursor:"default",icon:d,state:c,onClick:()=>{m.current?.click()},children:[(0,o.jsxs)(Dn,{align:"center",css:{flex:"1"},height:1,children:[(0,o.jsx)(xn,{css:{background:s,borderRadius:"2px",height:"24px",width:"24px","& input":{background:"transparent",border:"none",borderRadius:"2px",cursor:"pointer",height:"24px",width:"24px","&::-webkit-color-swatch-wrapper":{padding:0},"&::-webkit-color-swatch":{borderRadius:"2px",border:"none"},"&::-moz-color-swatch":{border:"none"}}},children:(0,o.jsx)("input",{ref:m,"aria-describedby":i?f:void 0,id:p,type:"color",value:s,onChange:e=>{g(e.target.value)},...u})}),(0,o.jsx)(Fd,{width:"3"}),(0,o.jsx)(xn,{color:"gray800",css:{flex:"1","& input[type=text]":{background:"transparent",border:"none",color:"$gray800",height:"100%",outline:"none",width:"100%"}},height:1,onClick:Hn,children:(0,o.jsx)("input",{"aria-describedby":i?f:void 0,"aria-errormessage":"error"===c?_:void 0,"aria-invalid":"error"===c,disabled:"disabled"===c,id:p,type:"text",value:s,onChange:t=>{e(t.target.value)},...u})})]}),l&&(0,o.jsx)(xn,{color:"primary700",css:{cursor:"pointer",userSelect:"none"},fontWeight:"medium",onClick:t=>{Hn(t),e(l)},children:h("remettre_sa_v_90478")})]}),(0,o.jsx)(ou,{id:_,state:c,children:a})]})},gk=({name:e,hint:t,state:n,...i})=>(0,o.jsx)(Rd.D0,{name:e,render:r=>{const s=eu(r.meta);return(0,o.jsx)(mk,{hint:s?r.meta.error:t,name:e,state:s?"error":n,value:r.input.value,onChange:e=>{r.input.onChange(e)},...i})}}),pk=({value:e,onChange:t,...n})=>{const[i,s]=(0,r.useState)(e?.toString()??""),[a,c]=(0,r.useState)(e);return a!==e&&(s(e?.toString()??""),c(e)),(0,o.jsx)(cu,{value:i,onChange:e=>{const n=parseFloat(e);s(e),c(isNaN(n)?null:n),t(isNaN(n)?null:n)},...n})},fk=({name:e,hint:t,state:n,...i})=>(0,o.jsx)(Rd.D0,{name:e,render:r=>{const s=eu(r.meta);return(0,o.jsx)(pk,{hint:s?r.meta.error:t,name:e,state:s?"error":n,value:r.input.value,onBlur:r.input.onBlur,onChange:r.input.onChange,onFocus:r.input.onFocus,...i})}}),_k=bn("div",{alignItems:"center",borderRadius:"$1",color:"$gray600",cursor:"pointer",display:"flex",height:"40px",justifyContent:"center",width:"40px",variants:{active:{true:{background:"$primary200",color:"$primary700"},false:{"&:hover":{background:"$gray200",color:"$gray800"}}}}}),bk=({css:e,label:t,description:n,value:i,height:s,renderOnPortal:a,onChange:c,...l})=>{const d=Yt(),[u,h]=(0,r.useState)(!1),m=(0,r.useMemo)(()=>(0,Uo.A)(yt.map(e=>({value:e,name:d(e)})),e=>e.name),[]);return(0,o.jsxs)(Dn,{css:e,direction:"column",width:1,children:[(0,o.jsx)(ru,{children:t}),(0,o.jsx)(iu,{children:n}),(t||n)&&(0,o.jsx)(Fd,{height:"1"}),(0,o.jsxs)(Gm,{isOpen:u,onStateChange:h,children:[(0,o.jsx)(Jm,{children:(0,o.jsx)(au,{cursor:"pointer",icon:zn(i),rightIcon:u?"chevron-up":"chevron-down",...l,children:(0,o.jsx)(xn,{css:{flex:"1"},children:d(i)})})}),(0,o.jsx)(Zm,{maxHeight:300,placement:"bottom",renderOnPortal:a,width:"match",children:(0,o.jsx)(Dn,{css:{px:"$2"},gap:"2",width:1,wrap:"wrap",children:m.map(e=>(0,o.jsx)(_k,{active:i===e.value,onClick:()=>{h(!1),c(e.value)},children:(0,o.jsx)(Mn,{icon:zn(e.value)})},e.value))})})]})]})},kk=({name:e,hint:t,state:n,...i})=>(0,o.jsx)(Rd.D0,{name:e,render:r=>{const s=eu(r.meta);return(0,o.jsx)(bk,{hint:s?r.meta.error:t,name:e,state:s?"error":n,value:r.input.value,onBlur:r.input.onBlur,onChange:e=>{r.input.onChange(e)},onFocus:r.input.onFocus,...i})}});var vk=n(3333),Ak=n(5488),yk=n.n(Ak);n(4385),n(5833),n(9844),n(6871),n(2830);const wk=({css:e,label:t,description:n,state:i,initialValue:s,onChange:a,onBlur:c,onFocus:l,hint:d,placeholder:u,value:h,...m})=>{const{translate:g,params:{organizationId:p}}=Id(),{language:f}=Kt(Wt),_=(0,r.useMemo)(()=>[{color:"white",label:g("blanc_36425")},{color:kn.colors.gray800.value,label:g("gris_fonc_51159")},{color:kn.colors.gray400.value,label:g("gris_clair_52465")},{color:kn.colors.primary900.value,label:g("bleu_fonc_40491")},{color:kn.colors.primary700.value,label:g("bleu_41949")},{color:kn.colors.error700.value,label:g("rouge_fonc_45023")},{color:kn.colors.error500.value,label:g("rouge_75079")},{color:kn.colors.warning300.value,label:g("jaune_53503")},{color:kn.colors.warning600.value,label:g("orange_64132")},{color:kn.colors.success700.value,label:g("vert_fonc_37265")},{color:kn.colors.success500,label:g("vert_27018")},{color:kn.colors.purple700.value,label:g("violet_fonc_77270")},{color:kn.colors.purple500.value,label:g("violet_54005")},{color:kn.colors.pink700.value,label:g("rose_fonc_98996")},{color:kn.colors.pink500.value,label:g("rose_49360")}],[]);return(0,o.jsxs)(Dn,{css:e,direction:"column",width:1,children:[(0,o.jsx)(ru,{children:t}),(0,o.jsx)(iu,{children:n}),(t||n)&&(0,o.jsx)(Fd,{height:"1"}),(0,o.jsx)(xn,{css:{"--ck-border-radius":"$radii$1","--ck-color-toolbar-background":"$colors$gray100","& .ck.ck-toolbar":{borderColor:"error"===i?"$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:"$primary300",color:"$primary700"}}},"& .ck.ck-content":{borderColor:"error"===i?"$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"},...Cg("& .ck.ck-content")},width:1,children:(0,o.jsx)(vk.CKEditor,{config:{placeholder:u,fontColor:{colors:_},fontBackgroundColor:{colors:_},language:f.toString().toLowerCase(),simpleUpload:{uploadUrl:`${Ii.HEAVENT_API_URL}/image/upload?organizationId=${p}`},heading:{options:[{model:"paragraphSmall",view:{name:"p",classes:"h-small"},title:g("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"}]}},data:s,editor:yk(),onBlur:()=>{c?.()},onChange:(e,t)=>{a(t.getData())},onFocus:()=>{l?.()},...m})}),(0,o.jsx)(ou,{state:i,children:d})]})},Ck=({name:e,hint:t,state:n,...i})=>(0,o.jsx)(Rd.D0,{name:e,parse:Qd.A,render:r=>{const s=eu(r.meta);return(0,o.jsx)(wk,{hint:s?r.meta.error:t,initialValue:r.input.value,name:e,state:s?"error":n,onChange:e=>{r.input.onChange(e)},...i})}}),Ik=e=>{const{translate:t,params:{organizationId:n}}=Id(),i=Kt(wr),s=Kt(Yr),a=Kt(Ur),c=yg();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===he.Acronym||e.slug===he.Address||e.slug===he.Color||e.slug===he.Description||e.slug===he.Icon||e.slug===he.Name||e.slug===j.Description||e.slug===j.Name||e.customField?.fieldType===K.Address||e.customField?.fieldType===K.Country||e.customField?.fieldType===K.Language||e.customField?.fieldType===K.Nationality||e.customField?.fieldType===K.Sex||e.customField?.fieldType===K.Text||e.customField?.fieldType===K.Textarea||e.customField?.fieldType===K.Time?"string"!=typeof e.value&&e.change(e.name,""):e.slug===h.AutoAccredit||e.slug===h.WeezeventIsSynchronized||e.slug===x.Privacy||e.slug===j.IsLocked||e.slug===j.ShowInDelegationSpace||e.slug===j.CanLeadersAddMembers||e.slug===j.CanLeadersEditCustomFields||e.slug===j.CanLeadersEditMembers||e.slug===j.CanLeadersDeleteMembers||e.slug===j.CanLeadersEditColumns||e.slug===j.CanLeadersImportMembers||e.slug===j.CanLeadersSeeHiddenAccreditationsSlots||e.slug===j.ShowFormLinkInDelegationSpace||e.customField?.fieldType===K.Checkbox||e.customField?.fieldType===K.Validation?"boolean"!=typeof e.value&&e.change(e.name,!1):e.slug===h.Category||e.slug===j.Category||e.slug===he.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===he.Latitude||e.slug===he.Longitude||e.slug===j.MaxResources||e.customField?.fieldType===K.Number?"number"!=typeof e.value&&e.change(e.name,0):e.slug===h.Tag||e.slug===he.Tag||e.slug===j.Campaigns||e.slug===j.Documents||e.slug===j.Tag||e.slug===he.Traces?Array.isArray(e.value)||e.change(e.name,[]):e.slug===j.DeadlineDate||e.customField?.fieldType===K.Date||e.customField?.fieldType===K.Datetime?xi.c9.isDateTime(e.value)||an(e.value)||e.change(e.name,xi.c9.invalid("Invalid")):e.customField?.fieldType===K.File?null!==e.value&&"object"==typeof e.value||e.change(e.name,i.documentInputDefault()):e.customField?.fieldType===K.Phone?null!==e.value&&"object"==typeof e.value||e.change(e.name,s.basePhoneInputDefault()):e.customField?.fieldType===K.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===j.Form&&"number"!=typeof e.value&&e.change("massEdit.value",e.forms[0].id)},[e.customField,e.slug]),e.slug===h.Acronym||e.slug===he.Acronym||e.slug===h.Address||e.slug===he.Address||e.customField?.fieldType===K.Address||e.customField?.fieldType===K.Text)return(0,o.jsx)(lu,{name:e.name});if(e.slug===h.AutoAccredit||e.slug===h.WeezeventIsSynchronized||e.slug===j.IsLocked||e.slug===j.ShowFormLinkInDelegationSpace||e.slug===j.ShowInDelegationSpace||e.slug===j.CanLeadersAddMembers||e.slug===j.CanLeadersEditCustomFields||e.slug===j.CanLeadersEditMembers||e.slug===j.CanLeadersDeleteMembers||e.slug===j.CanLeadersEditColumns||e.slug===j.CanLeadersImportMembers||e.slug===j.CanLeadersSeeHiddenAccreditationsSlots||e.customField?.fieldType===K.Checkbox||e.customField?.fieldType===K.Validation)return(0,o.jsxs)(kg,{name:e.name,shouldParseAsBoolean:!0,children:[(0,o.jsx)("option",{value:"true",children:t("oui_54361")}),(0,o.jsx)("option",{value:"false",children:t("non_33516")})]});if(e.slug===x.Privacy)return(0,o.jsxs)(kg,{name:e.name,shouldParseAsBoolean:!0,children:[(0,o.jsx)("option",{value:"true",children:t("Private")}),(0,o.jsx)("option",{value:"false",children:t("Public")})]});if(e.slug===h.Category||e.slug===j.Category||e.slug===he.Category)return(0,o.jsx)(pg,{isSearchVisible:!0,name:e.name,children:e.categories.map(e=>(0,o.jsx)("option",{value:e.id,children:e.name},e.id))});if(e.slug===h.Color||e.slug===he.Color)return(0,o.jsx)(gk,{name:e.name});if(e.slug===h.Description||e.slug===j.Description||e.slug===he.Description)return(0,o.jsx)(xn,{css:{overflow:"hidden auto"},width:1,children:(0,o.jsx)(Ck,{name:e.name})});if(e.slug===h.Icon||e.slug===he.Icon)return(0,o.jsx)(kk,{name:e.name});if(e.slug===h.Latitude||e.slug===he.Latitude)return(0,o.jsx)(fk,{name:e.name});if(e.slug===h.Longitude||e.slug===he.Longitude)return(0,o.jsx)(fk,{name:e.name});if(e.slug===h.Name||e.slug===he.Name)throw new Error("Should not happen");if(e.slug===j.Campaigns)return(0,o.jsx)(pg,{isSearchVisible:!0,multiple:!0,name:e.name,children:e.campaigns.map(e=>(0,o.jsx)("option",{value:e.id,children:e.name},e.id))});if(e.slug===j.Documents)return(0,o.jsx)(pg,{isSearchVisible:!0,multiple:!0,name:e.name,children:e.customDocuments.map(e=>(0,o.jsx)("option",{value:e.slug,children:e.name},e.slug))});if(e.slug===h.Tag||e.slug===he.Tag||e.slug===j.Tag)return(0,o.jsx)(pg,{isSearchVisible:!0,multiple:!0,name:e.name,children:e.tags.map(e=>(0,o.jsx)("option",{value:e.id,children:e.name},e.id))});if(e.slug===he.Traces)return(0,o.jsx)(pg,{isSearchVisible:!0,multiple:!0,name:e.name,children:e.traces.map(e=>(0,o.jsx)("option",{value:e.id,children:e.name},e.id))});if(e.slug===h.Index||e.slug===j.MaxResources||e.customField?.fieldType===K.Number)return(0,o.jsx)(lu,{name:e.name,shouldParseAsInt:!0});if(e.customField?.fieldType===K.Country)return(0,o.jsx)(pg,{isSearchVisible:!0,name:e.name,children:a.getCountriesIdName().map(({id:e,name:t})=>(0,o.jsx)("option",{value:e,children:t},e))});if(e.slug===j.DeadlineDate||e.customField?.fieldType===K.Date)return(0,o.jsx)(im,{name:e.name});if(e.customField?.fieldType===K.Datetime)return(0,o.jsx)(rm,{name:e.name});if(e.customField?.fieldType===K.File){const t=e.customField.fieldProperty===H.Picture?[ym.Images]:[ym.Images,ym.Pdf],i=e.customField.fieldProperty===H.Picture?"public-read":"private";return(0,o.jsx)(zm,{accept:t,acl:i,organizationId:n,prefix:`${e.name}.`})}return e.customField?.fieldType===K.Language?e.customField.fieldProperty===H.Language?(0,o.jsxs)(kg,{name:e.name,children:[(0,o.jsx)("option",{value:"",children:t("s_lectionnez_un_31086")}),c(Wr)]}):(0,o.jsxs)(kg,{name:e.name,children:[(0,o.jsx)("option",{value:"",children:t("s_lectionnez_un_31086")}),c(Ct)]}):e.customField?.fieldType===K.Nationality?(0,o.jsx)(pg,{isSearchVisible:!0,name:e.name,children:a.getNationalitiesIdName().map(({id:e,name:t})=>(0,o.jsx)("option",{value:e,children:t},e))}):e.customField?.fieldType===K.Phone?(0,o.jsx)(ng,{prefix:`${e.name}.`}):e.customField?.fieldType===K.Select?e.customField.canSelectMultiple?(0,o.jsx)(pg,{isSearchVisible:!0,multiple:!0,name:e.name,children:e.customField.values.map(({id:e,value:t})=>(0,o.jsx)("option",{value:e,children:t},e))}):(0,o.jsx)(pg,{isSearchVisible:!0,name:e.name,placeholder:t("s_lectionnez_un_44130"),children:e.customField.values.map(({id:e,value:t})=>(0,o.jsx)("option",{value:e,children:t},e))}):e.customField?.fieldType===K.Sex?(0,o.jsxs)(kg,{name:e.name,children:[(0,o.jsx)("option",{value:"",children:t("s_lectionnez_un_43620")}),c(Ot)]}):e.customField?.fieldType===K.Textarea?(0,o.jsx)(Ag,{name:e.name}):e.customField?.fieldType===K.Time?(0,o.jsx)(am,{name:e.name}):e.slug===j.Form?(0,o.jsx)(pg,{isSearchVisible:!0,multiple:!1,name:"massEdit.value",children:e.forms.map(e=>(0,o.jsx)("option",{value:e.id,children:e.name},e.id))}):null},xk=({displayName:e,isAddDeleteVisible:t,isResetVisible:n,massEditFieldInput:i,reset:r,strategy:s,change:a})=>{const{translate:c}=Id();return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"4"}),(0,o.jsx)(xn,{font:"gray700 textSm medium",children:c("que_souhaitez_v_87607")}),(0,o.jsx)(Fd,{height:"2"}),(0,o.jsx)(dg,{state:r||s!==ae.Replace?"unchecked":"checked",onClick:()=>{a("massEdit.reset",!1),a("massEdit.strategy",ae.Replace)},children:c("remplacer_les_v_78885")}),!r&&s===ae.Replace&&i,(0,o.jsx)(Fd,{height:"3"}),t&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(dg,{state:r||s!==ae.Add?"unchecked":"checked",onClick:()=>{a("massEdit.reset",!1),a("massEdit.strategy",ae.Add)},children:c("ajouter_des_val_80159")}),!r&&s===ae.Add&&i,(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(dg,{state:r||s!==ae.Delete?"unchecked":"checked",onClick:()=>{a("massEdit.reset",!1),a("massEdit.strategy",ae.Delete)},children:c("supprimer_des_v_96120")}),!r&&s===ae.Delete&&i,(0,o.jsx)(Fd,{height:"3"})]}),n&&(0,o.jsx)(dg,{state:r?"checked":"unchecked",onClick:()=>a("massEdit.reset",!0),children:c("r_initialiser_42983",e)})]})},Sk=e=>{const t=Yt(),n=(0,r.useMemo)(()=>(0,Uo.A)(e.customFields??[],e=>e.name.toLowerCase()),[e.customFields]),i=(0,r.useMemo)(()=>(0,Uo.A)(n.map(e=>({slug:e.slug,name:e.name,label:e.label})).concat(e.properties.map(e=>({slug:e,name:t(e),label:null}))),e=>e.name.toLowerCase()),[n,e.properties]);return(0,o.jsx)(Tm,{size:"md",onClose:e.onClose,children:(0,o.jsx)(Rd.lV,{initialValues:{massEdit:{reset:!1,selecteds:e.selecteds,slug:"",value:"",strategy:ae.Replace}},initialValuesEqual:Pd.A,render:({form:r,handleSubmit:s,submitting:a,values:c})=>{const{reset:l,slug:d,strategy:u}=c.massEdit,m=i.find(e=>e.slug===d),g=n.find(e=>e.slug===d),p=an(d)?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"1"}),(0,o.jsx)(xn,{css:{paddingLeft:"$6"},children:(0,o.jsx)(Ik,{campaigns:e.campaigns,categories:e.categories,change:r.change,customDocuments:e.customDocuments,customField:g,forms:e.forms,name:"massEdit.value",slug:d,tags:e.tags,traces:e.traces,value:c.massEdit.value})})]}):null,f=d===h.Tag||d===j.Campaigns||d===j.Documents||!0===g?.canSelectMultiple,_=d!==h.Category&&d!==x.Category&&d!==j.Category&&d!==he.Category&&d!==h.WeezeventIsSynchronized&&d!==x.Privacy&&d!==j.Form&&d!==j.IsLocked&&d!==j.ShowFormLinkInDelegationSpace&&d!==j.ShowInDelegationSpace&&d!==j.CanLeadersAddMembers&&d!==j.CanLeadersEditCustomFields&&d!==j.CanLeadersEditMembers&&d!==j.CanLeadersDeleteMembers&&d!==j.CanLeadersEditColumns&&d!==j.CanLeadersImportMembers&&d!==j.CanLeadersSeeHiddenAccreditationsSlots;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Dn,{justify:"center",children:(0,o.jsx)(xg,{color:"primary",icon:"sliders"})}),(0,o.jsx)(Fd,{height:"4"}),(0,o.jsx)(xn,{color:"gray900",fontSize:"textLg",fontWeight:"medium",textAlign:"center",children:t("_dition_de_la_v_67585")}),(0,o.jsx)(Fd,{height:"7"}),e.isLoading?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(yu,{borderRadius:"$1",height:20,width:1}),(0,o.jsx)(Fd,{height:"1"}),(0,o.jsx)(yu,{borderRadius:"$1",height:40,width:1})]}):(0,o.jsx)(pg,{isSearchVisible:!0,label:t("quel_est_le_cha_81138"),name:"massEdit.slug",placeholder:t("s_lectionnez_un_82446"),children:i.map(e=>{return(0,o.jsx)("option",{value:e.slug,children:(t=e,an(t.label)?`${t.name} (${t.label})`:t.name)},e.slug);var t})}),m&&(0,o.jsx)(xk,{change:r.change,displayName:m.name,isAddDeleteVisible:f,isResetVisible:_,massEditFieldInput:p,reset:l,strategy:u}),(0,o.jsx)(Fd,{height:"7"}),(0,o.jsxs)(Dn,{gap:"3",justify:"end",children:[(0,o.jsx)(Un,{disabled:(b=c.massEdit,k=g,!(b.reset||!k||k.fieldType!==K.Select||k.canSelectMultiple||"number"==typeof b.value&&!isNaN(b.value))),isLoading:a,onClick:s,children:t("modifier_la_val_07602")}),(0,o.jsx)(Un,{color:"white",onClick:e.onClose,children:t("annuler_48254")})]})]});var b,k},onSubmit:async t=>{const n=(await e.mutate(t.massEdit)).numberOfEdited;e.onSuccess(n),e.onClose()}})})},Ek=e=>(0,o.jsx)(Sk,{campaigns:[],categories:[],customDocuments:[],customFields:e.customFields,forms:[],isLoading:!1,mutate:e.mutate,properties:[],selecteds:e.selecteds,tags:[],traces:[],onClose:e.onClose,onSuccess:e.onSuccess}),jk=bn("div",{margin:"auto",width:"$containerTablet","@desktop":{width:"$container"}}),Tk=r.forwardRef((e,t)=>(0,o.jsx)(xn,{ref:t,css:{background:"$gray50",overflowX:"hidden",overflowY:"auto",py:"$10",...e.css},height:1,width:1,children:(0,o.jsx)(jk,{children:e.children})}));Tk.displayName="CenteredContainer";const Dk=e=>(0,o.jsxs)(xn,{css:{borderRadius:"$1",boxShadow:"$sm",overflow:"hidden",width:"100%"},children:[(0,o.jsxs)(Dn,{align:"center",css:{background:e.isOpen?"$gray900":"white",cursor:e.canSelect?"pointer":"default",px:"$6"},gap:"4",height:64,width:1,onClick:()=>{e.canSelect&&e.onSelect()},children:[(0,o.jsx)(Dn,{align:"center",css:{background:e.isCompleted?"$success200":"white",border:e.isCompleted?"none":"1px solid $gray200",borderRadius:"32px",color:e.isCompleted?"$success700":"$gray800",fontWeight:"$medium"},height:32,justify:"center",width:32,children:e.isCompleted?(0,o.jsx)(Mn,{icon:"check"}):e.stepNumber}),(0,o.jsx)(xn,{color:e.isOpen?"white":"gray800",fontSize:"textMd",fontWeight:"medium",children:e.title})]}),e.isOpen&&(0,o.jsx)(xn,{css:{background:"white",padding:"$6 70px",width:"100%"},children:e.children})]}),Pk=e=>(0,o.jsx)(Jd,{direction:"column",formRenderProps:e.formProps,render:e.render}),Rk=e=>{const[t,n]=r.useState(!1),[i,s]=r.useState(0),a=Kt(wc),c=r.Children.toArray(e.children);return(0,o.jsx)(Rd.lV,{initialValues:e.initialValues,initialValuesEqual:Pd.A,mutators:{...Dd.A,forceErrors:Yd},render:a=>c.map((c,l)=>{const d=i>=l||e.isEdit&&a.valid;return(0,o.jsxs)(Od.Provider,{value:{errors:a.errors,showErrors:t,submitErrors:a.submitErrors,setShowErrors:n},children:[(0,o.jsx)(Dk,{canSelect:d,isCompleted:i>l,isOpen:i===l,stepNumber:l+1,title:c.props.title,onSelect:()=>{d&&(n(!1),s(l))},children:r.cloneElement(c,{formProps:a})}),(0,o.jsx)(Fd,{height:"6"})]},l)}),validate:e=>a.validateForForm(c[i].props.schema)(e),onSubmit:async(t,o)=>{i===c.length-1?await e.onSubmit(t,o):(n(!1),s(i+1))}})},Ok=e=>(0,Kn.createPortal)((0,o.jsx)(xn,{css:{background:"white",left:"0",position:"absolute",top:"0",zIndex:"50",...e.css},height:1,width:1,children:e.children}),document.body),Fk=e=>(0,o.jsx)(Rd.D0,{name:e.name,render:t=>{const n=t.input.checked?"checked":"unchecked";return(0,o.jsx)(dg,{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}),zk=e=>{const t=Yt();return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(xn,{font:"gray900 textSm medium",children:t("que_souhaitez_v_87607")}),(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(Fk,{name:"massAccredit.strategy",value:ae.Add,children:t("ajouter_des_acc_17744")}),(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(Fk,{name:"massAccredit.strategy",value:ae.Replace,children:t("remplacer_les_a_92733")}),(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(Fk,{name:"massAccredit.strategy",value:ae.Delete,children:t("supprimer_des_a_04246")}),(0,o.jsx)(Fd,{height:"7"}),(0,o.jsx)(Dn,{children:(0,o.jsx)(Un,{onClick:e.handleSubmit,children:t("suivant_accr_25709")})})]})};function Mk(e,t=500){const[n,i]=(0,r.useState)(e),[o,s]=(0,r.useState)(e),a=vf(e=>{s(e)},t);return[n,o,e=>{i(e),a(e)}]}const $k=e=>{const{translate:t}=Id(),n=Kt(aa),i=(0,r.useMemo)(()=>xh(e.accreditation),[e.accreditation]),s=e.accreditationsSlotsIds.includes(e.slot.id)?"checked":"unchecked";return(0,o.jsxs)(Dn,{align:"center",css:{background:"white",bd:!0,cursor:"pointer",px:"$4",userSelect:"none"},gap:"2",height:64,onClick:()=>{e.onClick(e.slot.id,"unchecked"===s)},children:[(0,o.jsx)(Xh,{shouldPreventDefault:!1,state:s,onClick:uu.A}),(0,o.jsx)(Gh,{color:e.accreditation.color,icon:e.accreditation.icon}),(0,o.jsx)(xn,{css:{flex:"1"},font:"gray800 textSm semiBold",children:i}),(0,o.jsx)(Dn,{css:{px:"$3"},width:310,children:(0,o.jsx)(og,{color:e.slot.assignedResources>=(e.slot.maxResources||1/0)?"success":"warning",leftIcon:"user-group",children:t("_1_2_membres_04485",e.slot.assignedResources,n.toNumberOrInfinity(e.slot.maxResources))})})]})},Nk=e=>{const t=Yt(),n=Kt(is),i=Kt(aa),r=e.accreditationsSlotsIds.includes(e.slot.id)?"checked":"unchecked";return(0,o.jsxs)(Np,{css:{cursor:"pointer"},onClick:()=>{e.onClick(e.slot.id,"unchecked"===r)},children:[(0,o.jsx)(Op,{justify:"center",width:48,children:e.shouldDisplayList?(0,o.jsx)(Xh,{shouldPreventDefault:!1,state:r,onClick:uu.A}):(0,o.jsx)(lg,{shouldPreventDefault:!1,state:r,onClick:uu.A})}),(0,o.jsx)(Op,{children:an(e.slot.name)?e.slot.name:"-"}),(0,o.jsx)(Op,{children:e.slot.date?.isValid?n.toLocaleString(e.slot.date,Bi.DateOnly.WeekdayLongMonthLong):"-"}),(0,o.jsx)(Op,{children:(0,o.jsx)(og,{color:e.slot.assignedResources>=(e.slot.maxResources||1/0)?"success":"warning",leftIcon:"user-group",children:t("_1_2_membres_04485",e.slot.assignedResources,i.toNumberOrInfinity(e.slot.maxResources))})})]})},Bk=e=>{const t=Yt(),n=(0,r.useMemo)(()=>(0,Uo.A)(e.slots.filter(t=>t.accreditation.id===e.accreditation.id),e=>(0,Go.A)([e.date?.toMillis(),e.name.toLowerCase()])),[e.slots,e.accreditation]),i=(0,r.useMemo)(()=>n.map(e=>e.id),[n]),s=(0,r.useMemo)(()=>{const t=(0,Xr.A)(e.accreditationsSlotsIds,i);return t.length===i.length?"checked":0===t.length?"unchecked":"indeterminate"},[i,e.accreditationsSlotsIds]),a=(0,r.useCallback)((t,n)=>{if(e.accreditation.accreditationDisplay===u.Radio){const o=(0,mh.A)(e.accreditationsSlotsIds,i).concat(n?[t]:[]);e.change("massAccredit.accreditationsSlotsIds",o)}else e.change("massAccredit.accreditationsSlotsIds",l(e.accreditationsSlotsIds,t,n))},[e.accreditation,e.accreditationsSlotsIds,e.change,i]),c=e.accreditation.accreditationDisplay===u.List||e.strategy===ae.Delete;return e.accreditation.hasSlots?(0,o.jsx)(Wh,{accreditation:e.accreditation,displayNumberOfSlots:!0,displaySlots:!0,numberOfSlots:n.length,children:e.accreditation.accreditationDisplay===u.Calendar?(0,o.jsx)(Dn,{css:{background:"$gray50",padding:"$4"},children:(0,o.jsx)(Rg,{accreditationsSlotsIds:e.accreditationsSlotsIds,change:e.change,prefix:"massAccredit.",slots:n})}):(0,o.jsxs)(Bp,{hideBorder:!0,children:[(0,o.jsxs)(zp,{children:[(0,o.jsx)(Fp,{justify:"center",width:48,children:c&&(0,o.jsx)(Xh,{state:s,onClick:t=>{"checked"===t?e.change("massAccredit.accreditationsSlotsIds",(0,Ei.A)(e.accreditationsSlotsIds.concat(i))):e.change("massAccredit.accreditationsSlotsIds",(0,mh.A)(e.accreditationsSlotsIds,i))}})}),(0,o.jsx)(Fp,{children:t("nom_du_cr_neau_54351")}),(0,o.jsx)(Fp,{children:t("date_du_cr_neau_82295")}),(0,o.jsx)(Fp,{})]}),n.map(t=>(0,o.jsx)(Nk,{accreditationsSlotsIds:e.accreditationsSlotsIds,shouldDisplayList:c,slot:t,onClick:a},t.id))]})}):(0,o.jsx)($k,{accreditation:e.accreditation,accreditationsSlotsIds:e.accreditationsSlotsIds,slot:n[0],onClick:a})},Lk=e=>{const t=(0,r.useMemo)(()=>(0,Uo.A)(e.accreditations.filter(t=>t.accreditationCategoryId===e.category.id),e=>e.name.toLowerCase()),[]);return(0,o.jsx)($h,{category:e.category,children:t.map(t=>(0,o.jsx)(Bk,{accreditation:t,accreditationsSlotsIds:e.accreditationsSlotsIds,change:e.change,slots:e.slots,strategy:e.strategy},t.id))})},Vk=e=>{const t=Yt();return(0,o.jsxs)(Gm,{doNotCloseOnOtherOpen:!0,isOpen:e.isOpen,onStateChange:e.onStateChange,children:[(0,o.jsx)(Jm,{children:(0,o.jsx)(xn,{children:(0,o.jsxs)(Un,{color:e.color,leftIcon:"bars-filter",children:[t("filtres_64574")," ",(e.numberOfAppliedFilters||0)>0?`(${e.numberOfAppliedFilters})`:""]})})}),(0,o.jsx)(Zm,{placement:"bottom-end",width:385,children:(0,o.jsxs)(Dn,{direction:"column",onChange:Hn,children:[(0,o.jsxs)(Dn,{css:{padding:"$2 $6 $4 $6"},direction:"column",gap:"4",children:[(0,o.jsx)(xn,{font:"gray800 textMd medium",children:t("liste_des_filtr_75605")}),e.children]}),e.showButtons&&(0,o.jsxs)(Dn,{align:"center",css:{borderTop:"1px solid $gray200",padding:"$4 $6 $2 $6"},gap:"4",justify:"end",children:[(0,o.jsx)(xn,{css:{cursor:"pointer"},font:"gray700 textSm medium",onClick:e.reinit,children:t("r_initialiser_77538")}),(0,o.jsx)(Un,{size:"sm",onClick:e.apply,children:t("appliquer_05753")})]})]})})]})},Uk=e=>{const t=Yt(),[n,i]=(0,r.useState)(!1),[s,a]=(0,r.useState)(e.excludeEmpty?"checked":"unchecked"),[c,l]=(0,r.useState)(e.excludeFull?"checked":"unchecked"),[d,u]=(0,r.useState)(e.excludePast?"checked":"unchecked"),h=(e.excludeEmpty?1:0)+(e.excludeFull?1:0)+(e.excludePast?1:0);return(0,o.jsxs)(Dn,{css:{background:"$gray100",borderRadius:"$2",padding:"$4"},gap:"3",children:[(0,o.jsx)(xn,{css:{flex:"1"},children:(0,o.jsx)(cu,{icon:"magnifying-glass",placeholder:t("rechercher_une_65646"),value:e.name,onChange:t=>{e.setName(t)}})}),(0,o.jsxs)(Vk,{apply:()=>{e.setExcludeEmpty("checked"===s),e.setExcludeFull("checked"===c),e.setExcludePast("checked"===d),i(!1)},color:"white",isOpen:n,numberOfAppliedFilters:h,reinit:()=>{e.setExcludeEmpty(!1),a("unchecked"),e.setExcludeFull(!1),l("unchecked"),e.setExcludePast(!1),u("unchecked"),e.setName(""),i(!1)},showButtons:!0,onStateChange:i,children:[(0,o.jsx)(Qh,{state:s,onClick:a,children:t("cacher_les_cr_n_76382")}),(0,o.jsx)(Qh,{state:c,onClick:l,children:t("cacher_les_cr_n_31908")}),(0,o.jsx)(Qh,{state:d,onClick:u,children:t("masquer_les_cr_05336")})]})]})},Gk=e=>{const t=Yt(),[n,i,s]=Mk(""),[a,c]=(0,r.useState)(!1),[l,d]=(0,r.useState)(!1),[u,h]=(0,r.useState)(!1),{data:m,loader:g}=Jt("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 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 name\n assignedResources\n maxResources\n date\n isBlocked\n isFull\n\n accreditation {\n id\n accreditationCategoryId\n name\n accreditationDisplay\n hasSlots\n color\n icon\n }\n\n accreditationCategory {\n id\n name\n }\n }\n }\n }\n}\n",{eventId:e.eventId,delegationId:e.delegationId,accreditationName:an(i)?i:void 0,excludeEmpty:a,excludeFull:l,excludePast:u},[]);const p=(0,r.useMemo)(()=>(m.event?.accreditationsSlots.nodes??[]).filter(e=>!e.isBlocked),[m.event]),f=(0,r.useMemo)(()=>(0,Uo.A)((0,Er.A)(p.map(e=>e.accreditationCategory),e=>e.id),e=>e.name.toLowerCase()),[p]),_=(0,r.useMemo)(()=>(0,Er.A)(p.map(e=>e.accreditation),e=>e.id),[p]);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Uk,{excludeEmpty:a,excludeFull:l,excludePast:u,name:n,setExcludeEmpty:c,setExcludeFull:d,setExcludePast:h,setName:s}),(0,o.jsx)(Fd,{height:"6"}),g||(0,o.jsx)(Ph,{css:{border:"1px solid $gray100",borderRadius:"$1"},children:f.map(t=>(0,o.jsx)(Lk,{accreditations:_,accreditationsSlotsIds:e.values.massAccredit.accreditationsSlotsIds,category:t,change:e.change,slots:p,strategy:e.values.massAccredit.strategy},t.id))}),(0,o.jsx)(Fd,{height:"7"}),(0,o.jsx)(Dn,{children:(0,o.jsx)(Un,{isLoading:e.submitting,onClick:e.handleSubmit,children:an(e.buttonText)?e.buttonText:t(e.values.massAccredit.strategy===ae.Add?"accr_diter_les_78545":e.values.massAccredit.strategy===ae.Replace?"r_accr_diter_le_34059":"d_saccr_diter_l_28590",e.numberOfSelected)})})]})},Wk=({eventId:e,numberOfSelected:t,onClose:n,onSuccess:i,selecteds:r})=>{const s=Yt(),a=Kt(ys),{mutate:c}=ho();return(0,o.jsx)(Ok,{children:(0,o.jsx)(km,{category:s("Accreditation"),title:s("accr_diter_les_48281"),onClose:n,children:(0,o.jsx)(Tk,{children:(0,o.jsxs)(Rk,{initialValues:{massAccredit:{selecteds:r,strategy:ae.Add,accreditationsSlotsIds:[]}},isEdit:!1,onSubmit:async t=>{const o=(await c({eventId:e,massAccredit:t.massAccredit})).numberOfMembers;i(s("_1_membres_ont_05068",o)),n()},children:[(0,o.jsx)(Pk,{render:({handleSubmit:e})=>(0,o.jsx)(zk,{handleSubmit:e}),schema:a.massAccreditStep1Schema(),title:s("initialisation_38640")}),(0,o.jsx)(Pk,{render:({form:n,handleSubmit:i,submitting:r,values:s})=>(0,o.jsx)(Gk,{change:n.change,delegationId:null,eventId:e,handleSubmit:i,numberOfSelected:t,submitting:r,values:s}),schema:a.massAccreditStep2Schema(),title:s("accr_ditations_39450")})]})})})})},qk={PLURAL:"campaigns",SINGLE:"campaign"},Hk={CAMPAIGNS:qk.PLURAL,CAMPAIGN:e=>_a([qk.SINGLE,e])},Kk={CAMPAIGNS:({organizationId:e,eventId:t})=>_a([t?Ta.EVENT({organizationId:e,eventId:t}):tc.COMMUNITY({organizationId:e}),Hk.CAMPAIGNS]),CAMPAIGNS_SEGMENT:({organizationId:e,segmentId:t})=>_a([Kk.CAMPAIGNS({organizationId:e}),t]),CAMPAIGN:({organizationId:e,eventId:t,campaignId:n})=>_a([t?Ta.EVENT({organizationId:e,eventId:t}):tc.COMMUNITY({organizationId:e}),Hk.CAMPAIGN(n)]),CAMPAIGN_DASHBOARD:e=>_a([Kk.CAMPAIGN(e),Aa.DASHBOARD]),CAMPAIGN_PREVIEW:({userInfoId:e,...t})=>_a([Kk.CAMPAIGN(t),Aa.PREVIEW,e]),CREATE:e=>Ia(Kk.CAMPAIGNS(e)),CREATE_TEMPLATE:e=>_a([Ia(Kk.CAMPAIGNS(e)),"template"]),UPDATE:e=>xa(Kk.CAMPAIGN(e))},Yk=e=>{const{history:t,translate:n}=Id(),{mutate:i,isLoading:s}=function(e={}){return Xt("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)}(),[c,l]=(0,r.useState)([]),d=a(c);return(0,o.jsxs)(Tm,{size:"md",onClose:e.onClose,children:[(0,o.jsx)(Dn,{justify:"center",children:(0,o.jsx)(xg,{color:"primary",icon:"people-group"})}),(0,o.jsx)(Fd,{height:"4"}),(0,o.jsx)(xn,{font:"gray900 textLg medium",textAlign:"center",children:n("SendCampaign")}),(0,o.jsx)(Fd,{height:"7"}),(0,o.jsx)(gg,{isSearchVisible:!0,label:n("campagne_97871"),values:c,onChange:l,children:e.campaigns.map(e=>(0,o.jsx)("option",{value:e.id,children:e.name},e.id))}),e.canCreate&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:"2"}),(0,o.jsx)(Un,{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(Kk.CREATE({organizationId:e.organizationId,eventId:e.eventId||void 0,options:n}))},children:n("cr_er_une_nouve_86635")})]}),(0,o.jsx)(Fd,{height:"7"}),(0,o.jsxs)(Dn,{gap:"3",justify:"end",children:[(0,o.jsx)(Un,{disabled:!d,isLoading:s,onClick:async()=>{if(a(c)){const t=e.campaigns.find(e=>e.id===c[0]),o=(await i({organizationId:e.organizationId,eventId:e.eventId,delegationId:e.delegationId,selecteds:e.selecteds,campaignId:c[0]})).numberOfMembers;e.onSuccess(n("la_campagne_1_62015",t.name,o)),e.onClose()}},children:n("envoyer_26609")}),(0,o.jsx)(Un,{color:"white",onClick:e.onClose,children:n("annuler_48254")})]})]})},Zk=e=>{const{translate:t}=Id(),n=Kt(ys),{mutate:i}=So();return(0,o.jsx)(Ok,{children:(0,o.jsx)(km,{category:t("Accreditation"),title:t("update_desired_accreditations"),onClose:e.onClose,children:(0,o.jsx)(Tk,{css:{py:"$7"},children:(0,o.jsxs)(Rk,{initialValues:{massAccredit:{selecteds:e.selecteds,strategy:ae.Add,accreditationsSlotsIds:[]}},isEdit:!1,onSubmit:async t=>{await i({eventId:e.eventId,delegationId:e.delegationId,massAccredit:t.massAccredit}),e.onSuccess(),e.onClose()},children:[(0,o.jsx)(Pk,{render:({handleSubmit:e})=>(0,o.jsx)(zk,{handleSubmit:e}),schema:n.massAccreditStep1Schema(),title:t("initialisation_38640")}),(0,o.jsx)(Pk,{render:({form:n,handleSubmit:i,values:r,submitting:s})=>(0,o.jsx)(Gk,{buttonText:r.massAccredit.strategy===ae.Delete?t("supprimer_les_a_93519"):t("update_desired_accreditations"),change:n.change,delegationId:e.delegationId,eventId:e.eventId,handleSubmit:i,numberOfSelected:e.numberOfSelected,submitting:s,values:r}),schema:n.massAccreditStep2Schema(),title:t("accr_ditations_39450")})]})})})})},Jk=e=>{const{translate:t,params:{organizationId:n,eventId:i,delegationId:s}}=Id(),{mutate:c}=function(e={}){return Xt("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:l}=Ao(),{mutate:d}=mo(),[u,h]=(0,r.useState)(!1),[m,g]=(0,r.useState)(!1),[p,f]=(0,r.useState)(!1),[_,b]=(0,r.useState)(!1),[k,v]=(0,r.useState)(!1),A=e.massActions.getSelectedsInput(null,null),y=e.showAccreditationsValidate||a(e.campaigns)||e.showDelete;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Un,{color:"invisible-gray",leftIcon:"pen",onClick:()=>{h(!0)},children:t("_diter_un_champ_64621")}),e.showWishedAccreditationsEdit&&(0,o.jsx)(Un,{color:"invisible-gray",leftIcon:"wand-magic-sparkles",onClick:()=>{g(!0)},children:t("_diter_les_accr_41957")}),e.showAccreditationsEdit&&(0,o.jsx)(Un,{color:"invisible-gray",leftIcon:"wand-magic-sparkles",onClick:()=>{f(!0)},children:t("_diter_les_accr_86042")}),y&&(0,o.jsxs)(Gm,{children:[(0,o.jsx)(Jm,{children:(0,o.jsx)(Un,{color:"invisible-gray",rightIcon:"chevron-down",children:t("plus_77692")})}),(0,o.jsxs)(Zm,{placement:"bottom-end",children:[e.showAccreditationsValidate&&(0,o.jsx)(Km,{icon:"check",onClick:async()=>{await l({eventId:i,delegationId:s,usersInfosIds:A.ids}),e.onMassEditSuccess()},children:t("valider_les_acc_80801")}),a(e.campaigns)&&(0,o.jsx)(Km,{icon:"paper-plane",onClick:()=>{b(!0)},children:t("SendCampaign")}),e.showDelete&&(0,o.jsx)(Km,{color:"red",icon:"user-xmark",onClick:()=>v(!0),children:t("retirer_de_la_d_64963")})]})]}),u&&(0,o.jsx)(Ek,{customFields:e.customFields,mutate:e=>c({organizationId:n,eventId:i,delegationId:s,massEdit:e}),selecteds:A,onClose:()=>{h(!1)},onSuccess:e.onMassEditSuccess}),m&&(0,o.jsx)(Zk,{delegationId:s,eventId:i,numberOfSelected:e.massActions.numberOfSelected,selecteds:A,onClose:()=>{g(!1)},onSuccess:e.onMassEditSuccess}),p&&(0,o.jsx)(Wk,{eventId:i,numberOfSelected:e.massActions.numberOfSelected,selecteds:A,onClose:()=>{f(!1)},onSuccess:e.onMassEditSuccess}),_&&(0,o.jsx)(Yk,{campaigns:e.campaigns,canCreate:!1,delegationId:s,eventId:i,organizationId:n,selecteds:A,onClose:()=>{b(!1)},onSuccess:e.onMassEditSuccess}),k&&(0,o.jsx)(uk,{buttonText:t("supprimer_43083"),subtext:t("_tes_vous_sur_d_29974"),text:t("suppression_de_57689",A.ids?.length??0),onClose:()=>v(!1),onDelete:async()=>{await d({organizationId:n,eventId:i,delegationId:s,selecteds:A,deleteFromEvent:e.deleteFromEvent}),e.onMassEditSuccess()}})]})},Xk=e=>{const{translate:t}=Id(),n=r.useRef(null),i=Kt(is);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(Dn,{ref:n,css:{background:"white",border:"1px solid $gray200"},children:[(0,o.jsxs)(Dn,{css:{width:"calc(2 * $cellWidth)"},direction:"column",children:[(0,o.jsx)(Dn,{align:"center",css:{borderBottom:"1px solid $gray200",borderRight:"1px solid $gray200",height:"$cellHeightSm",px:"$4"},width:1,children:(0,o.jsx)(gg,{isSearchVisible:!0,isSelectAllVisible:!0,menuWidth:300,multiple:!0,triggerElem:(0,o.jsxs)(Un,{color:"white",leftIcon:"bars-filter",size:"sm",children:[t("accr_ditations_39450"),a(e.selectedSlotsIds)&&` (${e.selectedSlotsIds.length})`]}),values:e.selectedSlotsIds,onChange:e.setSelectedSlotsIds,children:e.allAccreditations.map(e=>(0,o.jsx)("optgroup",{label:e.name,children:e.slots.map(t=>(0,o.jsx)("option",{value:t.id,children:wh(i,t,e.name,{accreditation:{includeNameAtEnd:!0}})},t.id))},e.id))})}),(0,o.jsx)(Dn,{css:{borderRight:"1px solid $gray200",height:"$cellHeightSm"},width:1,onClick:()=>{n.current?.requestFullscreen()}}),e.data.map(t=>e.renderLeftColumn(t))]}),(0,o.jsx)(Dn,{css:{flex:"1",overflowX:"auto"},children:(0,o.jsxs)(Dn,{direction:"column",children:[(0,o.jsx)(Dn,{css:{borderBottom:"1px solid $gray200",height:"$cellHeightSm"},children:e.filteredAccreditations.map(t=>{const n=an(t.acronym)?t.acronym:t.name;return(0,o.jsxs)(Dn,{align:"center",css:{borderRight:"1px solid $gray200",px:"$4",width:`calc(${t.numberOfSlots} * ${e.cellWidth}px)`},direction:"column",height:1,justify:"center",children:[(0,o.jsx)(xn,{css:{ellipsis:!0},font:"gray800 textSm medium",textAlign:"center",title:n,width:1,children:n}),(0,o.jsx)(xn,{color:"gray500",css:{ellipsis:!0},textAlign:"center",title:t.accreditationCategory.name,width:1,children:t.accreditationCategory.name})]},t.id)})}),(0,o.jsx)(Dn,{css:{height:"$cellHeightSm"},children:e.slots.map(t=>{const n=t.date?.isValid?i.toLocaleString(t.date,Bi.DateOnly.Numeric):"-";return(0,o.jsxs)(Dn,{align:"center",css:{borderRight:"1px solid $gray200",px:"$4",width:`${e.cellWidth}px`},direction:"column",height:1,justify:"center",children:[(0,o.jsx)(xn,{css:{ellipsis:!0},font:"gray800 textSm medium",textAlign:"center",title:t.name||"-",width:1,children:t.name||"-"}),(0,o.jsx)(xn,{color:"gray500",css:{ellipsis:!0},textAlign:"center",title:n,width:1,children:n})]},t.id)})}),e.data.map(t=>e.renderRow(t))]})})]}),(0,o.jsx)(u_,{children:(0,o.jsx)(d_,{limit:e.limit,numberOfPages:e.numberOfPages,offset:e.offset,setLimit:e.setLimit,setOffset:e.setOffset,showLimits:!0,totalCount:e.totalCount})})]})},Qk=e=>{const{translate:t}=Id(),n=(0,r.useMemo)(()=>(e.vr.matrixAuis||[]).flatMap(e=>e.isAutoAccredit?[e.accreditationSlotId]:[]),[e.vr]),i=(0,r.useMemo)(()=>(e.vr.matrixAuis||[]).flatMap(e=>e.isAutoAccredit?[]:[e.accreditationSlotId]),[e.vr]),s=(0,r.useMemo)(()=>(e.vr.matrixWishedSlots||[]).map(e=>e.id),[e.vr]);return(0,o.jsx)(Dn,{css:{borderTop:"1px solid $gray200",height:"$cellHeightSm"},children:e.slotsIds.map(r=>{const a=n.includes(r),c=i.includes(r),l=s.includes(r),d=e.isEditMode&&("assigned"===e.editMode&&(a||c)||"wished"===e.editMode&&l),u=e.isEditMode&&("assigned"===e.editMode&&!(a||c)||"wished"===e.editMode&&!l);return(0,o.jsxs)(Dn,{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:[d&&(0,o.jsx)(Dn,{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),e.reloadRow(e.vr.id)},children:(0,o.jsx)(Mn,{icon:"trash-can"})}),u&&(0,o.jsx)(Dn,{align:"center",className:"h-accreditations-matrix-edit-cell",css:{background:"$primary200",bd:"primary500 1",color:"$primary700",cursor:"pointer"},height:1,justify:"center",width:1,onClick:async()=>{await e.addAccreditationSlot(e.vr.userInfo.id,r),e.reloadRow(e.vr.id)},children:(0,o.jsx)(Mn,{icon:"plus"})}),a||c?(0,o.jsx)(Dn,{align:"center",className:e.isEditMode?"h-accreditations-matrix-cell":"",css:{background:"$success200",bd:"success500 1",color:"$success700",fontSize:"$textMd"},height:1,justify:"center",width:1,children:(0,o.jsx)(Mn,{icon:n.includes(r)?"bolt-auto":"check"})}):l?(0,o.jsx)(Dn,{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,o.jsx)(xn,{font:"gray800 textXs medium",children:t("souhait_e_52100")})}):null]},r)})})},ev=e=>{const{translate:t}=Id(),n=(0,r.useMemo)(()=>{return t=e.allAccreditationsSlots,(0,Uo.A)((0,Er.A)(t,e=>e.accreditation.id).map(e=>({...e.accreditation,accreditationCategory:e.accreditationCategory,slots:Ih(t.filter(t=>t.accreditation.id===e.accreditation.id))})),e=>[e.accreditationCategory.name.toLowerCase(),Th(e.index),e.name.toLowerCase()]);var t},[e.allAccreditationsSlots]),i=(0,r.useMemo)(()=>function(e,t){return e.flatMap(e=>{const n=e.slots.map(e=>e.id),i=c(t)?e.slots.length:(0,Xr.A)(n,t).length;return 0===i?[]:[{...e,numberOfSlots:i}]})}(n,e.selectedSlotsIds),[n,e.selectedSlotsIds]),s=(0,r.useMemo)(()=>{return t=i,n=e.selectedSlotsIds,t.flatMap(e=>e.slots.filter(e=>c(n)||n.includes(e.id)));var t,n},[i,e.selectedSlotsIds]),a=(0,r.useMemo)(()=>s.map(e=>e.id),[s]),l=(0,r.useCallback)(e=>(0,o.jsx)(Dn,{css:{borderRight:"1px solid $gray200",borderTop:"1px solid $gray200",height:"$cellHeightSm",px:"$4"},width:1,children:(0,o.jsx)(L_,{size:32,userInfo:e.userInfo})},e.userInfo.id),[]),d=(0,r.useCallback)(t=>e.isRowLoading(t.id)?(0,o.jsx)(a_,{css:{border:"none",borderTop:"1px solid $gray200",height:"$cellHeightSm"}},t.userInfo.id):(0,o.jsx)(Qk,{addAccreditationSlot:e.addAccreditationSlot,deleteAccreditationSlot:e.deleteAccreditationSlot,editMode:e.editMode,isEditMode:e.isEditMode,reloadRow:e.reloadRow,slotsIds:a,vr:t},t.userInfo.id),[e.addAccreditationSlot,e.deleteAccreditationSlot,e.editMode,e.isEditMode,e.isRowLoading,e.reloadRow,a]);return(0,o.jsx)(Dn,{direction:"column",width:1,children:e.isLoading?(0,o.jsx)(Nn,{}):c(e.members)||c(i)?(0,o.jsx)(Dn,{css:{background:"white",border:"1px solid $gray200"},height:400,children:c(e.members)?(0,o.jsx)(Rh,{imageSrc:fu.Blanks.Member,title:t("aucun_membre_ne_07054")}):(0,o.jsx)(Rh,{imageSrc:fu.Blanks.Accreditation,title:t("aucune_accr_dit_97505")})}):(0,o.jsx)(Xk,{allAccreditations:n,cellWidth:120,data:e.members,filteredAccreditations:i,limit:e.limit,numberOfPages:e.numberOfPages,offset:e.offset,renderLeftColumn:l,renderRow:d,selectedSlotsIds:e.selectedSlotsIds,setLimit:e.setLimit,setOffset:e.setOffset,setSelectedSlotsIds:e.setSelectedSlotsIds,slots:s,totalCount:e.totalCount})})},tv=e=>{const{params:{eventId:t,delegationId:n}}=Id(),{data:i,idToLoading:s,isEditMode:a,isLoading:c,limit:l,numberOfPages:d,offset:u,reloadRow:h,setLimit:m,setOffset:g,totalCount:p}=Yf(),{mutate:f}=So(),{data:_,isLoading:b}=Jt("query DelegationMembersAccreditationsMatrix($eventId: EventId!, $delegationId: DelegationId!) {\n event(id: $eventId) {\n delegation(id: $delegationId) {\n accreditationsSlots(onlyVisible: true) {\n accreditationSlot {\n ...AccreditationSlotMatrix\n }\n }\n }\n }\n}\n",{eventId:t,delegationId:n},[ji.AccreditationSlotMatrixFragment]),k=(0,r.useMemo)(()=>(_.event?.delegation.accreditationsSlots??[]).map(e=>e.accreditationSlot),[_]),v=(0,r.useCallback)(e=>s[e]??!1,[s]),A=(0,r.useCallback)((e,i)=>f({eventId:t,delegationId:n,massAccredit:{accreditationsSlotsIds:[i],selecteds:{ids:[e]},strategy:ae.Add}}),[t,n,f]),y=(0,r.useCallback)((e,i)=>(console.log("delete accreditation slot",{eventId:t,delegationId:n,userInfoId:e,accreditationSlotId:i}),f({eventId:t,delegationId:n,massAccredit:{accreditationsSlotsIds:[i],selecteds:{ids:[e]},strategy:ae.Delete}})),[t,n,f]);return(0,o.jsx)(ev,{addAccreditationSlot:A,allAccreditationsSlots:k,deleteAccreditationSlot:y,editMode:"wished",isEditMode:a,isLoading:c||b,isRowLoading:v,limit:l,members:i,numberOfPages:d,offset:u,reloadRow:h,selectedSlotsIds:e.selectedSlotsIds,setLimit:m,setOffset:g,setSelectedSlotsIds:e.setSelectedSlotsIds,totalCount:p})},nv=e=>{const{params:{organizationId:t,eventId:n,delegationId:i}}=Id(),s=Kt(el),a=tn(),[c,l,d]=o_(t,"eventDelegationMembers.columns",e.columns),[u,h,m]=o_(t,"eventDelegationMembers.limit",25),[g,p,f]=o_(t,"eventDelegationMembers.predicates",[]),[_,b,k]=o_(t,"eventDelegationMembers.rendering",Bc.List),[v,A,y]=o_(t,"eventDelegationMembers.selectedSlotsIds",[]),[w,C,x]=o_(t,"eventDelegationMembers.sort",null),{data:S,isLoading:E}=Jt("query EventDelegationMembersInfos(\n $organizationId: OrganizationId!\n $eventId: EventId!\n $delegationId: DelegationId!\n $privacy: CustomFieldPrivacy!\n) {\n organization(id: $organizationId) {\n weezeventOrganizationId\n\n customFields(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 numberOfDelegationsAccreditationsSlots\n\n accreditationsSlots(onlyDefault: true, onlyHidden: true) {\n accreditationSlotId\n }\n\n columnsCustomFields {\n ...SegmentCustomField\n }\n\n form {\n positionDisplay\n slotDisplay\n\n elements {\n customField {\n ...SegmentCustomField\n }\n }\n }\n }\n }\n}\n",{organizationId:t,eventId:n,delegationId:i,privacy:e.customFieldsPrivacy},[ji.SegmentCustomFieldFragment,ji.CustomDocumentPopulationFragment]);const j=d||m||f||k||y||x||E,T=(0,r.useMemo)(()=>e.customFieldsPrivacy===I.All?S.organization?.customFields.nodes??[]:(0,Go.A)((S.event?.delegation.form.elements.map(e=>e.customField)||[]).concat(S.event?.delegation.columnsCustomFields||[])),[e.customFieldsPrivacy,S.organization,S.event]),D=r_(T),P=(0,r.useMemo)(()=>S.event?s.getDelegationMembersFilters(t,n,T,S.event,S.event.delegation.form,S.event.isWeezeventConnected):[],[n,T,S.event]),R=(0,r.useMemo)(()=>S.event?s.getDelegationMembersPossibleColumns(T,{isWeezeventConnected:S.event.isWeezeventConnected,positionDisplay:S.event.delegation.form.positionDisplay,slotDisplay:S.event.delegation.form.slotDisplay}):[],[T,S.event]),O=(0,r.useMemo)(()=>(S.event?.delegation.accreditationsSlots??[]).map(e=>e.accreditationSlotId),[S.event]),F=(0,r.useMemo)(()=>"function"==typeof e.showEditMode?e.showEditMode(_):e.showEditMode,[e.showEditMode,_]),z=(S.event?.delegation.numberOfDelegationsAccreditationsSlots??0)>0;return(0,r.useEffect)(()=>{a.setItem(du.DELEGATIONS_SPACE_TAB,"members")},[]),j?(0,o.jsx)(Nn,{}):(0,o.jsx)(e_,{columns:e.canEditColumns?c:e.columns,columnsSearch:[],columnsToIncludes:Qc,eventId:n,filters:P,getMassActionId:e=>e.userInfo.id,limit:u,loadDataList:xo,loadDataListParams:{delegationId:i,onlyVisibleAccreditationsSlots:e.onlyVisibleAccreditationsSlots,includeCanRegistrationStateUpdate:!1,includeIsEditable:!1},loadRow:Io,loadRowParams:{delegationId:i,onlyVisibleAccreditationsSlots:e.onlyVisibleAccreditationsSlots,includeCanRegistrationStateUpdate:!1,includeIsEditable:!1},organizationId:t,possibleColumns:R,possibleRenderings:[Bc.List,Bc.AccreditationsMatrix],predicates:g,renderActions:(t,n,i)=>(0,o.jsx)(Jk,{campaigns:e.campaigns,customFields:T,deleteFromEvent:e.deleteFromEvent,massActions:t,showAccreditationsEdit:e.showAccreditationsEdit,showAccreditationsValidate:e.showAccreditationsValidate,showDelete:e.canDeleteMembers,showWishedAccreditationsEdit:z,onMassEditSuccess:i}),rendering:_,setColumns:l,setLimit:h,setPredicates:p,setRendering:b,setSort:C,showEditColumns:_===Bc.List&&e.canEditColumns,showEditMode:F,showFilters:!0,showMassActions:e.canEditMembers,showRowDropdown:!0,showRowEdit:e.canEditMembers,showSearchColumns:!1,sort:w,children:_===Bc.AccreditationsMatrix?(0,o.jsx)(tv,{selectedSlotsIds:v,setSelectedSlotsIds:A}):(0,o.jsx)(g_,{getEditPath:e.getEditPath,renderCell:(r,s,a)=>(0,o.jsx)(Ib,{accreditationsPanelPath:dc.DELEGATION_MEMBER_ACCREDITATIONS({organizationId:t,eventId:n,delegationId:i,userInfoId:s.userInfo.id}),availabilitiesPanelPath:dc.DELEGATION_MEMBER_AVAILABILITIES({organizationId:t,eventId:n,delegationId:i,userInfoId:s.userInfo.id}),canAccredit:e.canAccredit,canAssign:!1,canChangeDelegation:!1,canClickMemberName:e.canClickMemberName,column:r,customField:D.get(r.slug),eventId:n,positionsPanelPath:dc.DELEGATION_MEMBER_POSITIONS({organizationId:t,eventId:n,delegationId:i,userInfoId:s.userInfo.id}),reloadRow:a,row:s}),renderRowDropdown:(t,n)=>(0,o.jsx)(hk,{accreditationState:t.accreditationState,allowedCustomDocuments:e.customBadges,canAccredit:e.canAccredit,canDelete:e.canDeleteMembers&&t.canDelete,customDocuments:S.event?.customDocuments??[],deleteFromEvent:e.deleteFromEvent,member:t.userInfo,reload:n,showDeleteFromEvent:e.showDeleteFromEvent,showDocumentsDownload:e.showDocumentsDownload,volunteerRegistrationId:t.id}),renderRowPanels:(r,s)=>(0,o.jsx)(ak,{accreditationsPanelPath:dc.DELEGATION_MEMBER_ACCREDITATIONS({organizationId:t,eventId:n,delegationId:i,userInfoId:r.userInfo.id}),availabilitiesPanelPath:dc.DELEGATION_MEMBER_AVAILABILITIES({organizationId:t,eventId:n,delegationId:i,userInfoId:r.userInfo.id}),canAccredit:e.canAccredit,canCheckIn:!1,canDeletePosition:()=>!1,canEditWishedAccreditations:!0,defaultHiddenAccreditationsSlotsIds:O,delegationId:i,eventId:n,organizationId:t,positionsPanelPath:dc.DELEGATION_MEMBER_POSITIONS({organizationId:t,eventId:n,delegationId:i,userInfoId:r.userInfo.id}),reloadRow:s,returnPathFallback:dc.DELEGATION_MEMBERS({organizationId:t,eventId:n,delegationId:i}),volunteerRegistration:r})})})},iv=e=>{const t=(0,r.useMemo)(()=>(e.user.events||[]).map(e=>({id:e.id,color:"gray",icon:null,text:e.name})),[e.user]);return(0,o.jsx)(Op,{minWidth:e.column.minWidth,width:e.column.width,children:(0,o.jsx)(O_,{badges:t})})},ov=e=>{const{params:{organizationId:t}}=Id(),n=Kt(is),{mutate:i}=function(e={}){return Xt("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)((n,o)=>i({organizationId:t,userInfoId:e.row.id,slug:o,value:n}),[e.row,i]),a=(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]),c=(0,r.useMemo)(()=>(e.row.formsUsersInfos||[]).flatMap(e=>e.form?[`${e.form.name} : ${n.toLocaleString(e.insertedAt.toLocal(),Bi.DateTime)}`]:[]).join(", "),[e.row.formsUsersInfos]),l=(0,r.useMemo)(()=>(e.row.delegations||[]).map(e=>({id:e.id,color:"gray",icon:null,text:e.name})),[e.row.delegations]),d=(0,r.useMemo)(()=>(0,Er.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]),u=(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,o.jsx)(V_,{canClickMemberName:e.canClickMemberName,column:e.column,mutate:s,reload:e.reloadRow,updatable:e.updatable,userInfo:e.row}):"id"===e.column.slug?(0,o.jsx)(Op,{minWidth:e.column.minWidth,width:e.column.width,children:e.row.id}):"picture"===e.column.slug?(0,o.jsx)(Op,{minWidth:e.column.minWidth,width:e.column.width,children:(0,o.jsx)(f_,{email:e.row.email,image:e.row.picture?.url,name:e.row.name,size:32})}):"email"===e.column.slug?(0,o.jsx)(Op,{minWidth:e.column.minWidth,width:e.column.width,children:e.row.email}):"events"===e.column.slug?(0,o.jsx)(iv,{column:e.column,user:e.row}):"number_of_events"===e.column.slug?(0,o.jsx)(Op,{minWidth:e.column.minWidth,width:e.column.width,children:e.row.events?.length??0}):"forms"===e.column.slug?(0,o.jsx)(Op,{minWidth:e.column.minWidth,width:e.column.width,children:(0,o.jsx)(O_,{badges:a})}):"forms_inserted_at"===e.column.slug?(0,o.jsx)(Op,{minWidth:e.column.minWidth,width:e.column.width,children:(0,o.jsx)(xn,{css:{ellipsis:!0},title:c,children:c})}):"delegations"===e.column.slug?(0,o.jsx)(Op,{minWidth:e.column.minWidth,width:e.column.width,children:(0,o.jsx)(O_,{badges:l})}):"delegations_categories"===e.column.slug?(0,o.jsx)(Op,{minWidth:e.column.minWidth,width:e.column.width,children:(0,o.jsx)(O_,{badges:d})}):"inserted_at"===e.column.slug?(0,o.jsx)(Op,{minWidth:e.column.minWidth,width:e.column.width,children:n.toLocaleString(e.row.insertedAt.toLocal(),Bi.DateTime)}):"tags"===e.column.slug?(0,o.jsx)(Op,{minWidth:e.column.minWidth,width:e.column.width,children:(0,o.jsx)(O_,{badges:u})}):"roles"===e.column.slug?(0,o.jsx)(U_,{minWidth:e.column.minWidth,userPermissions:e.row,width:e.column.width}):(0,o.jsx)(N_,{column:e.column,customField:e.customField,fields:e.row.fields,mutate:s,reload:e.reloadRow,updatable:e.updatable})},rv=e=>{const{params:{organizationId:t,delegationId:n}}=Id(),i=Kt(Jc),s=tn(),[a,c,l]=o_(t,"organizationDelegationMembers.columns",e.columns),[d,u,h]=o_(t,"organizationDelegationMembers.limit",25),[m,g,p]=o_(t,"organizationDelegationMembers.predicates",[]),[f,_,b]=o_(t,"organizationDelegationMembers.sort",null),{data:k,isLoading:v}=Jt("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 columnsCustomFields {\n ...SegmentCustomField\n }\n\n form {\n elements {\n customField {\n ...SegmentCustomField\n }\n }\n }\n }\n }\n}\n",{organizationId:t,privacy:e.isOrganizationAdmin?I.All:I.Public,delegationId:n},[ji.SegmentCustomFieldFragment]);const A=l||h||p||b||v,y=(0,r.useMemo)(()=>e.isOrganizationAdmin?k.organization?.customFields.nodes??[]:(0,Go.A)((k.organization?.delegation.form.elements.map(e=>e.customField)||[]).concat(k.organization?.delegation.columnsCustomFields??[])),[k.organization]),w=r_(y),C=(0,r.useMemo)(()=>i.getDelegationMembersFilters(y),[y]),x=(0,r.useMemo)(()=>i.getDelegationMembersPossibleColumns(y),[y]);return(0,r.useEffect)(()=>{s.setItem(du.DELEGATIONS_SPACE_TAB,"members")},[]),A?(0,o.jsx)(Nn,{}):(0,o.jsx)(e_,{columns:e.canEditColumns?a:e.columns,columnsSearch:[],columnsToIncludes:Zc,eventId:null,filters:C,limit:d,loadDataList:ko,loadDataListParams:{delegationId:n},loadRow:bo,organizationId:t,possibleColumns:x,predicates:m,renderActions:(t,n,i)=>(0,o.jsx)(Jk,{campaigns:e.campaigns,customFields:y,deleteFromEvent:!1,massActions:t,showAccreditationsEdit:!1,showAccreditationsValidate:!1,showDelete:e.canDeleteMembers,showWishedAccreditationsEdit:!1,onMassEditSuccess:i}),rendering:Bc.List,setColumns:c,setLimit:u,setPredicates:g,setSort:_,showEditColumns:e.canEditColumns,showEditMode:e.isOrganizationAdmin,showFilters:!0,showMassActions:!0,showRowDropdown:!0,showRowEdit:e.canEditMembers,showSearchColumns:!1,sort:f,children:(0,o.jsx)(g_,{getEditPath:e.getEditPath,renderCell:(t,n,i)=>(0,o.jsx)(ov,{canClickMemberName:e.canClickMemberName,column:t,customField:w.get(t.slug),reloadRow:i,row:n,updatable:e.canEditMembers}),renderRowDropdown:(t,n)=>(0,o.jsx)(hk,{accreditationState:null,allowedCustomDocuments:e.customBadges,canAccredit:!1,canDelete:e.canDeleteMembers,customDocuments:[],deleteFromEvent:!1,member:t,reload:n,showDeleteFromEvent:!1,showDocumentsDownload:e.showDocumentsDownload,volunteerRegistrationId:null})})})},sv=e=>{const t=gu(),n=(0,r.useMemo)(()=>e.min.startOf("week").equals(e.value.startOf("week")),[e.min,e.value]),i=(0,r.useMemo)(()=>e.max.endOf("week").equals(e.value.endOf("week")),[e.max,e.value]);return(0,o.jsxs)(Dn,{gap:"2",children:[(0,o.jsx)(Un,{color:"white",disabled:n,leftIcon:"chevron-left",onClick:()=>{e.onChange(e.value.minus(t?{week:1}:{day:1}))}}),(0,o.jsx)(xn,{width:160,children:(0,o.jsx)(nm,{...e})}),(0,o.jsx)(Un,{color:"white",disabled:i,leftIcon:"chevron-right",onClick:()=>{e.onChange(e.value.plus(t?{week:1}:{day:1}))}})]})},av=r.createContext({}),cv=e=>{const{days:t,interval:n}=r.useContext(av),i=t[0],s=t[6]??t[0],a=r.useMemo(()=>(e.startAt??xi.c9.max(i,n.start)).startOf("day"),[e.startAt,i,n]),c=r.useMemo(()=>(e.endAt??xi.c9.min(s,n.end)).endOf("day"),[e.endAt,s,n]),l=r.useMemo(()=>"number"==typeof e.startHour&&e.startHour>0&&e.startAt?.isValid&&e.startAt.hour{const e=Math.max(a.diff(i,"days").days+1,1);return l?e-1:e},[l,a,i]),u=r.useMemo(()=>{const e=Math.min(Math.ceil(c.diff(i,"days").days)+1,8);return l?e-1:e},[l,c,i]);return a>s||c{const t=r.useMemo(()=>{if("week"===e.display){const t=e.date.startOf("week");return(0,Xs.A)(0,7).map(e=>t.plus({day:e}))}return[e.date]},[e.date]),n=r.useMemo(()=>xi.IX.fromDateTimes(e.minDate.startOf("day"),e.maxDate.endOf("day")),[e.minDate,e.maxDate]),[i,s]=r.useState(300),a=r.useCallback(e=>{if(e){const t=Math.max(Math.ceil(e.getBoundingClientRect().height),300);s(t)}},[e.date,s]),c=e.showBorder?{bd:!0,overflow:"hidden"}:{};return(0,o.jsx)(av.Provider,{value:{days:t,interval:n},children:(0,o.jsxs)(Dn,{css:{...c,...e.css},direction:"column",children:[(0,o.jsx)(Dn,{css:{borderBottom:"1px solid $gray200"},height:60,width:1,children:t.map(e=>(0,o.jsxs)(Dn,{align:"center",css:{background:"$gray50"},direction:"column",height:1,justify:"center",width:1,children:[(0,o.jsx)(xn,{css:{textTransform:"capitalize"},font:"gray500 textXs medium",children:e.toLocaleString({weekday:"long"})}),(0,o.jsx)(xn,{font:"gray800 textXl semiBold",children:e.day})]},e.toISO()))}),(0,o.jsxs)(Dn,{className:"h-calendar-events-container",css:{position:"relative"},direction:"column",height:i,width:1,children:[(0,o.jsx)(ku,{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,o.jsx)(Dn,{css:{background:n.contains(e)?"white":"$primary50",borderRight:"1px solid $gray200",gridColumn:`${t+1} / ${t+2}`,gridRow:"1 / 2"}},e.toISO()))}),(0,o.jsx)(ku,{ref:a,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})]})]})})},dv=e=>{const{translate:t}=Id(),n=e.member.accreditationsUsersInfos.some(t=>t.accreditationSlotId===e.accreditationSlotId);return(0,o.jsx)(Np,{children:(0,o.jsxs)(Op,{children:[(0,o.jsx)(xn,{css:{flex:"1"},children:(0,o.jsx)(L_,{userInfo:e.member.userInfo})}),(0,o.jsx)(Dn,{align:"center",gap:"3",children:n?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(Dn,{align:"center",gap:"1",children:[(0,o.jsx)(xn,{color:"success500",children:(0,o.jsx)(Mn,{icon:"badge-check",iconStyle:"solid"})}),(0,o.jsx)(xn,{font:"gray800 textXs medium",children:t("d_j_attribu_e_06450")})]}),(0,o.jsxs)(Gm,{children:[(0,o.jsx)(Jm,{children:(0,o.jsx)(Un,{color:"white",leftIcon:"ellipsis-vertical",size:"sm"})}),(0,o.jsx)(Zm,{placement:"bottom-end",children:(0,o.jsx)(Km,{color:"red",icon:"trash-can",onClick:()=>e.deleteAccreditationSlot(e.member.userInfo.id,e.accreditationSlotId),children:t("retirer_l_accr_62187")})})]})]}):(0,o.jsx)(Un,{size:"sm",onClick:()=>e.addAccreditationSlot(e.member.userInfo.id,e.accreditationSlotId),children:t("ajouter_97327")})})]})})},uv=e=>{const t=Yt();return(0,o.jsx)(Dn,{css:{background:"white",bd:!0,padding:"$4 $6"},direction:"column",gap:"2",children:e.isLoading?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(yu,{borderRadius:"$1",height:20,width:1}),(0,o.jsx)(yu,{borderRadius:"$1",height:20,width:1}),e.isWeezeventConnected&&(0,o.jsx)(yu,{borderRadius:"$1",height:20,width:1})]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(Dn,{align:"center",css:{color:"$gray700"},gap:"1",width:1,children:[(0,o.jsx)(xn,{children:(0,o.jsx)(Mn,{icon:"badge-check"})}),(0,o.jsx)(xn,{css:{flex:"1"},children:t("attribu_es_48167")}),(0,o.jsx)(xn,{children:e.stats.assignedResources})]}),(0,o.jsxs)(Dn,{align:"center",css:{color:"$gray700"},gap:"1",width:1,children:[(0,o.jsx)(xn,{children:(0,o.jsx)(Mn,{icon:"hand-holding-heart"})}),(0,o.jsx)(xn,{css:{flex:"1"},children:t("souhait_es_78101")}),(0,o.jsx)(xn,{children:e.stats.wishedResources})]}),e.isWeezeventConnected&&(0,o.jsxs)(Dn,{align:"center",css:{color:"$gray700"},gap:"1",width:1,children:[(0,o.jsx)(xn,{children:(0,o.jsx)(Mn,{icon:"scanner-gun"})}),(0,o.jsx)(xn,{css:{flex:"1"},children:t("scann_es_13169")}),(0,o.jsx)(xn,{children:e.stats.scannedResources})]})]})})},hv=e=>{const{params:{eventId:t,delegationId:n},translate:i}=Id(),{mutate:s}=ho(),a=(0,r.useMemo)(()=>`${e.das.accreditation.name}${an(e.das.accreditationSlot.name)?` - ${e.das.accreditationSlot.name}`:""}`,[e.das]),[c,l]=(0,r.useState)(!1),[d,u]=(0,r.useState)(e.das),[h,m]=(0,r.useState)((0,Uo.A)(e.das.volunteersRegistrations,e=>e.userInfo.name)),[g,p]=(0,r.useState)({}),f=(0,r.useCallback)(async i=>{l(!0),p(e=>({...e,[i]:!0}));const{event:o}=await(r={eventId:t,delegationId:n,accreditationSlotId:e.accreditationSlotId,userInfoId:i},s=await to(),co("query DelegationAccreditationSlotMember(\n $eventId: EventId!\n $delegationId: DelegationId!\n $accreditationSlotId: AccreditationsSlotId!\n $userInfoId: UsersInfoId!\n) {\n event(id: $eventId) {\n delegation(id: $delegationId) {\n accreditationSlot(id: $accreditationSlotId) {\n ...DelegationAccreditationSlotStats\n }\n }\n\n member: volunteerRegistrationByUserInfoId(userInfoId: $userInfoId) {\n ...VolunteerRegistrationDelegationAccreditationSlot\n }\n }\n}\n",{variables:r,token:s||void 0,fragments:[ji.DelegationAccreditationSlotStatsFragment,ji.VolunteerRegistrationDelegationAccreditationSlotFragment]}));var r,s;m(t=>t.flatMap(t=>{if(t.userInfo.id===i){const t=o.member.accreditationsUsersInfos.some(t=>t.accreditationSlotId===e.accreditationSlotId),n=o.member.accreditationsSlots.some(t=>t.id===e.accreditationSlotId);return t||n?[o.member]:[]}return[t]})),u(o.delegation.accreditationSlot),p(e=>({...e,[i]:!1})),l(!1)},[e.accreditationSlotId,n,t,l,u,p,m]),_=(0,r.useCallback)(async(e,n)=>{p(t=>({...t,[e]:!0})),await s({eventId:t,massAccredit:{accreditationsSlotsIds:[n],selecteds:{ids:[e]},strategy:ae.Add}}),await f(e)},[t,f,p]),b=(0,r.useCallback)(async(e,n)=>{p(t=>({...t,[e]:!0})),await s({eventId:t,massAccredit:{accreditationsSlotsIds:[n],selecteds:{ids:[e]},strategy:ae.Delete}}),await f(e)},[t,f,p]);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(xb,{children:a}),(0,o.jsxs)(_f,{css:{background:"$gray50",gap:"$6",padding:"$6"},children:[(0,o.jsx)(uv,{isLoading:c,isWeezeventConnected:e.isWeezeventConnected,stats:d}),(0,o.jsxs)(Bp,{children:[(0,o.jsx)(zp,{children:(0,o.jsx)(Fp,{children:i("nom_du_membre_69353")})}),h.map(t=>g[t.userInfo.id]?(0,o.jsx)(a_,{bx:!0},t.id):(0,o.jsx)(dv,{accreditationSlotId:e.accreditationSlotId,addAccreditationSlot:_,deleteAccreditationSlot:b,member:t},t.id))]})]})]})},mv=e=>{const{data:t,loader:n,isLoading:i}=Jt("query DelegationAccreditationSlotMembers(\n $eventId: EventId!\n $delegationId: DelegationId!\n $accreditationSlotId: AccreditationsSlotId!\n) {\n event(id: $eventId) {\n isWeezeventConnected\n\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},[ji.DelegationAccreditationSlotStatsFragment,ji.VolunteerRegistrationDelegationAccreditationSlotFragment]);return(0,o.jsx)(ff,{size:"md",onClose:e.onClose,children:i?n:(0,o.jsx)(hv,{accreditationSlotId:e.accreditationSlotId,das:t.event.delegation.accreditationSlot,isWeezeventConnected:t.event.isWeezeventConnected})})},gv=e=>{const t="horizontal"===e.display?{}:{flex:"1"};return(0,o.jsxs)(Dn,{align:"center",gap:"2",width:"horizontal"===e.display?void 0:1,children:[(0,o.jsx)(xn,{children:(0,o.jsx)(Mn,{icon:e.icon})}),(0,o.jsx)(xn,{css:t,fontSize:"textXs",children:e.text}),(0,o.jsx)(Dn,{align:"center",css:{background:e.background,borderRadius:"$1",fontSize:"$textXs",fontWeight:"$medium",padding:"2px 8px",minWidth:"30px"},justify:"center",children:e.count})]})},pv=e=>{const{translate:t,params:{eventId:n,delegationId:i}}=Id(),[s,a]=(0,r.useState)(e.das),c=(0,r.useMemo)(()=>Vh(e.das.accreditation.color),[e.das]),l=(0,r.useMemo)(()=>({background:c[50],border:`1px solid ${c[500]}`,color:c[700]}),[c]),d=(0,r.useMemo)(()=>`${e.das.accreditation.name}${an(e.das.accreditationSlot.name)?` - ${e.das.accreditationSlot.name}`:""}`,[e.das]),u=(0,r.useCallback)(async()=>{const{event:{delegation:t}}=await(o={eventId:n,delegationId:i,accreditationSlotId:e.das.accreditationSlot.id},r=await to(),co("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:o,token:r||void 0,fragments:[ji.DelegationAccreditationSlotStatsFragment]}));var o,r;a(t.accreditationSlot)},[e.das,a]),[h,m]=(0,r.useState)(!1),g=s.maxResources?`/${s.maxResources}`:"",p=`${s.assignedResources}${g}`;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(Dn,{align:"horizontal"===e.display?"center":"start",css:{...l,borderRadius:"$1",cursor:e.isEventAdmin?"pointer":"default",minHeight:"32px",px:"$2",py:"horizontal"===e.display?"0":"$2"},direction:"horizontal"===e.display?"row":"column",gap:"horizontal"===e.display?"6":"2",width:1,onClick:()=>{e.isEventAdmin&&m(!0)},children:[(0,o.jsx)(xn,{css:{flex:"1"},fontSize:"textXs",fontWeight:"medium",children:d}),(0,o.jsx)(gv,{background:c[100],count:p,display:e.display,icon:"badge-check",text:t("attribu_es_48167")}),e.showWished&&(0,o.jsx)(gv,{background:c[100],count:s.wishedResources,display:e.display,icon:"hand-holding-heart",text:t("souhait_es_78101")}),(0,o.jsx)(gv,{background:c[100],count:s.scannedResources,display:e.display,icon:"scanner-gun",text:t("scann_es_13169")})]}),e.isEventAdmin&&h&&(0,o.jsx)(mv,{accreditationSlotId:e.das.accreditationSlot.id,delegationId:i,eventId:n,onClose:()=>(m(!1),u())})]})},fv=e=>{const t=gu(),n=(0,r.useMemo)(()=>e.event.startAt.startOf("day").equals(e.event.endAt.startOf("day")),[e.event]),i=(0,r.useMemo)(()=>(0,Uo.A)(e.accreditationsSlots.filter(e=>!e.accreditationSlot.date?.isValid),e=>[e.accreditationCategory.name,Th(e.accreditation.index),e.accreditation.name.toLowerCase()]),[e.accreditationsSlots]),s=(0,r.useMemo)(()=>(0,Uo.A)(e.accreditationsSlots.filter(e=>e.accreditationSlot.date?.isValid),e=>[e.accreditationCategory.name,Th(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,o.jsxs)(lv,{css:{borderTop:"1px solid $gray200"},date:e.selectedDay,display:t?"week":"day",maxDate:e.event.endAt,minDate:e.event.startAt,children:[i.map(t=>(0,o.jsx)(cv,{children:(0,o.jsx)(pv,{das:t,display:n?"vertical":"horizontal",isEventAdmin:e.isEventAdmin,showWished:!a[t.accreditationId]})},t.accreditationSlot.id)),s.map(t=>(0,o.jsx)(cv,{endAt:t.accreditationSlot.date,startAt:t.accreditationSlot.date,children:(0,o.jsx)(pv,{das:t,display:"vertical",isEventAdmin:e.isEventAdmin,showWished:!a[t.accreditationId]})},t.accreditationSlot.id))]})};var _v=n(791);const bv=e=>{const t=Kt(aa),{delegationAccreditationsSlots:n,showWished:i}=wv(),r=n.find(t=>t.accreditationSlot.id===e.slot.id);return(0,o.jsxs)(Np,{children:[(0,o.jsx)(Op,{css:{paddingLeft:"76px",textTransform:"capitalize"},children:e.slot.name}),i&&(0,o.jsx)(Op,{width:150,children:t.toNumberOrInfinity(r?.wishedResources??0)}),(0,o.jsx)(Op,{width:150,children:t.toNumberOrInfinity(r?.assignedResources??0)}),(0,o.jsx)(Op,{width:150,children:t.toNumberOrInfinity(r?.maxResources)}),(0,o.jsx)(Op,{width:150,children:t.toNumberOrInfinity(r?.scannedResources??0)})]})},kv=e=>{const t=Kt(aa),{delegationAccreditations:n,delegationAccreditationsSlots:i,accreditationIdToSlots:s,accreditationIdToOpen:c,setAccreditationIdToOpen:l,showWished:d}=wv(),u=c[e.accreditation.id]??!0,h=s[e.accreditation.id],m=(0,r.useMemo)(()=>{const t=n.find(t=>t.accreditationId===e.accreditation.id);if("number"==typeof t?.maxResources)return t.maxResources;{const t=i.filter(t=>t.accreditationId===e.accreditation.id&&"number"==typeof t.maxResources);return a(t)?(0,cr.A)(t,e=>e.maxResources):null}},[e.accreditation,n,i]),g=(0,r.useMemo)(()=>(0,cr.A)(i.filter(t=>t.accreditationId===e.accreditation.id),e=>e.wishedResources),[e.accreditation,i]),p=(0,r.useMemo)(()=>(0,cr.A)(i.filter(t=>t.accreditationId===e.accreditation.id),e=>e.assignedResources),[e.accreditation,i]),f=(0,r.useMemo)(()=>(0,cr.A)(i.filter(t=>t.accreditationId===e.accreditation.id),e=>e.scannedResources),[e.accreditation,i]);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(Np,{children:[(0,o.jsxs)(Op,{align:"center",css:{cursor:"pointer",paddingLeft:"44px",userSelect:"none"},gap:"2",onClick:()=>l({...c,[e.accreditation.id]:!u}),children:[e.accreditation.hasSlots&&(0,o.jsx)(Dn,{align:"center",css:{color:"$gray800"},height:32,justify:"center",width:32,children:(0,o.jsx)(Mn,{icon:u?"chevron-up":"chevron-right"})}),(0,o.jsx)(Gh,{color:e.accreditation.color,icon:e.accreditation.icon}),(0,o.jsx)(xn,{children:e.accreditation.name})]}),d&&(0,o.jsx)(Op,{width:150,children:t.toNumberOrInfinity(g)}),(0,o.jsx)(Op,{width:150,children:t.toNumberOrInfinity(p)}),(0,o.jsx)(Op,{width:150,children:t.toNumberOrInfinity(m)}),(0,o.jsx)(Op,{width:150,children:t.toNumberOrInfinity(f)})]}),e.accreditation.hasSlots&&u&&h.map(e=>(0,o.jsx)(bv,{slot:e},`s-${e.id}`))]})},vv=e=>{const t=Kt(aa),{delegationAccreditations:n,delegationAccreditationsSlots:i,categoryIdToOpen:s,categoryIdToAccreditations:c,setCategoryIdToOpen:l,showWished:d}=wv(),u=s[e.category.id]??!0,h=(0,r.useMemo)(()=>Dh(c[e.category.id]),[c,e.category.id]),m=(0,r.useMemo)(()=>{const t=(0,Go.A)(n.filter(t=>t.accreditationCategoryId===e.category.id).map(e=>{if("number"==typeof e.maxResources)return e.maxResources;{const t=i.filter(t=>t.accreditationId===e.accreditationId&&"number"==typeof t.maxResources);return a(t)?(0,cr.A)(t,e=>e.maxResources):null}}));return a(t)?(0,_v.A)(t):null},[e.category,n,i]),g=(0,r.useMemo)(()=>(0,cr.A)(i.filter(t=>t.accreditationCategory.id===e.category.id),e=>e.wishedResources),[e.category,i]),p=(0,r.useMemo)(()=>(0,cr.A)(i.filter(t=>t.accreditationCategory.id===e.category.id),e=>e.assignedResources),[e.category,i]),f=(0,r.useMemo)(()=>(0,cr.A)(i.filter(t=>t.accreditationCategory.id===e.category.id),e=>e.scannedResources),[e.category,i]);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(Np,{css:{background:"$gray100"},children:[(0,o.jsxs)(Op,{align:"center",css:{cursor:"pointer",userSelect:"none"},gap:"2",onClick:()=>l({...s,[e.category.id]:!u}),children:[(0,o.jsx)(Dn,{align:"center",css:{color:"$gray800"},height:32,justify:"center",width:32,children:(0,o.jsx)(Mn,{icon:u?"chevron-up":"chevron-right"})}),(0,o.jsx)(xn,{css:{textTransform:"uppercase"},fontSize:"textXs",fontWeight:"medium",children:e.category.name})]}),d&&(0,o.jsx)(Op,{width:150,children:t.toNumberOrInfinity(g)}),(0,o.jsx)(Op,{width:150,children:t.toNumberOrInfinity(p)}),(0,o.jsx)(Op,{width:150,children:t.toNumberOrInfinity(m)}),(0,o.jsx)(Op,{width:150,children:t.toNumberOrInfinity(f)})]}),u&&h.map(e=>(0,o.jsx)(kv,{accreditation:e},`a-${e.id}`))]})},Av=(0,r.createContext)({}),yv=e=>{const{translate:t,params:{organizationId:n}}=Id(),i=Kt(is),s=(0,r.useMemo)(()=>(0,Uo.A)((0,Er.A)(e.accreditationsSlots.map(e=>e.accreditationCategory),e=>e.id),e=>e.name.toLowerCase()),[e.accreditationsSlots]),a=(0,r.useMemo)(()=>(0,rg.A)((0,lh.A)((0,Er.A)(e.accreditations.map(e=>e.accreditation),e=>e.id),e=>e.accreditationCategoryId),e=>(0,Uo.A)(e,e=>e.name.toLowerCase())),[e.accreditations]),c=(0,r.useMemo)(()=>(0,rg.A)((0,lh.A)(e.accreditationsSlots.map(e=>({...e.accreditationSlot,name:wh(i,e.accreditationSlot,"",{date:{localeFormat:Bi.DateOnly.WeekdayLongMonthLong}})})),e=>e.accreditationId),e=>Ih(e)),[e.accreditationsSlots]),l=(0,r.useMemo)(()=>e.accreditations.some(e=>!(e.willAutoAccredit||e.accreditation.willAutoAccredit)),[e.accreditations]),[d,u]=o_(n,"eventDelegationAccreditations.categoryIdToOpen",{}),[h,m]=o_(n,"eventDelegationAccreditations.accreditationIdToOpen",{});return(0,o.jsx)(Av.Provider,{value:{accreditationIdToOpen:h,accreditationIdToSlots:c,categories:s,categoryIdToAccreditations:a,categoryIdToOpen:d,delegationAccreditations:e.accreditations,delegationAccreditationsSlots:e.accreditationsSlots,setAccreditationIdToOpen:m,setCategoryIdToOpen:u,showWished:l},children:(0,o.jsxs)(Bp,{hideBorder:!0,children:[(0,o.jsxs)(zp,{children:[(0,o.jsx)(Fp,{children:t("cat_gorie_accr_40335")}),l&&(0,o.jsx)(Fp,{width:150,children:t("souhait_es_78101")}),(0,o.jsx)(Fp,{width:150,children:t("affect_es_00048")}),(0,o.jsx)(Fp,{width:150,children:t("quota_00069")}),(0,o.jsx)(Fp,{width:150,children:t("scann_es_13169")})]}),s.map(e=>(0,o.jsx)(vv,{category:e},`c-${e.id}`))]})})};function wv(){return(0,r.useContext)(Av)}const Cv=e=>{const{translate:t,params:{organizationId:n}}=Id(),[i,s]=(0,r.useState)(""),[a,c]=o_(n,"eventDelegationAccreditations.rendering","calendar"),[l,d]=(0,r.useState)(e.event.delegation.minAccreditationSlotDate),u=(0,r.useMemo)(()=>l?.isValid?l:e.event.startAt,[e.event,l]),[h,m]=(0,r.useState)(null),g=(0,r.useMemo)(()=>e.event.delegation.accreditationsSlots.filter(e=>{const t=!an(i)||e.accreditation.name.toLowerCase().includes(i.toLowerCase())||e.accreditationSlot.name.toLowerCase().includes(i.toLowerCase())||"table"!==a||e.accreditationCategory.name.toLowerCase().includes(i.toLowerCase()),n=!h?.isValid||!!e.accreditationSlot.date?.isValid&&h.toSQLDate()===e.accreditationSlot.date.toSQLDate();return t&&n}),[e.event,i,a,h]);return(0,o.jsxs)(Dn,{css:{background:"white",bd:!0,overflow:"hidden"},direction:"column",children:[(0,o.jsxs)(Dn,{css:{background:"white",padding:"$5 $5"},gap:"3",children:[(0,o.jsx)(xn,{width:320,children:(0,o.jsx)(cu,{icon:"magnifying-glass",placeholder:t("rechercher_une_65646"),value:i,onChange:s})}),(0,o.jsx)(xn,{css:{flex:"1"}}),"calendar"===a&&(0,o.jsx)(sv,{max:e.event.endAt,min:e.event.startAt,value:u,onChange:d}),"table"===a&&(0,o.jsx)(xn,{width:160,children:(0,o.jsx)(nm,{max:e.event.endAt,min:e.event.startAt,value:h,onChange:m})}),(0,o.jsxs)(Gm,{children:[(0,o.jsx)(Jm,{children:(0,o.jsx)(Un,{color:"white",leftIcon:"table"===a?"table":"calendar",children:t("table"===a?"vue_tableau_18026":"vue_calendrier_58086")})}),(0,o.jsxs)(Zm,{placement:"bottom-end",children:[(0,o.jsx)(Km,{icon:"calendar",onClick:()=>c("calendar"),children:t("vue_calendrier_58086")}),(0,o.jsx)(Km,{icon:"table",onClick:()=>c("table"),children:t("vue_tableau_18026")})]})]})]}),"table"===a?(0,o.jsx)(yv,{accreditations:e.event.delegation.accreditations,accreditationsSlots:g}):(0,o.jsx)(fv,{accreditations:e.event.delegation.accreditations,accreditationsSlots:g,event:e.event,isEventAdmin:e.isEventAdmin,selectedDay:u})]})},Iv=()=>{const e=Yt();return(0,o.jsx)(Dn,{align:"center",css:{background:"white",border:"1px solid $gray200",borderRadius:"$1",boxShadow:"$xs"},height:1,justify:"center",width:1,children:(0,o.jsx)(xn,{height:250,width:1,children:(0,o.jsx)(Rh,{title:e("aucune_accr_dit_27643")})})})},xv=e=>{const{params:{eventId:t,delegationId:n}}=Id(),{data:i,loader:r}=Jt("query DelegationAccreditations(\n $eventId: EventId!\n $delegationId: DelegationId!\n $onlyVisible: Boolean!\n) {\n event(id: $eventId) {\n startAt\n endAt\n\n delegation(id: $delegationId) {\n minAccreditationSlotDate\n\n accreditations {\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 }\n }\n\n accreditationsSlots(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",{eventId:t,delegationId:n,onlyVisible:e.onlyVisible},[ji.DelegationAccreditationSlotStatsFragment]);return r||(a(i.event?.delegation.accreditationsSlots)?(0,o.jsx)(Cv,{event:i.event,isEventAdmin:e.isEventAdmin}):(0,o.jsx)(Iv,{}))},Sv=e=>{const{translate:t,params:{eventId:n,delegationId:i}}=Id(),{mutate:s,isLoading:c}=function(e={}){return Xt("mutation EventDocumentsExport(\n $eventId: EventId!\n $delegationId: DelegationId\n $documentsExport: DocumentsExportInput!\n) {\n eventDocumentsExport(\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]),d=(0,r.useMemo)(()=>a(l)?l.map(e=>e.name).join(", "):mt.includes(e.slug)?dk(e.slug):null,[l,e.slug]),u=a(l);return d?(0,o.jsxs)(Dn,{align:"center",css:{borderBottom:"1px solid $gray200",padding:"$4 $6","&:last-child":{borderBottom:"none"}},gap:"3",children:[(0,o.jsx)(Dn,{align:"center",css:{background:"$blueGray100",borderRadius:"12px",color:"$blueGray700"},height:40,justify:"center",width:40,children:(0,o.jsx)(Mn,{icon:"file-lines"})}),(0,o.jsx)(xn,{css:{flex:"1"},font:"gray900 textSm medium",children:d}),(0,o.jsxs)(tp,{children:[(0,o.jsx)(op,{children:(0,o.jsx)(xn,{children:(0,o.jsx)(Un,{color:"white",isLoading:c,leftIcon:"download",onClick:()=>s({eventId:n,delegationId:i,documentsExport:{badgeType:u?null:e.slug,customDocumentSlug:u?e.slug:null,documentType:u?M.UserCustomDocument:M.CustomBadge,language:Ee.Fr,oneFile:!1,segmentsIds:[],strategy:F.OnePerPage}})})})}),(0,o.jsx)(ip,{placement:"top",children:t("recevoir_les_do_31669")})]})]}):null},Ev=e=>{const{translate:t}=Id();return(0,o.jsxs)(Dn,{direction:"column",gap:"2",children:[(0,o.jsx)(xn,{font:"gray900 textMd medium",children:t("documents_dispo_46996")}),(0,o.jsx)(Dn,{css:{background:"white",border:"1px solid $gray200",borderRadius:"$2",flex:"1",overflow:"hidden"},direction:"column",children:e.delegationsSpaceCustomBadges.map(t=>(0,o.jsx)(Sv,{customDocuments:e.customDocuments,slug:t},t))})]})},jv=(Ce.OrganizationAdmin,[Ce.OrganizationAdmin,Ce.EventAdmin]);Ce.OrganizationAdmin,Ce.OrganizationReader;const Tv=[Ce.OrganizationAdmin,Ce.OrganizationReader,Ce.EventAdmin,Ce.EventReader];function Dv(e,t,n){let i=e.roles;return void 0!==n&&(i=i.filter(t=>{switch(t.type){case Ce.Custom:case Ce.PositionEditor:case Ce.PositionReader:return function(e,t,n){const i=e.usersPositionsCategories.some(e=>"ANY"===n.positionCategoryId?t.id===e.role.id:t.id===e.role.id&&e.positionCategoryId===n.positionCategoryId);if("positionId"in n){const o=e.usersPositions.some(e=>t.id===e.role.id&&e.positionId===n.positionId);return i||o}return i}(e,{id:t.id,type:t.type},n);default:return!0}})),t.map(e=>i.some(t=>"1"===t.positionPermissions[e]))}function Pv(e,t){return t.map(t=>e.roles.some(e=>"1"===e.delegationCategoryPermissions[t]))}const Rv=r.createContext({}),Ov=e=>{const{params:{eventId:t}}=Id(),n=r.useMemo(()=>e.userPermissions.roles.some(e=>jv.includes(e.type)),[e.userPermissions]),i=r.useMemo(()=>e.userPermissions.roles.some(e=>Tv.includes(e.type)),[e.userPermissions]);return t?(0,o.jsx)(Rv.Provider,{value:{isEventAdmin:n,isEventReader:i,userPermissions:e.userPermissions,hasDelegationCategoryPermission:t=>Pv(e.userPermissions,[t])[0],hasDelegationCategoryPermissions:t=>Pv(e.userPermissions,t),hasPositionPermission:(t,n)=>function(e,t,n){return Dv(e,[t],n)[0]}(e.userPermissions,t,n),hasPositionPermissions:(t,n)=>Dv(e.userPermissions,t,n)},children:e.children}):(0,o.jsx)(o.Fragment,{children:e.children})};function Fv(){return r.useContext(Rv)}const zv=({bannerUrl:e,featureFlags:t,isLoading:n})=>{const[i,s]=(0,r.useState)(!0);return(0,r.useEffect)(()=>{(async()=>{an(e)&&(s(!0),await Sd(e),s(!1))})()},[e]),n||an(e)?i?(0,o.jsx)(yu,{css:{minHeight:"115px",width:"100%","@tablet":{borderRadius:"$2",minHeight:"230px"},"@desktop":{marginLeft:"auto",marginRight:"auto",minHeight:"360px",width:"$container"}}}):(0,o.jsx)(xn,{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},Mv=({additionalComponents:e,extraItems:t,logoSrc:n,userInfo:i})=>{const{params:{organizationId:s,delegationId:a,userInfoId:c},translate:l}=Id(),d=dm(),u=tn(),[h,m]=r.useState(!1);return(0,o.jsxs)(Dn,{align:"center",as:"header",css:{backgroundColor:"white",px:"$6",position:"relative",borderBottom:"1px solid $gray200"},height:65,justify:"between",width:1,children:[(0,o.jsxs)(Dn,{align:"center",css:{cursor:n?"pointer":"default",margin:"inherit",padding:"$4","& svg":{height:"50%"}},gap:"7",height:1,children:[n&&(0,o.jsx)(Fn,{height:1,to:a?Ca(Xa.ORGANIZATION_DELEGATIONS({organizationId:s})):Cd.USER_PROFILE({organizationId:s,userInfoId:c}),children:n&&(0,o.jsx)("img",{height:"100%",src:n,width:"auto"})}),e]}),(0,o.jsxs)(Gm,{"aria-label":l("menu_utilisateu_40033"),"aria-orientation":"vertical",isOpen:h,onStateChange:m,children:[(0,o.jsx)(Jm,{children:(0,o.jsxs)(Dn,{align:"center","aria-expanded":h,"aria-label":l("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,o.jsx)(f_,{email:i?.email,image:i?.picture?.url,name:i?.name,size:32}),!d&&(0,o.jsx)(xn,{css:{maxWidth:"calc(100% - 66px)"},children:(0,o.jsx)(xn,{css:{ellipsis:!0},children:i?.name||i?.email})}),(0,o.jsx)("div",{children:h?(0,o.jsx)("i",{className:"far fa-angle-up"}):(0,o.jsx)("i",{className:"far fa-angle-down"})})]})}),(0,o.jsxs)(Zm,{"aria-orientation":"vertical",id:"user-menu",maxHeight:500,placement:"bottom-end",width:300,children:[(0,o.jsx)(Hm,{children:(0,o.jsxs)(Dn,{align:"center",css:{cursor:"default"},gap:"3",width:1,children:[(0,o.jsx)(f_,{email:i?.email,image:i?.picture?.url,name:i?.name,size:32}),(0,o.jsxs)(xn,{css:{width:"calc(100% - 44px)"},children:[(0,o.jsx)(xn,{css:{ellipsis:!0},fontWeight:"semiBold",children:i?.name||i?.email}),an(i?.name)&&(0,o.jsx)(xn,{color:"gray500",css:{ellipsis:!0},children:i?.email})]})]})}),(0,o.jsx)(Qm,{color:"gray100",direction:"horizontal"}),t,(0,o.jsx)(Hm,{color:"red",onClick:()=>{u.removeItem(du.DELEGATIONS_SPACE_TAB),no()},children:l("se_d_connecter_74151")})]})]})]})},$v=({additionalComponents:e,children:t,extraItems:n,featureFlags:i,isLoading:s,organization:a,spaceDesign:c,userInfo:l})=>(r.useEffect(()=>{a&&Ed(c.themeColors??{})},[a]),(0,o.jsxs)(o.Fragment,{children:[l&&(0,o.jsx)(Mv,{additionalComponents:e,extraItems:n,logoSrc:c.logoSrc,userInfo:l}),(0,o.jsxs)(Dn,{align:"center",as:"main",css:{height:"fit-content",...i?.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:i?.isV4?"4":void 0,height:1,width:1,children:[!("edit"===window.location.pathname.split("/").at(-1)||"edit"===window.location.pathname.split("/").at(-2))&&(0,o.jsx)(zv,{bannerUrl:c.bannerSrc,featureFlags:i,isLoading:s}),(0,o.jsx)(xn,{css:{width:"100%",...i?.isV4?{}:{height:"100%",position:"relative",padding:"$4","@tablet":{padding:"$5 $7"},"@desktop":{paddingBottom:"$7",marginLeft:"auto",marginRight:"auto"}},"@desktop":{width:"$container"}},children:t})]})]})),Nv=e=>(0,o.jsx)(xn,{css:{padding:"$2 $3"},font:"gray500 textXs semiBold",children:e.children}),Bv=e=>{const{translate:t,params:{organizationId:n,eventId:i,delegationId:s}}=Id(),[c,l]=(0,r.useMemo)(()=>(0,Qs.A)(e.delegations,e=>"number"==typeof e.event?.id),[e.delegations]),d=(0,r.useMemo)(()=>(0,Uo.A)(Object.values((0,lh.A)(c,e=>e.event.id)),([e])=>e.event.name.toLowerCase()),[c]);return e.delegations.length>1?(0,o.jsxs)(o.Fragment,{children:[a(l)&&(0,o.jsx)(Nv,{children:t("communaut_20896")}),l.map(e=>(0,o.jsx)(Hm,{to:dc.DELEGATION({organizationId:n,delegationId:e.id}),children:e.name},e.id)),d.map((e,t)=>{const i=e[0],s=(0,Uo.A)(e,e=>e.name.toLowerCase());return(0,o.jsxs)(r.Fragment,{children:[(0,o.jsx)(Nv,{children:i.event.name}),s.map(e=>(0,o.jsx)(Hm,{to:dc.DELEGATION({organizationId:n,eventId:e.event?.id,delegationId:e.id}),children:e.name},e.id))]},t)}),(0,o.jsx)(Qm,{direction:"horizontal",color:"gray100"}),(0,o.jsx)(Hm,{to:Ca(Xa.ORGANIZATION_DELEGATIONS({organizationId:n})),children:t("voir_toutes_les_79250")}),(0,o.jsx)(Qm,{direction:"horizontal",color:"gray100"}),(0,o.jsx)(Hm,{to:dc.DELEGATION_PROFILE({organizationId:n,eventId:i,delegationId:s}),children:t("mon_profil_48224")}),(0,o.jsx)(Qm,{direction:"horizontal",color:"gray100"})]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Hm,{to:dc.DELEGATION_PROFILE({organizationId:n,eventId:i,delegationId:s}),children:t("mon_profil_48224")}),(0,o.jsx)(Qm,{direction:"horizontal",color:"gray100"})]})},Lv=e=>{const{history:t,translate:n,params:{organizationId:i,eventId:r,delegationId:s}}=Id(),{mutate:a}=function(e={}){return Xt("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)}(),c=(e=!1)=>e?t.goBack(dc.DELEGATION_DASHBOARD({organizationId:i,eventId:r,delegationId:s})):t.push(dc.DELEGATION_DASHBOARD({organizationId:i,eventId:r,delegationId:s}));return(0,o.jsx)(Xd,{direction:"column",initialValues:{fields:e.delegation.fields},render:({form:t,handleSubmit:r,submitting:s})=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Un,{color:"invisible",leftIcon:"arrow-left",onClick:()=>c(!0),children:n("retour_92202")}),(0,o.jsx)(Fd,{height:"4"}),(0,o.jsx)(Dn,{direction:"column",gap:"4",children:e.delegation.usedCustomFields.map(e=>(0,o.jsx)(wg,{change:t.change,display:!0,field:e,fileAcl:"public-read",isMandatory:!1,organizationId:i,prefix:"fields."},e.id))}),(0,o.jsx)(Fd,{height:"6"}),(0,o.jsxs)(Dn,{gap:"4",children:[(0,o.jsx)(Un,{isLoading:s,onClick:r,children:n("mettre_jour_85141")}),(0,o.jsx)(Un,{color:"white",onClick:()=>c(!0),children:n("annuler_48254")})]})]}),width:1,onSubmit:async e=>{await a({organizationId:i,eventId:r,delegationId:s,fields:e.fields}),c()}})},Vv=()=>{const{params:{organizationId:e,delegationId:t}}=Id(),{data:n,loader:i}=Jt("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},[ji.CustomFieldWithConditionFragment]);return i||(0,o.jsx)(Lv,{delegation:n.organization.delegation})},Uv=e=>(0,o.jsx)(Dn,{css:{background:"white",bd:!0,...e.css},direction:"column",width:1,children:(0,o.jsxs)(Dn,{direction:"column",width:1,children:[(0,o.jsxs)(Dn,{css:{borderBottom:e.hideTitleBorder?void 0:"1px solid $gray200",paddingBottom:e.hideTitleBorder?"0":"$5",paddingTop:"$5",px:"$6"},gap:"3",width:1,children:[(0,o.jsx)(xn,{color:"gray900",css:{flex:"1",alignContent:"center"},fontSize:"textMd",fontWeight:"semiBold",children:e.title}),e.rightIcon&&(0,o.jsx)(xn,{color:"gray900",css:{cursor:"pointer"},fontSize:"textMd",fontWeight:"semiBold",textAlign:"center",width:20,onClick:t=>{e.rightIconClick?.(t)},children:(0,o.jsx)(Mn,{icon:e.rightIcon})}),e.select]}),(0,o.jsx)(xn,{className:"h-detail-box-content",css:{flex:"1",padding:"$6"},width:1,children:e.children})]})}),Gv=({css:e,title:t,children:n})=>(0,o.jsxs)(Dn,{direction:"column",gap:"3",children:[(0,o.jsx)(xn,{color:"gray900",fontSize:"textLg",fontWeight:"semiBold",children:t}),(0,o.jsx)(Dn,{css:{bd:!0,padding:"$4",...e},direction:"column",children:n})]}),Wv=({children:e,...t})=>dm()?(0,o.jsx)(Gv,{...t,children:e}):(0,o.jsx)(Uv,{...t,children:e}),qv=bn(xn,{overflow:"hidden",textOverflow:"ellipsis"}),Hv=e=>{const t=Kt(os);switch(e.field.fieldType){case K.File:{const n=t.getValue(e.field,e.fields);return n?(0,o.jsx)(vm,{acl:"public-read",document:n}):(0,o.jsx)(qv,{color:"gray500",css:{fontSize:"$textMd","@tablet":{fontSize:"$textSm"}},children:"-"})}case K.Phone:{const n=t.getValueString(e.field,e.fields);return(0,o.jsx)(qv,{color:"gray500",css:{fontSize:"$textMd","@tablet":{fontSize:"$textSm"}},children:an(n)?(0,o.jsx)(qh,{css:{display:"block",overflow:"hidden",textOverflow:"ellipsis"},hideIcon:!0,to:`tel:${n}`,children:n}):"-"})}default:{const n=t.getValueString(e.field,e.fields);return(0,o.jsx)(qv,{color:"gray500",css:{fontSize:"$textMd","@tablet":{fontSize:"$textSm"}},children:an(n)?URL.canParse(n)?(0,o.jsx)(qh,{css:{display:"block",overflow:"hidden",textOverflow:"ellipsis"},hideIcon:!0,to:n,children:n}):n:"-"})}}},Kv=e=>(0,o.jsx)(xn,{color:"gray800",css:{overflow:"hidden",textOverflow:"ellipsis",...e.css},fontSize:"textSm",fontWeight:"medium",children:e.children}),Yv=e=>(0,o.jsxs)(Dn,{direction:"column",gap:"1",children:[(0,o.jsx)(Kv,{children:e.field.name}),(0,o.jsx)(Hv,{field:e.field,fields:e.fields})]}),Zv=e=>(0,o.jsx)(Dn,{direction:"column",gap:"4",width:1,children:e.customFields.map((t,n)=>(0,o.jsxs)(r.Fragment,{children:[0!==n&&(0,o.jsx)(Qm,{direction:"horizontal"}),(0,o.jsx)(Yv,{field:t,fields:e.delegation.fields})]},t.id))});function Jv(e){return e<=.2?kn.colors.error500.value:e<.7?kn.colors.warning500.value:e<=1?kn.colors.success500.value:kn.colors.blueGray500.value}const Xv=({percent:e,prospectivePercent:t})=>(0,o.jsxs)(xn,{css:{background:"$gray100",borderRadius:"$1",position:"relative"},height:8,width:1,children:[(0,o.jsx)(xn,{css:{background:Jv(e),borderRadius:"$1",left:0,maxWidth:"100%",position:"absolute",top:0,width:100*e+"%"},height:1}),void 0!==t&&(0,o.jsx)(xn,{css:{background:Jv(t),borderRadius:"$1",left:0,opacity:.4,maxWidth:"100%",position:"absolute",top:0,width:100*t+"%"},height:1})]}),Qv=e=>(0,o.jsx)(Dn,{align:"center",css:{bd:!0,fontSize:"$textMd"},height:48,justify:"center",width:48,children:(0,o.jsx)(Mn,{icon:e.icon})}),eA=({delegation:e})=>{const{translate:t,params:{organizationId:n}}=Id(),i=Kt(is),r=Kt(aa),{dashboardLeaders:s}=jr(n);return(0,o.jsxs)(Dn,{direction:"column",gap:"4",width:1,children:[e.deadlineDate&&(0,o.jsxs)(Dn,{align:"center",gap:"4",children:[(0,o.jsx)(Qv,{icon:"calendar"}),(0,o.jsxs)(Dn,{css:{flex:"1"},direction:"column",gap:"1",children:[(0,o.jsx)(xn,{font:"gray800 textSm medium",children:t("date_butoir_dinscription")}),(0,o.jsx)(xn,{color:"gray500",children:i.toLocaleString(e.deadlineDate,Bi.DateOnly.MonthLong)})]})]}),(0,o.jsxs)(Dn,{align:"center",gap:"4",children:[(0,o.jsx)(Qv,{icon:"gem"}),(0,o.jsxs)(Dn,{css:{flex:"1"},direction:"column",gap:"1",children:[(0,o.jsx)(xn,{font:"gray800 textSm medium",children:t(s)}),(0,o.jsx)(Dn,{gap:"3",children:e.leaders.map(e=>(0,o.jsxs)(Dn,{align:"center",css:{bd:"gray300 1 xs",px:"$1"},gap:"1",height:22,children:[(0,o.jsx)(f_,{email:e.email,image:e.picture?.url,name:e.name,size:16}),(0,o.jsx)(xn,{font:"gray800 textXs medium",children:e.nameOrEmail})]},e.id))})]})]}),(0,o.jsxs)(Dn,{align:"center",gap:"4",children:[(0,o.jsx)(Qv,{icon:"users"}),(0,o.jsxs)(Dn,{direction:"column",gap:"1",children:[(0,o.jsx)(xn,{font:"gray800 textSm medium",children:t("quota_00069")}),(0,o.jsxs)(Dn,{align:"center",css:{flex:"1"},gap:"3",children:[(0,o.jsx)(xn,{width:100,children:(0,o.jsx)(Xv,{percent:e.maxResources?e.numberOfResources/e.maxResources:1})}),(0,o.jsxs)(xn,{color:"gray500",children:[e.numberOfResources,"/",r.toNumberOrInfinity(e.maxResources)]})]})]})]})]})},tA=()=>{const{translate:e,params:{organizationId:t}}=Id(),{dashboardLeaders:n}=jr(t);return(0,o.jsxs)(Dn,{direction:"column",gap:"4",width:1,children:[(0,o.jsxs)(Dn,{align:"center",gap:"4",children:[(0,o.jsx)(Qv,{icon:"gem"}),(0,o.jsxs)(Dn,{css:{flex:"1"},direction:"column",gap:"1",children:[(0,o.jsx)(xn,{font:"gray800 textSm medium",children:e(n)}),(0,o.jsx)(yu,{borderRadius:"$1",height:20,width:1})]})]}),(0,o.jsxs)(Dn,{align:"center",gap:"4",children:[(0,o.jsx)(Qv,{icon:"users"}),(0,o.jsxs)(Dn,{css:{flex:"1"},direction:"column",gap:"1",children:[(0,o.jsx)(xn,{font:"gray800 textSm medium",children:e("quota_00069")}),(0,o.jsx)(yu,{borderRadius:"$1",height:20,width:1})]})]})]})},nA=e=>{const{history:t,translate:n,params:{organizationId:i,eventId:s,delegationId:a}}=Id(),{isLoading:c,copy:l}=Ep(),d=(0,r.useMemo)(()=>uc({organizationId:e.delegation.organizationId,eventId:e.delegation.eventId,delegationId:e.delegation.id,formId:e.delegation.form.id}),[e.delegation]);return(0,o.jsx)(Wv,{css:{height:"fit-content"},hideTitleBorder:!0,title:n("Form"),children:(0,o.jsxs)(Dn,{direction:"column",gap:"4",width:1,children:[(0,o.jsx)(xn,{color:"gray800",children:n("envoyez_le_lien_23853")}),(0,o.jsxs)(Dn,{gap:"3",width:1,children:[(0,o.jsx)(Dn,{css:{flex:"1"},children:(0,o.jsx)(Un,{css:{width:"100%"},textAlign:"center",onClick:()=>t.push(dc.MEMBERS_INVITE({organizationId:i,eventId:s,delegationId:a})),children:n("envoyer_par_e_m_11240")})}),(0,o.jsxs)(tp,{children:[(0,o.jsx)(op,{children:(0,o.jsx)(Un,{color:"white",leftIcon:"arrow-up-right-from-square",onClick:()=>window.open(d,"_blank")})}),(0,o.jsx)(ip,{placement:"top",children:n("ouvrir_40131")})]}),(0,o.jsxs)(tp,{children:[(0,o.jsx)(op,{children:(0,o.jsx)(Un,{color:"white",leftIcon:c?"loader":"copy",onClick:()=>l(d)})}),(0,o.jsx)(ip,{placement:"top",children:n("copier_75889")})]})]})]})})},iA=()=>{const{history:e,translate:t,params:{organizationId:n,eventId:i,delegationId:s}}=Id(),c=Kt(Ac),{data:l,isLoading:d}=Jt("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 form {\n id\n name\n }\n\n leaders {\n id\n email\n name\n nameOrEmail\n\n picture {\n url\n }\n }\n\n usedCustomFields {\n ...CustomFieldWithCondition\n }\n }\n }\n}\n",{organizationId:n,delegationId:s},[ji.CustomFieldWithConditionFragment]),u=(0,r.useMemo)(()=>l.organization?.delegation.canLeadersEditCustomFields??!1,[l.organization]),h=(0,r.useMemo)(()=>l.organization?.delegation.usedCustomFields??[],[l.organization]),m=(0,r.useCallback)(()=>e.push(dc.FIELDS_EDIT({organizationId:n,eventId:i,delegationId:s})),[n,i,s]),g=(0,r.useMemo)(()=>!(l.organization?.delegation.usedCustomFieldsFilled??1),[l.organization]),p=(0,r.useMemo)(()=>{if(an(l.organization?.delegation.description)){const e=l.organization.delegation;return c.renderText(e.description,{delegation:{...e,formLink:uc({organizationId:n,eventId:i,delegationId:e.id,formId:e.formId})}})}return""},[l.organization]);return(0,o.jsxs)(Dn,{direction:"column",gap:"4",width:1,children:[g&&u&&(0,o.jsxs)(Bd,{color:"warning",leftIcon:"circle-exclamation",children:[(0,o.jsx)(xn,{fontWeight:"semiBold",children:t("informations_im_33187")}),(0,o.jsx)(Fd,{height:"1"}),(0,o.jsx)(xn,{fontWeight:"regular",children:t("des_information_10949")}),(0,o.jsx)(Fd,{height:"2"}),(0,o.jsx)(Un,{color:"invisible",css:{color:"inherit",px:"0","&:hover":{color:"inherit"}},rightIcon:"arrow-right",onClick:m,children:t("_diter_les_info_35201")})]}),(0,o.jsxs)(Dn,{gap:"4",width:1,children:[(0,o.jsxs)(Dn,{css:{flex:"1"},direction:"column",gap:"4",children:[an(p)&&(0,o.jsx)(Dn,{children:(0,o.jsx)(Wv,{hideTitleBorder:!0,title:t("description_58935"),children:(0,o.jsx)(Ig,{text:p})})}),(0,o.jsx)(Wv,{hideTitleBorder:!0,title:t("informations_g_79325"),children:d?(0,o.jsx)(tA,{}):(0,o.jsx)(eA,{delegation:l.organization.delegation})}),a(h)&&(0,o.jsx)(Dn,{children:(0,o.jsx)(Wv,{hideTitleBorder:!0,rightIcon:u?"pen":void 0,rightIconClick:m,title:t("informations_co_28407"),children:d?(0,o.jsx)(tA,{}):(0,o.jsx)(Zv,{customFields:h,delegation:l.organization.delegation})})})]}),!0===l.organization?.delegation.showFormLinkInDelegationSpace&&(0,o.jsx)(Dn,{width:450,children:(0,o.jsx)(nA,{delegation:l.organization.delegation})})]})]})},oA=()=>{const{params:{organizationId:e,eventId:t,delegationId:n}}=Id();return"members"===tn().getItem(du.DELEGATIONS_SPACE_TAB)?(0,o.jsx)(hl,{path:dc.DELEGATION_MEMBERS({organizationId:e,eventId:t,delegationId:n}),replace:!0}):(0,o.jsx)(hl,{path:dc.DELEGATION_DASHBOARD({organizationId:e,eventId:t,delegationId:n}),replace:!0})},rA=e=>{switch(e){case sA.Event:return{color:"success",leftIcon:"calendar"};case sA.ParentDelegation:return{color:"pink",leftIcon:"people-group"};default:return Br()}};var sA;!function(e){e.Event="event",e.ParentDelegation="parent-delegation"}(sA||(sA={}));const aA=({state:e,userInfo:t,onClick:n})=>{const i=Yt(),r=an(t.name);return(0,o.jsxs)(Dn,{align:"center",css:{borderBottom:"1px solid $gray200",cursor:"pointer",py:"$3",userSelect:"none",width:"100%","&:last-child":{border:"none"}},onClick:n,children:[(0,o.jsx)(Xh,{shouldPreventDefault:!1,state:e,onClick:uu.A}),(0,o.jsx)(Fd,{width:"3"}),(0,o.jsx)(f_,{email:t.email,image:t.picture?.url,name:t.name,size:40}),(0,o.jsx)(Fd,{width:"4"}),(0,o.jsxs)(Dn,{css:{flex:"1",overflow:"hidden"},direction:"column",children:[(0,o.jsx)(xn,{ellipsis:!0,color:"gray700",children:r?t.name:t.email}),r&&(0,o.jsx)(xn,{ellipsis:!0,color:"gray500",children:t.email})]}),t.source&&(0,o.jsx)(xn,{children:(0,o.jsx)(og,{...rA(t.source),leftIconStyle:"solid",children:t.source===sA.Event?i("_v_nement_22345"):i("d_l_gation_pare_68507")})})]})},cA=()=>(0,o.jsxs)(Dn,{align:"center",css:{borderBottom:"1px solid $gray200",cursor:"pointer",py:"$3",userSelect:"none",width:"100%","&:last-child":{border:"none"}},children:[(0,o.jsx)(Xh,{shouldPreventDefault:!1,state:"unchecked",onClick:uu.A}),(0,o.jsx)(Fd,{width:"3"}),(0,o.jsx)(yu,{size:40,variant:"circular"}),(0,o.jsx)(Fd,{width:"4"}),(0,o.jsxs)(Dn,{css:{flex:"1",overflow:"hidden"},direction:"column",gap:"1",children:[(0,o.jsx)(yu,{borderRadius:"$1",height:12,width:1}),(0,o.jsx)(yu,{borderRadius:"$1",height:12,width:1})]})]}),lA=e=>{const{translate:t,params:{organizationId:n,eventId:i,delegationId:s}}=Id(),{mutate:c,isLoading:d}=wo(),[u,h,m]=Mk(""),{data:g,isLoading:p}=Jt("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:s,name:an(h)?h:void 0},[ji.ExistingVolunteerFragment]);const[f,_]=(0,r.useState)([]);return(0,o.jsxs)(Tm,{size:"md",onClose:e.onClose,children:[(0,o.jsx)(xn,{color:"gray800",css:{height:"56px",textAlign:"center"},children:(0,o.jsx)("img",{alt:"Avatars",height:"100%",src:fu.AvatarGroup})}),(0,o.jsx)(Fd,{height:"6"}),(0,o.jsx)(xn,{color:"gray800",fontSize:"textLg",fontWeight:"medium",textAlign:"center",children:t("ajouter_un_memb_33261")}),(0,o.jsx)(Fd,{height:"1"}),(0,o.jsx)(xn,{color:"gray500",textAlign:"center",children:t("ajouter_un_ou_d_21477")}),(0,o.jsx)(Fd,{height:"6"}),(0,o.jsx)(cu,{icon:"magnifying-glass",placeholder:t("rechercher_un_m_05904"),value:u,onChange:m}),(0,o.jsx)(Fd,{height:"6"}),(0,o.jsx)(Dn,{css:{flex:"1",overflowY:"auto"},direction:"column",children:p?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(cA,{}),(0,o.jsx)(cA,{}),(0,o.jsx)(cA,{})]}):g.organization.delegation.parentUsersInfos.map(e=>{const t=f.includes(e.id)?"checked":"unchecked";return(0,o.jsx)(aA,{state:t,userInfo:e,onClick:()=>{_(l(f,e.id,"unchecked"===t))}},e.id)})}),(0,o.jsx)(Fd,{height:"7"}),(0,o.jsxs)(Dn,{align:"center",gap:"3",justify:"end",children:[(0,o.jsx)(Un,{disabled:!a(f),isLoading:d,onClick:async()=>{await c({eventId:i,delegationId:s,selecteds:{ids:f}}),location.reload()},children:t("ajouter_97327")}),(0,o.jsx)(Un,{color:"white",onClick:e.onClose,children:t("annuler_48254")})]})]})},dA=({delegation:e,name:t})=>{const{translate:n,params:{organizationId:i,delegationId:s}}=Id(),[a,c]=(0,r.useState)(!1),l=e.canLeadersAddMembers&&e.state===R.Ongoing,d=l&&(!!e.eventId&&!!e.parentId||e.canLeadersImportMembers),{delegationHeader:u,addMemberButton:h}=jr(i);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(Dn,{gap:"3",children:[(0,o.jsxs)(Dn,{css:{flex:"1"},direction:"column",gap:"1",children:[(0,o.jsx)(xn,{font:"gray900 displayXs semiBold",children:n("bienvenue_1_42255",t||"")}),(0,o.jsx)(xn,{color:"gray500",children:n(u,e.name)})]}),d?(0,o.jsxs)(Gm,{children:[(0,o.jsx)(Jm,{children:(0,o.jsx)(Un,{children:n(h)})}),(0,o.jsxs)(Zm,{placement:"bottom-end",children:[e.eventId&&e.parentId&&(0,o.jsx)(Km,{icon:"user-group",onClick:()=>{c(!0)},children:n("ajouter_des_mem_06922")}),(0,o.jsx)(Km,{icon:"user-plus",to:dc.MEMBER_CREATE({organizationId:i,eventId:e.eventId||void 0,delegationId:s,formId:e.formId}),children:n("ajouter_un_nouv_29283")}),e.canLeadersImportMembers&&(0,o.jsx)(Km,{icon:"file-import",to:dc.DELEGATION_MEMBERS_IMPORT({organizationId:i,eventId:e.eventId||void 0,delegationId:s}),onClick:e=>Vm(e.target),children:n("importer_via_un_61623")})]})]}):l?(0,o.jsx)(Un,{to:dc.MEMBER_CREATE({organizationId:i,eventId:e.eventId||void 0,delegationId:s,formId:e.formId}),children:n(h)}):null]}),a&&(0,o.jsx)(lA,{onClose:()=>{c(!1)}})]})},uA=r.memo(function(e){const t=Yt(),{descId:n,labelId:i}=nu(),[s,a]=r.useState(e.initialIsOpen),c=r.useCallback(t=>{a(t),e.onToggle?.(t)},[e.onToggle,a]),l=e.descId??n,d=e.labelId??i;return(0,o.jsxs)(Dn,{as:"fieldset",css:{background:"white",borderRadius:"$2",boxShadow:"$sm",border:"inherit",margin:"inherit",padding:"$6 $7",...e.css},direction:"column",children:[(0,o.jsxs)(Dn,{align:"center","aria-describedby":l,"aria-labelledby":d,as:"legend",css:{float:"left",width:"100%",border:"none",padding:"none",...s&&!e.centerTitleAndSubtitle?{borderBottom:"1px solid $gray200",paddingBottom:"$5"}:{}},gap:"4",children:[(0,o.jsxs)(Dn,{css:e.centerTitleAndSubtitle?{flex:"1",alignItems:"center",marginBottom:"var(--space32)"}:{flex:"1"},direction:"column",gap:"1",children:[(0,o.jsx)(xn,{color:"gray900",fontSize:"textMd",fontWeight:"semiBold",id:d,children:e.title}),an(e.subtitle)&&(0,o.jsx)(xn,{color:"gray500",dangerouslySetInnerHTML:{__html:e.subtitle},id:l})]}),!e.hideToggle&&(0,o.jsx)(xn,{children:(0,o.jsx)(Fh,{label:t("toggle_section_92160"),size:"md",value:s,onChange:c})})]}),s&&(0,o.jsxs)(o.Fragment,{children:[!e.centerTitleAndSubtitle&&(0,o.jsx)(Fd,{height:"5"}),e.children]})]})});var hA=n(6632);const mA=({formats:e,file:t,ids:n,localStorageKeyPrefix:i,onChange:s})=>{const{params:{organizationId:a},translate:c}=Id(),{data:l,loader:d}=go({organizationId:a}),u=(0,r.useMemo)(()=>{const e=localStorage.getItem(du[`${i}_FORMATS`]);return e?JSON.parse(e):e},[i]),h=(0,r.useMemo)(()=>{const t=t=>e?.[t]===l.organization?.[t]?(0,o.jsx)(og,{css:{textTransform:"uppercase"},children:c("from_organisati_25675")}):u?.[t]===e?.[t]&&(0,o.jsx)(og,{css:{textTransform:"uppercase"},children:c("from_saved_22150")});return{datetime:t("datetimeFormat"),date:t("dateFormat"),timeBadge:t("timeFormat")}},[l.organization,u,e]);return d||(0,o.jsxs)(uA,{...n,hideToggle:!0,initialIsOpen:!0,subtitle:c("s_lectionnez_vo_125161",aa.bytesToMegabytes(_r)),title:c("votre_fichier_d_51776"),children:[(0,o.jsx)(zm,{...n,accept:ym.Csv,acl:"private",organizationId:a,prefix:"input.csv.",withFileField:!0,onChange:s}),(0,o.jsx)(eg,{height:"5"}),(0,o.jsxs)(Dn,{direction:"column",gap:"4",children:[(0,o.jsxs)(Dn,{gap:"2",align:"center",children:[(0,o.jsx)(xn,{font:"gray900 textMd medium",children:c("param_tres_du_f_01675")}),u&&(0,o.jsxs)(tp,{children:[(0,o.jsx)(op,{children:(0,o.jsx)(Un,{disabled:!u,color:"white",leftIcon:"arrows-rotate",size:"sm",onClick:()=>{localStorage.removeItem(du[`${i}_FORMATS`]),window.location.reload()}})}),(0,o.jsx)(ip,{placement:"top",children:c("reset_defaults_72577")})]})]}),(0,o.jsxs)(Dn,{direction:"column",gap:"6",children:[(0,o.jsx)(xn,{width:1,children:(0,o.jsx)(lu,{description:c("you_must_set_th_73159"),label:c("set_delimiter_20565"),name:"input.csv.delimiter",state:t?"disabled":void 0})}),(0,o.jsxs)(Dn,{direction:"row",gap:"2",children:[(0,o.jsx)(xn,{width:1,children:(0,o.jsx)(lu,{description:c("leave_blank_if_02058"),label:c("set_quote_chara_43496"),name:"input.csv.quoteChar",state:t?"disabled":void 0})}),(0,o.jsx)(xn,{width:1,children:(0,o.jsxs)(kg,{description:c("leave_blank_to_11865"),label:c("set_newline_cha_37738"),name:"input.csv.newline",state:t?"disabled":void 0,children:[(0,o.jsx)("option",{value:void 0,children:"Auto-detect"}),(0,o.jsx)("option",{value:"\r",children:"\\r"}),(0,o.jsx)("option",{value:"\n",children:"\\n"}),(0,o.jsx)("option",{value:"\r\n",children:"\\r\\n"})]})})]}),(0,o.jsxs)(Dn,{direction:"row",gap:"2",children:[(0,o.jsx)(xn,{width:1,children:(0,o.jsx)(lu,{label:(0,o.jsxs)(Dn,{gap:"2",align:"center",children:[c("format_d_heure_46798"),h.timeBadge]}),name:"input.csv.formats.timeFormat",state:t?"disabled":void 0})}),(0,o.jsx)(xn,{width:1,children:(0,o.jsx)(lu,{label:(0,o.jsxs)(Dn,{gap:"2",align:"center",children:[c("format_de_date_82059"),h.date]}),name:"input.csv.formats.dateFormat",state:t?"disabled":void 0})}),(0,o.jsx)(xn,{width:1,children:(0,o.jsx)(lu,{label:(0,o.jsxs)(Dn,{gap:"2",align:"center",children:[c("format_de_date_24474"),h.datetime]}),name:"input.csv.formats.datetimeFormat",state:t?"disabled":void 0})})]})]})]})]})},gA=()=>{const e=Yt();return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Bd,{color:"primary",leftIcon:"clock",children:e("votre_import_es_05273")}),(0,o.jsx)(Fd,{height:"6"})]})},pA=e=>{const t=Yt(),n=(0,r.useMemo)(()=>[{id:-1,name:t("default_fields_04920"),fields:Object.entries(e.defaultFields).map(([e,n])=>({name:an(t(e))?t(e):e,slug:n,id:Math.random()}))},...e.categories].map(t=>({...t,fields:(0,Uo.A)(t.fields,t=>{const n=t.name.toLowerCase(),i=t.slug.toLowerCase(),o=e.column.name.toLowerCase(),r=Math.min(un(n,o),un(i,o));return r{const i=Object.values(e.defaultFields).find(e=>e===t);return i&&e.requiredFieldSlugs.includes(i)?(0,o.jsx)("strong",{children:n}):n},[e.defaultFields,e.requiredFieldSlugs]);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(cu,{state:"disabled",value:e.column.name,onChange:()=>{}}),(0,o.jsx)(Mn,{icon:"arrow-right"}),(0,o.jsx)(pg,{isSearchVisible:!0,multiple:!1,name:`input.mappings.${e.column.index}`,placeholder:t("s_lectionnez_un_12007"),renderValue:i,children:n.map(t=>(0,o.jsx)("optgroup",{label:t.name,children:t.fields.map(t=>(0,o.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))})]})},fA=bn("div",{display:"grid",gridTemplateColumns:"[column] 1fr auto [field] 1fr",gap:"$4 $5",alignItems:"center"}),_A=bn("div",{color:"$gray800",gridColumn:"column",fontWeight:"$medium"}),bA=bn("div",{color:"$gray800",gridColumn:"field",fontWeight:"$medium"}),kA=({categories:e,columns:t,defaultFields:n,requiredFieldSlugs:i,values:r})=>{const s=Yt();return(0,o.jsxs)(fA,{children:[(0,o.jsx)(_A,{children:s("titres_de_vos_c_31388")}),(0,o.jsx)(bA,{children:s("champs_de_formu_64126")}),t.map((t,s)=>(0,o.jsx)(pA,{categories:e,column:{name:t,index:s},defaultFields:n,requiredFieldSlugs:i,values:r},s))]})},vA=e=>{const t=Yt();return(0,o.jsxs)(uA,{hideToggle:!0,initialIsOpen:!0,subtitle:t("_ditez_la_corre_24969"),title:t("liste_des_champ_40104"),children:[e.modeSelection,(0,o.jsx)(Fd,{height:"5"}),(0,o.jsx)(kA,{...e})]})},AA=e=>{const{translate:t}=Id(),n=e.customFields.find(t=>t.id===e.customFieldValues.customFieldId);return(0,o.jsxs)(wp,{buttons:(0,o.jsxs)(tp,{children:[(0,o.jsx)(op,{children:(0,o.jsx)(xn,{children:(0,o.jsx)(Un,{color:"white",leftIcon:"trash-can",size:"sm",onClick:e.remove})})}),(0,o.jsx)(ip,{placement:"top",children:t("supprimer_43083")})]}),title:t("champ_de_formul_73221",e.index+1),children:[(0,o.jsxs)(pg,{isSearchVisible:!0,label:t("CustomField"),name:`${e.field}.customFieldId`,children:[(0,o.jsx)("option",{value:"-1",children:t("s_lectionner_un_48159")}),e.customFields.map(e=>(0,o.jsx)("option",{value:e.id,children:e.name},e.id))]}),n&&(0,o.jsxs)(Dn,{direction:"column",gap:"1",children:[(0,o.jsx)(xn,{font:"gray700 textSm medium",children:t("nouvelle_valeur_39039",n.name)}),(0,o.jsx)(Ik,{campaigns:[],categories:[],change:e.change,customDocuments:[],customField:n,forms:[],name:`${e.field}.value`,slug:n.slug,tags:[],traces:[],value:e.customFieldValues.value}),n.fieldType===K.Select&&n.canSelectMultiple&&(0,o.jsx)(em,{name:`${e.field}.addValues`,children:t("ajouter_les_val_22996")})]})]})},yA=e=>{const t=Yt();return(0,o.jsxs)(o.Fragment,{children:[e.values.map((t,n)=>{const i=`${e.name}[${n}]`;return(0,o.jsxs)(r.Fragment,{children:[0!==n&&(0,o.jsx)(Fd,{height:"3"}),(0,o.jsx)(AA,{change:e.change,customFieldValues:e.values[n],customFields:e.customFields,field:i,index:n,remove:()=>{e.change(e.name,function(e,t){return e.filter((e,n)=>n!==t)}(e.values,n))}})]},n)}),(0,o.jsx)(Fd,{height:"3"}),(0,o.jsxs)(xn,{color:"primary700",css:{cursor:"pointer"},fontWeight:"medium",onClick:()=>{e.change(e.name,e.values.concat([{customFieldId:-1,addValues:!1}]))},children:["+ ",t("ajouter_un_nouv_22370")]})]})},wA=({file:e,onToggle:t,...n})=>{const i=Yt();return(0,o.jsx)(uA,{initialIsOpen:a(n.values)??!1,subtitle:i("d_finissez_dire_31742"),title:i("attribution_d_u_50979"),onToggle:t,children:(0,o.jsx)(yA,{name:"input.presets",...n})})},CA=(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 IA({additionalCategories:e,customFields:t,defaultFields:n,file:i,form:s,modeSelection:c,onToggle:l,requiredFieldSlugs:d,values:u}){const{isLoading:h,columns:m,errors:g}=((e,t)=>{const[n,i]=(0,r.useReducer)(CA,{isLoading:!0,columns:void 0,errors:void 0});return(0,r.useEffect)(()=>{i({type:"LOADING"}),(0,pr.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})(i,{delimiter:u.input.csv.delimiter??void 0,quoteChar:u.input.csv.quoteChar??void 0,newline:u.input.csv.newline??void 0}),p=r.useMemo(()=>{const n=Object.entries((0,lh.A)(t,e=>e.customFieldCategoryId)).map(([e,t])=>{const n=t[0];return{id:n.customFieldCategoryId,name:n.customFieldCategoryName,fields:t}});return e?n.concat(e):n},[e,t]);return h||g?null:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(vA,{categories:p,columns:m,defaultFields:n,modeSelection:c,requiredFieldSlugs:d,values:u.input.mappings}),a(t)&&(0,o.jsx)(wA,{change:s.change,customFields:t,file:i,values:u.input.presets,onToggle:l})]})}const xA=e=>!!e.getFieldState("input.csv.key")?.valid&&!!e.getFieldState("input.csv.file")?.valid,SA=(0,hA.A)(({ImportInputService:e,columns:t,customFields:n})=>t.map(t=>Object.keys(e.IMPORT_COLUMNS_DEFAULT).map(e=>e.toLowerCase()).includes(t.toLowerCase())?e.IMPORT_COLUMNS_DEFAULT[Object.keys(e.IMPORT_COLUMNS_DEFAULT).find(e=>e.toLowerCase()===t.toLowerCase())]:n.find(e=>e.slug.toLowerCase()===t.toLowerCase()||e.name.toLowerCase()===t.toLowerCase())?.slug??null)),EA=(e,t)=>e.IMPORT_COLUMNS_REQUIRED(t.mode).every(e=>t.mappings.includes(e)),jA=(e,t,n)=>t.formatListValues(e.IMPORT_COLUMNS_REQUIRED(n.mode).filter(e=>!n.mappings.includes(e)),"conjunction"),TA=({ImportInputService:e,additionalCategories:t,centeredContainerRef:n,closePath:i,createUpdateKey:s,customFields:a,form:c,handleSubmit:l,importTagPrefix:d,isTagInputDisabled:u=!1,itemName:h,localStorageKeyPrefix:m,showModeSelection:g=!0,submitting:p,title:f,values:_})=>{const{params:{organizationId:b},translate:k}=Id(),v=nu(),A=Kt(Wt),y=r.useRef(null),w=()=>xi.c9.now().toFormat(Oi),C=()=>(c.change("input.tag",`${d}-csv-${w()}`),setInterval(()=>c.change("input.tag",`${d}-csv-${w()}`),1e3)),I=()=>clearInterval(y.current);r.useEffect(()=>(y.current=C(),()=>I()),[y]);const x=r.useCallback(t=>{c.change("input.tag",`${d}-csv-${xi.c9.now().toFormat(Oi)}`),(0,pr.parse)(t,{delimiter:_.input.csv.delimiter,preview:1,newline:_.input.csv.newline,quoteChar:_.input.csv.quoteChar,complete:({data:t,errors:n})=>{let i;if(!n.length){const n=t[0],o=SA({ImportInputService:e,columns:n,customFields:a});try{i=JSON.parse(localStorage.getItem(du[`${m}_MAPPINGS`])??"{}")}catch(e){console.debug(`LocalStorage not available: ${e.toString()}`)}c.change("input.mappings",n.map((e,t)=>void 0!==i[e]?i[e]:o[t]))}}});try{c.change("input.presets",JSON.parse(localStorage.getItem(du[`${m}_PRESETS`](b))??"[]")),g&&c.change("input.mode",localStorage.getItem(du[`${m}_MODE`])??ne.CreateUpdate)}catch(e){console.debug(`LocalStorage not available: ${e.toString()}`)}},[a,c,_]);return(0,o.jsx)(km,{button:(0,o.jsxs)(tp,{children:[(0,o.jsx)(op,{children:(0,o.jsx)(Un,{disabled:!(_.input.csv.file&&EA(e,_.input)),isLoading:p,onClick:()=>{I(),l()},children:k("importer_la_lis_12866")})}),(!_.input.csv.file||!EA(e,_.input))&&(0,o.jsx)(ip,{placement:"top",children:_.input.csv.file?k("you_have_not_ma_46806",jA(e,A,_.input)):k("the_file_is_emp_77243")})]}),category:f,color:"dark",fallbackClosePath:i,title:k("nouvel_import_48306"),children:(0,o.jsxs)(Tk,{ref:n,children:[c.getState().submitSucceeded&&(0,o.jsx)(gA,{}),(0,o.jsx)(Kd,{errorId:v.errorId}),(0,o.jsxs)(Dn,{direction:"column",gap:"5",children:[(0,o.jsx)(mA,{formats:_.input.csv.formats,file:_.input.csv.file,ids:v,localStorageKeyPrefix:m,onChange:x}),_.input.csv?.file&&xA(c)&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(IA,{additionalCategories:t,customFields:a,defaultFields:e.IMPORT_COLUMNS_DEFAULT,file:_.input.csv.file,form:c,modeSelection:g?(0,o.jsx)(o.Fragment,{children:_.input.mode&&(0,o.jsxs)(Dn,{direction:"column",gap:"2",children:[(0,o.jsx)(xn,{color:"gray800",fontWeight:"medium",children:k("que_souhaitez_v_33936")}),(0,o.jsx)(Fk,{name:"input.mode",value:ne.Create,children:k("add_one_1_per_91911",h?.singular,s?.name)}),(0,o.jsx)(Fk,{name:"input.mode",value:ne.CreateUpdate,children:k("add_one_1_per_73704",h?.singular,s?.name)}),(0,o.jsx)(Fk,{name:"input.mode",value:ne.Update,children:k("do_not_add_any_50401",h?.plural)})]})}):void 0,requiredFieldSlugs:e.IMPORT_COLUMNS_REQUIRED(_.input.mode),values:_,onToggle:e=>{if(!_.input.csv.file)throw new Error("No file in input!");try{e?c.change("input.presets",JSON.parse(localStorage.getItem(du[`${m}_PRESETS`](b))??"[]")):c.change("input.presets",[])}catch(e){console.debug(`LocalStorage not available: ${e.toString()}`)}}}),(0,o.jsxs)(uA,{hideToggle:!0,initialIsOpen:!0,subtitle:k(u?"your_imported_i_20879":"by_default_you_75833"),title:k("identify_your_i_87636"),children:[(0,o.jsx)(lu,{label:k("your_import_tag_41852"),name:"input.tag",state:"disabled"}),!u&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fd,{height:2}),(0,o.jsx)(cu,{label:k("specify_an_impo_41868"),onChange:e=>{an(e)?(y.current&&I(),c.change("input.tag",`${d}-csv-${e}`)):(c.change("input.tag",`${d}-csv-${w()}`),y.current=C())}})]})]})]})]})]})})},DA=({checkImport:e,mutate:t,...n})=>{const{params:{organizationId:i,eventId:s,delegationId:a},translate:c}=Id(),l=Kt(Wt),{data:d,loader:u}=go({organizationId:i}),h=tn(),m=Kt(n.ImportInputService),g=Kt(wc),p=r.useRef(null),f=r.useMemo(()=>{try{const e={dateFormat:d.organization.dateFormat,datetimeFormat:d.organization.datetimeFormat,timeFormat:d.organization.timeFormat},t=JSON.parse(h.getItem(du[`${n.localStorageKeyPrefix}_FORMATS`])??"{}");return{...e,...t}}catch{return null}},[d.organization]);return u||(0,o.jsx)(Xd,{customErrorRef:p,height:1,initialValues:{input:m.default(f).input},mutators:{setValue:([e,t],n,{changeValue:i})=>i(n,e,()=>t)},render:({form:e,handleSubmit:t,submitting:i,values:r})=>(0,o.jsx)(TA,{centeredContainerRef:p,form:e,handleSubmit:t,submitting:i,values:r,...n}),validate:g.validateForForm(m.schema()),onSubmit:async({input:o})=>{if(!EA(n.ImportInputService,o))return{[yc.Ym]:c("you_have_not_ma_46806",jA(n.ImportInputService,l,o))};(e=>{const t=e.csv.file;if(!t)throw new Error("No file in input!");(0,pr.parse)(t,{delimiter:e.csv.delimiter,preview:1,newline:e.csv.newline,quoteChar:e.csv.quoteChar,complete:({data:t,errors:i})=>{if(!i.length)try{const i=t[0],o=SA({ImportInputService:n.ImportInputService,columns:i,customFields:n.customFields}),r=JSON.parse(h.getItem(du[`${n.localStorageKeyPrefix}_MAPPINGS`])??"{}"),s={};for(const[t,n]of e.mappings.entries()){const e=i[t];n?s[e]=n:delete r[e],an(o[t])&&!s[e]&&(s[e]=null)}h.setItem(du[`${n.localStorageKeyPrefix}_MAPPINGS`],JSON.stringify({...r,...s}))}catch(e){console.debug(`LocalStorage not available: ${e.toString()}`)}}});try{const t=JSON.parse(h.getItem(du[`${n.localStorageKeyPrefix}_PRESETS`](i))??"[]");h.setItem(du[`${n.localStorageKeyPrefix}_PRESETS`](i),JSON.stringify([...new Map([...t,...e.presets].map(e=>[e.customFieldId,e])).values()])),h.setItem(du[`${n.localStorageKeyPrefix}_FORMATS`],JSON.stringify(e.csv.formats?Object.fromEntries(Object.entries(e.csv.formats).filter(([e,t])=>an(t))):{})),n.showModeSelection&&h.setItem(du[`${n.localStorageKeyPrefix}_MODE`],e.mode)}catch(e){console.debug(`LocalStorage not available: ${e.toString()}`)}})(o);const r=(e=>{const t={...e.csv};return delete t.file,{...e,csv:t}})(o);try{const{jobId:n}=await t({organizationId:i,eventId:s,delegationId:a,input:r});p.current&&(p.current.scrollTop=0),e(i,n)}catch{}}})},PA=()=>{const{params:{organizationId:e,eventId:t,delegationId:n},translate:i}=Id(),{data:s,loader:a}=Jt("query DelegationImportInfos($organizationId: OrganizationId!, $delegationId: DelegationId!) {\n organization: organizationPublic(id: $organizationId) {\n delegation(id: $delegationId) {\n form {\n elements {\n elementType\n customField {\n ...CustomFieldImport\n }\n }\n }\n }\n }\n}\n",{organizationId:e,delegationId:n},[ji.CustomFieldImportFragment]),{mutate:c}=function(e={}){return Xt("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:l}=r.useContext(dl),d=(0,r.useCallback)((e,t)=>l(e,n,t),[l,t]),u=(0,r.useMemo)(()=>(s.organization?.delegation.form.elements??[]).flatMap(e=>e.elementType===J.Field?[e.customField]:[]),[s.organization]);return a||(0,o.jsx)(DA,{ImportInputService:Ks,checkImport:d,closePath:dc.DELEGATION_MEMBERS({organizationId:e,eventId:t,delegationId:n}),customFields:u,importTagPrefix:`delegation-${n}`,isTagInputDisabled:!0,itemName:{singular:i("membre_53723"),plural:i("membres_67337")},localStorageKeyPrefix:"DELEGATION_MEMBERS_IMPORT",mutate:c,showModeSelection:!1,title:i("import_de_membr_48618")})},RA=e=>(0,o.jsxs)(Dn,{css:{bd:!0,padding:"$6",background:"$white"},direction:"column",children:[e.title&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(xn,{font:"gray800 textMd semiBold",children:e.title}),(0,o.jsx)(Fd,{height:"5"})]}),e.children]}),OA=e=>{const{translate:t}=Id();return(0,o.jsx)(RA,{title:(0,o.jsxs)(Dn,{justify:"between",width:1,children:[(0,o.jsx)(xn,{children:t("invit_n_1_57041",e.index+1)}),e.showRemove&&(0,o.jsx)(Un,{color:"white",leftIcon:"trash-can",size:"sm",onClick:e.onRemove})]}),children:(0,o.jsxs)(Dn,{direction:"column",gap:"4",width:1,children:[(0,o.jsx)(lu,{isEmail:!0,label:t("Email"),name:`${e.prefix}email`}),(0,o.jsxs)(Dn,{gap:"4",children:[(0,o.jsx)(lu,{label:(0,o.jsx)(Hh,{children:t("pr_nom_66988")}),name:`${e.prefix}fields.firstName`}),(0,o.jsx)(lu,{label:(0,o.jsx)(Hh,{children:t("Name")}),name:`${e.prefix}fields.lastName`})]})]})})},FA=()=>{const{history:e,translate:t,params:{organizationId:n,eventId:i,delegationId:r}}=Id(),s=Kt(Sr),{mutate:a}=function(e={}){return Xt("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)}(),c=()=>{e.goBack(dc.DELEGATION_DASHBOARD({organizationId:n,eventId:i,delegationId:r}))};return(0,o.jsxs)(Dn,{direction:"column",gap:"7",children:[(0,o.jsx)(Un,{color:"invisible",leftIcon:"arrow-left",onClick:c,children:t("retour_92202")}),(0,o.jsx)(xn,{font:"gray800 textLg bold",children:t("envoyer_le_lien_38138")}),(0,o.jsx)(Xd,{direction:"column",gap:"6",hideDefaultErrors:!0,initialValues:s.delegationFormInviteValuesDefault(),render:({handleSubmit:e,submitting:n})=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Kd,{hideSpacer:!0}),(0,o.jsx)(yp.ED,{name:"usersInfos",children:({fields:e})=>(0,o.jsxs)(o.Fragment,{children:[e.map((t,n)=>(0,o.jsx)(OA,{index:n,prefix:`${t}.`,showRemove:(e?.length??0)>1,onRemove:()=>e.remove(n)},n)),(0,o.jsx)(Un,{color:"invisible",leftIcon:"plus",onClick:()=>{e.push({email:"",fields:{firstName:"",lastName:""}})},children:t("ajouter_un_invi_90855")})]})}),(0,o.jsx)(Dn,{children:(0,o.jsx)(Un,{isLoading:n,onClick:e,children:t("envoyer_le_lien_38138")})})]}),schema:s.delegationFormInviteValuesSchema(),onSubmit:async e=>{await a({organizationId:n,eventId:i,delegationId:r,usersInfos:e.usersInfos}),c()}})]})},zA=e=>{const{translate:t,params:{organizationId:n,eventId:i}}=Id(),s=(0,r.useMemo)(()=>i&&e.form.slotDisplay!==we.Hide,[e.form,i]),c=(0,r.useMemo)(()=>i&&e.form.positionDisplay!==Ae.None,[e.form,i]),l=(0,r.useMemo)(()=>i&&(e.form.accreditationDisplay!==ke.None||a(e.delegationAccreditations)),[e.delegationAccreditations,e.form,i]);return(0,o.jsxs)(o.Fragment,{children:[e.showEmail&&(0,o.jsxs)(RA,{children:[an(e.form.description)&&(0,o.jsx)(Ig,{text:e.form.description}),(0,o.jsx)(lu,{isEmail:!0,label:t("Email"),name:"email"})]}),(0,o.jsx)(RA,{title:an(e.form.informationTitle)?e.form.informationTitle:t("informations_pe_37892"),children:(0,o.jsx)(Gg,{change:e.change,elements:e.form.elements,organizationId:n,prefix:"formRegister.userInfo.fields.",values:e.values.formRegister.userInfo.fields})}),s&&e.event&&(0,o.jsxs)(RA,{title:an(e.form.slotTitle)?e.form.slotTitle:t("disponibilit_s_49923"),children:[an(e.form.slotSubtitle)&&(0,o.jsx)(Ig,{text:e.form.slotSubtitle}),(0,o.jsx)(xp,{blockedSlots:e.blockedSlots,change:e.change,currentSlots:e.values.formRegister.slots,customSlotsPeriods:e.form.customSlotsPeriods,daysDisplay:e.form.daysDisplay,event:e.event,prefix:"formRegister.",slotDisplay:e.form.slotDisplay})]}),c&&e.event&&(0,o.jsxs)(RA,{title:an(e.form.positionTitle)?e.form.positionTitle:t("missions_souhai_23225"),children:[an(e.form.positionSubtitle)&&(0,o.jsx)(Ig,{text:e.form.positionSubtitle}),(0,o.jsx)(lp,{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:e.values.formRegister.userInfo.fields})]}),l&&e.event&&(0,o.jsx)(o.Fragment,{children:(0,o.jsxs)(RA,{title:an(e.form.accreditationTitle)?e.form.accreditationTitle:t("accr_ditations_74375"),children:[an(e.form.accreditationSubtitle)&&(0,o.jsx)(Ig,{text:e.form.accreditationSubtitle}),(0,o.jsx)(Ng,{accreditationsSlotsIds:e.values.formRegister.accreditationsSlotsIds,change:e.change,delegationAccreditations:e.delegationAccreditations??[],displayFormCustomFields:!0,event:e.event,options:e.form,prefix:"formRegister.",showAutoAccredit:e.showAutoAccredit,slots:e.values.formRegister.slots,userInfosFields:e.values.formRegister.userInfo.fields})]})})]})},MA=e=>{const{params:{organizationId:t,eventId:n,formId:i,delegationId:s},translate:a}=Id(),{data:c,loader:l}=Jt("query MemberCreateUpdate($organizationId: OrganizationId!, $eventId: EventId, $formId: FormId!) {\n organization(id: $organizationId) {\n event: eventMaybe(id: $eventId) {\n startAt\n endAt\n ranges(formId: $formId)\n country\n\n accreditationsCategories {\n ...FormRegisterAccreditationCategory\n }\n\n positionsCategories {\n ...FormRegisterCategory\n }\n }\n }\n}\n",{organizationId:t,eventId:n,formId:i},[ji.FormRegisterAccreditationCategoryFragment,ji.FormRegisterCategoryFragment]),d=Kt(wc),u=Kt(As),h=r.useRef(null),m=e.form,g=r.useMemo(()=>m.elements.filter(e=>e.elementType===J.Field),[m.elements]),p=r.useCallback(t=>d.validateForForm(u.formRegisterSchema(g,m.slotDisplay,e.event?.startAt??xi.c9.now(),e.event?.endAt??xi.c9.now(),m.positionRanking,m.positionDisplay,m.accreditationDisplay,s))(t),[g,m,s,e.event]);return l||(0,o.jsxs)(Dn,{ref:h,direction:"column",gap:"7",children:[(0,o.jsx)(Un,{color:"invisible",leftIcon:"arrow-left",onClick:()=>e.handleRedirect(),children:a("retour_92202")}),e.header,(0,o.jsx)(Xd,{customErrorRef:h,direction:"column",gap:"6",initialValues:e.initialValues,render:({form:{change:t},submitting:n,values:i,handleSubmit:r})=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Kd,{featureFlags:e.featureFlags,hideSpacer:!0}),(0,o.jsx)(zA,{blockedSlots:e.blockedSlots,change:t,delegationAccreditations:e.delegationAccreditations,event:c.organization.event,form:e.form,showAutoAccredit:!1,showEmail:e.showEmail,values:i}),(0,o.jsxs)(Dn,{gap:"4",children:[(0,o.jsx)(Un,{isLoading:n,onClick:r,children:e.isUpdate?a("update_84647"):a("cr_er_le_membre_78743")}),(0,o.jsx)(Un,{color:"white",onClick:()=>e.handleRedirect(),children:a("annuler_48254")})]})]}),validate:p,width:1,onSubmit:async t=>{await e.mutate(t.email,t.formRegister),e.reload(),e.handleRedirect()}})]})},$A=e=>{const{params:{organizationId:t,eventId:n,delegationId:i},translate:s}=Id(),a=Kt(As),{mutate:c}=_o(),{data:l,loader:d}=Jt("query MemberCreate($organizationId: OrganizationId!, $eventId: EventId) {\n organization: organizationPublic(id: $organizationId) {\n country\n\n event(id: $eventId) {\n startAt\n endAt\n country\n\n accreditationsCategories {\n ...FormRegisterAccreditationCategory\n }\n\n positionsCategories {\n ...FormRegisterCategory\n }\n }\n }\n}\n",{organizationId:t,eventId:n},[ji.FormRegisterAccreditationCategoryFragment,ji.FormRegisterCategoryFragment]),u=r.useMemo(()=>l.organization?{email:"",formRegister:a.formRegisterInputDefault(Q.DelegationsSpace,null,e.customFields,{countryCode:e.country,delegationAccreditations:e.delegationAccreditations,eventStartDate:e.event?.startAt,forOther:!0,sendNotificationEmail:!1,slotDisplay:e.form.slotDisplay,team:null})}:{},[l.organization,e.customFields]),h=r.useCallback((n,o)=>c({organizationId:t,eventId:e.eventId,delegationId:i,formId:e.form.id,email:n,formRegister:o}),[l.organization]);return d||(0,o.jsx)(MA,{delegationAccreditations:e.delegationAccreditations,event:e.event,form:e.form,handleRedirect:e.handleRedirect,header:(0,o.jsx)(xn,{font:"gray800 textLg bold",children:s("cr_ation_d_un_m_98624")}),initialValues:u,isUpdate:!1,mutate:h,reload:e.reload,showEmail:e.showEmail})},NA=e=>{const{params:{organizationId:t,eventId:n,delegationId:i,formId:s,userInfoId:a},translate:c}=Id(),l=Kt(As),{data:d,loader:u}=Jt("query MemberUpdate(\n $organizationId: OrganizationId!\n $eventId: EventId\n $formId: FormId!\n $userInfoId: UsersInfoId!\n) {\n organization(id: $organizationId) {\n event: eventMaybe(id: $eventId) {\n startAt\n endAt\n }\n\n userInfo(id: $userInfoId) {\n id\n email\n name\n picture {\n url\n }\n fields\n userId\n\n formUserInfo(formId: $formId) {\n positionsCategoriesIds\n positionsIds\n positionsSlotsIds\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 id\n name\n description\n daysDisplay\n positionTitle\n positionSubtitle\n slotTitle\n slotSubtitle\n accreditationTitle\n accreditationSubtitle\n informationTitle\n registerButtonText\n\n ...FormMissionsOptions\n ...FormAccreditationsOptions\n\n elements {\n ...FormElementDisplay\n }\n\n customSlotsPeriods {\n ...FormRegisterCustomSlotPeriod\n }\n }\n }\n }\n }\n}\n",{organizationId:t,eventId:n,formId:s,userInfoId:a},[ji.FormMissionsOptionsFragment,ji.FormAccreditationsOptionsFragment,ji.FormElementDisplayFragment,ji.FormRegisterCustomSlotPeriodFragment]),{mutate:h}=function(e={}){return Xt("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)}(),{mutate:m}=function(e={}){return Xt("mutation UserInfoUpdate(\n $organizationId: OrganizationId!\n $eventId: EventId\n $delegationId: DelegationId\n $userId: UserId!\n $userInfo: UsersInfoInput!\n $filledFormsIds: [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 ) {\n id\n }\n}\n",e)}(),{mutate:g}=function(e={}){return Xt("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:p}=function(e={}){return Xt("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:f}=function(e={}){return Xt("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)}(),_=r.useMemo(()=>{const t=(e.form.elements??[]).flatMap(e=>e.elementType===J.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]),b=r.useMemo(()=>{if(d.organization){const t=d.organization.userInfo;return{email:t.email,formRegister:{...l.formRegisterInputDefault(Q.DelegationsSpace,t,_,{countryCode:e.country,eventStartDate:e.event?.startAt,forOther:!0,sendNotificationEmail:!1,slotDisplay:e.form.slotDisplay,team:null}),positionsSlotsIds:t.formUserInfo.positionsSlotsIds,positionsIds:t.formUserInfo.positionsIds,positionsCategoriesIds:t.formUserInfo.positionsCategoriesIds,accreditationsSlotsIds:t.formUserInfo.accreditationsSlotsIds.concat(e.delegationAccreditations?.filter(e=>e.isDefault).map(e=>e.accreditationSlotId)??[]),slots:t.formUserInfo.slots.map(e=>({startDate:e.startDate,startTime:e.startTime,endDate:e.endDate,endTime:e.endTime}))}}}return{}},[d.organization?.userInfo,e.country,e.form,e.event,_]),k=r.useCallback(async(o,r)=>!d.organization||(o!==d.organization.userInfo.email&&await h({organizationId:t,eventId:n,delegationId:i,userInfoId:a,email:o}),await m({organizationId:t,eventId:n,delegationId:i,userId:d.organization.userInfo.userId,userInfo:r.userInfo}),n&&e.form.slotDisplay!==we.Hide&&await g({eventId:n,delegationId:i,userId:d.organization.userInfo.userId,userInfoId:a,userInfoSlots:[{formId:s,slots:r.slots}]}),n&&e.form.positionDisplay!==Ae.None&&await p({eventId:n,delegationId:i,userId:d.organization.userInfo.userId,userInfoId:a,userInfoPositions:[{formId:s,positionsCategoriesIds:r.positionsCategoriesIds,positionsIds:r.positionsIds,positionsSlotsIds:r.positionsSlotsIds}]}),n&&await f({eventId:n,delegationId:i,userId:d.organization.userInfo.userId,userInfoId:a,userInfoAccreditations:[{formId:s,accreditationsSlotsIds:r.accreditationsSlotsIds}]}),!0),[d.organization,e.form]);return u||(0,o.jsx)(MA,{blockedSlots:e.blockedSlots,delegationAccreditations:e.delegationAccreditations,event:d.organization.event,featureFlags:e.featureFlags,form:e.form,handleRedirect:e.handleRedirect,header:(0,o.jsx)(RA,{children:(0,o.jsxs)(Dn,{align:"center",gap:"3",children:[(0,o.jsx)(f_,{email:d.organization.userInfo.email,image:d.organization.userInfo.picture?.url,name:d.organization.userInfo.name,size:64}),(0,o.jsxs)(Dn,{direction:"column",gap:"1",children:[(0,o.jsx)(xn,{font:"gray500 textXs medium",children:c("mise_jour_des_00596")}),(0,o.jsx)(xn,{font:"gray800 textXl bold",children:d.organization.userInfo.name})]})]})}),initialValues:b,isUpdate:!0,mutate:k,reload:e.reload,showEmail:e.showEmail,userInfo:d.organization.userInfo})},BA=e=>{const{history:t,params:{organizationId:n,eventId:i,delegationId:s,formId:a}}=Id(),{data:c,loader:l}=Jt("query DelegationsSpaceCreateMember(\n $organizationId: OrganizationId!\n $eventId: EventId\n $delegationId: DelegationId!\n $formId: FormId!\n) {\n organization: organizationPublic(id: $organizationId) {\n ...OrganizationDelegationsSpace\n\n delegation(id: $delegationId) {\n eventId\n\n accreditationsSlots(onlyVisible: true) {\n ...DelegationAccreditationSlot\n }\n\n form {\n ...CreateUpdateMemberForm\n }\n }\n\n event(id: $eventId) {\n startAt\n endAt\n ranges(formId: $formId, delegationId: $delegationId)\n country\n\n accreditationsCategories {\n ...FormRegisterAccreditationCategory\n }\n\n positionsCategories {\n ...FormRegisterCategory\n }\n }\n }\n}\n",{organizationId:n,eventId:i,delegationId:s,formId:a},[ji.OrganizationDelegationsSpaceFragment,ji.DelegationAccreditationSlotFragment,ji.CreateUpdateMemberFormFragment,ji.FormRegisterAccreditationCategoryFragment,ji.FormRegisterCategoryFragment]),d=(0,r.useMemo)(()=>(c.organization?.delegation.form.elements??[]).flatMap(e=>e.elementType===J.Field?[e.customField]:[]),[c.organization]);return l||(0,o.jsx)($A,{customFields:d,delegationAccreditations:c.organization.delegation.accreditationsSlots,event:c.organization.event,eventId:c.organization.delegation.eventId,form:c.organization.delegation.form,handleRedirect:(e=!1)=>e?t.goBack(dc.DELEGATION({organizationId:n,eventId:i,delegationId:s})):t.push(dc.DELEGATION({organizationId:n,eventId:i,delegationId:s})),reload:e.reload,showEmail:!0})},LA=e=>{const{history:t,params:{organizationId:n,eventId:i,delegationId:r,formId:s}}=Id(),{data:a,loader:c}=Jt("query DelegationsSpaceUpdateMember(\n $organizationId: OrganizationId!\n $eventId: EventId\n $delegationId: DelegationId!\n $formId: FormId!\n) {\n organizationPublic(id: $organizationId) {\n ...OrganizationDelegationsSpace\n country\n\n delegation(id: $delegationId) {\n eventId\n\n accreditationsSlots(onlyVisible: true) {\n ...DelegationAccreditationSlot\n }\n\n form {\n ...CreateUpdateMemberForm\n }\n }\n\n event(id: $eventId) {\n startAt\n endAt\n ranges(formId: $formId)\n country\n\n accreditationsCategories {\n ...FormRegisterAccreditationCategory\n }\n\n positionsCategories {\n ...FormRegisterCategory\n }\n }\n }\n}\n",{organizationId:n,eventId:i,delegationId:r,formId:s},[ji.OrganizationDelegationsSpaceFragment,ji.DelegationAccreditationSlotFragment,ji.CreateUpdateMemberFormFragment,ji.FormRegisterAccreditationCategoryFragment,ji.FormRegisterCategoryFragment]);return c||(0,o.jsx)(NA,{country:a.organizationPublic.event?.country??a.organizationPublic.country,delegationAccreditations:a.organizationPublic.delegation.accreditationsSlots,event:a.organizationPublic.event,form:a.organizationPublic.delegation.form,handleRedirect:(e=!1)=>e?t.goBack(dc.DELEGATION({organizationId:n,eventId:i,delegationId:r})):t.push(dc.DELEGATION({organizationId:n,eventId:i,delegationId:r})),reload:e.reload,showEmail:!0})},VA=({inputName:e})=>{const t=Yt(),n=yg();return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(Dn,{css:{gap:"$6","@tablet":{gap:"$4","> *":{flexGrow:1,width:"auto"}}},wrap:"wrap",children:[(0,o.jsx)(lu,{autoComplete:"given-name",label:t("pr_nom_66988"),name:`${e}fields.firstName`}),(0,o.jsx)(lu,{autoComplete:"family-name",label:t("last_name"),name:`${e}fields.lastName`})]}),(0,o.jsx)(Fd,{height:"6"}),(0,o.jsx)(lu,{autoComplete:"email",isEmail:!0,label:t("e_mail_13869"),name:`${e}email`}),(0,o.jsx)(Fd,{height:"6"}),(0,o.jsx)(kg,{autoComplete:"language",label:t("Language"),name:`${e}fields.language`,children:n(Wr)}),(0,o.jsx)(Fd,{height:"6"}),(0,o.jsx)(ng,{label:t("Phone"),prefix:`${e}fields.phone.`})]})},UA=()=>{const{history:e,translate:t,params:{organizationId:n,eventId:i,delegationId:r}}=Id(),{data:s,loader:a}=Jt("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},[]),c=Kt(bs),l=Kt(wc),{mutate:d,isLoading:u}=function(e={}){return Xt("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:h}=Ro(),m=dc.DELEGATION({organizationId:n,eventId:i,delegationId:r}),g=(t=!1)=>t?e.goBack(m):e.push(m);return a||(0,o.jsx)(Xd,{direction:"column",height:1,initialValues:{userInfo:c.userInfoProfileInputDefault(s.user)},render:({handleSubmit:e})=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Un,{color:"invisible",leftIcon:"arrow-left",onClick:()=>g(!0),children:t("retour_92202")}),(0,o.jsx)(Fd,{height:"4"}),(0,o.jsx)(xn,{font:"gray800 textLg bold",children:t("mise_jour_du_49930")}),(0,o.jsx)(Fd,{height:"6"}),(0,o.jsx)(Kd,{}),(0,o.jsx)(zm,{accept:ym.Images,acl:"public-read",allowCrop:!0,label:t("photo_de_profil_08618"),organizationId:n,prefix:"userInfo.fields.picture."}),(0,o.jsx)(Fd,{height:"6"}),(0,o.jsx)(VA,{inputName:"userInfo."}),(0,o.jsx)(Fd,{height:"6"}),(0,o.jsxs)(Dn,{gap:"4",children:[(0,o.jsx)(Un,{isLoading:u,onClick:e,children:t("enregistrer_les_30411")}),(0,o.jsx)(Un,{color:"white",onClick:()=>g(!0),children:t("annuler_48254")})]})]}),validate:l.validateForForm(c.updateProfileSchema()),width:1,onSubmit:async e=>{const{userProfileUpdate:{email:t,language:n}}=await d({userId:h.id,userInfoId:s.user.userInfo.id,userInfo:e.userInfo});h.email!==t||h.language!==n?no():g()}})},GA=()=>{const{translate:e,params:{organizationId:t,eventId:n,delegationId:i}}=Id(),{data:s,loader:c,reload:l}=Jt('query DelegationsSpaceDelegation(\n $delegationId: DelegationId!\n $organizationId: OrganizationId!\n $eventId: EventId\n) {\n organization(id: $organizationId) {\n ...OrganizationDelegationsSpace\n ...OrganizationCustomFields\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 canLeadersEditColumns\n canLeadersImportMembers\n canLeadersSeeHiddenAccreditationsSlots\n\n campaigns {\n id\n name\n }\n\n customDocuments {\n slug\n name\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:i,organizationId:t,eventId:n},[ji.OrganizationDelegationsSpaceFragment,ji.OrganizationCustomFieldsFragment,ji.UserPermissionsFragment,ji.MemberRegistrationUserInfoFragment]),d=(0,r.useMemo)(()=>{const e=s.organization?.delegations.nodes??[];return(0,o.jsx)(Bv,{delegations:e})},[s.organization]),u=(0,r.useMemo)(()=>!!s.organization?.delegation&&s.organization.delegation.canLeadersDeleteMembers&&s.organization.delegation.state!==R.Locked,[s.organization]),h=(0,r.useMemo)(()=>!!s.organization?.delegation&&s.organization.delegation.canLeadersEditMembers&&s.organization.delegation.state!==R.Locked,[s.organization]),m=(0,r.useCallback)(e=>e===Bc.AccreditationsMatrix&&h,[h]),g=(0,r.useMemo)(()=>(s.organization?.delegation.numberOfDelegationsAccreditationsSlots??0)>0,[s.organization]),p=(0,r.useMemo)(()=>s.organization?.allowDelegationSpaceDownload||a(s.organization?.delegation.customDocuments??[]),[s.organization]),f=(0,r.useMemo)(()=>(s.organization?.delegationsSpaceCustomBadges??[]).concat(s.organization?.delegation.customDocuments.map(e=>e.slug)??[]),[s.organization]),_=(0,r.useMemo)(()=>s.organization?.delegation.event?.customDocuments??[],[s.organization]),b=e=>({organizationId:e?":organizationId":t,eventId:n?e?":eventId":n:void 0,delegationId:e?":delegationId":i}),{tabMembers:k,tabAccreditations:v}=jr(t);return(0,r.useEffect)(()=>{const e=s.organization?.delegation?.event?.name??s.organization?.name??"Recrewteer";document.title=(0,Go.A)([e,s.organization?.delegation?.name]).join(" - ")},[s.organization]),c||(0,o.jsx)(Ov,{userPermissions:s.user,children:(0,o.jsxs)($o.dO,{children:[(0,o.jsx)($o.qh,{path:[dc.DELEGATION_MEMBERS_IMPORT({organizationId:":organizationId",delegationId:":delegationId",eventId:":eventId"}),dc.DELEGATION_MEMBERS_IMPORT({organizationId:":organizationId",delegationId:":delegationId"})],children:(0,o.jsx)(PA,{})}),(0,o.jsx)($o.qh,{children:(0,o.jsx)($v,{extraItems:d,isLoading:!1,organization:s.organization,spaceDesign:{themeColors:s.organization?.delegationsSpaceDesign?.colors,bannerSrc:s.organization?.delegationsSpaceDesign?.banner?.url,logoSrc:s.organization?.delegationsSpaceDesign?.logo?.url},userInfo:s.user.userInfo,children:(0,o.jsxs)($o.dO,{children:[(0,o.jsx)($o.qh,{exact:!0,path:[dc.DELEGATION({organizationId:":organizationId",delegationId:":delegationId"}),dc.DELEGATION({organizationId:":organizationId",eventId:":eventId",delegationId:":delegationId"})],children:(0,o.jsx)(oA,{})}),(0,o.jsx)($o.qh,{path:[dc.MEMBERS_INVITE({organizationId:":organizationId",delegationId:":delegationId"}),dc.MEMBERS_INVITE({organizationId:":organizationId",eventId:":eventId",delegationId:":delegationId"})],children:(0,o.jsx)(FA,{})}),(0,o.jsx)($o.qh,{path:[dc.MEMBER_EDIT({organizationId:":organizationId",delegationId:":delegationId",userInfoId:":userInfoId",formId:":formId"}),dc.MEMBER_EDIT({organizationId:":organizationId",eventId:":eventId",delegationId:":delegationId",userInfoId:":userInfoId",formId:":formId"})],children:(0,o.jsx)(LA,{reload:l})}),(0,o.jsx)($o.qh,{path:[dc.MEMBER_CREATE({organizationId:":organizationId",delegationId:":delegationId",formId:":formId"}),dc.MEMBER_CREATE({organizationId:":organizationId",eventId:":eventId",delegationId:":delegationId",formId:":formId"})],children:(0,o.jsx)(BA,{reload:l})}),(0,o.jsx)($o.qh,{path:[dc.DELEGATION_PROFILE({organizationId:":organizationId",delegationId:":delegationId"}),dc.DELEGATION_PROFILE({organizationId:":organizationId",eventId:":eventId",delegationId:":delegationId"})],children:(0,o.jsx)(UA,{})}),(0,o.jsx)($o.qh,{path:[dc.FIELDS_EDIT({organizationId:":organizationId",delegationId:":delegationId"}),dc.FIELDS_EDIT({organizationId:":organizationId",eventId:":eventId",delegationId:":delegationId"})],children:(0,o.jsx)(Vv,{})}),(0,o.jsx)($o.qh,{children:(0,o.jsxs)(Dn,{direction:"column",gap:"6",children:[(0,o.jsx)(dA,{delegation:s.organization.delegation,name:Su(t)?`${s.user.userInfo.firstName} ${s.user.userInfo.lastName}`:s.user.userInfo.firstName}),(0,o.jsx)(Dn,{direction:"column",children:(0,o.jsxs)(hf,{children:[(0,o.jsx)(mf,{getPath:(e=!1)=>dc.DELEGATION_DASHBOARD(b(e)),title:e("tableau_de_bord_24627"),children:(0,o.jsx)(iA,{})}),(0,o.jsx)(mf,{getPath:(e=!1)=>dc.DELEGATION_MEMBERS(b(e)),title:e(k,s.organization.delegation.numberOfResources),children:n?(0,o.jsx)(nv,{campaigns:s.organization.delegation.campaigns,canAccredit:!1,canClickMemberName:!1,canDeleteMembers:u,canEditColumns:s.organization.delegation.canLeadersEditColumns,canEditMembers:h,columns:s.organization.delegation.columns,customBadges:f,customFieldsPrivacy:I.Public,deleteFromEvent:!0,getEditPath:e=>dc.MEMBER_EDIT({delegationId:i,eventId:n,organizationId:t,userInfoId:e.userInfo.id,formId:s.organization.delegation.formId}),onlyVisibleAccreditationsSlots:!s.organization.delegation.canLeadersSeeHiddenAccreditationsSlots,showAccreditationsEdit:!1,showAccreditationsValidate:!1,showDeleteFromEvent:!1,showDocumentsDownload:p,showEditMode:m}):(0,o.jsx)(rv,{campaigns:s.organization.delegation.campaigns,canClickMemberName:!1,canDeleteMembers:u,canEditColumns:s.organization.delegation.canLeadersEditColumns,canEditMembers:h,columns:s.organization.delegation.columns,customBadges:f,getEditPath:e=>dc.MEMBER_EDIT({delegationId:i,organizationId:t,userInfoId:e.id,formId:s.organization.delegation.formId}),isOrganizationAdmin:!1,showDocumentsDownload:p})}),n&&g&&(0,o.jsx)(mf,{getPath:(e=!1)=>dc.DELEGATION_ACCREDITATIONS(b(e)),title:e(v),children:(0,o.jsx)(xv,{onlyVisible:!s.organization.delegation.canLeadersSeeHiddenAccreditationsSlots})}),n&&p&&(0,o.jsx)(mf,{getPath:(e=!1)=>dc.DELEGATION_DOCUMENTS(b(e)),title:e("Documents"),children:(0,o.jsx)(Ev,{customDocuments:_,delegationsSpaceCustomBadges:f})})]})})]})})]})})})]})})},WA=()=>(0,o.jsxs)($o.dO,{children:[(0,o.jsx)($o.qh,{path:[dc.DELEGATION({delegationId:":delegationId",organizationId:":organizationId"}),dc.DELEGATION({delegationId:":delegationId",eventId:":eventId",organizationId:":organizationId"})],children:(0,o.jsx)(GA,{})}),(0,o.jsx)($o.rd,{from:"/v2/organization/:organizationId/delegations",to:wa(Xa.ORGANIZATION_DELEGATIONS({organizationId:":organizationId"}))})]}),qA=()=>(0,o.jsx)(tf,{children:(0,o.jsx)(WA,{})}),HA=()=>(0,o.jsxs)($o.dO,{children:[(0,o.jsx)($o.rd,{exact:!0,from:Xa.ORGANIZATION_DELEGATIONS({organizationId:":organizationId"}),to:Ca(Xa.ORGANIZATION_DELEGATIONS({organizationId:":organizationId"}))}),(0,o.jsx)($o.qh,{path:Ca(Xa.ORGANIZATION_DELEGATIONS({organizationId:":organizationId"})),children:(0,o.jsx)(sf,{})}),(0,o.jsx)($o.qh,{path:[dc.DELEGATION({delegationId:":delegationId",organizationId:":organizationId"}),dc.DELEGATION({delegationId:":delegationId",eventId:":eventId",organizationId:":organizationId"})],children:(0,o.jsx)(qA,{})})]}),KA=()=>(0,o.jsx)(tf,{children:(0,o.jsx)(HA,{})}),YA=e=>(0,o.jsx)(Dn,{css:{bd:!0,alignSelf:"stretch",alignItems:"flex-start",padding:"$4",background:"$gray50"},direction:"column",gap:"3",children:e.children}),ZA=e=>{const t=dm();return(0,o.jsxs)(Dn,{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,o.jsxs)(Dn,{direction:"column",gap:"4",children:[(0,o.jsxs)(Dn,{css:{flex:"1"},direction:t?"column":"row",gap:t?"1":"4",children:[(0,o.jsxs)(Dn,{direction:"column",children:[(0,o.jsx)(xn,{fontWeight:"medium",children:e.title}),e.subtitle&&(0,o.jsx)(Ig,{text:e.subtitle.toString()})]}),!t&&(0,o.jsx)(xn,{css:{blockSize:"fit-content",inlineSize:"fit-content"},children:e.badge})]}),e.children&&(0,o.jsx)(Dn,{css:{flex:"1",overflow:"hidden"},gap:"8",children:e.children})]}),(0,o.jsx)(Dn,{gap:"3",children:e.button})]})};function JA(e,t,n){const i=Bi.DateOnly.MonthLong;return t.equals(n)?e.toLocaleString(t,i):[e.toLocaleString(t,Bi.DateOnly.MonthShort),e.toLocaleString(n,Bi.DateOnly.MonthShort)].join(" - ")}function XA(e){switch(e){case U.Archived:case U.Done:return"error";case U.Ongoing:return"success";case U.Upcoming:return"purple";default:return Br()}}function QA(e,t){const n=xi.c9.now().setZone("utc",{keepLocalTime:!0}).startOf("day");return xi.IX.fromDateTimes(e.startOf("day"),t.endOf("day")).contains(n)?n:e}const ey=e=>{const t=Yt(),n=Kt(is);return(0,o.jsxs)(Dn,{direction:"column",gap:"1",width:200,children:[(0,o.jsx)(xn,{font:"gray500 textXs regular",children:t("date_de_l_v_ne_69973")}),(0,o.jsx)(xn,{font:"gray800 textSm medium",children:JA(n,e.event.startAt,e.event.endAt)})]})},ty=e=>{const t=Yt();return(0,o.jsxs)(Dn,{direction:"column",gap:"1",width:100,children:[(0,o.jsx)(xn,{font:"gray500 textXs regular",children:t("status_06428")}),(0,o.jsx)(Dn,{children:(0,o.jsx)(og,{color:XA(e.event.state),children:t(e.event.state)})})]})},ny=e=>(0,o.jsxs)(Dn,{css:{alignItems:"center",padding:"$4",inlineSize:"100%",background:"$gray50","@tablet":{maxInlineSize:"$containerTablet"},"@desktop":{maxInlineSize:"$container"}},direction:"column",gap:"7",children:[(0,o.jsx)(Eu,{}),(0,o.jsx)(Dn,{css:{alignItems:"flex-start",alignSelf:"stretch"},direction:"column",gap:"6",children:e.children})]}),iy=bn("div",{display:"flex",justifyContent:"center",alignItems:"center",background:"$gray50",padding:"$10 $4 0 $4"}),oy=()=>(0,o.jsx)(iy,{children:(0,o.jsxs)(ny,{children:[(0,o.jsx)(ju,{}),(0,o.jsxs)(Dn,{direction:"column",gap:"3",css:{width:"100%","@desktop":{width:"$modalMd"}},children:[(0,o.jsx)(yu,{height:23,width:1,borderRadius:"$1"}),(0,o.jsx)(yu,{height:74,width:1,borderRadius:"$2"}),(0,o.jsx)(yu,{height:74,width:1,borderRadius:"$2"}),(0,o.jsx)(yu,{height:74,width:1,borderRadius:"$2"})]})]})}),ry=()=>{const{params:{organizationId:e,userInfoId:t},translate:n}=Id(),i=dm(),{data:s,isLoading:c,loader:l}=Jt('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},[ji.OrganizationMembersSpaceFragment]),d=Zt(),u=(0,r.useMemo)(()=>{const e=(s.userInfo?.volunteersRegistrations??[]).map(e=>({...e,accreditationsUsersInfos:s.organization?.hideAccreditationsUntilConfirmationEmailSent&&!e.isAccreditationsEmailSent?[]:e.accreditationsUsersInfos,positionsSlotsUsersInfos:s.organization?.hideAssignmentsUntilConfirmationEmailSent&&!e.isAssignmentsEmailSent?[]:e.positionsSlotsUsersInfos}));return(0,Uo.A)(e,e=>-(e.event.range?.start?.toMillis()??e.event.startAt.toMillis()))},[s.userInfo,s.organization]);return l||(0,o.jsx)(Td,{isLoading:c,loadDelegationsSpace:!1,loadMembersSpace:!0,organizationId:e,skeleton:(0,o.jsx)(oy,{}),children:(0,o.jsx)(iy,{children:(0,o.jsxs)(ny,{children:[(0,o.jsx)(af,{subtitle:[...d(n("g_rer_et_visual_89310","{1}"),(0,o.jsx)("b",{style:{color:"var(--colors-gray800)"},children:s.organization.name}))],title:(0,o.jsx)(xn,{fontSize:"displayXs",fontWeight:"semiBold",children:n("bonjour_1_97713",(Su(e)?`${s.userInfo.firstName} ${s.userInfo.lastName}`:s.userInfo.firstName)||"")})}),(0,o.jsx)(af,{subtitle:n("visualisez_tous_48942"),title:n("listes_des_v_n_07148"),children:(0,o.jsxs)(Dn,{direction:"column",gap:"8",children:[(0,o.jsx)(YA,{children:(0,o.jsx)(ZA,{button:(0,o.jsx)(Un,{featureFlags:{isV4:!0},to:Cd.MEMBER({organizationId:e,userInfoId:t}),children:n("voir_les_inform_25921")}),title:s.organization.name})}),a(u)&&(0,o.jsx)(YA,{children:u.map(r=>(0,o.jsxs)(ZA,{button:(0,o.jsx)(Un,{featureFlags:{isV4:!0},to:Cd.MEMBER({organizationId:e,userInfoId:t,eventId:r.event.id}),children:n("voir_l_v_nemen_72358")}),subtitle:r.event.description,title:r.event.name,children:[(0,o.jsx)(ey,{event:r.event}),!i&&(0,o.jsx)(ty,{event:r.event})]},r.id))})]})})]})})})},sy=r.createContext({}),ay=e=>(0,o.jsx)(sy.Provider,{value:{},children:e.children}),cy=()=>{const{history:e,params:{organizationId:t,eventId:n,userInfoId:i},translate:r}=Id(),{data:s,loader:a}=Jt("query MemberEvents($organizationId: OrganizationId!, $userInfoId: UsersInfoId!) {\n organization(id: $organizationId) {\n id\n name\n\n userInfo(id: $userInfoId) {\n events {\n id\n name\n }\n }\n }\n}\n",{organizationId:t,userInfoId:i},[]);return a||(0,o.jsxs)(bg,{"aria-label":r("format_du_docum_28991"),value:n?`event-${n}`:`org-${t}`,onChange:n=>e.push(n.startsWith("org-")?Cd.MEMBER({organizationId:parseInt(n.split("-").at(-1)),userInfoId:i}):Cd.MEMBER({organizationId:t,eventId:parseInt(n.split("-").at(-1)),userInfoId:i})),children:[(0,o.jsx)("option",{value:`org-${s.organization.id}`,children:s.organization.name}),(0,o.jsx)("optgroup",{label:r("events_23531"),children:s.organization.userInfo.events.map(e=>(0,o.jsx)("option",{value:`event-${e.id}`,children:e.name},e.id))})]})},ly=e=>{const{history:t,params:{organizationId:n,eventId:i,formId:s,userInfoId:a}}=Id(),{data:c,loader:l}=Jt("query MemberSpaceUpdateMember(\n $organizationId: OrganizationId!\n $eventId: EventId\n $formId: FormId!\n $userInfoId: UsersInfoId!\n) {\n organization(id: $organizationId) {\n event: eventMaybe(id: $eventId) {\n startAt\n endAt\n ranges(formId: $formId)\n country\n\n accreditationsCategories {\n ...FormRegisterAccreditationCategory\n }\n\n positionsCategories {\n ...FormRegisterCategory\n }\n }\n\n userInfo(id: $userInfoId) {\n ...UserInfoForm\n name\n userId\n\n volunteerRegistration(eventId: $eventId) {\n positionsSlotsUsersInfos {\n positionSlot {\n range\n }\n }\n }\n\n picture {\n url\n }\n\n formUserInfo(formId: $formId) {\n positionsCategoriesIds\n positionsIds\n positionsSlotsIds\n accreditationsSlotsIds\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 form {\n ...CreateUpdateMemberForm\n }\n }\n }\n }\n\n organizationPublic(id: $organizationId) {\n ...OrganizationDelegationsSpace\n country\n }\n}\n",{organizationId:n,eventId:i,formId:s,userInfoId:a},[ji.FormRegisterAccreditationCategoryFragment,ji.FormRegisterCategoryFragment,ji.UserInfoFormFragment,ji.CreateUpdateMemberFormFragment,ji.OrganizationDelegationsSpaceFragment]),d=(0,r.useMemo)(()=>(c.organization?.userInfo.volunteerRegistration?.positionsSlotsUsersInfos??[]).map(e=>e.positionSlot.range),[c.organization?.userInfo.volunteerRegistration]);return l||(0,o.jsx)(NA,{blockedSlots:d,country:c.organization.event?.country??c.organizationPublic.country,event:c.organization.event,featureFlags:{isV4:!0},form:c.organization.userInfo.formUserInfo.form,handleRedirect:(e=!1)=>e?t.goBack(Cd.MEMBER_FORMS({organizationId:n,eventId:i,userInfoId:a})):t.push(Cd.MEMBER_FORMS({organizationId:n,eventId:i,userInfoId:a})),reload:e.reload,showEmail:!1})},dy=e=>{const t=Kt(is),n=r.useMemo(()=>{const t=Vh(e.aui.accreditation.color);return{background:t[50],color:t[700]}},[e.aui]);return(0,o.jsx)(o.Fragment,{children:e.renderAccreditation((0,o.jsxs)(Dn,{css:{...n,borderRadius:"$1",padding:"$1 $2"},direction:"column",gap:"1",justify:"center",width:1,children:[(0,o.jsxs)(Dn,{align:"center",css:{fontSize:"10px"},gap:"1",children:[(0,o.jsx)(xn,{children:wh(t,e.aui.accreditationSlot,"")}),e.aui.isAutoAccredit&&(0,o.jsx)(xn,{fontSize:"textXs",children:(0,o.jsx)(Mn,{icon:"bolt-auto"})})]}),(0,o.jsx)(xn,{fontSize:"textXs",fontWeight:"medium",children:e.aui.accreditation.name})]}),e.aui.accreditation.id)})},uy=e=>{const t=gu(),n=r.useMemo(()=>(0,Uo.A)(e.event.volunteerRegistration.accreditationsUsersInfos.filter(e=>!e.accreditationSlot.date?.isValid),e=>[e.accreditationCategory.name.toLowerCase(),Th(e.accreditation.index),e.accreditation.name.toLowerCase(),e.accreditationSlot.name.toLowerCase()]),[e.event]),i=r.useMemo(()=>(0,Uo.A)(e.event.volunteerRegistration.accreditationsUsersInfos.filter(e=>e.accreditationSlot.date?.isValid),e=>[e.accreditationCategory.name.toLowerCase(),Th(e.accreditation.index),e.accreditation.name.toLowerCase(),e.accreditationSlot.name.toLowerCase()]),[e.event]);return(0,o.jsxs)(lv,{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,o.jsx)(cv,{children:(0,o.jsx)(dy,{aui:t,renderAccreditation:e.renderAccreditation})},t.id)),i.map(t=>(0,o.jsx)(cv,{endAt:t.accreditationSlot.date,startAt:t.accreditationSlot.date,children:(0,o.jsx)(dy,{aui:t,renderAccreditation:e.renderAccreditation})},t.id))]})},hy=e=>{const{translate:t,params:{organizationId:n,eventId:i,userInfoId:s}}=Id(),a=Kt(is),{mutate:c}=ho(),{mutate:l}=function(e={}){return Xt("mutation AccreditationsSlotsUsersInfosCheckIn(\n $eventId: EventId!\n $checkIn: AccreditationSlotCheckInInput!\n) {\n accreditationsSlotsUsersInfosCheckIn(eventId: $eventId, checkIn: $checkIn)\n}\n",e)}(),d=(0,r.useMemo)(()=>wh(a,e.aui.accreditationSlot,e.aui.accreditation.name),[e.aui]);return(0,o.jsxs)(Np,{children:[(0,o.jsxs)(Op,{align:"center",gap:"3",children:[(0,o.jsx)(Gh,{color:e.aui.accreditation.color,icon:e.aui.accreditation.icon}),(0,o.jsxs)(Dn,{css:{overflow:"hidden"},direction:"column",width:1,children:[(0,o.jsx)(qh,{css:{overflow:"hidden",width:"100%","& > a":{width:"100%"}},to:Il.ACCREDITATION({organizationId:n,eventId:i,accreditationId:e.aui.accreditation.id}),children:(0,o.jsx)(xn,{css:{ellipsis:!0},title:e.aui.accreditation.name,width:1,children:e.aui.accreditation.name})}),(0,o.jsx)(xn,{color:"gray500",css:{ellipsis:!0},title:d,width:1,children:d})]})]}),(0,o.jsxs)(Op,{align:"start",direction:"column",justify:"center",children:[e.aui.state===A.Waiting&&(0,o.jsxs)(Dn,{align:"center",gap:"1",children:[(0,o.jsx)(xn,{color:"warning500",children:(0,o.jsx)(Mn,{icon:"hourglass-empty",iconStyle:"solid"})}),(0,o.jsx)(xn,{font:"gray800 textXs medium",children:t("pas_encore_scan_88057")})]}),e.aui.state===A.CheckedIn&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(Dn,{align:"center",gap:"1",children:[(0,o.jsx)(xn,{color:"success500",children:(0,o.jsx)(Mn,{icon:"badge-check",iconStyle:"solid"})}),(0,o.jsx)(xn,{font:"gray800 textXs medium",children:t("scann_e_01567")})]}),(0,o.jsx)(xn,{font:"gray500 textXs regular",children:e.aui.checkInAt?.isValid?a.toLocaleString(e.aui.checkInAt.toLocal(),Bi.DateTime):""})]})]}),(0,o.jsx)(Op,{children:e.aui.isAutoAccredit&&(0,o.jsx)(xn,{color:"success700",fontSize:"textMd",children:(0,o.jsx)(Mn,{icon:"check"})})}),(0,o.jsx)(Op,{children:e.aui.isWorkflow&&(0,o.jsx)(xn,{color:"success700",fontSize:"textMd",children:(0,o.jsx)(Mn,{icon:"check"})})}),(0,o.jsxs)(Op,{align:"start",direction:"column",justify:"center",children:[(0,o.jsx)(xn,{children:e.aui.createdBy?.name??"-"}),(0,o.jsx)(xn,{color:"gray500",children:a.toLocaleString(e.aui.insertedAt.toLocal(),Bi.DateTime)})]}),(0,o.jsxs)(h_,{justify:"end",width:200,children:[e.aui.state===A.Waiting&&(0,o.jsx)(Un,{color:"white",size:"sm",onClick:async()=>{await l({eventId:e.aui.eventId,checkIn:{strategy:y.CheckIn,accreditationsSlotsUsersInfosIds:[e.aui.id]}}),e.reload()},children:"Scanner"}),(0,o.jsx)(Mb,{children:(0,o.jsx)(Km,{color:"red",icon:"trash-can",onClick:async()=>{await c({eventId:i,massAccredit:{accreditationsSlotsIds:[e.aui.accreditationSlot.id],selecteds:{ids:[s]},strategy:ae.Delete}}),e.reload()},children:t("d_saffecter_du_47122")})})]})]})},my=e=>{const{translate:t}=Id(),n=(0,r.useMemo)(()=>(0,Uo.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(),Th(e.accreditation.index),e.accreditation.name.toLowerCase(),e.accreditationSlot.date?.toMillis()??1,e.accreditationSlot.name.toLowerCase()]),[e.event,e.selectedDay]);return(0,o.jsxs)(Bp,{css:{borderTop:"1px solid $gray200"},hideBorder:!0,children:[(0,o.jsxs)(zp,{children:[(0,o.jsx)(Fp,{children:t("Accreditation")}),(0,o.jsx)(Fp,{children:t("scann_e_le_27812")}),(0,o.jsx)(Fp,{children:t("affect_e_automa_74071")}),(0,o.jsx)(Fp,{children:t("ajout_via_une_69544")}),(0,o.jsx)(Fp,{children:t("ajout_e_par_71330")}),(0,o.jsx)(Fp,{width:200})]}),n.map(t=>(0,o.jsx)(hy,{aui:t,reload:e.reload},t.id))]})},gy=e=>{const{translate:t}=Id(),[n,i]=r.useState(QA(e.event.startAt,e.event.endAt)),[s,a]=r.useState(null);return(0,o.jsx)(o.Fragment,{children:(0,o.jsxs)(Dn,{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,o.jsxs)(Dn,{align:"center",as:"header",css:{padding:e.featureFlags?.isV4?void 0:"$5 $6"},gap:"4",children:[(0,o.jsxs)(xn,{as:"hgroup",css:{flex:"1"},children:[(0,o.jsx)(Ud,{textStyle:"heading",children:e.title}),e.subtitle&&(0,o.jsx)(na,{textStyle:"subtitle",children:e.subtitle})]}),(0,o.jsxs)(Dn,{as:"nav",gap:"3",children:["calendar"===e.accreditationsDisplay&&(0,o.jsx)(sv,{max:e.event.endAt,min:e.event.startAt,value:n,onChange:i}),"list"===e.accreditationsDisplay&&!e.hideListView&&(0,o.jsx)(xn,{width:160,children:(0,o.jsx)(nm,{rightIcon:"xmark",value:s,onChange:a,onRightIconClick:()=>a(null)})}),!e.hideListView&&e.setAccreditationsDisplay&&(0,o.jsx)(xn,{width:200,children:(0,o.jsxs)(bg,{value:e.accreditationsDisplay,onChange:e.setAccreditationsDisplay,children:[(0,o.jsx)("option",{value:"calendar",children:t("Calendar")}),(0,o.jsx)("option",{value:"list",children:t("List")})]})}),e.actions]})]}),"calendar"===e.accreditationsDisplay?(0,o.jsx)(uy,{event:e.event,featureFlags:e.featureFlags,renderAccreditation:e.renderAccreditation,selectedDay:n}):(0,o.jsx)(my,{event:e.event,reload:e.reload,selectedDay:s})]})})};const py=(0,r.memo)(e=>{const t=(0,r.useCallback)(t=>{t&&(n.current&&(i.current?.setMap(null),n.current=null),n.current=new google.maps.Map(t,{zoom:e.coordinatesFieldsProps?.zoomProps.input.value??e.initialZoom??13,center:qo(e.center)||Ho,gestureHandling:"cooperative",mapTypeControl:!1,streetViewControl:!1,mapTypeId:Yo(e.layer),...e.mapOptions||{}}),n.current.mapTypes.set(se.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:se.IgnPlan,maxZoom:18})),n.current.addListener("zoom_changed",()=>{e.coordinatesFieldsProps&&e.coordinatesFieldsProps.zoomProps.input.onChange(n.current.getZoom())}),n.current.addListener("tilesloaded",()=>{e.onTilesloaded?.()}),c())},[]),n=(0,r.useRef)(null),i=(0,r.useRef)(null),s=(0,r.useRef)([]),c=()=>{s.current.forEach(e=>e.setMap(null)),a(e.traces)?s.current=e.traces.map(e=>{const t=e.points.map(([e,t])=>({lat:e,lng:t})),i=e.direction===Pe.None?[]:[{icon:{path:e.direction===Pe.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}):s.current=[]};return(0,r.useEffect)(()=>{(()=>{if(i.current&&i.current.setMap(null),e.point&&n.current){const t=qo(e.point);n.current.setCenter(t),i.current=new google.maps.Marker({position:t,map:n.current,draggable:"object"==typeof e.coordinatesFieldsProps&&null!==e.coordinatesFieldsProps}),e.coordinatesFieldsProps&&i.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(Yo(e.layer))},[e.layer]),(0,r.useEffect)(()=>{c()},[JSON.stringify(e.traces||[])]),(0,o.jsx)(xn,{ref:t,height:1,width:1,children:e.coordinatesFieldsProps?.zoomProps&&(0,o.jsx)(Vg.Yr,{name:e.coordinatesFieldsProps.zoomProps.input.name,children:e=>{n.current?.setZoom(e)}})})},Pd.A);py.displayName="Map";const fy=r.forwardRef(({shouldLightDismiss:e=!0,initialOpen:t=!1,isOpen:n,setIsOpen:i,onClose:s,children:a,...c},l)=>{const[d,u]=r.useState(t),h=r.useRef(null),m=n??d,g=i??u;return r.useEffect(()=>{const e=h.current;return m?function(e){e&&!e.open&&e.showModal()}(e):e?.close(),()=>{e?.close()}},[m]),r.useEffect(()=>{const t=h.current;function n(e){e.preventDefault(),e.stopPropagation(),c.onClose?.(),g(!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,g]),r.useImperativeHandle(l,()=>({close(){g(!1)},showModal(){g(!0)},isOpen:()=>m,addEventListener(e,t,n){h.current?.addEventListener(e,t,n)},removeEventListener(e,t,n){h.current?.removeEventListener(e,t,n)}}),[m,g]),(0,o.jsxs)(o.Fragment,{children:[false,(0,o.jsx)("dialog",{ref:h,"aria-describedby":c["aria-describedby"],"aria-description":c["aria-description"],"aria-label":c["aria-label"],"aria-labelledby":c["aria-labelledby"],style:c.style,onClose:s,children:a})]})});fy.displayName="Dialog";const _y=({children:e,labelId:t,isOpen:n,size:i,setIsOpen:r,...s})=>{const a=gu();return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("style",{dangerouslySetInnerHTML:{__html:"\n dialog::backdrop {\n background: rgba(52, 64, 84, 0.7)\n }\n "}}),(0,o.jsx)(fy,{"aria-labelledby":t,"data-testid":"right-panel-body",isOpen:n,setIsOpen:r,style:{maxHeight:"none",maxWidth:"none",margin:"0 0 0 0",marginInlineStart:a?"auto":"0",height:"100%",border:"none",inlineSize:a?"sm"===i?"480px":"690px":"100%",top:0,padding:0},onClose:s.onClose,children:(0,o.jsx)(Dn,{align:"center",css:{background:"$gray50",boxShadow:"$shadowsXl",blockSize:"100%",flex:1},direction:"column",...s,children:e})})]})},by=({heading:e,id:t,leftIcon:n,leftIconColor:i,leftIconBorder:r,setIsOpen:s,...a})=>(0,o.jsxs)(Dn,{as:"header",css:{alignItems:"flex-start",alignSelf:"stretch",background:"$white",borderBlockEnd:"1px solid $gray200"},direction:"column",gap:"4",...a,children:[(0,o.jsxs)(Dn,{css:{alignItems:"center",alignSelf:"stretch",padding:"$6 $7 $5 $7"},gap:"4",children:[n&&(0,o.jsx)(Dn,{align:"center",css:{border:r},justify:"center",children:(0,o.jsx)(Gh,{color:i,icon:n})}),(0,o.jsx)(Dn,{css:{alignItems:"flex-start",flex:1},direction:"column",id:t,justify:"center",children:e})]}),(0,o.jsx)(Dn,{align:"center",css:{padding:"$2",height:"$space$9",width:"$space$9",position:"absolute",right:"$space$4",top:"$space$4"},justify:"center",children:(0,o.jsx)(Un,{color:"invisible",css:{color:"$gray500",width:"$space$6",height:"$space$6",padding:0},textAlign:"center",onClick:()=>s(!1),children:(0,o.jsx)("i",{className:"far fa-xmark"})})}),a.children]}),ky=e=>(0,o.jsx)(Dn,{css:{alignSelf:"stretch",alignItems:"start",padding:"$6",overflowY:"auto",...e.css},direction:"column",gap:"6",children:e.children}),vy=({children:e,...t})=>(0,o.jsx)(na,{as:"address",textStyle:"inherit",...t,children:e}),Ay=e=>{const{params:{organizationId:t,eventId:n},translate:i}=Id(),{data:r,loader:s}=Jt("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||(r.organization.event?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(by,{heading:(0,o.jsx)(Ud,{textStyle:"heading",children:r.organization.event.accreditation.name}),id:e.labelId,leftIcon:zn(r.organization.event.accreditation.icon),leftIconColor:r.organization.event.accreditation.color,setIsOpen:e.setIsOpen}),(0,o.jsx)(ky,{children:(0,o.jsx)(af,{children:(0,o.jsx)(Dn,{direction:"column",gap:"6",children:r.organization.event.accreditation.description||Ah(r.organization.event.accreditation)?(0,o.jsxs)(o.Fragment,{children:[r.organization.event.accreditation.description&&(0,o.jsxs)(Dn,{direction:"column",gap:"1",children:[(0,o.jsx)(Ud,{textStyle:"subheading",children:i("description_58935")}),(0,o.jsx)(Ig,{text:r.organization.event.accreditation.description})]}),Ah(r.organization.event.accreditation)&&(0,o.jsxs)(Dn,{direction:"column",gap:"1",children:[(0,o.jsx)(Ud,{textStyle:"subheading",children:i("localisation_38416")}),kh(r.organization.event.accreditation)&&(0,o.jsx)(vy,{children:r.organization.event.accreditation.address}),vh(r.organization.event.accreditation)&&(0,o.jsx)(xn,{height:380,width:1,children:(0,o.jsx)(py,{initialZoom:r.organization.event.accreditation.zoom,layer:r.organization.event.accreditation.layer,point:Ko(r.organization.event.accreditation)})})]})]}):(0,o.jsx)(Rh,{imageSrc:_u.WeezeventBlankPerson,title:i("il_n_y_a_aucun_10373")})})})})]}):(0,o.jsx)(hl,{}))},yy=e=>{const[t,n]=(0,r.useState)(!1),i=(0,tu.A)("rightpanel-");return(0,r.useEffect)(()=>(e.accreditationId&&!t?n(!0):n(!1),()=>{n(!1)}),[e.accreditationId]),(0,o.jsx)(_y,{isOpen:t,labelId:i,setIsOpen:n,size:"md",onClose:()=>e.setDisplayedAccreditationId(null),children:e.accreditationId&&(0,o.jsx)(Ay,{accreditationId:e.accreditationId,labelId:i,setIsOpen:n})})},wy=e=>{const{params:{organizationId:t,eventId:n,userInfoId:i},translate:s}=Id(),{data:c,loader:l,reload:d}=Jt("query UserProfileAccreditations(\n $organizationId: OrganizationId!\n $eventId: EventId!\n $userInfoId: UsersInfoId!\n) {\n organization(id: $organizationId) {\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 accreditationsUsersInfos {\n ...UserPanelAccreditationSlotUserInfo\n }\n }\n }\n}\n",{organizationId:t,eventId:n,userInfoId:i},[ji.UserPanelAccreditationSlotUserInfoFragment]),[u,h]=(0,r.useState)(null),m=Zt(),g=(0,r.useMemo)(()=>(0,Uo.A)(c.event?.volunteerRegistration.accreditationsUsersInfos,e=>e.accreditationSlot.date?.toMillis()??0),[c.event]),p=s("planning_de_vos_42899"),f=[...m(s("visualiser_l_in_46133","{1}"),(0,o.jsx)("b",{style:{color:"var(--colors-gray800)"},children:c.event?.name}))];return l||(0,o.jsxs)(o.Fragment,{children:[a(g)?(0,o.jsx)(gy,{accreditationsDisplay:"calendar",event:c.event,featureFlags:{isV4:!0},hideListView:!0,reload:()=>{d(),g.length<=1&&e.reloadHeader()},renderAccreditation:(e,t)=>(0,o.jsx)(Un,{color:"invisible",style:{width:"100%",padding:"unset"},onClick:()=>h(t),children:e}),subtitle:f,title:p}):(0,o.jsxs)(Dn,{as:"section",css:{background:"white",bd:!0,padding:"$6 $7 $7 $7"},direction:"column",gap:"6",justify:"center",children:[(0,o.jsx)(Dn,{align:"center",as:"header",gap:"4",children:(0,o.jsxs)(xn,{as:"hgroup",css:{flex:"1"},children:[(0,o.jsx)(Ud,{textStyle:"heading",children:p}),f&&(0,o.jsx)(na,{textStyle:"subtitle",children:f})]})}),(0,o.jsx)(Dn,{css:{bd:!0,padding:"$9 $7"},children:(0,o.jsx)(Rh,{imageSrc:_u.WeezeventBlankHandGlobe,subtitle:s("ici_seront_affi_51536"),title:s("encore_un_peu_d_88675")})})]}),(0,o.jsx)(yy,{accreditationId:u,setDisplayedAccreditationId:h})]})},Cy=e=>{const{translate:t,params:{eventId:n}}=Id(),i=Kt(sa),{mutate:s}=po(),a=(0,r.useMemo)(()=>Li(),[]),[c,l]=(0,r.useState)(e.assignments.map(e=>({...e,checkInAt:e.checkInAt?.toLocal(),checkOutAt:e.checkOutAt?.toLocal()}))),d=(0,r.useMemo)(()=>c.every(e=>e.checkInAt?.isValid&&e.checkOutAt?.isValid&&e.checkOutAt>e.checkInAt||e.checkInAt?.isValid&&!e.checkOutAt?.isValid||!e.checkInAt?.isValid&&!e.checkOutAt?.isValid),[c]),u=(0,r.useCallback)((e,t,n)=>{l((0,jp.jM)(i=>{i.forEach(i=>{i.id===e&&(i[t]=n||void 0)})}))},[c,l]);return(0,o.jsx)(ti,{isOpen:e.isOpen,onClose:e.onClose,children:(0,o.jsxs)(ei,{children:[(0,o.jsx)(Qn,{icon:"sliders",children:t("mettre_jour_d_54198")}),(0,o.jsx)(Xn,{gap:"4",children:c.map(e=>(0,o.jsxs)(Dn,{direction:"column",gap:"1",children:[(0,o.jsxs)(xn,{font:"gray800 textSm medium",children:[e.position.name," -"," ",(0,o.jsx)(lk,{fontWeight:"regular",children:gh(i,e.positionSlot,"",{slot:{includeRange:!0}})})]}),(0,o.jsxs)(Dn,{gap:"6",children:[(0,o.jsx)(om,{rightIcon:"xmark",value:e.checkInAt,zone:a,onChange:t=>{u(e.id,"checkInAt",t)},onRightIconClick:()=>{u(e.id,"checkInAt",null)}}),(0,o.jsx)(om,{rightIcon:"xmark",value:e.checkOutAt,zone:a,onChange:t=>{u(e.id,"checkOutAt",t)},onRightIconClick:()=>{u(e.id,"checkOutAt",null)}}),(0,o.jsx)(cu,{shouldParseAsInt:!0,value:e.breakTime,onChange:t=>{u(e.id,"breakTime",t)}})]})]},e.id))}),(0,o.jsx)(Jn,{children:(0,o.jsx)(Un,{disabled:!d,onClick:async()=>{await Promise.all(c.map(e=>s({eventId:n,checkIn:{strategy:y.CheckInOut,breakTime:e.breakTime,checkInAt:e.checkInAt,checkOutAt:e.checkOutAt,positionsSlotsUsersInfosIds:[e.id]}}))),e.onClose(),e.onSuccess()},children:t("mettre_jour_85141")})})]})})},Iy=e=>{const{translate:t}=Id(),n=Kt(sa),i=r.useMemo(()=>{const t=Vh(e.psui.position.color);return{background:t[50],color:t[700]}},[e.psui]);return(0,o.jsx)(o.Fragment,{children:e.renderPosition((0,o.jsxs)(Dn,{css:{...i,borderRadius:"$1",padding:"$1 $2"},direction:"column",gap:"1",justify:"center",width:1,children:[(0,o.jsxs)(Dn,{align:"center",css:{fontSize:"10px"},gap:"1",children:[(0,o.jsxs)(Dn,{direction:"column",gap:"1",children:[e.psui.positionSlot.name&&(0,o.jsx)(xn,{children:e.psui.positionSlot.name}),(0,o.jsx)(xn,{children:n.toDisplayString(e.psui.positionSlot.range,{hideDate:!0})})]}),e.psui.state===A.CheckedOut&&(0,o.jsx)(Mn,{icon:"stopwatch",title:t("d_pointer_25328")}),e.psui.state===A.CheckedIn&&(0,o.jsx)(Mn,{icon:"timer",title:t("pointer_80927")})]}),(0,o.jsx)(xn,{fontSize:"textXs",fontWeight:"medium",children:e.psui.position.name})]}),e.psui.position.id)})},xy=e=>{const t=gu(),[n]=Ps(e.dayStartTime),i=r.useMemo(()=>function(e,t,n,i){const o=Math.ceil(n.endOf("day").diff(t.startOf("day"),"days").days),r=(0,Xs.A)(0,o).map(e=>t.startOf("day").set({hour:i}).plus({day:e})),[s,a]=(0,Qs.A)(e,e=>e.range.start.hour===i&&0===e.range.start.minute);return a.flatMap(e=>e.range.splitAt(...r).map(t=>({...e,range:t}))).concat(s)}(e.assignments.map(e=>({...e,range:e.positionSlot.range})),e.startAt,e.endAt,n),[e.assignments,e.startAt,e.endAt,n]);return(0,o.jsx)(lv,{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:i.map((t,i)=>(0,o.jsx)(cv,{endAt:t.range.start,startAt:t.range.start,startHour:n,children:(0,o.jsx)(Iy,{psui:t,renderPosition:e.renderPosition,startHour:n})},i))})};var Sy,Ey;!function(e){e[e.READ_DELEGATION=0]="READ_DELEGATION",e[e.CREATE_DELEGATION=1]="CREATE_DELEGATION",e[e.EDIT_DELEGATION=2]="EDIT_DELEGATION",e[e.DELETE_DELEGATION=3]="DELETE_DELEGATION",e[e.VALIDATE_MEMBERS_ACCREDITATIONS=4]="VALIDATE_MEMBERS_ACCREDITATIONS"}(Sy||(Sy={})),function(e){e[e.READ_POSITION=0]="READ_POSITION",e[e.EDIT_POSITION=1]="EDIT_POSITION",e[e.EDIT_MEMBER=2]="EDIT_MEMBER",e[e.EDIT_ASSIGNMENT_STATE=3]="EDIT_ASSIGNMENT_STATE",e[e.READ_COMMENTS=4]="READ_COMMENTS",e[e.ADD_COMMENTS=5]="ADD_COMMENTS",e[e.EDIT_AVAILABILITIES=6]="EDIT_AVAILABILITIES",e[e.ASSIGN_MEMBER=7]="ASSIGN_MEMBER",e[e.SEND_CAMPAIGNS=8]="SEND_CAMPAIGNS"}(Ey||(Ey={}));const jy=e=>{const{translate:t,params:{organizationId:n,eventId:i}}=Id(),{hasPositionPermission:s}=Fv(),a=Kt(is),c=Kt(Js),l=Kt(sa),{mutate:d}=po(),u=(0,r.useMemo)(()=>gh(l,e.psui.positionSlot,"",{slot:{includeRange:!0}}),[e.psui]),h=s(Ey.ASSIGN_MEMBER),m=s(Ey.READ_POSITION,{positionCategoryId:e.psui.positionCategoryId,positionId:e.psui.position.id});return(0,o.jsxs)(Np,{children:[(0,o.jsxs)(Op,{align:"center",gap:"3",children:[(0,o.jsx)(Gh,{color:e.psui.position.color,icon:e.psui.position.icon}),(0,o.jsxs)(Dn,{css:{overflow:"hidden"},direction:"column",width:1,children:[(0,o.jsx)(qh,{css:{overflow:"hidden",width:"100%","& > a":{width:"100%"}},to:Dl.POSITION({organizationId:n,eventId:i,positionId:e.psui.position.id}),children:(0,o.jsx)(xn,{css:{ellipsis:!0},title:e.psui.position.name,width:1,children:e.psui.position.name})}),(0,o.jsx)(xn,{color:"gray500",css:{ellipsis:!0},title:u,width:1,children:u})]})]}),(0,o.jsx)(Op,{children:e.psui.state===A.CheckedOut?(0,o.jsx)(og,{leftIcon:"clock",children:t("temps_total_79448",c.minutesToHoursMinutesString(e.psui.timeDifferenceMinutes))}):e.psui.state===A.CheckedIn?(0,o.jsx)(og,{color:"success",leftIcon:"circle",leftIconStyle:"solid",children:t("point_le_1_63576",a.toLocaleString(e.psui.checkInAt.toLocal(),Bi.DateTime))}):(0,o.jsx)(og,{color:"warning",leftIcon:"circle",leftIconStyle:"solid",children:t("non_point_42145")})}),(0,o.jsx)(Op,{children:e.psui.isAutoAssign&&(0,o.jsx)(xn,{color:"success700",fontSize:"textMd",children:(0,o.jsx)(Mn,{icon:"check"})})}),(0,o.jsxs)(Op,{align:"start",direction:"column",justify:"center",children:[(0,o.jsx)(xn,{children:e.psui.createdBy?.name??"-"}),(0,o.jsx)(xn,{color:"gray500",children:a.toLocaleString(e.psui.insertedAt.toLocal(),Bi.DateTime)})]}),(0,o.jsxs)(h_,{justify:"end",width:200,children:[m&&(e.psui.state===A.Waiting?(0,o.jsx)(Un,{color:"white",size:"sm",onClick:async()=>{await d({eventId:e.psui.eventId,checkIn:{strategy:y.CheckIn,positionsSlotsUsersInfosIds:[e.psui.id]}}),e.reload()},children:t("pointer_80927")}):e.psui.state===A.CheckedIn?(0,o.jsx)(Un,{color:"white",size:"sm",onClick:async()=>{await d({eventId:e.psui.eventId,checkIn:{strategy:y.CheckOut,positionsSlotsUsersInfosIds:[e.psui.id]}}),e.reload()},children:t("d_pointer_25328")}):null),(0,o.jsx)(Nb,{canCheckIn:m,canDelete:h,psui:e.psui,reloadCheckIn:e.reload,onDelete:e.reload})]})]})},Ty=e=>{const{translate:t}=Id(),{hasPositionPermission:n}=Fv(),i=n(Ey.READ_POSITION),s=(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,o.jsxs)(Bp,{css:{borderTop:"1px solid $gray200"},hideBorder:!0,children:[(0,o.jsxs)(zp,{children:[(0,o.jsx)(Fp,{children:t("Position")}),(0,o.jsx)(Fp,{children:t("statut_du_point_52451")}),(0,o.jsx)(Fp,{children:t("affect_e_automa_74071")}),(0,o.jsx)(Fp,{children:t("ajout_e_par_71330")}),i&&(0,o.jsx)(Fp,{width:200})]}),s.map(t=>(0,o.jsx)(jy,{psui:t,reload:e.reload},t.id))]})},Dy=e=>{const{params:{organizationId:t,eventId:n,userInfoId:i},translate:s}=Id(),{isEventAdmin:a}=Fv(),[c,l]=r.useState(QA(e.event.startAt,e.event.endAt)),[d,u]=r.useState(null),[h,m]=r.useState(!1);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(Dn,{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,o.jsxs)(Dn,{align:"center",as:"header",gap:"4",css:{padding:e.featureFlags?.isV4?void 0:"$5 $6"},children:[(0,o.jsxs)(xn,{as:"hgroup",css:{flex:"1"},children:[(0,o.jsx)(Ud,{textStyle:"heading",children:e.title}),e.subtitle&&(0,o.jsx)(na,{textStyle:"subtitle",children:e.subtitle})]}),(0,o.jsxs)(Dn,{as:"nav",gap:"3",children:["calendar"===e.positionsDisplay&&(0,o.jsx)(sv,{max:e.event.endAt,min:e.event.startAt,value:c,onChange:l}),"list"===e.positionsDisplay&&!e.hideListView&&(0,o.jsx)(xn,{width:160,children:(0,o.jsx)(nm,{rightIcon:"xmark",value:d,onChange:u,onRightIconClick:()=>u(null)})}),!e.hideListView&&e.setPositionsDisplay&&(0,o.jsx)(xn,{width:200,children:(0,o.jsxs)(bg,{value:e.positionsDisplay,onChange:e.setPositionsDisplay,children:[(0,o.jsx)("option",{value:"calendar",children:s("Calendar")}),(0,o.jsx)("option",{value:"list",children:s("List")})]})}),a&&(0,o.jsx)(Un,{to:Jl.EDIT_ASSIGNMENT(t,n,i),children:s("_diter_les_affe_42283")}),a&&(0,o.jsxs)(Gm,{children:[(0,o.jsx)(Jm,{children:(0,o.jsx)(Un,{color:"white",leftIcon:"ellipsis-vertical"})}),(0,o.jsx)(Zm,{placement:"bottom-end",children:(0,o.jsx)(Km,{icon:"circle-check",onClick:()=>m(!0),children:s("mettre_jour_d_54198")})})]})]})]}),"calendar"===e.positionsDisplay?(0,o.jsx)(xy,{assignments:e.assignments,dayStartTime:e.event.dayStartTime,endAt:e.event.endAt,featureFlags:e.featureFlags,renderPosition:e.renderPosition,selectedDay:c,startAt:e.event.startAt}):!e.hideListView&&(0,o.jsx)(Ty,{assignments:e.assignments,reload:e.reload,selectedDay:d})]}),Cy&&(0,o.jsx)(Cy,{assignments:e.assignments,isOpen:h,onClose:()=>m(!1),onSuccess:()=>e.reload()})]})},Py=({children:e,...t})=>(0,o.jsx)(na,{as:"abbr",textStyle:"abbreviation",...t,children:e}),Ry=e=>{const{params:{organizationId:t,eventId:n},translate:i}=Id(),{data:r,loader:s}=Jt("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 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},[ji.LeaderInfosFragment,ji.TraceFragment]);const c=Kt(sa);return s||(r.organization.event?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(by,{heading:(0,o.jsxs)(Ud,{textStyle:"heading",children:[r.organization.event.position.name,an(r.organization.event.position.acronym)&&(0,o.jsx)(Py,{css:{marginInlineStart:"$2"},children:r.organization.event.position.acronym})]}),id:e.labelId,leftIcon:zn(r.organization.event.position.icon),leftIconColor:r.organization.event.position.color,setIsOpen:e.setIsOpen}),(0,o.jsx)(ky,{children:(0,o.jsx)(af,{children:r.organization.event.position.description||r.organization.event.position.range||a(r.organization.event.position.leaders)||r.organization.event.position.range||Ah(r.organization.event.position)?(0,o.jsxs)(Dn,{direction:"column",gap:"6",children:[r.organization.event.position.description&&(0,o.jsxs)(Dn,{direction:"column",gap:"1",children:[(0,o.jsx)(Ud,{textStyle:"subheading",children:i("description_du_95106")}),(0,o.jsx)(Ig,{text:r.organization.event.position.description})]}),r.organization.event.position.range&&(0,o.jsxs)(Dn,{direction:"column",gap:"1",children:[(0,o.jsx)(Ud,{textStyle:"subheading",children:i("Date")}),(0,o.jsx)(na,{children:c.toComponents(r.organization.event.position.range)})]}),a(r.organization.event.position.leaders)&&(0,o.jsxs)(Dn,{direction:"column",gap:"1",children:[(0,o.jsx)(Ud,{textStyle:"subheading",children:i("reponsable_82458_plural")}),r.organization.event.position.leaders.map(e=>(0,o.jsx)(xn,{children:(0,o.jsx)(L_,{areContactLinksEnabled:!0,isClickDisabled:!0,showPhoneNumber:!0,size:40,userInfo:e.userInfo})},e.userInfo.id))]}),Ah(r.organization.event.position)&&(0,o.jsxs)(Dn,{direction:"column",gap:"1",children:[(0,o.jsx)(Ud,{textStyle:"subheading",children:i("localisation_38416")}),kh(r.organization.event.position)&&(0,o.jsx)(vy,{children:r.organization.event.position.address}),vh(r.organization.event.position)&&(0,o.jsx)(xn,{height:380,width:1,children:(0,o.jsx)(py,{initialZoom:r.organization.event.position.zoom,layer:r.organization.event.position.layer,point:Ko(r.organization.event.position),traces:r.organization.event.position.traces})})]})]}):(0,o.jsx)(Rh,{imageSrc:_u.WeezeventBlankPerson,title:i("il_n_y_a_aucun_10373")})})})]}):(0,o.jsx)(hl,{}))},Oy=e=>{const[t,n]=(0,r.useState)(!1),i=(0,tu.A)("rightpanel-");return(0,r.useEffect)(()=>(e.positionId&&!t?n(!0):n(!1),()=>{n(!1)}),[e.positionId]),(0,o.jsx)(_y,{isOpen:t,labelId:i,setIsOpen:n,size:"md",onClose:()=>e.setDisplayedPositionId(null),children:e.positionId&&(0,o.jsx)(Ry,{labelId:i,positionId:e.positionId,setIsOpen:n})})},Fy=e=>{const{params:{organizationId:t,eventId:n,userInfoId:i},translate:s}=Id(),{data:c,loader:l,reload:d}=fo({organizationId:t,eventId:n,userInfoId:i}),[u,h]=(0,r.useState)(null),m=Zt(),g=(0,r.useMemo)(()=>(0,Uo.A)(c.event?.volunteerRegistration.positionsSlotsUsersInfos,e=>e.positionSlot.range.start.toMillis()),[c.event]),p=s("planning_de_vos_51737"),f=[...m(s("visualisez_l_in_88697","{1}"),(0,o.jsx)("b",{style:{color:"var(--colors-gray800)"},children:c.event?.name}))];return l||(0,o.jsxs)(o.Fragment,{children:[a(g)?(0,o.jsx)(Dy,{assignments:g,event:c.event,featureFlags:{isV4:!0},hideListView:!0,positionsDisplay:"calendar",reload:()=>{d(),g.length<=1&&e.reloadHeader()},renderPosition:(e,t)=>(0,o.jsx)(Un,{color:"invisible",style:{width:"100%",padding:"unset",blockSize:"fit-content"},onClick:()=>h(t),children:e}),subtitle:f,title:p}):(0,o.jsxs)(Dn,{as:"section",css:{background:"white",bd:!0,padding:"$6 $7 $7 $7"},direction:"column",gap:"6",justify:"center",children:[(0,o.jsx)(Dn,{align:"center",as:"header",gap:"4",children:(0,o.jsxs)(xn,{as:"hgroup",css:{flex:"1"},children:[(0,o.jsx)(Ud,{textStyle:"heading",children:p}),f&&(0,o.jsx)(na,{textStyle:"subtitle",children:f})]})}),(0,o.jsx)(Dn,{css:{bd:!0,padding:"$9 $7"},children:(0,o.jsx)(Rh,{imageSrc:_u.WeezeventBlankPerson,subtitle:s("ici_seront_affi_69159"),title:s("encore_un_peu_d_88675")})})]}),(0,o.jsx)(Oy,{positionId:u,setDisplayedPositionId:h})]})},zy=e=>{const t=Yt(),n=dm(),i=pu(),s=Kt(aa),a=r.useMemo(()=>{try{return s.getFormatter()}catch{return null}},[]);return(0,o.jsxs)(Dn,{align:"center",css:{boxShadow:"$xs",padding:"$4",flex:"1"},gap:"4",children:[!n&&(0,o.jsx)(Dn,{align:"center",css:{background:"$gray100",borderRadius:"$2",color:"$gray700"},height:40,justify:"center",width:40,children:(0,o.jsx)(Mn,{icon:"file-lines"})}),(0,o.jsxs)(Dn,{css:{flex:"1"},direction:"column",children:[(0,o.jsx)(Ud,{textStyle:"subheading",css:{lineBreak:"anywhere",whiteSpace:"normal"},children:e.document.name}),(0,o.jsxs)(Dn,{direction:n?"column":"row",gap:n?void 0:"1",css:{ellipsis:!0},children:[e.subtitle&&(0,o.jsx)(o.Fragment,{children:(0,o.jsxs)(na,{textStyle:"subtitle",children:[e.subtitle,!n&&" | "]})}),(0,o.jsx)(na,{textStyle:"subtitle",children:a&&"number"==typeof e.document.size&&a.format(e.document.size).replace(/^([\d,.]+)/,"$1 ")})]})]}),(0,o.jsx)(Un,{color:"white",leftIcon:"arrow-down-to-bracket",onClick:()=>{window.open(e.document.url,"_blank")},children:i&&t("t_l_charger_03283")})]})},My=e=>{const{params:{organizationId:t,userInfoId:n},translate:i}=Id(),s=Kt(is),c=(0,r.useCallback)(e=>{e&&(e.onload=()=>{const t=e.contentDocument.body.scrollHeight;e.style.height=`${t}px`,e.contentDocument.body.style.margin="0",e.contentDocument.body.style.overflow="hidden",e.parentElement.style.height=`${t+64}px`})},[]),l=Zt(),{data:d,loader:u}=Jt("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},[ji.DocumentEmailPreviewFragment]);const h=d.organization?.userInfo.campaign.sentAt?.setZone(xi.c9.local().zone);return u||(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(by,{heading:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Ud,{textStyle:"heading",children:d.organization.userInfo.campaign.name}),(0,o.jsx)(na,{textStyle:"subtitle",children:[...l(i("envoy_e_le_1_90336","{1}","{2}"),(0,o.jsx)(ia,{dateTime:h,children:s.toLocaleString(h,Bi.DateTime)}),(0,o.jsx)(qh,{to:`mailto:${d.organization.userInfo.campaign.createdBy.email}?subject=${encodeURI(i("re_1_84422",d.organization.userInfo.campaign.subject))}`,children:d.organization.userInfo.campaign.createdBy?.nameOrEmail}))]})]}),id:e.labelId,leftIcon:d.organization.userInfo.campaign.campaignType===v.Email?"at":"message",leftIconColor:"black",setIsOpen:e.setIsOpen}),(0,o.jsx)(ky,{css:{backgroundColor:"$gray100"},children:(0,o.jsx)(Dn,{css:{background:"white",borderRadius:"$2",boxShadow:"$md",minBlockSize:"100%",inlineSize:"100%"},direction:"column",gap:"3",children:(0,o.jsxs)(Dn,{css:{background:"$gray200",borderRadius:"$2",padding:"$7"},direction:"column",gap:"6",children:[(0,o.jsx)(xn,{css:{padding:0,minBlockSize:"300px",marginBlockStart:"$3",blockSize:"fit-content !important","& iframe":{background:"white",border:"none",borderRadius:"$2",overflow:"hidden",inlineSize:"100%"}},children:(0,o.jsx)("iframe",{ref:c,srcDoc:d.organization.userInfo.campaign.preview})}),a(d.organization.userInfo.campaign.documents)&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Ud,{textStyle:"subheading",children:i("pi_ces_jointes_36761")}),(0,o.jsx)(af,{css:{padding:0},children:(0,o.jsx)(Dn,{direction:"column",children:d.organization.userInfo.campaign.documents.map(e=>(0,o.jsx)(zy,{document:e},e.id))})})]})]})})})]})},$y=e=>{const[t,n]=(0,r.useState)(!1),i=(0,tu.A)("rightpanel-");return(0,r.useEffect)(()=>(e.campaignId&&!t?n(!0):n(!1),()=>{n(!1)}),[e.campaignId]),(0,o.jsx)(_y,{isOpen:t,labelId:i,setIsOpen:n,size:"md",onClose:()=>e.setDisplayedCampaignId(null),children:e.campaignId&&(0,o.jsx)(My,{campaignId:e.campaignId,labelId:i,setIsOpen:n})})},Ny=e=>{const{translate:t}=Id(),n=dm(),i=Zt(),r=Kt(is),s=e.campaign.sentAt?.setZone(xi.c9.local().zone);return(0,o.jsxs)(Np,{css:{"&:hover":{background:"$gray100"}},onMouseLeave:e=>{Vm(e.target)},children:[(0,o.jsx)(Op,{css:{flex:"1"},children:(0,o.jsxs)(Dn,{direction:"column",width:1,children:[(0,o.jsx)(Ud,{css:{ellipsis:!0,fontSize:"$textSm"},textStyle:"subheading",children:e.campaign.name}),(0,o.jsx)(na,{css:{ellipsis:!0},textStyle:"subtitle",children:[...i(t("envoy_e_le_1_90336","{1}","{2}"),(0,o.jsx)(ia,{dateTime:s,children:r.toLocaleString(s,n?Bi.ShortDateTime:Bi.DateTime)}),(0,o.jsx)(qh,{to:`mailto:${e.campaign.createdBy.email}?subject=${encodeURI(t("re_1_84422",e.campaign.subject))}`,children:e.campaign.createdBy.nameOrEmail}))]})]})}),(0,o.jsxs)(Op,{css:{flex:n?"0 50px":"0 150px"},children:[(0,o.jsx)(xn,{width:22,children:e.campaign.campaignType===v.Email?(0,o.jsx)(Mn,{icon:"at"}):(0,o.jsx)(Mn,{icon:"message"})}),!n&&e.campaign.campaignType]}),(0,o.jsx)(Op,{css:{flex:"0 200px"},justify:"end",children:(0,o.jsx)(Un,{color:"white",textAlign:"center",onClick:()=>e.setDisplayedCampaignId(e.campaign.id),children:t("lire_le_message_68344")})})]})},By=()=>{const{params:{organizationId:e,eventId:t,userInfoId:n},translate:i}=Id(),s=dm(),[c,l]=(0,r.useState)(null),[d,u]=(0,r.useState)(25),[h,m]=(0,r.useState)(0),g=(0,r.useCallback)(()=>{m(0)},[m]),p=(0,r.useCallback)(e=>{u(e),g()},[u,g]),{data:f,isLoading:_,loader:k}=Jt("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(eventId: $eventId, states: [Done], limit: $limit, offset: $offset, sort: $sort) {\n nodes {\n id\n name\n campaignType\n state\n subject\n sentAt\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:d,offset:h,sort:c},[]),{numberOfPages:v,totalCount:A}=Af(f.userInfo?.campaigns),[y,w]=(0,r.useState)(null);return k||(0,o.jsxs)(o.Fragment,{children:[a(f.userInfo.campaigns.nodes)?(0,o.jsx)(Dn,{css:{flex:"1",overflow:"hidden"},width:1,children:(0,o.jsx)(c_,{featureFlags:{isV4:!0},headerRow:(0,o.jsxs)(zp,{children:[(0,o.jsx)(s_,{attribute:b.Name,setSort:l,sort:c,children:i("titre_de_la_cam_20463")}),(0,o.jsx)(s_,{attribute:b.Type,css:{flex:s?"0 50px":"0 150px"},setSort:l,sort:c,children:i("type_35427")}),(0,o.jsx)(Fp,{width:200})]}),paginationRow:(0,o.jsx)(u_,{children:(0,o.jsx)(d_,{limit:d,numberOfPages:v,offset:h,setLimit:p,setOffset:m,showLimits:!0,totalCount:A})}),children:_?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(a_,{}),(0,o.jsx)(a_,{}),(0,o.jsx)(a_,{})]}):f.userInfo.campaigns.nodes.map(e=>(0,o.jsx)(Ny,{campaign:e,setDisplayedCampaignId:w},e.id))})}):(0,o.jsx)(Dn,{css:{bd:!0,padding:"$9 $7"},children:(0,o.jsx)(Rh,{imageSrc:_u.WeezeventBlankSwissArmyKnife,subtitle:i("ici_seront_affi_69159"),title:i("ici_seront_affi_06596")})}),(0,o.jsx)($y,{campaignId:y,setDisplayedCampaignId:w})]})},Ly=()=>{const{params:{organizationId:e,eventId:t,userInfoId:n},translate:i}=Id(),s=dm(),[c,l]=(0,r.useState)(null),[d,u]=(0,r.useState)(2),[h,m]=(0,r.useState)(0),g=(0,r.useCallback)(()=>{m(0)},[m]),p=(0,r.useCallback)(e=>{u(e),g()},[u,g]),{data:f,loader:_,isLoading:b}=Jt("query UserDocuments(\n $organizationId: OrganizationId!\n $eventId: EventId\n $userInfoId: UsersInfoId!\n $limit: Int\n $offset: Int\n $sort: DocumentsSort\n) {\n organization(id: $organizationId) {\n ...OrganizationMembersSpace\n country\n\n customFields {\n nodes {\n ...CustomFieldWithCondition\n }\n }\n\n event: eventMaybe(id: $eventId) {\n name\n country\n }\n\n userInfo(id: $userInfoId) {\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,userInfoId:n,limit:d,offset:h,sort:c},[ji.OrganizationMembersSpaceFragment,ji.CustomFieldWithConditionFragment,ji.DocumentEmailPreviewFragment]),{numberOfPages:k,totalCount:v}=Af(f.organization?.userInfo?.documents),A=Kt(is),y=Zt();return _||(0,o.jsx)(o.Fragment,{children:a(f.organization?.userInfo.documents.nodes)?(0,o.jsx)(Dn,{css:{flex:"1",overflow:"hidden"},width:1,children:(0,o.jsx)(c_,{featureFlags:{isV4:!0},headerRow:(0,o.jsxs)(zp,{children:[(0,o.jsx)(s_,{attribute:z.Name,setSort:l,sort:c,children:i("nom_du_document_73868")}),(0,o.jsx)(Fp,{width:200})]}),paginationRow:(0,o.jsx)(u_,{css:{borderBlockStart:"1px solid $gray200"},children:(0,o.jsx)(d_,{limit:d,numberOfPages:k,offset:h,setLimit:p,setOffset:m,showLimits:!0,totalCount:v})}),children:b?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(a_,{}),(0,o.jsx)(a_,{}),(0,o.jsx)(a_,{})]}):f.organization?.userInfo.documents.nodes.map(e=>(0,o.jsx)(Np,{children:(0,o.jsx)(zy,{document:e,subtitle:a(e.campaigns)?1===e.campaigns.length?[...y(i("envoy_e_le_1_90336","{1}","{2}"),(0,o.jsx)(ia,{dateTime:e.campaigns[0].sentAt,children:A.toLocaleString(e.campaigns[0].sentAt,s?Bi.ShortDateTime:Bi.DateTime)}),(0,o.jsx)(qh,{to:`mailto:${e.campaigns[0].createdBy.email}?subject=${encodeURI(i("re_1_84422",e.name))}`,children:e.campaigns[0].createdBy?.nameOrEmail}))]:i("sent_multiple_t_40457"):void 0})},e.id))})}):(0,o.jsx)(Dn,{css:{bd:!0,padding:"$9 $7"},children:(0,o.jsx)(Rh,{imageSrc:_u.WeezeventBlankSwissArmyKnife,title:i("pour_le_moment_62758"),subtitle:i("ici_seront_affi_73099")})})})},Vy=e=>{const t=Yt(),n=Kt(is),i=Zt();return(0,o.jsx)(og,{color:"white-with-green-icon",leftIcon:"circle-check",leftIconStyle:"solid",children:[...i(t("rempli_le_1_29292","{1}"),(0,o.jsx)(ia,{dateTime:e.formUserInfo.insertedAt,children:n.toLocaleString(e.formUserInfo.insertedAt,Bi.DateOnly.MonthLong)}))]})},Uy=({userInfo:e})=>{const{params:{eventId:t,organizationId:n},translate:i}=Id(),s=dm(),c=(0,r.useMemo)(()=>{const n=e.formsUsersInfos.filter(e=>t?null!==e.eventId:null===e.eventId);return a(n)?n.flatMap(e=>e.form.elements.length>0?[e]:[]):[]},[e.formsUsersInfos,t]);return(0,o.jsx)(o.Fragment,{children:a(c)?(0,o.jsx)(YA,{children:c.map(r=>(0,o.jsx)(ZA,{badge:(0,o.jsx)(Vy,{formUserInfo:r}),button:(0,o.jsx)(Un,{to:Cd.MEMBER_FORM_EDIT({organizationId:n,userInfoId:e.id,eventId:t,formId:r.formId}),children:s?(0,o.jsx)(Mn,{icon:"pen"}):i("_diter_62574")}),title:r.form.name},r.form.id))}):(0,o.jsx)(Dn,{css:{bd:!0,padding:"$9 $7"},children:(0,o.jsx)(Rh,{imageSrc:_u.WeezeventBlankPerson,subtitle:i("ici_seront_affi_54352"),title:i("encore_un_peu_d_88675")})})})},Gy=()=>{const{params:{organizationId:e,eventId:t,userInfoId:n},translate:i}=Id(),{data:s,loader:a,reload:c}=Jt("query MemberRegistration(\n $organizationId: OrganizationId!\n $eventId: EventId\n $userInfoId: UsersInfoId!\n $isEvent: Boolean!\n) {\n organization(id: $organizationId) {\n ...OrganizationMembersSpace\n country\n\n customFields {\n nodes {\n ...CustomFieldWithCondition\n }\n }\n\n event: eventMaybe(id: $eventId) @include(if: $isEvent) {\n name\n country\n }\n\n userInfo(id: $userInfoId) {\n ...MemberRegistrationUserInfo\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 campaigns {\n nodes {\n id\n name\n documents {\n id\n name\n size\n url\n }\n }\n }\n }\n }\n\n user {\n ...UserPermissions\n }\n}\n",{organizationId:e,eventId:t,userInfoId:n,isEvent:!!t},[ji.OrganizationMembersSpaceFragment,ji.CustomFieldWithConditionFragment,ji.MemberRegistrationUserInfoFragment,ji.FormsUsersInfosWishedFragment,ji.MemberAssignmentFragment,ji.MemberAccreditationFragment,ji.UserPermissionsFragment]),l=Zt(),d=(0,r.useMemo)(()=>{if(a)return null;{const e=s.organization?.userInfo,n=e?.volunteerRegistration;return t?{...e,volunteerRegistration:{...n,accreditationsUsersInfos:s.organization.hideAccreditationsUntilConfirmationEmailSent&&!n.isAccreditationsEmailSent?[]:n.accreditationsUsersInfos,positionsSlotsUsersInfos:s.organization.hideAssignmentsUntilConfirmationEmailSent&&!n.isAssignmentsEmailSent?[]:n.positionsSlotsUsersInfos}}:s.organization.userInfo}},[s,a]);return a||(d?(0,o.jsx)(Ov,{userPermissions:s.user,children:(0,o.jsx)($v,{additionalComponents:(0,o.jsx)(cy,{}),featureFlags:{isV4:!0},isLoading:!1,organization:s.organization,spaceDesign:{themeColors:s.organization?.membersSpaceDesign?.colors,bannerSrc:s.organization?.membersSpaceDesign?.banner?.url,logoSrc:s.organization?.membersSpaceDesign?.logo?.url},userInfo:d,children:(0,o.jsxs)($o.dO,{children:[(0,o.jsx)($o.rd,{exact:!0,from:Cd.MEMBER({organizationId:":organizationId",userInfoId:":userInfoId"}),to:Cd.MEMBER_FORMS({organizationId:e,userInfoId:n})}),(0,o.jsx)($o.rd,{exact:!0,from:Cd.MEMBER({organizationId:":organizationId",userInfoId:":userInfoId",eventId:":eventId"}),to:Cd.MEMBER_POSITIONS({organizationId:e,userInfoId:n,eventId:t})}),(0,o.jsx)($o.qh,{path:[Cd.MEMBER_FORM_EDIT({organizationId:":organizationId",userInfoId:":userInfoId",formId:":formId"}),Cd.MEMBER_FORM_EDIT({organizationId:":organizationId",userInfoId:":userInfoId",eventId:":eventId",formId:":formId"})],children:(0,o.jsx)(ly,{reload:c})}),(0,o.jsx)($o.qh,{children:(0,o.jsxs)(hf,{featureFlags:{isV4:!0},children:[(0,o.jsx)(mf,{featureFlags:{isV4:!0},getPath:(i=!1)=>Cd.MEMBER_FORMS({organizationId:i?":organizationId":e,userInfoId:i?":userInfoId":n,eventId:i?t?":eventId":void 0:t}),subtitle:[...l(i(t?"pr_visualiser_e_41845":"pr_visualiser_e_26744","{1}"),(0,o.jsx)("b",{style:{color:"var(--colors-gray800)"},children:t?s.organization.event?.name:s.organization.name}))],title:i("formulaires_rem_62495"),children:(0,o.jsx)(Uy,{userInfo:d})}),t&&(0,o.jsx)(mf,{featureFlags:{isV4:!1},getPath:(i=!1)=>Cd.MEMBER_POSITIONS({organizationId:i?":organizationId":e,eventId:i?":eventId":t,userInfoId:i?":userInfoId":n}),title:i("planning_de_vos_51737"),children:(0,o.jsx)(Fy,{reloadHeader:c})}),t&&(0,o.jsx)(mf,{featureFlags:{isV4:!1},getPath:(i=!1)=>Cd.MEMBER_ACCREDITATIONS({organizationId:i?":organizationId":e,userInfoId:i?":userInfoId":n,eventId:i?":eventId":t}),title:i("accr_ditations_39450"),children:(0,o.jsx)(wy,{reloadHeader:c})}),(0,o.jsx)(mf,{featureFlags:{isV4:!0},getPath:(i=!1)=>Cd.MEMBER_MESSAGES({organizationId:i?":organizationId":e,userInfoId:i?":userInfoId":n,eventId:i?t?":eventId":void 0:t}),subtitle:[...l(i(t?"visualiser_l_en_66953":"visualiser_l_en_48128","{1}"),(0,o.jsx)("b",{style:{color:"var(--colors-gray800)"},children:t?s.organization.event?.name:s.organization.name}))],title:i("messages_37744"),children:(0,o.jsx)(By,{})}),(0,o.jsx)(mf,{featureFlags:{isV4:!0},getPath:(i=!1)=>Cd.MEMBER_DOCUMENTS({organizationId:i?":organizationId":e,userInfoId:i?":userInfoId":n,eventId:i?t?":eventId":void 0:t}),subtitle:[...l(i(t?"visualiser_l_en_48475":"visualiser_l_en_47798","{1}"),(0,o.jsx)("b",{style:{color:"var(--colors-gray800)"},children:t?s.organization.event?.name:s.organization.name}))],title:i("Documents"),children:(0,o.jsx)(Ly,{})})]})})]})})}):(0,o.jsx)(xn,{children:"ERROR"}))},Wy=()=>(0,o.jsx)(ay,{children:(0,o.jsx)(Gy,{})}),qy=e=>{const{params:{organizationId:t},translate:n}=Id(),i=pu();return(0,o.jsxs)(Dn,{align:"center",css:{padding:"$4 $6",borderBlockEnd:"1px solid $gray200","&:last-of-type":{borderBlockEnd:"none"}},gap:"3",children:[(0,o.jsx)(f_,{email:e.userInfo.email,image:e.userInfo.picture?.url,name:e.userInfo.name,size:40}),(0,o.jsxs)(Dn,{css:{flex:"1",overflow:"hidden"},direction:"column",children:[(0,o.jsx)(xn,{color:"gray800",css:{ellipsis:!0},fontWeight:"medium",children:an(e.userInfo.name)?e.userInfo.name:"-"}),(0,o.jsx)(xn,{color:"gray500",css:{ellipsis:!0},children:e.userInfo.email})]}),(0,o.jsx)(Dn,{children:i?(0,o.jsx)(Un,{color:"white",size:"sm",to:Cd.USER_PROFILE({organizationId:t,userInfoId:e.userInfo.id}),children:n("voir_son_profil_99428")}):(0,o.jsx)(Un,{color:"white",leftIcon:"arrow-right",size:"sm",to:Cd.USER_PROFILE({organizationId:t,userInfoId:e.userInfo.id})})})]})};function Hy(){const{history:e,params:{organizationId:t}}=Id(),{data:n,isLoading:i}=Jt("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(Cd.USER_PROFILE({organizationId:t,userInfoId:n.user.usersInfos[0].id}))},[n.user]),{isLoading:i,usersInfos:n.user?.usersInfos}}const Ky=()=>(0,o.jsx)(vu,{children:(0,o.jsxs)(Dn,{direction:"column",gap:"3",css:{width:"100%","@desktop":{width:"$modalMd"}},children:[(0,o.jsx)(yu,{height:23,width:1,borderRadius:"$1"}),(0,o.jsx)(yu,{height:74,width:1,borderRadius:"$2"}),(0,o.jsx)(yu,{height:74,width:1,borderRadius:"$2"}),(0,o.jsx)(yu,{height:74,width:1,borderRadius:"$2"})]})}),Yy=()=>{const e=Yt(),{organizationId:t}=Qt(),{usersInfos:n,isLoading:i}=Hy();return(0,o.jsx)(Td,{isLoading:i,loadDelegationsSpace:!1,loadMembersSpace:!0,organizationId:t,skeleton:(0,o.jsx)(Ky,{}),children:(0,o.jsx)(vu,{children:(0,o.jsxs)(Dn,{css:{width:"100%","@desktop":{width:"$modalMd"}},direction:"column",gap:"3",children:[(0,o.jsx)(xn,{color:"gray800",fontSize:"textMd",fontWeight:"semiBold",children:e("_quel_profil_s_67307")}),(n??[]).map(e=>(0,o.jsx)(qy,{userInfo:e},e.id))]})})})},Zy=()=>{const e=Yt(),{organizationId:t}=Qt(),{usersInfos:n,isLoading:i}=Hy();return(0,o.jsx)(Td,{isLoading:i,loadDelegationsSpace:!1,loadMembersSpace:!0,organizationId:t,skeleton:(0,o.jsx)(oy,{}),children:(0,o.jsx)(iy,{children:(0,o.jsx)(ny,{children:(0,o.jsx)(af,{subtitle:a(n)?[e("listes_des_prof_08757",n[0].email)]:void 0,title:e("s_lectionnez_le_89411"),children:(0,o.jsx)(Dn,{css:{bd:!0},direction:"column",children:(n??[]).map(e=>(0,o.jsx)(qy,{userInfo:e},e.id))})})})})})},Jy=()=>{const{params:{organizationId:e}}=Id();return(0,o.jsxs)($o.dO,{children:[(0,o.jsx)($o.rd,{exact:!0,from:Cd.USER_PROFILES({organizationId:":organizationId"}),to:Ca(Cd.USER_PROFILES({organizationId:":organizationId"}))}),(0,o.jsx)($o.qh,{children:xd(e)?(0,o.jsx)(Yy,{}):(0,o.jsx)(Zy,{})})]})},Xy=()=>(0,o.jsxs)($o.dO,{children:[(0,o.jsx)($o.qh,{path:Cd.USER_PROFILES({organizationId:":organizationId"}),children:(0,o.jsx)(Jy,{})}),(0,o.jsx)($o.qh,{path:Cd.USER_PROFILE({organizationId:":organizationId",userInfoId:":userInfoId"}),children:(0,o.jsx)(ry,{})}),(0,o.jsx)($o.qh,{path:[Xa.ORGANIZATION_DELEGATIONS({organizationId:":organizationId"}),dc.DELEGATIONS({organizationId:":organizationId"}),dc.DELEGATIONS({organizationId:":organizationId",eventId:":eventId"}),dc.DELEGATION({organizationId:":organizationId",delegationId:":delegationId"}),dc.DELEGATION({organizationId:":organizationId",eventId:":eventId",delegationId:":delegationId"})],children:(0,o.jsx)(KA,{})}),(0,o.jsx)($o.qh,{path:[Cd.MEMBER({organizationId:":organizationId",userInfoId:":userInfoId"}),Cd.MEMBER({organizationId:":organizationId",userInfoId:":userInfoId",eventId:":eventId"})],children:(0,o.jsx)(Wy,{})}),(0,o.jsx)($o.rd,{to:wa(Xa.ORGANIZATION({organizationId:":organizationId"}))})]}),Qy=()=>(0,o.jsx)(Qp,{children:(0,o.jsx)(Xy,{})});var ew,tw,nw;function iw(){return iw=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const e=Yt(),{user:t}=Ro(),n=tn();let i=null,r=null;try{i=n.getItemInt(du.ORGANIZATION_ID),r=n.getItemInt(du.EVENT_ID)}catch{}return ga.includes(location.host)?(i=pa[window.location.host],(0,o.jsx)(hl,{path:`/v2/organization/${i}/auth`})):i&&r?t?(0,o.jsx)(hl,{path:id(i,r)}):(0,o.jsx)(hl,{path:ed(i,r)}):(0,o.jsxs)(Dn,{align:"center",css:{backgroundImage:`url(${fu.Background404})`,backgroundSize:"cover",height:"100%",width:"100%"},direction:"column",justify:"center",children:[(0,o.jsx)(xn,{css:{marginBottom:"100px",width:"300px"},children:(0,o.jsx)(ow,{})}),(0,o.jsx)(xn,{css:{color:"white",fontSize:"24px"},children:e("il_n_y_a_rien_33749")})]})},sw=e=>(0,o.jsx)(ml,{getRedirectPath:({organizationId:t,eventId:n,userInfoId:i,delegationId:o})=>"number"!=typeof t||"number"!=typeof n||i||o?location.pathname.includes("delegation")&&"number"==typeof t?wa(Xa.ORGANIZATION_DELEGATIONS({organizationId:t})):location.pathname.startsWith(`${Ii.HEAVENT_PUBLIC_URL.pathname}/organization`)&&"number"==typeof t?wa(Xa.ORGANIZATION({organizationId:t})):Jl.HOME:od(e.isEmbed,ed(t,n)),shouldHaveUser:!0,children:e.children}),aw=e=>(0,o.jsx)(ml,{getRedirectPath:({organizationId:t,eventId:n})=>"number"==typeof t&&"number"==typeof n?od(e.isEmbed,id(t,n)):location.pathname.includes("delegations")&&"number"==typeof t?Ca(Xa.ORGANIZATION_DELEGATIONS({organizationId:t})):location.pathname.startsWith(`${Ii.HEAVENT_PUBLIC_URL.pathname}/organization`)&&"number"==typeof t?Ca(Cd.USER_PROFILES({organizationId:t})):Jl.HOME,shouldHaveUser:!1,children:e.children}),cw=e=>(0,o.jsxs)($o.dO,{children:[(0,o.jsx)($o.qh,{path:"/v2",children:(0,o.jsx)(ch,{})}),(0,o.jsx)($o.rd,{from:od(e.isEmbed,ed(":organizationId",":eventId")),to:wa(Xa.ORGANIZATION({organizationId:":organizationId"}))}),(0,o.jsx)($o.rd,{from:od(e.isEmbed,nd(":organizationId",":eventId")),to:wa(Xa.ORGANIZATION({organizationId:":organizationId"}))}),(0,o.jsx)($o.qh,{exact:!0,path:[Xa.ORGANIZATION_FORM({organizationId:":organizationId",formId:":formId"}),Ta.EVENT_FORM({organizationId:":organizationId",eventId:":eventId",formId:":formId"}),Ta.EVENT_TEAM_FORM({organizationId:":organizationId",eventId:":eventId",formId:":formId",teamCode:":teamCode"}),dc.DELEGATION_FORM({organizationId:":organizationId",delegationId:":delegationId",formId:":formId"}),dc.DELEGATION_FORM({organizationId:":organizationId",delegationId:":delegationId",eventId:":eventId",formId:":formId"})],children:(0,o.jsx)(Jp,{})}),(0,o.jsx)($o.qh,{path:wa(Xa.ORGANIZATION_DELEGATIONS({organizationId:":organizationId"})),children:(0,o.jsx)(aw,{isEmbed:!1,children:(0,o.jsx)(Ou,{loadDelegationsSpace:!0,loadMembersSpace:!1})})}),(0,o.jsx)($o.qh,{path:wa(Xa.ORGANIZATION({organizationId:":organizationId"})),children:(0,o.jsx)(aw,{isEmbed:!1,children:(0,o.jsx)(Ou,{loadDelegationsSpace:!1,loadMembersSpace:!0})})}),(0,o.jsx)($o.qh,{path:Xa.ORGANIZATION({organizationId:":organizationId"}),children:(0,o.jsx)(sw,{isEmbed:!1,children:(0,o.jsx)(Qy,{})})}),(0,o.jsx)($o.qh,{children:(0,o.jsx)(rw,{})})]}),lw=()=>(0,o.jsx)(xn,{css:{color:"$gray800",height:"100%",overflow:"scroll",position:"relative",width:"100%",backgroundColor:"$gray50"},children:(0,o.jsx)(Rn.Kd,{basename:Ii.HEAVENT_PUBLIC_URL.pathnameOptional,children:(0,o.jsxs)($o.dO,{children:[(0,o.jsx)($o.qh,{path:td(":code",":source",":organizationId",":eventId"),children:(0,o.jsx)(rd,{})}),(0,o.jsx)($o.qh,{path:"/embed",children:(0,o.jsx)(cw,{isEmbed:!0})}),(0,o.jsx)($o.qh,{children:(0,o.jsx)(cw,{isEmbed:!1})})]})})});(0,Kn.render)((0,o.jsx)(r.StrictMode,{children:(0,o.jsx)(e=>{const[t,n]=(0,r.useState)(null);return(0,r.useEffect)(()=>{let e=!0;return Eo().then(t=>{e&&n(t)}).catch(()=>{alert("Could not load application, please try again.")}),()=>{e=!1}},[]),t?e.render(t):(0,o.jsx)(Nn,{})},{render:e=>(0,o.jsx)(Po.Provider,{value:e,children:(0,o.jsx)(al,{children:(0,o.jsx)(Do,{children:(0,o.jsx)(ri,{children:(0,o.jsxs)(ul,{children:[(0,o.jsx)(cl,{}),(0,o.jsx)(lw,{})]})})})})})})}),document.getElementById("heavent-react-hook"))},1931:(e,t,n)=>{"use strict";e.exports=n.p+"img/google-3994b2066e10d4d349a4.png"},2281:(e,t,n)=>{"use strict";e.exports=n.p+"img/login2x-a7058a62cb4dc68d53e5.png"},2388:(e,t,n)=>{"use strict";e.exports=n.p+"img/asoLogo-837233f9633c3b94afc9.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"},2830:()=>{!function(e){const t=e.nl=e.nl||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 van %1","Align center":"Midden uitlijnen","Align left":"Links uitlijnen","Align right":"Rechts uitlijnen",Aquamarine:"Aquamarijn",Black:"Zwart","Block quote":"Blok citaat",Blue:"Blauw",Bold:"Vet","Break text":"","Bulleted List":"Ongenummerde lijst",Cancel:"Annuleren","Centered image":"Gecentreerde afbeelding","Change image text alternative":"Verander alt-tekst van de afbeelding","Choose heading":"Kies kop","Dim grey":"Gedimd grijs","Document colors":"Document kleur",Downloadable:"Downloadbaar","Dropdown toolbar":"Drop-down werkbalk","Edit block":"Blok aanpassen","Edit link":"Bewerk link","Editor toolbar":"Editor welkbalk","Font Background Color":"Tekst achtergrondkleur","Font Color":"Tekstkleur","Full size image":"Afbeelding op volledige grootte",Green:"Groen",Grey:"Grijs",Heading:"Koppen","Heading 1":"Kop 1","Heading 2":"Kop 2","Heading 3":"Kop 3","Heading 4":"Kop 4","Heading 5":"Kop 5","Heading 6":"Kop 6","Image resize list":"","Image toolbar":"Afbeeldingswerkbalk","image widget":"afbeeldingswidget","In line":"","Insert image":"Afbeelding toevoegen","Insert paragraph after block":"Voeg paragraaf toe na blok","Insert paragraph before block":"Voeg paragraaf toe voor blok",Italic:"Cursief",Justify:"Volledig uitlijnen","Left aligned image":"Links uitgelijnde afbeelding","Light blue":"Lichtblauw","Light green":"Lichtgroen","Light grey":"Lichtgrijs",Link:"Link","Link URL":"Link URL",Next:"Volgende","Numbered List":"Genummerde lijst","Open in a new tab":"Open een nieuw tabblad","Open link in new tab":"Open link in nieuw tabblad",Orange:"Oranje",Original:"Origineel",Paragraph:"Paragraaf",Previous:"Vorige",Purple:"Paars",Red:"Rood",Redo:"Opnieuw","Remove color":"Verwijder kleur","Resize image":"","Resize image to %0":"","Resize image to the original size":"","Rich Text Editor":"Tekstbewerker","Rich Text Editor, %0":"Tekstbewerker, %0","Right aligned image":"Rechts uitgelijnde afbeelding",Save:"Opslaan","Select all":"Selecteer alles","Show more items":"Meer items weergeven","Side image":"Afbeelding naast tekst","Text alignment":"Tekst uitlijning","Text alignment toolbar":"Tekst uitlijning werkbalk","Text alternative":"Alt-tekst","This link has no URL":"Deze link heeft geen URL",Turquoise:"Turquoise",Underline:"Onderlijnen",Undo:"Ongedaan maken",Unlink:"Verwijder link","Upload failed":"Uploaden afbeelding mislukt","Upload in progress":"Bezig met uploaden",White:"Wit","Widget toolbar":"Widget werkbalk","Wrap text":"",Yellow:"Geel"}),t.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}))},3574:(e,t,n)=>{"use strict";e.exports=n.p+"svg/done2-fe55d02679b93e21cc5f.svg"},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"},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"},4385:()=>{!function(e){const t=e.de=e.de||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 von %1","Align center":"Zentriert","Align left":"Linksbündig","Align right":"Rechtsbündig",Aquamarine:"Aquamarinblau",Black:"Schwarz","Block quote":"Blockzitat",Blue:"Blau",Bold:"Fett","Break text":"Bild teilt Text","Bulleted List":"Aufzählungsliste",Cancel:"Abbrechen","Centered image":"Zentriertes Bild","Change image text alternative":"Alternativtext ändern","Choose heading":"Überschrift auswählen","Dim grey":"Dunkelgrau","Document colors":"Dokumentfarben",Downloadable:"Herunterladbar","Dropdown toolbar":"Dropdown-Liste Werkzeugleiste","Edit block":"Absatz bearbeiten","Edit link":"Link bearbeiten","Editor toolbar":"Editor Werkzeugleiste","Font Background Color":"Hintergrundfarbe","Font Color":"Schriftfarbe","Full size image":"Bild in voller Größe",Green:"Grün",Grey:"Grau",Heading:"Überschrift","Heading 1":"Überschrift 1","Heading 2":"Überschrift 2","Heading 3":"Überschrift 3","Heading 4":"Überschrift 4","Heading 5":"Überschrift 5","Heading 6":"Überschrift 6","Image resize list":"Bildgrößen-Liste","Image toolbar":"Bild Werkzeugleiste","image widget":"Bild-Steuerelement","In line":"Text in Zeile","Insert image":"Bild einfügen","Insert paragraph after block":"Absatz nach Block einfügen","Insert paragraph before block":"Absatz vor Block einfügen",Italic:"Kursiv",Justify:"Blocksatz","Left aligned image":"Linksbündiges Bild","Light blue":"Hellblau","Light green":"Hellgrün","Light grey":"Hellgrau",Link:"Link","Link URL":"Link Adresse",Next:"Nächste","Numbered List":"Nummerierte Liste","Open in a new tab":"In neuem Tab öffnen","Open link in new tab":"Link im neuen Tab öffnen",Orange:"Orange",Original:"Original",Paragraph:"Absatz",Previous:"vorherige",Purple:"Violett",Red:"Rot",Redo:"Wiederherstellen","Remove color":"Farbe entfernen","Resize image":"Bildgröße ändern","Resize image to %0":"Bildgröße ändern in %0","Resize image to the original size":"Bild in Originalgröße ändern","Rich Text Editor":"Rich Text Editor","Rich Text Editor, %0":"Rich-Text-Editor, %0","Right aligned image":"Rechtsbündiges Bild",Save:"Speichern","Select all":"Alles auswählen","Show more items":"Mehr anzeigen","Side image":"Seitenbild","Text alignment":"Textausrichtung","Text alignment toolbar":"Text-Ausrichtung Toolbar","Text alternative":"Alternativtext","This link has no URL":"Dieser Link hat keine Adresse",Turquoise:"Türkis",Underline:"Unterstrichen",Undo:"Rückgängig",Unlink:"Link entfernen","Upload failed":"Hochladen fehlgeschlagen","Upload in progress":"Upload läuft",White:"Weiß","Widget toolbar":"Widget Werkzeugleiste","Wrap text":"Text umfließt Bild",Yellow:"Gelb"}),t.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}))},4628:(e,t,n)=>{"use strict";e.exports=n.p+"img/formPositionRanked-376168a7e3c71ed7defd.png"},5376:(e,t,n)=>{"use strict";e.exports=n.p+"svg/sad-cbf74279d944b2baac65.svg"},5488:(e,t,n)=>{var i;e=n.nmd(e),function(e){const t=e.fr=e.fr||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 sur %1","Align center":"Centrer","Align left":"Aligner à gauche","Align right":"Aligner à droite",Aquamarine:"Bleu vert",Black:"Noir","Block quote":"Citation",Blue:"Bleu",Bold:"Gras","Bulleted List":"Liste à puces",Cancel:"Annuler","Change image text alternative":"Changer le texte alternatif à l’image","Choose heading":"Choisir l'en-tête","Dim grey":"Gris pâle","Document colors":"Couleurs du document",Downloadable:"Fichier téléchargeable","Dropdown toolbar":"Barre d'outils dans un menu déroulant","Edit block":"Modifier le bloc","Edit link":"Modifier le lien","Editor toolbar":"Barre d'outils de l'éditeur","Font Background Color":"Couleur d'arrière-plan","Font Color":"Couleur de police",Green:"Vert",Grey:"Gris",Heading:"En-tête","Heading 1":"Titre 1","Heading 2":"Titre 2","Heading 3":"Titre 3","Heading 4":"Titre 4","Heading 5":"Titre 5","Heading 6":"Titre 6","Image resize list":"Liste des tailles d'images","image widget":"Objet image","Insert image":"Insérer une image","Insert paragraph after block":"Insérer du texte après ce bloc","Insert paragraph before block":"Insérer du texte avant ce bloc",Italic:"Italique",Justify:"Justifier","Light blue":"Bleu clair","Light green":"Vert clair","Light grey":"Gris clair",Link:"Lien","Link URL":"URL du lien",Next:"Suivant","Numbered List":"Liste numérotée","Open in a new tab":"Ouvrir dans un nouvel onglet","Open link in new tab":"Ouvrir le lien dans un nouvel onglet",Orange:"Orange",Original:"Taille originale",Paragraph:"Paragraphe",Previous:"Précedent",Purple:"Violet",Red:"Rouge",Redo:"Restaurer","Remove color":"Enlever la couleur","Resize image":"Redimensionner l'image","Resize image to %0":"Redimensionner à %0","Resize image to the original size":"Appliquer les dimensions d'origine","Rich Text Editor":"Éditeur de texte enrichi","Rich Text Editor, %0":"Éditeur de texte enrichi, %0",Save:"Enregistrer","Select all":"Sélectionner tout","Show more items":"Montrer plus d'éléments","Text alignment":"Alignement du texte","Text alignment toolbar":"Barre d'outils d'alignement du texte","Text alternative":"Texte alternatif","This link has no URL":"Ce lien n'a pas d'URL",Turquoise:"Turquoise",Underline:"Souligné",Undo:"Annuler",Unlink:"Supprimer le lien","Upload failed":"Échec de l'envoi","Upload in progress":"Téléchargement en cours",White:"Blanc","Widget toolbar":"Barre d'outils du widget",Yellow:"Jaune"}),t.getPluralForm=function(e){return e>1}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})),self,i=()=>(()=>{"use strict";var i={636:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(15),o=n.n(i),r=n(645),s=n.n(r)()(o());s.push([e.id,".ck-content blockquote{border-left:5px solid #ccc;font-style:italic;margin-left:0;margin-right:0;overflow:hidden;padding-left:1.5em;padding-right:1.5em}.ck-content[dir=rtl] blockquote{border-left:0;border-right:5px solid #ccc}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-block-quote/theme/blockquote.css"],names:[],mappings:"AAKA,uBAWC,0BAAsC,CADtC,iBAAkB,CAFlB,aAAc,CACd,cAAe,CAPf,eAAgB,CAIhB,kBAAmB,CADnB,mBAOD,CAEA,gCACC,aAAc,CACd,2BACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-content blockquote {\n\t/* See #12 */\n\toverflow: hidden;\n\n\t/* https://github.com/ckeditor/ckeditor5-block-quote/issues/15 */\n\tpadding-right: 1.5em;\n\tpadding-left: 1.5em;\n\n\tmargin-left: 0;\n\tmargin-right: 0;\n\tfont-style: italic;\n\tborder-left: solid 5px hsl(0, 0%, 80%);\n}\n\n.ck-content[dir="rtl"] blockquote {\n\tborder-left: 0;\n\tborder-right: solid 5px hsl(0, 0%, 80%);\n}\n'],sourceRoot:""}]);const a=s},390:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(15),o=n.n(i),r=n(645),s=n.n(r)()(o());s.push([e.id,'.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position{display:inline;pointer-events:none;position:relative}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span{position:absolute;width:0}.ck.ck-editor__editable .ck-widget:-webkit-drag>.ck-widget__selection-handle,.ck.ck-editor__editable .ck-widget:-webkit-drag>.ck-widget__type-around{display:none}:root{--ck-clipboard-drop-target-dot-width:12px;--ck-clipboard-drop-target-dot-height:8px;--ck-clipboard-drop-target-color:var(--ck-color-focus-border)}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span{background:var(--ck-clipboard-drop-target-color);border:1px solid var(--ck-clipboard-drop-target-color);bottom:calc(var(--ck-clipboard-drop-target-dot-height)*-.5);margin-left:-1px;top:calc(var(--ck-clipboard-drop-target-dot-height)*-.5)}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span:after{border-color:var(--ck-clipboard-drop-target-color) transparent transparent transparent;border-style:solid;border-width:calc(var(--ck-clipboard-drop-target-dot-height)) calc(var(--ck-clipboard-drop-target-dot-width)*.5) 0 calc(var(--ck-clipboard-drop-target-dot-width)*.5);content:"";display:block;height:0;left:50%;position:absolute;top:calc(var(--ck-clipboard-drop-target-dot-height)*-.5);transform:translateX(-50%);width:0}.ck.ck-editor__editable .ck-widget.ck-clipboard-drop-target-range{outline:var(--ck-widget-outline-thickness) solid var(--ck-clipboard-drop-target-color)!important}.ck.ck-editor__editable .ck-widget:-webkit-drag{zoom:.6;outline:none!important}',"",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-clipboard/theme/clipboard.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-clipboard/clipboard.css"],names:[],mappings:"AASC,8DACC,cAAe,CAEf,mBAAoB,CADpB,iBAOD,CAJC,mEACC,iBAAkB,CAClB,OACD,CAWA,qJACC,YACD,CCzBF,MACC,yCAA0C,CAC1C,yCAA0C,CAC1C,6DACD,CAOE,mEAIC,gDAAiD,CADjD,sDAAuD,CAFvD,2DAA8D,CAI9D,gBAAiB,CAHjB,wDAqBD,CAfC,yEAWC,sFAAuF,CAEvF,kBAAmB,CADnB,qKAA0K,CAX1K,UAAW,CAIX,aAAc,CAFd,QAAS,CAIT,QAAS,CADT,iBAAkB,CAElB,wDAA2D,CAE3D,0BAA2B,CAR3B,OAYD,CA2DF,kEACC,gGACD,CAKA,gDACC,OAAS,CACT,sBACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-editor__editable {\n\t/*\n\t * Vertical drop target (in text).\n\t */\n\t& .ck.ck-clipboard-drop-target-position {\n\t\tdisplay: inline;\n\t\tposition: relative;\n\t\tpointer-events: none;\n\n\t\t& span {\n\t\t\tposition: absolute;\n\t\t\twidth: 0;\n\t\t}\n\t}\n\n\t/*\n\t * Styles of the widget being dragged (its preview).\n\t */\n\t& .ck-widget:-webkit-drag {\n\t\t& > .ck-widget__selection-handle {\n\t\t\tdisplay: none;\n\t\t}\n\n\t\t& > .ck-widget__type-around {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-clipboard-drop-target-dot-width: 12px;\n\t--ck-clipboard-drop-target-dot-height: 8px;\n\t--ck-clipboard-drop-target-color: var(--ck-color-focus-border)\n}\n\n.ck.ck-editor__editable {\n\t/*\n\t * Vertical drop target (in text).\n\t */\n\t& .ck.ck-clipboard-drop-target-position {\n\t\t& span {\n\t\t\tbottom: calc(-.5 * var(--ck-clipboard-drop-target-dot-height));\n\t\t\ttop: calc(-.5 * var(--ck-clipboard-drop-target-dot-height));\n\t\t\tborder: 1px solid var(--ck-clipboard-drop-target-color);\n\t\t\tbackground: var(--ck-clipboard-drop-target-color);\n\t\t\tmargin-left: -1px;\n\n\t\t\t/* The triangle above the marker */\n\t\t\t&::after {\n\t\t\t\tcontent: "";\n\t\t\t\twidth: 0;\n\t\t\t\theight: 0;\n\n\t\t\t\tdisplay: block;\n\t\t\t\tposition: absolute;\n\t\t\t\tleft: 50%;\n\t\t\t\ttop: calc(var(--ck-clipboard-drop-target-dot-height) * -.5);\n\n\t\t\t\ttransform: translateX(-50%);\n\t\t\t\tborder-color: var(--ck-clipboard-drop-target-color) transparent transparent transparent;\n\t\t\t\tborder-width: calc(var(--ck-clipboard-drop-target-dot-height)) calc(.5 * var(--ck-clipboard-drop-target-dot-width)) 0 calc(.5 * var(--ck-clipboard-drop-target-dot-width));\n\t\t\t\tborder-style: solid;\n\t\t\t}\n\t\t}\n\t}\n\n\t/*\n\t// Horizontal drop target (between blocks).\n\t& .ck.ck-clipboard-drop-target-position {\n\t\tdisplay: block;\n\t\tposition: relative;\n\t\twidth: 100%;\n\t\theight: 0;\n\t\tmargin: 0;\n\t\ttext-align: initial;\n\n\t\t& .ck-clipboard-drop-target__line {\n\t\t\tposition: absolute;\n\t\t\twidth: 100%;\n\t\t\theight: 0;\n\t\t\tborder: 1px solid var(--ck-clipboard-drop-target-color);\n\t\t\tmargin-top: -1px;\n\n\t\t\t&::before {\n\t\t\t\tcontent: "";\n\t\t\t\twidth: 0;\n\t\t\t\theight: 0;\n\n\t\t\t\tdisplay: block;\n\t\t\t\tposition: absolute;\n\t\t\t\tleft: calc(-1 * var(--ck-clipboard-drop-target-dot-size));\n\t\t\t\ttop: 0;\n\n\t\t\t\ttransform: translateY(-50%);\n\t\t\t\tborder-color: transparent transparent transparent var(--ck-clipboard-drop-target-color);\n\t\t\t\tborder-width: var(--ck-clipboard-drop-target-dot-size) 0 var(--ck-clipboard-drop-target-dot-size) calc(2 * var(--ck-clipboard-drop-target-dot-size));\n\t\t\t\tborder-style: solid;\n\t\t\t}\n\n\t\t\t&::after {\n\t\t\t\tcontent: "";\n\t\t\t\twidth: 0;\n\t\t\t\theight: 0;\n\n\t\t\t\tdisplay: block;\n\t\t\t\tposition: absolute;\n\t\t\t\tright: calc(-1 * var(--ck-clipboard-drop-target-dot-size));\n\t\t\t\ttop: 0;\n\n\t\t\t\ttransform: translateY(-50%);\n\t\t\t\tborder-color: transparent var(--ck-clipboard-drop-target-color) transparent transparent;\n\t\t\t\tborder-width: var(--ck-clipboard-drop-target-dot-size) calc(2 * var(--ck-clipboard-drop-target-dot-size)) var(--ck-clipboard-drop-target-dot-size) 0;\n\t\t\t\tborder-style: solid;\n\t\t\t}\n\t\t}\n\t}\n\t*/\n\n\t/*\n\t * Styles of the widget that it a drop target.\n\t */\n\t& .ck-widget.ck-clipboard-drop-target-range {\n\t\toutline: var(--ck-widget-outline-thickness) solid var(--ck-clipboard-drop-target-color) !important;\n\t}\n\n\t/*\n\t * Styles of the widget being dragged (its preview).\n\t */\n\t& .ck-widget:-webkit-drag {\n\t\tzoom: 0.6;\n\t\toutline: none !important;\n\t}\n}\n'],sourceRoot:""}]);const a=s},638:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(15),o=n.n(i),r=n(645),s=n.n(r)()(o());s.push([e.id,".ck.ck-editor{position:relative}.ck.ck-editor .ck-editor__top .ck-sticky-panel .ck-toolbar{z-index:var(--ck-z-modal)}.ck.ck-editor__top .ck-sticky-panel .ck-toolbar{border-radius:0}.ck-rounded-corners .ck.ck-editor__top .ck-sticky-panel .ck-toolbar,.ck.ck-editor__top .ck-sticky-panel .ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius);border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-editor__top .ck-sticky-panel .ck-toolbar{border-bottom-width:0}.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar{border-bottom-width:1px;border-radius:0}.ck-rounded-corners .ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar,.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius);border-radius:0}.ck.ck-editor__main>.ck-editor__editable{background:var(--ck-color-base-background);border-radius:0}.ck-rounded-corners .ck.ck-editor__main>.ck-editor__editable,.ck.ck-editor__main>.ck-editor__editable.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-top-right-radius:0}.ck.ck-editor__main>.ck-editor__editable:not(.ck-focused){border-color:var(--ck-color-base-border)}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-editor-classic/theme/classiceditor.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-editor-classic/classiceditor.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAKA,cAIC,iBAMD,CAJC,2DAEC,yBACD,CCLC,gDCED,eDKC,CAPA,uICMA,qCAAsC,CDJpC,2BAA4B,CAC5B,4BAIF,CAPA,gDAMC,qBACD,CAEA,iFACC,uBAAwB,CCR1B,eDaC,CANA,yMCHA,qCAAsC,CDOpC,eAEF,CAKF,yCAEC,0CAA2C,CCpB3C,eD8BD,CAZA,yHCdE,qCAAsC,CDmBtC,wBAAyB,CACzB,yBAMF,CAHC,0DACC,wCACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-editor {\n\t/* All the elements within `.ck-editor` are positioned relatively to it.\n\t If any element needs to be positioned with respect to the , etc.,\n\t it must land outside of the `.ck-editor` in DOM. */\n\tposition: relative;\n\n\t& .ck-editor__top .ck-sticky-panel .ck-toolbar {\n\t\t/* https://github.com/ckeditor/ckeditor5-editor-classic/issues/62 */\n\t\tz-index: var(--ck-z-modal);\n\t}\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../mixins/_rounded.css";\n\n.ck.ck-editor__top {\n\t& .ck-sticky-panel {\n\t\t& .ck-toolbar {\n\t\t\t@mixin ck-rounded-corners {\n\t\t\t\tborder-bottom-left-radius: 0;\n\t\t\t\tborder-bottom-right-radius: 0;\n\t\t\t}\n\n\t\t\tborder-bottom-width: 0;\n\t\t}\n\n\t\t& .ck-sticky-panel__content_sticky .ck-toolbar {\n\t\t\tborder-bottom-width: 1px;\n\n\t\t\t@mixin ck-rounded-corners {\n\t\t\t\tborder-radius: 0;\n\t\t\t}\n\t\t}\n\t}\n}\n\n/* Note: Use ck-editor__main to make sure these styles don\'t apply to other editor types */\n.ck.ck-editor__main > .ck-editor__editable {\n\t/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/113 */\n\tbackground: var(--ck-color-base-background);\n\n\t@mixin ck-rounded-corners {\n\t\tborder-top-left-radius: 0;\n\t\tborder-top-right-radius: 0;\n\t}\n\n\t&:not(.ck-focused) {\n\t\tborder-color: var(--ck-color-base-border);\n\t}\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]);const a=s},894:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(15),o=n.n(i),r=n(645),s=n.n(r)()(o());s.push([e.id,".ck .ck-placeholder,.ck.ck-placeholder{position:relative}.ck .ck-placeholder:before,.ck.ck-placeholder:before{content:attr(data-placeholder);left:0;pointer-events:none;position:absolute;right:0}.ck.ck-read-only .ck-placeholder:before{display:none}.ck.ck-reset_all .ck-placeholder{position:relative}.ck .ck-placeholder:before,.ck.ck-placeholder:before{color:var(--ck-color-engine-placeholder-text);cursor:text}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-engine/theme/placeholder.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-engine/placeholder.css"],names:[],mappings:"AAMA,uCAEC,iBAWD,CATC,qDAIC,8BAA+B,CAF/B,MAAO,CAKP,mBAAoB,CANpB,iBAAkB,CAElB,OAKD,CAKA,wCACC,YACD,CAQD,iCACC,iBACD,CC5BC,qDAEC,6CAA8C,CAD9C,WAED",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/* See ckeditor/ckeditor5#936. */\n.ck.ck-placeholder,\n.ck .ck-placeholder {\n\tposition: relative;\n\n\t&::before {\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\tright: 0;\n\t\tcontent: attr(data-placeholder);\n\n\t\t/* See ckeditor/ckeditor5#469. */\n\t\tpointer-events: none;\n\t}\n}\n\n/* See ckeditor/ckeditor5#1987. */\n.ck.ck-read-only .ck-placeholder {\n\t&::before {\n\t\tdisplay: none;\n\t}\n}\n\n/*\n * Rules for the `ck-placeholder` are loaded before the rules for `ck-reset_all` in the base CKEditor 5 DLL build.\n * This fix overwrites the incorrectly set `position: static` from `ck-reset_all`.\n * See https://github.com/ckeditor/ckeditor5/issues/11418.\n */\n.ck.ck-reset_all .ck-placeholder {\n\tposition: relative;\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/* See ckeditor/ckeditor5#936. */\n.ck.ck-placeholder, .ck .ck-placeholder {\n\t&::before {\n\t\tcursor: text;\n\t\tcolor: var(--ck-color-engine-placeholder-text);\n\t}\n}\n"],sourceRoot:""}]);const a=s},401:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(15),o=n.n(i),r=n(645),s=n.n(r)()(o());s.push([e.id,".ck.ck-editor__editable span[data-ck-unsafe-element]{display:none}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-engine/theme/renderer.css"],names:[],mappings:"AAMA,qDACC,YACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/* Elements marked by the Renderer as hidden should be invisible in the editor. */\n.ck.ck-editor__editable span[data-ck-unsafe-element] {\n\tdisplay: none;\n}\n"],sourceRoot:""}]);const a=s},585:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(15),o=n.n(i),r=n(645),s=n.n(r)()(o());s.push([e.id,".ck .ck-button.ck-color-table__remove-color{align-items:center;display:flex;width:100%}label.ck.ck-color-grid__label{font-weight:unset}.ck .ck-button.ck-color-table__remove-color{border-bottom-left-radius:0;border-bottom-right-radius:0;padding:calc(var(--ck-spacing-standard)/2) var(--ck-spacing-standard)}.ck .ck-button.ck-color-table__remove-color:not(:focus){border-bottom:1px solid var(--ck-color-base-border)}[dir=ltr] .ck .ck-button.ck-color-table__remove-color .ck.ck-icon{margin-right:var(--ck-spacing-standard)}[dir=rtl] .ck .ck-button.ck-color-table__remove-color .ck.ck-icon{margin-left:var(--ck-spacing-standard)}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-font/theme/fontcolor.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-font/fontcolor.css"],names:[],mappings:"AAKA,4CAEC,kBAAmB,CADnB,YAAa,CAEb,UACD,CAEA,8BACC,iBACD,CCNA,4CAEC,2BAA4B,CAC5B,4BAA6B,CAF7B,qEAiBD,CAbC,wDACC,mDACD,CAEA,kEAEE,uCAMF,CARA,kEAME,sCAEF",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck .ck-button.ck-color-table__remove-color {\n\tdisplay: flex;\n\talign-items: center;\n\twidth: 100%;\n}\n\nlabel.ck.ck-color-grid__label {\n\tfont-weight: unset;\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n.ck .ck-button.ck-color-table__remove-color {\n\tpadding: calc(var(--ck-spacing-standard) / 2 ) var(--ck-spacing-standard);\n\tborder-bottom-left-radius: 0;\n\tborder-bottom-right-radius: 0;\n\n\t&:not(:focus) {\n\t\tborder-bottom: 1px solid var(--ck-color-base-border);\n\t}\n\n\t& .ck.ck-icon {\n\t\t@mixin ck-dir ltr {\n\t\t\tmargin-right: var(--ck-spacing-standard);\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\tmargin-left: var(--ck-spacing-standard);\n\t\t}\n\t}\n}\n\n'],sourceRoot:""}]);const a=s},230:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(15),o=n.n(i),r=n(645),s=n.n(r)()(o());s.push([e.id,".ck.ck-heading_heading1{font-size:20px}.ck.ck-heading_heading2{font-size:17px}.ck.ck-heading_heading3{font-size:14px}.ck[class*=ck-heading_heading]{font-weight:700}.ck.ck-dropdown.ck-heading-dropdown .ck-dropdown__button .ck-button__label{width:8em}.ck.ck-dropdown.ck-heading-dropdown .ck-dropdown__panel .ck-list__item{min-width:18em}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-heading/theme/heading.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-heading/heading.css"],names:[],mappings:"AAKA,wBACC,cACD,CAEA,wBACC,cACD,CAEA,wBACC,cACD,CAEA,+BACC,eACD,CCZC,2EACC,SACD,CAEA,uEACC,cACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-heading_heading1 {\n\tfont-size: 20px;\n}\n\n.ck.ck-heading_heading2 {\n\tfont-size: 17px;\n}\n\n.ck.ck-heading_heading3 {\n\tfont-size: 14px;\n}\n\n.ck[class*="ck-heading_heading"] {\n\tfont-weight: bold;\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/* Resize dropdown's button label. */\n.ck.ck-dropdown.ck-heading-dropdown {\n\t& .ck-dropdown__button .ck-button__label {\n\t\twidth: 8em;\n\t}\n\n\t& .ck-dropdown__panel .ck-list__item {\n\t\tmin-width: 18em;\n\t}\n}\n"],sourceRoot:""}]);const a=s},48:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(15),o=n.n(i),r=n(645),s=n.n(r)()(o());s.push([e.id,".ck-content .image{clear:both;display:table;margin:.9em auto;min-width:50px;text-align:center}.ck-content .image img{display:block;margin:0 auto;max-width:100%;min-width:100%}.ck-content .image-inline{align-items:flex-start;display:inline-flex;max-width:100%}.ck-content .image-inline picture{display:flex}.ck-content .image-inline img,.ck-content .image-inline picture{flex-grow:1;flex-shrink:1;max-width:100%}.ck.ck-editor__editable .image>figcaption.ck-placeholder:before{overflow:hidden;padding-left:inherit;padding-right:inherit;text-overflow:ellipsis;white-space:nowrap}.ck.ck-editor__editable .image-inline.ck-widget_selected,.ck.ck-editor__editable .image.ck-widget_selected{z-index:1}.ck.ck-editor__editable .image-inline.ck-widget_selected ::selection{display:none}.ck.ck-editor__editable td .image-inline img,.ck.ck-editor__editable th .image-inline img{max-width:none}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-image/theme/image.css"],names:[],mappings:"AAMC,mBAEC,UAAW,CADX,aAAc,CAOd,gBAAkB,CAGlB,cAAe,CARf,iBAuBD,CAbC,uBAEC,aAAc,CAGd,aAAc,CAGd,cAAe,CAGf,cACD,CAGD,0BAYC,sBAAuB,CANvB,mBAAoB,CAGpB,cAoBD,CAdC,kCACC,YACD,CAGA,gEAGC,WAAY,CACZ,aAAc,CAGd,cACD,CAUD,gEASC,eAAgB,CARhB,oBAAqB,CACrB,qBAAsB,CAQtB,sBAAuB,CAFvB,kBAGD,CAWA,2GACC,SAUD,CAHC,qEACC,YACD,CAOA,0FACC,cACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-content {\n\t& .image {\n\t\tdisplay: table;\n\t\tclear: both;\n\t\ttext-align: center;\n\n\t\t/* Make sure there is some space between the content and the image. Center image by default. */\n\t\t/* The first value should be equal to --ck-spacing-large variable if used in the editor context\n\t \tto avoid the content jumping (See https://github.com/ckeditor/ckeditor5/issues/9825). */\n\t\tmargin: 0.9em auto;\n\n\t\t/* Make sure the caption will be displayed properly (See: https://github.com/ckeditor/ckeditor5/issues/1870). */\n\t\tmin-width: 50px;\n\n\t\t& img {\n\t\t\t/* Prevent unnecessary margins caused by line-height (see #44). */\n\t\t\tdisplay: block;\n\n\t\t\t/* Center the image if its width is smaller than the content\'s width. */\n\t\t\tmargin: 0 auto;\n\n\t\t\t/* Make sure the image never exceeds the size of the parent container (ckeditor/ckeditor5-ui#67). */\n\t\t\tmax-width: 100%;\n\n\t\t\t/* Make sure the image is never smaller than the parent container (See: https://github.com/ckeditor/ckeditor5/issues/9300). */\n\t\t\tmin-width: 100%\n\t\t}\n\t}\n\n\t& .image-inline {\n\t\t/*\n\t\t * Normally, the .image-inline would have "display: inline-block" and "img { width: 100% }" (to follow the wrapper while resizing).\n\t\t * Unfortunately, together with "srcset", it gets automatically stretched up to the width of the editing root.\n\t\t * This strange behavior does not happen with inline-flex.\n\t\t */\n\t\tdisplay: inline-flex;\n\n\t\t/* While being resized, don\'t allow the image to exceed the width of the editing root. */\n\t\tmax-width: 100%;\n\n\t\t/* This is required by Safari to resize images in a sensible way. Without this, the browser breaks the ratio. */\n\t\talign-items: flex-start;\n\n\t\t/* When the picture is present it must act as a flex container to let the img resize properly */\n\t\t& picture {\n\t\t\tdisplay: flex;\n\t\t}\n\n\t\t/* When the picture is present, it must act like a resizable img. */\n\t\t& picture,\n\t\t& img {\n\t\t\t/* This is necessary for the img to span the entire .image-inline wrapper and to resize properly. */\n\t\t\tflex-grow: 1;\n\t\t\tflex-shrink: 1;\n\n\t\t\t/* Prevents overflowing the editing root boundaries when an inline image is very wide. */\n\t\t\tmax-width: 100%;\n\t\t}\n\t}\n}\n\n.ck.ck-editor__editable {\n\t/*\n\t * Inhertit the content styles padding of the
in case the integration overrides `text-align: center`\n\t * of `.image` (e.g. to the left/right). This ensures the placeholder stays at the padding just like the native\n\t * caret does, and not at the edge of
.\n\t */\n\t& .image > figcaption.ck-placeholder::before {\n\t\tpadding-left: inherit;\n\t\tpadding-right: inherit;\n\n\t\t/*\n\t\t * Make sure the image caption placeholder doesn\'t overflow the placeholder area.\n\t\t * See https://github.com/ckeditor/ckeditor5/issues/9162.\n\t\t */\n\t\twhite-space: nowrap;\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t}\n\n\n\t/*\n\t * Make sure the selected inline image always stays on top of its siblings.\n\t * See https://github.com/ckeditor/ckeditor5/issues/9108.\n\t */\n\t& .image.ck-widget_selected {\n\t\tz-index: 1;\n\t}\n\n\t& .image-inline.ck-widget_selected {\n\t\tz-index: 1;\n\n\t\t/*\n\t\t * Make sure the native browser selection style is not displayed.\n\t\t * Inline image widgets have their own styles for the selected state and\n\t\t * leaving this up to the browser is asking for a visual collision.\n\t\t */\n\t\t& ::selection {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n\n\t/* The inline image nested in the table should have its original size if not resized.\n\tSee https://github.com/ckeditor/ckeditor5/issues/9117. */\n\t& td,\n\t& th {\n\t\t& .image-inline img {\n\t\t\tmax-width: none;\n\t\t}\n\t}\n}\n'],sourceRoot:""}]);const a=s},43:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(15),o=n.n(i),r=n(645),s=n.n(r)()(o());s.push([e.id,".ck-content .image.image_resized{box-sizing:border-box;display:block;max-width:100%}.ck-content .image.image_resized img{width:100%}.ck-content .image.image_resized>figcaption{display:block}.ck.ck-editor__editable td .image-inline.image_resized img,.ck.ck-editor__editable th .image-inline.image_resized img{max-width:100%}[dir=ltr] .ck.ck-button.ck-button_with-text.ck-resize-image-button .ck-button__icon{margin-right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-button.ck-button_with-text.ck-resize-image-button .ck-button__icon{margin-left:var(--ck-spacing-standard)}.ck.ck-dropdown .ck-button.ck-resize-image-button .ck-button__label{width:4em}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-image/theme/imageresize.css"],names:[],mappings:"AAKA,iCAQC,qBAAsB,CADtB,aAAc,CANd,cAkBD,CATC,qCAEC,UACD,CAEA,4CAEC,aACD,CAQC,sHACC,cACD,CAIF,oFACC,uCACD,CAEA,oFACC,sCACD,CAEA,oEACC,SACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-content .image.image_resized {\n\tmax-width: 100%;\n\t/*\n\tThe `
` element for resized images must not use `display:table` as browsers do not support `max-width` for it well.\n\tSee https://stackoverflow.com/questions/4019604/chrome-safari-ignoring-max-width-in-table/14420691#14420691 for more.\n\tFortunately, since we control the width, there is no risk that the image will look bad.\n\t*/\n\tdisplay: block;\n\tbox-sizing: border-box;\n\n\t& img {\n\t\t/* For resized images it is the `
` element that determines the image width. */\n\t\twidth: 100%;\n\t}\n\n\t& > figcaption {\n\t\t/* The `
` element uses `display:block`, so `
` also has to. */\n\t\tdisplay: block;\n\t}\n}\n\n.ck.ck-editor__editable {\n\t/* The resized inline image nested in the table should respect its parent size.\n\tSee https://github.com/ckeditor/ckeditor5/issues/9117. */\n\t& td,\n\t& th {\n\t\t& .image-inline.image_resized img {\n\t\t\tmax-width: 100%;\n\t\t}\n\t}\n}\n\n[dir="ltr"] .ck.ck-button.ck-button_with-text.ck-resize-image-button .ck-button__icon {\n\tmargin-right: var(--ck-spacing-standard);\n}\n\n[dir="rtl"] .ck.ck-button.ck-button_with-text.ck-resize-image-button .ck-button__icon {\n\tmargin-left: var(--ck-spacing-standard);\n}\n\n.ck.ck-dropdown .ck-button.ck-resize-image-button .ck-button__label {\n\twidth: 4em;\n}\n'],sourceRoot:""}]);const a=s},899:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(15),o=n.n(i),r=n(645),s=n.n(r)()(o());s.push([e.id,'.ck-image-upload-complete-icon{border-radius:50%;display:block;position:absolute;right:min(var(--ck-spacing-medium),6%);top:min(var(--ck-spacing-medium),6%);z-index:1}.ck-image-upload-complete-icon:after{content:"";position:absolute}:root{--ck-color-image-upload-icon:#fff;--ck-color-image-upload-icon-background:#008a00;--ck-image-upload-icon-size:20;--ck-image-upload-icon-width:2px;--ck-image-upload-icon-is-visible:clamp(0px,100% - 50px,1px)}.ck-image-upload-complete-icon{animation-delay:0ms,3s;animation-duration:.5s,.5s;animation-fill-mode:forwards,forwards;animation-name:ck-upload-complete-icon-show,ck-upload-complete-icon-hide;background:var(--ck-color-image-upload-icon-background);font-size:calc(1px*var(--ck-image-upload-icon-size));height:calc(var(--ck-image-upload-icon-is-visible)*var(--ck-image-upload-icon-size));opacity:0;overflow:hidden;width:calc(var(--ck-image-upload-icon-is-visible)*var(--ck-image-upload-icon-size))}.ck-image-upload-complete-icon:after{animation-delay:.5s;animation-duration:.5s;animation-fill-mode:forwards;animation-name:ck-upload-complete-icon-check;border-right:var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);border-top:var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);box-sizing:border-box;height:0;left:25%;opacity:0;top:50%;transform:scaleX(-1) rotate(135deg);transform-origin:left top;width:0}@keyframes ck-upload-complete-icon-show{0%{opacity:0}to{opacity:1}}@keyframes ck-upload-complete-icon-hide{0%{opacity:1}to{opacity:0}}@keyframes ck-upload-complete-icon-check{0%{height:0;opacity:1;width:0}33%{height:0;width:.3em}to{height:.45em;opacity:1;width:.3em}}',"",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-image/theme/imageuploadicon.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-image/imageuploadicon.css"],names:[],mappings:"AAKA,+BAUC,iBAAkB,CATlB,aAAc,CACd,iBAAkB,CAOlB,sCAAwC,CADxC,oCAAsC,CAGtC,SAMD,CAJC,qCACC,UAAW,CACX,iBACD,CChBD,MACC,iCAA8C,CAC9C,+CAA4D,CAG5D,8BAA+B,CAC/B,gCAAiC,CACjC,4DACD,CAEA,+BAWC,sBAA4B,CAN5B,0BAAgC,CADhC,qCAAuC,CADvC,wEAA0E,CAD1E,uDAAwD,CAMxD,oDAAuD,CAWvD,oFAAuF,CAlBvF,SAAU,CAgBV,eAAgB,CAChB,mFA0BD,CAtBC,qCAgBC,mBAAsB,CADtB,sBAAyB,CAEzB,4BAA6B,CAH7B,4CAA6C,CAF7C,sFAAuF,CADvF,oFAAqF,CASrF,qBAAsB,CAdtB,QAAS,CAJT,QAAS,CAGT,SAAU,CADV,OAAQ,CAKR,mCAAoC,CACpC,yBAA0B,CAH1B,OAcD,CAGD,wCACC,GACC,SACD,CAEA,GACC,SACD,CACD,CAEA,wCACC,GACC,SACD,CAEA,GACC,SACD,CACD,CAEA,yCACC,GAGC,QAAS,CAFT,SAAU,CACV,OAED,CACA,IAEC,QAAS,CADT,UAED,CACA,GAGC,YAAc,CAFd,SAAU,CACV,UAED,CACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck-image-upload-complete-icon {\n\tdisplay: block;\n\tposition: absolute;\n\n\t/*\n\t * Smaller images should have the icon closer to the border.\n\t * Match the icon position with the linked image indicator brought by the link image feature.\n\t */\n\ttop: min(var(--ck-spacing-medium), 6%);\n\tright: min(var(--ck-spacing-medium), 6%);\n\tborder-radius: 50%;\n\tz-index: 1;\n\n\t&::after {\n\t\tcontent: "";\n\t\tposition: absolute;\n\t}\n}\n','/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-color-image-upload-icon: hsl(0, 0%, 100%);\n\t--ck-color-image-upload-icon-background: hsl(120, 100%, 27%);\n\n\t/* Match the icon size with the linked image indicator brought by the link image feature. */\n\t--ck-image-upload-icon-size: 20;\n\t--ck-image-upload-icon-width: 2px;\n\t--ck-image-upload-icon-is-visible: clamp(0px, 100% - 50px, 1px);\n}\n\n.ck-image-upload-complete-icon {\n\topacity: 0;\n\tbackground: var(--ck-color-image-upload-icon-background);\n\tanimation-name: ck-upload-complete-icon-show, ck-upload-complete-icon-hide;\n\tanimation-fill-mode: forwards, forwards;\n\tanimation-duration: 500ms, 500ms;\n\n\t/* To make animation scalable. */\n\tfont-size: calc(1px * var(--ck-image-upload-icon-size));\n\n\t/* Hide completed upload icon after 3 seconds. */\n\tanimation-delay: 0ms, 3000ms;\n\n\t/*\n\t * Use CSS math to simulate container queries.\n\t * https://css-tricks.com/the-raven-technique-one-step-closer-to-container-queries/#what-about-showing-and-hiding-things\n\t */\n\toverflow: hidden;\n\twidth: calc(var(--ck-image-upload-icon-is-visible) * var(--ck-image-upload-icon-size));\n\theight: calc(var(--ck-image-upload-icon-is-visible) * var(--ck-image-upload-icon-size));\n\n\t/* This is check icon element made from border-width mixed with animations. */\n\t&::after {\n\t\t/* Because of border transformation we need to "hard code" left position. */\n\t\tleft: 25%;\n\n\t\ttop: 50%;\n\t\topacity: 0;\n\t\theight: 0;\n\t\twidth: 0;\n\n\t\ttransform: scaleX(-1) rotate(135deg);\n\t\ttransform-origin: left top;\n\t\tborder-top: var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);\n\t\tborder-right: var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);\n\n\t\tanimation-name: ck-upload-complete-icon-check;\n\t\tanimation-duration: 500ms;\n\t\tanimation-delay: 500ms;\n\t\tanimation-fill-mode: forwards;\n\n\t\t/* #1095. While reset is not providing proper box-sizing for pseudoelements, we need to handle it. */\n\t\tbox-sizing: border-box;\n\t}\n}\n\n@keyframes ck-upload-complete-icon-show {\n\tfrom {\n\t\topacity: 0;\n\t}\n\n\tto {\n\t\topacity: 1;\n\t}\n}\n\n@keyframes ck-upload-complete-icon-hide {\n\tfrom {\n\t\topacity: 1;\n\t}\n\n\tto {\n\t\topacity: 0;\n\t}\n}\n\n@keyframes ck-upload-complete-icon-check {\n\t0% {\n\t\topacity: 1;\n\t\twidth: 0;\n\t\theight: 0;\n\t}\n\t33% {\n\t\twidth: 0.3em;\n\t\theight: 0;\n\t}\n\t100% {\n\t\topacity: 1;\n\t\twidth: 0.3em;\n\t\theight: 0.45em;\n\t}\n}\n'],sourceRoot:""}]);const a=s},825:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(15),o=n.n(i),r=n(645),s=n.n(r)()(o());s.push([e.id,'.ck .ck-upload-placeholder-loader{align-items:center;display:flex;justify-content:center;left:0;position:absolute;top:0}.ck .ck-upload-placeholder-loader:before{content:"";position:relative}:root{--ck-color-upload-placeholder-loader:#b3b3b3;--ck-upload-placeholder-loader-size:32px;--ck-upload-placeholder-image-aspect-ratio:2.8}.ck .ck-image-upload-placeholder{margin:0;width:100%}.ck .ck-image-upload-placeholder.image-inline{width:calc(var(--ck-upload-placeholder-loader-size)*2*var(--ck-upload-placeholder-image-aspect-ratio))}.ck .ck-image-upload-placeholder img{aspect-ratio:var(--ck-upload-placeholder-image-aspect-ratio)}.ck .ck-upload-placeholder-loader{height:100%;width:100%}.ck .ck-upload-placeholder-loader:before{animation:ck-upload-placeholder-loader 1s linear infinite;border-radius:50%;border-right:2px solid transparent;border-top:3px solid var(--ck-color-upload-placeholder-loader);height:var(--ck-upload-placeholder-loader-size);width:var(--ck-upload-placeholder-loader-size)}@keyframes ck-upload-placeholder-loader{to{transform:rotate(1turn)}}',"",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-image/theme/imageuploadloader.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-image/imageuploadloader.css"],names:[],mappings:"AAKA,kCAGC,kBAAmB,CADnB,YAAa,CAEb,sBAAuB,CAEvB,MAAO,CALP,iBAAkB,CAIlB,KAOD,CAJC,yCACC,UAAW,CACX,iBACD,CCXD,MACC,4CAAqD,CACrD,wCAAyC,CACzC,8CACD,CAEA,iCAGC,QAAS,CADT,UAgBD,CAbC,8CACC,sGACD,CAEA,qCAOC,4DACD,CAGD,kCAEC,WAAY,CADZ,UAWD,CARC,yCAMC,yDAA0D,CAH1D,iBAAkB,CAElB,kCAAmC,CADnC,8DAA+D,CAF/D,+CAAgD,CADhD,8CAMD,CAGD,wCACC,GACC,uBACD,CACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck .ck-upload-placeholder-loader {\n\tposition: absolute;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\ttop: 0;\n\tleft: 0;\n\n\t&::before {\n\t\tcontent: '';\n\t\tposition: relative;\n\t}\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-color-upload-placeholder-loader: hsl(0, 0%, 70%);\n\t--ck-upload-placeholder-loader-size: 32px;\n\t--ck-upload-placeholder-image-aspect-ratio: 2.8;\n}\n\n.ck .ck-image-upload-placeholder {\n\t/* We need to control the full width of the SVG gray background. */\n\twidth: 100%;\n\tmargin: 0;\n\n\t&.image-inline {\n\t\twidth: calc( 2 * var(--ck-upload-placeholder-loader-size) * var(--ck-upload-placeholder-image-aspect-ratio) );\n\t}\n\n\t& img {\n\t\t/*\n\t\t * This is an arbitrary aspect for a 1x1 px GIF to display to the user. Not too tall, not too short.\n\t\t * There's nothing special about this number except that it should make the image placeholder look like\n\t\t * a real image during this short period after the upload started and before the image was read from the\n\t\t * file system (and a rich preview was loaded).\n\t\t */\n\t\taspect-ratio: var(--ck-upload-placeholder-image-aspect-ratio);\n\t}\n}\n\n.ck .ck-upload-placeholder-loader {\n\twidth: 100%;\n\theight: 100%;\n\n\t&::before {\n\t\twidth: var(--ck-upload-placeholder-loader-size);\n\t\theight: var(--ck-upload-placeholder-loader-size);\n\t\tborder-radius: 50%;\n\t\tborder-top: 3px solid var(--ck-color-upload-placeholder-loader);\n\t\tborder-right: 2px solid transparent;\n\t\tanimation: ck-upload-placeholder-loader 1s linear infinite;\n\t}\n}\n\n@keyframes ck-upload-placeholder-loader {\n\tto {\n\t\ttransform: rotate( 360deg );\n\t}\n}\n"],sourceRoot:""}]);const a=s},870:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(15),o=n.n(i),r=n(645),s=n.n(r)()(o());s.push([e.id,".ck.ck-editor__editable .image,.ck.ck-editor__editable .image-inline{position:relative}.ck.ck-editor__editable .image .ck-progress-bar,.ck.ck-editor__editable .image-inline .ck-progress-bar{left:0;position:absolute;top:0}.ck.ck-editor__editable .image-inline.ck-appear,.ck.ck-editor__editable .image.ck-appear{animation:fadeIn .7s}.ck.ck-editor__editable .image .ck-progress-bar,.ck.ck-editor__editable .image-inline .ck-progress-bar{background:var(--ck-color-upload-bar-background);height:2px;transition:width .1s;width:0}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-image/theme/imageuploadprogress.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-image/imageuploadprogress.css"],names:[],mappings:"AAMC,qEAEC,iBACD,CAGA,uGAIC,MAAO,CAFP,iBAAkB,CAClB,KAED,CCRC,yFACC,oBACD,CAID,uGAIC,gDAAiD,CAFjD,UAAW,CAGX,oBAAuB,CAFvB,OAGD,CAGD,kBACC,GAAO,SAAY,CACnB,GAAO,SAAY,CACpB",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-editor__editable {\n\t& .image,\n\t& .image-inline {\n\t\tposition: relative;\n\t}\n\n\t/* Upload progress bar. */\n\t& .image .ck-progress-bar,\n\t& .image-inline .ck-progress-bar {\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\tleft: 0;\n\t}\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-editor__editable {\n\t& .image,\n\t& .image-inline {\n\t\t/* Showing animation. */\n\t\t&.ck-appear {\n\t\t\tanimation: fadeIn 700ms;\n\t\t}\n\t}\n\n\t/* Upload progress bar. */\n\t& .image .ck-progress-bar,\n\t& .image-inline .ck-progress-bar {\n\t\theight: 2px;\n\t\twidth: 0;\n\t\tbackground: var(--ck-color-upload-bar-background);\n\t\ttransition: width 100ms;\n\t}\n}\n\n@keyframes fadeIn {\n\tfrom { opacity: 0; }\n\tto { opacity: 1; }\n}\n"],sourceRoot:""}]);const a=s},831:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(15),o=n.n(i),r=n(645),s=n.n(r)()(o());s.push([e.id,".ck.ck-text-alternative-form{display:flex;flex-direction:row;flex-wrap:nowrap}.ck.ck-text-alternative-form .ck-labeled-field-view{display:inline-block}.ck.ck-text-alternative-form .ck-label{display:none}@media screen and (max-width:600px){.ck.ck-text-alternative-form{flex-wrap:wrap}.ck.ck-text-alternative-form .ck-labeled-field-view{flex-basis:100%}.ck.ck-text-alternative-form .ck-button{flex-basis:50%}}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-image/theme/textalternativeform.css","webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css"],names:[],mappings:"AAOA,6BACC,YAAa,CACb,kBAAmB,CACnB,gBAqBD,CAnBC,oDACC,oBACD,CAEA,uCACC,YACD,CCZA,oCDCD,6BAcE,cAUF,CARE,oDACC,eACD,CAEA,wCACC,cACD,CCrBD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";\n\n.ck.ck-text-alternative-form {\n\tdisplay: flex;\n\tflex-direction: row;\n\tflex-wrap: nowrap;\n\n\t& .ck-labeled-field-view {\n\t\tdisplay: inline-block;\n\t}\n\n\t& .ck-label {\n\t\tdisplay: none;\n\t}\n\n\t@mixin ck-media-phone {\n\t\tflex-wrap: wrap;\n\n\t\t& .ck-labeled-field-view {\n\t\t\tflex-basis: 100%;\n\t\t}\n\n\t\t& .ck-button {\n\t\t\tflex-basis: 50%;\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@define-mixin ck-media-phone {\n\t@media screen and (max-width: 600px) {\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]);const a=s},399:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(15),o=n.n(i),r=n(645),s=n.n(r)()(o());s.push([e.id,".ck .ck-link_selected{background:var(--ck-color-link-selected-background)}.ck .ck-link_selected span.image-inline{outline:var(--ck-widget-outline-thickness) solid var(--ck-color-link-selected-background)}.ck .ck-fake-link-selection{background:var(--ck-color-link-fake-selection)}.ck .ck-fake-link-selection_collapsed{border-right:1px solid var(--ck-color-base-text);height:100%;margin-right:-1px;outline:1px solid hsla(0,0%,100%,.5)}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-link/link.css"],names:[],mappings:"AAMA,sBACC,mDAMD,CAHC,wCACC,yFACD,CAOD,4BACC,8CACD,CAGA,sCAEC,gDAAiD,CADjD,WAAY,CAEZ,iBAAkB,CAClB,oCACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/* Class added to span element surrounding currently selected link. */\n.ck .ck-link_selected {\n\tbackground: var(--ck-color-link-selected-background);\n\n\t/* Give linked inline images some outline to let the user know they are also part of the link. */\n\t& span.image-inline {\n\t\toutline: var(--ck-widget-outline-thickness) solid var(--ck-color-link-selected-background);\n\t}\n}\n\n/*\n * Classes used by the "fake visual selection" displayed in the content when an input\n * in the link UI has focus (the browser does not render the native selection in this state).\n */\n.ck .ck-fake-link-selection {\n\tbackground: var(--ck-color-link-fake-selection);\n}\n\n/* A collapsed fake visual selection. */\n.ck .ck-fake-link-selection_collapsed {\n\theight: 100%;\n\tborder-right: 1px solid var(--ck-color-base-text);\n\tmargin-right: -1px;\n\toutline: solid 1px hsla(0, 0%, 100%, .5);\n}\n'],sourceRoot:""}]);const a=s},465:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(15),o=n.n(i),r=n(645),s=n.n(r)()(o());s.push([e.id,".ck.ck-link-actions{display:flex;flex-direction:row;flex-wrap:nowrap}.ck.ck-link-actions .ck-link-actions__preview{display:inline-block}.ck.ck-link-actions .ck-link-actions__preview .ck-button__label{overflow:hidden}@media screen and (max-width:600px){.ck.ck-link-actions{flex-wrap:wrap}.ck.ck-link-actions .ck-link-actions__preview{flex-basis:100%}.ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){flex-basis:50%}}.ck.ck-link-actions .ck-button.ck-link-actions__preview{padding-left:0;padding-right:0}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label{color:var(--ck-color-link-default);cursor:pointer;max-width:var(--ck-input-width);min-width:3em;padding:0 var(--ck-spacing-medium);text-align:center;text-overflow:ellipsis}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label:hover{text-decoration:underline}.ck.ck-link-actions .ck-button.ck-link-actions__preview,.ck.ck-link-actions .ck-button.ck-link-actions__preview:active,.ck.ck-link-actions .ck-button.ck-link-actions__preview:focus,.ck.ck-link-actions .ck-button.ck-link-actions__preview:hover{background:none}.ck.ck-link-actions .ck-button.ck-link-actions__preview:active{box-shadow:none}.ck.ck-link-actions .ck-button.ck-link-actions__preview:focus .ck-button__label{text-decoration:underline}[dir=ltr] .ck.ck-link-actions .ck-button:not(:first-child),[dir=rtl] .ck.ck-link-actions .ck-button:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-link-actions .ck-button.ck-link-actions__preview{margin:var(--ck-spacing-standard) var(--ck-spacing-standard) 0}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label{max-width:100%;min-width:0}[dir=ltr] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview),[dir=rtl] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){margin-left:0}}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-link/theme/linkactions.css","webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-link/linkactions.css"],names:[],mappings:"AAOA,oBACC,YAAa,CACb,kBAAmB,CACnB,gBAqBD,CAnBC,8CACC,oBAKD,CAHC,gEACC,eACD,CCXD,oCDCD,oBAcE,cAUF,CARE,8CACC,eACD,CAEA,8DACC,cACD,CCrBD,CCKA,wDACC,cAAe,CACf,eAmCD,CAjCC,0EAEC,kCAAmC,CAEnC,cAAe,CAIf,+BAAgC,CAChC,aAAc,CARd,kCAAmC,CASnC,iBAAkB,CAPlB,sBAYD,CAHC,gFACC,yBACD,CAGD,mPAIC,eACD,CAEA,+DACC,eACD,CAGC,gFACC,yBACD,CAWD,qHACC,sCACD,CDvDD,oCC2DC,wDACC,8DAMD,CAJC,0EAEC,cAAe,CADf,WAED,CAGD,gJAME,aAEF,CD1ED",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";\n\n.ck.ck-link-actions {\n\tdisplay: flex;\n\tflex-direction: row;\n\tflex-wrap: nowrap;\n\n\t& .ck-link-actions__preview {\n\t\tdisplay: inline-block;\n\n\t\t& .ck-button__label {\n\t\t\toverflow: hidden;\n\t\t}\n\t}\n\n\t@mixin ck-media-phone {\n\t\tflex-wrap: wrap;\n\n\t\t& .ck-link-actions__preview {\n\t\t\tflex-basis: 100%;\n\t\t}\n\n\t\t& .ck-button:not(.ck-link-actions__preview) {\n\t\t\tflex-basis: 50%;\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@define-mixin ck-media-phone {\n\t@media screen and (max-width: 600px) {\n\t\t@mixin-content;\n\t}\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/components/tooltip/mixins/_tooltip.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_unselectable.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n@import "../mixins/_focus.css";\n@import "../mixins/_shadow.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";\n\n.ck.ck-link-actions {\n\t& .ck-button.ck-link-actions__preview {\n\t\tpadding-left: 0;\n\t\tpadding-right: 0;\n\n\t\t& .ck-button__label {\n\t\t\tpadding: 0 var(--ck-spacing-medium);\n\t\t\tcolor: var(--ck-color-link-default);\n\t\t\ttext-overflow: ellipsis;\n\t\t\tcursor: pointer;\n\n\t\t\t/* Match the box model of the link editor form\'s input so the balloon\n\t\t\tdoes not change width when moving between actions and the form. */\n\t\t\tmax-width: var(--ck-input-width);\n\t\t\tmin-width: 3em;\n\t\t\ttext-align: center;\n\n\t\t\t&:hover {\n\t\t\t\ttext-decoration: underline;\n\t\t\t}\n\t\t}\n\n\t\t&,\n\t\t&:hover,\n\t\t&:focus,\n\t\t&:active {\n\t\t\tbackground: none;\n\t\t}\n\n\t\t&:active {\n\t\t\tbox-shadow: none;\n\t\t}\n\n\t\t&:focus {\n\t\t\t& .ck-button__label {\n\t\t\t\ttext-decoration: underline;\n\t\t\t}\n\t\t}\n\t}\n\n\t@mixin ck-dir ltr {\n\t\t& .ck-button:not(:first-child) {\n\t\t\tmargin-left: var(--ck-spacing-standard);\n\t\t}\n\t}\n\n\t@mixin ck-dir rtl {\n\t\t& .ck-button:not(:last-child) {\n\t\t\tmargin-left: var(--ck-spacing-standard);\n\t\t}\n\t}\n\n\t@mixin ck-media-phone {\n\t\t& .ck-button.ck-link-actions__preview {\n\t\t\tmargin: var(--ck-spacing-standard) var(--ck-spacing-standard) 0;\n\n\t\t\t& .ck-button__label {\n\t\t\t\tmin-width: 0;\n\t\t\t\tmax-width: 100%;\n\t\t\t}\n\t\t}\n\n\t\t& .ck-button:not(.ck-link-actions__preview) {\n\t\t\t@mixin ck-dir ltr {\n\t\t\t\tmargin-left: 0;\n\t\t\t}\n\n\t\t\t@mixin ck-dir rtl {\n\t\t\t\tmargin-left: 0;\n\t\t\t}\n\t\t}\n\t}\n}\n'],sourceRoot:""}]);const a=s},827:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(15),o=n.n(i),r=n(645),s=n.n(r)()(o());s.push([e.id,".ck.ck-link-form{display:flex}.ck.ck-link-form .ck-label{display:none}@media screen and (max-width:600px){.ck.ck-link-form{flex-wrap:wrap}.ck.ck-link-form .ck-labeled-field-view{flex-basis:100%}.ck.ck-link-form .ck-button{flex-basis:50%}}.ck.ck-link-form_layout-vertical{display:block}.ck.ck-link-form_layout-vertical .ck-button.ck-button-cancel,.ck.ck-link-form_layout-vertical .ck-button.ck-button-save{margin-top:var(--ck-spacing-medium)}.ck.ck-link-form_layout-vertical{min-width:var(--ck-input-width);padding:0}.ck.ck-link-form_layout-vertical .ck-labeled-field-view{margin:var(--ck-spacing-large) var(--ck-spacing-large) var(--ck-spacing-small)}.ck.ck-link-form_layout-vertical .ck-labeled-field-view .ck-input-text{min-width:0;width:100%}.ck.ck-link-form_layout-vertical .ck-button{border:0;border-radius:0;border-top:1px solid var(--ck-color-base-border);margin:0;padding:var(--ck-spacing-standard);width:50%}[dir=ltr] .ck.ck-link-form_layout-vertical .ck-button,[dir=rtl] .ck.ck-link-form_layout-vertical .ck-button{margin-left:0}[dir=rtl] .ck.ck-link-form_layout-vertical .ck-button:last-of-type{border-right:1px solid var(--ck-color-base-border)}.ck.ck-link-form_layout-vertical .ck.ck-list{margin:var(--ck-spacing-standard) var(--ck-spacing-large)}.ck.ck-link-form_layout-vertical .ck.ck-list .ck-button.ck-switchbutton{border:0;padding:0;width:100%}.ck.ck-link-form_layout-vertical .ck.ck-list .ck-button.ck-switchbutton:hover{background:none}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-link/theme/linkform.css","webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-link/linkform.css"],names:[],mappings:"AAOA,iBACC,YAiBD,CAfC,2BACC,YACD,CCNA,oCDCD,iBAQE,cAUF,CARE,wCACC,eACD,CAEA,4BACC,cACD,CCfD,CDuBD,iCACC,aAYD,CALE,wHAEC,mCACD,CE/BF,iCAEC,+BAAgC,CADhC,SA+CD,CA5CC,wDACC,8EAMD,CAJC,uEACC,WAAY,CACZ,UACD,CAGD,4CAIC,QAAS,CADT,eAAgB,CAEhB,gDAAiD,CAHjD,QAAS,CADT,kCAAmC,CAKnC,SAaD,CAnBA,4GAaE,aAMF,CAJE,mEACC,kDACD,CAKF,6CACC,yDAWD,CATC,wEACC,QAAS,CACT,SAAU,CACV,UAKD,CAHC,8EACC,eACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";\n\n.ck.ck-link-form {\n\tdisplay: flex;\n\n\t& .ck-label {\n\t\tdisplay: none;\n\t}\n\n\t@mixin ck-media-phone {\n\t\tflex-wrap: wrap;\n\n\t\t& .ck-labeled-field-view {\n\t\t\tflex-basis: 100%;\n\t\t}\n\n\t\t& .ck-button {\n\t\t\tflex-basis: 50%;\n\t\t}\n\t}\n}\n\n/*\n * Style link form differently when manual decorators are available.\n * See: https://github.com/ckeditor/ckeditor5-link/issues/186.\n */\n.ck.ck-link-form_layout-vertical {\n\tdisplay: block;\n\n\t/*\n\t * Whether the form is in the responsive mode or not, if there are decorator buttons\n\t * keep the top margin of action buttons medium.\n\t */\n\t& .ck-button {\n\t\t&.ck-button-save,\n\t\t&.ck-button-cancel {\n\t\t\tmargin-top: var(--ck-spacing-medium);\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@define-mixin ck-media-phone {\n\t@media screen and (max-width: 600px) {\n\t\t@mixin-content;\n\t}\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n/*\n * Style link form differently when manual decorators are available.\n * See: https://github.com/ckeditor/ckeditor5-link/issues/186.\n */\n.ck.ck-link-form_layout-vertical {\n\tpadding: 0;\n\tmin-width: var(--ck-input-width);\n\n\t& .ck-labeled-field-view {\n\t\tmargin: var(--ck-spacing-large) var(--ck-spacing-large) var(--ck-spacing-small);\n\n\t\t& .ck-input-text {\n\t\t\tmin-width: 0;\n\t\t\twidth: 100%;\n\t\t}\n\t}\n\n\t& .ck-button {\n\t\tpadding: var(--ck-spacing-standard);\n\t\tmargin: 0;\n\t\tborder-radius: 0;\n\t\tborder: 0;\n\t\tborder-top: 1px solid var(--ck-color-base-border);\n\t\twidth: 50%;\n\n\t\t@mixin ck-dir ltr {\n\t\t\tmargin-left: 0;\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\tmargin-left: 0;\n\n\t\t\t&:last-of-type {\n\t\t\t\tborder-right: 1px solid var(--ck-color-base-border);\n\t\t\t}\n\t\t}\n\t}\n\n\t/* Using additional `.ck` class for stronger CSS specificity than `.ck.ck-link-form > :not(:first-child)`. */\n\t& .ck.ck-list {\n\t\tmargin: var(--ck-spacing-standard) var(--ck-spacing-large);\n\n\t\t& .ck-button.ck-switchbutton {\n\t\t\tborder: 0;\n\t\t\tpadding: 0;\n\t\t\twidth: 100%;\n\n\t\t\t&:hover {\n\t\t\t\tbackground: none;\n\t\t\t}\n\t\t}\n\t}\n}\n'],sourceRoot:""}]);const a=s},499:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(15),o=n.n(i),r=n(645),s=n.n(r)()(o());s.push([e.id,".ck.ck-button,a.ck.ck-button{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ck.ck-button .ck-tooltip,a.ck.ck-button .ck-tooltip{display:block}@media (hover:none){.ck.ck-button .ck-tooltip,a.ck.ck-button .ck-tooltip{display:none}}.ck.ck-button,a.ck.ck-button{align-items:center;display:inline-flex;justify-content:left;position:relative}.ck.ck-button .ck-button__label,a.ck.ck-button .ck-button__label{display:none}.ck.ck-button.ck-button_with-text .ck-button__label,a.ck.ck-button.ck-button_with-text .ck-button__label{display:inline-block}.ck.ck-button:not(.ck-button_with-text),a.ck.ck-button:not(.ck-button_with-text){justify-content:center}.ck.ck-button:hover .ck-tooltip,a.ck.ck-button:hover .ck-tooltip{opacity:1;visibility:visible}.ck.ck-button:focus:not(:hover) .ck-tooltip,a.ck.ck-button:focus:not(:hover) .ck-tooltip{display:none}.ck.ck-button,a.ck.ck-button{background:var(--ck-color-button-default-background)}.ck.ck-button:not(.ck-disabled):hover,a.ck.ck-button:not(.ck-disabled):hover{background:var(--ck-color-button-default-hover-background)}.ck.ck-button:not(.ck-disabled):active,a.ck.ck-button:not(.ck-disabled):active{background:var(--ck-color-button-default-active-background);box-shadow:inset 0 2px 2px var(--ck-color-button-default-active-shadow)}.ck.ck-button.ck-disabled,a.ck.ck-button.ck-disabled{background:var(--ck-color-button-default-disabled-background)}.ck.ck-button,a.ck.ck-button{border-radius:0}.ck-rounded-corners .ck.ck-button,.ck-rounded-corners a.ck.ck-button,.ck.ck-button.ck-rounded-corners,a.ck.ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-button,a.ck.ck-button{-webkit-appearance:none;border:1px solid transparent;cursor:default;font-size:inherit;line-height:1;min-height:var(--ck-ui-component-min-height);min-width:var(--ck-ui-component-min-height);padding:var(--ck-spacing-tiny);text-align:center;transition:box-shadow .2s ease-in-out,border .2s ease-in-out;vertical-align:middle;white-space:nowrap}.ck.ck-button:active,.ck.ck-button:focus,a.ck.ck-button:active,a.ck.ck-button:focus{border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck.ck-button .ck-button__icon use,.ck.ck-button .ck-button__icon use *,a.ck.ck-button .ck-button__icon use,a.ck.ck-button .ck-button__icon use *{color:inherit}.ck.ck-button .ck-button__label,a.ck.ck-button .ck-button__label{color:inherit;cursor:inherit;font-size:inherit;font-weight:inherit;vertical-align:middle}[dir=ltr] .ck.ck-button .ck-button__label,[dir=ltr] a.ck.ck-button .ck-button__label{text-align:left}[dir=rtl] .ck.ck-button .ck-button__label,[dir=rtl] a.ck.ck-button .ck-button__label{text-align:right}.ck.ck-button .ck-button__keystroke,a.ck.ck-button .ck-button__keystroke{color:inherit}[dir=ltr] .ck.ck-button .ck-button__keystroke,[dir=ltr] a.ck.ck-button .ck-button__keystroke{margin-left:var(--ck-spacing-large)}[dir=rtl] .ck.ck-button .ck-button__keystroke,[dir=rtl] a.ck.ck-button .ck-button__keystroke{margin-right:var(--ck-spacing-large)}.ck.ck-button .ck-button__keystroke,a.ck.ck-button .ck-button__keystroke{font-weight:700;opacity:.7}.ck.ck-button.ck-disabled:active,.ck.ck-button.ck-disabled:focus,a.ck.ck-button.ck-disabled:active,a.ck.ck-button.ck-disabled:focus{box-shadow:var(--ck-focus-disabled-outer-shadow),0 0}.ck.ck-button.ck-disabled .ck-button__icon,a.ck.ck-button.ck-disabled .ck-button__icon{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-disabled .ck-button__label,a.ck.ck-button.ck-disabled .ck-button__label{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-disabled .ck-button__keystroke,a.ck.ck-button.ck-disabled .ck-button__keystroke{opacity:.3}.ck.ck-button.ck-button_with-text,a.ck.ck-button.ck-button_with-text{padding:var(--ck-spacing-tiny) var(--ck-spacing-standard)}[dir=ltr] .ck.ck-button.ck-button_with-text .ck-button__icon,[dir=ltr] a.ck.ck-button.ck-button_with-text .ck-button__icon{margin-left:calc(var(--ck-spacing-small)*-1);margin-right:var(--ck-spacing-small)}[dir=rtl] .ck.ck-button.ck-button_with-text .ck-button__icon,[dir=rtl] a.ck.ck-button.ck-button_with-text .ck-button__icon{margin-left:var(--ck-spacing-small);margin-right:calc(var(--ck-spacing-small)*-1)}.ck.ck-button.ck-button_with-keystroke .ck-button__label,a.ck.ck-button.ck-button_with-keystroke .ck-button__label{flex-grow:1}.ck.ck-button.ck-on,a.ck.ck-button.ck-on{background:var(--ck-color-button-on-background)}.ck.ck-button.ck-on:not(.ck-disabled):hover,a.ck.ck-button.ck-on:not(.ck-disabled):hover{background:var(--ck-color-button-on-hover-background)}.ck.ck-button.ck-on:not(.ck-disabled):active,a.ck.ck-button.ck-on:not(.ck-disabled):active{background:var(--ck-color-button-on-active-background);box-shadow:inset 0 2px 2px var(--ck-color-button-on-active-shadow)}.ck.ck-button.ck-on.ck-disabled,a.ck.ck-button.ck-on.ck-disabled{background:var(--ck-color-button-on-disabled-background)}.ck.ck-button.ck-button-save,a.ck.ck-button.ck-button-save{color:var(--ck-color-button-save)}.ck.ck-button.ck-button-cancel,a.ck.ck-button.ck-button-cancel{color:var(--ck-color-button-cancel)}.ck.ck-button-action,a.ck.ck-button-action{background:var(--ck-color-button-action-background)}.ck.ck-button-action:not(.ck-disabled):hover,a.ck.ck-button-action:not(.ck-disabled):hover{background:var(--ck-color-button-action-hover-background)}.ck.ck-button-action:not(.ck-disabled):active,a.ck.ck-button-action:not(.ck-disabled):active{background:var(--ck-color-button-action-active-background);box-shadow:inset 0 2px 2px var(--ck-color-button-action-active-shadow)}.ck.ck-button-action.ck-disabled,a.ck.ck-button-action.ck-disabled{background:var(--ck-color-button-action-disabled-background)}.ck.ck-button-action,a.ck.ck-button-action{color:var(--ck-color-button-action-text)}.ck.ck-button-bold,a.ck.ck-button-bold{font-weight:700}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/button/button.css","webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/mixins/_unselectable.css","webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/tooltip/mixins/_tooltip.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/button/button.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/mixins/_button.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_rounded.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_focus.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_shadow.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_disabled.css"],names:[],mappings:"AAQA,6BCCC,qBAAsB,CACtB,wBAAyB,CACzB,oBAAqB,CACrB,gBD6BD,CE/BC,qDACC,aAqBD,CAHC,oBAnBD,qDAoBE,YAEF,CADC,CFvBF,6BAOC,kBAAmB,CADnB,mBAAoB,CAEpB,oBAAqB,CAHrB,iBA4BD,CAvBC,iEACC,YACD,CAGC,yGACC,oBACD,CAID,iFACC,sBACD,CEkBA,iEAEC,SAAU,CADV,kBAED,CAbA,yFACC,YACD,CC7BD,6BCAC,oDD0ID,CCvIE,6EACC,0DACD,CAEA,+EACC,2DAA4C,CAC5C,uEACD,CAID,qDACC,6DACD,CDhBD,6BEDC,eF2ID,CA1IA,wIEGE,qCFuIF,CA1IA,6BA6BC,uBAAwB,CANxB,4BAA6B,CAjB7B,cAAe,CAcf,iBAAkB,CAHlB,aAAc,CAJd,4CAA6C,CAD7C,2CAA4C,CAJ5C,8BAA+B,CAC/B,iBAAkB,CAiBlB,4DAA8D,CAnB9D,qBAAsB,CAFtB,kBAqID,CA3GC,oFGhCA,2BAA2B,CCF3B,2CAA8B,CDC9B,YHqCA,CAIC,kJAEC,aACD,CAGD,iEAIC,aAAc,CACd,cAAe,CAHf,iBAAkB,CAClB,mBAAoB,CAMpB,qBASD,CAlBA,qFAYE,eAMF,CAlBA,qFAgBE,gBAEF,CAEA,yEACC,aAYD,CAbA,6FAIE,mCASF,CAbA,6FAQE,oCAKF,CAbA,yEAWC,eAAiB,CACjB,UACD,CAIC,oIIrFD,oDJyFC,CAEA,uFK3FD,kCL6FC,CAGA,yFKhGD,kCLkGC,CAEA,iGACC,UACD,CAGD,qEACC,yDAcD,CAXC,2HAEE,4CAA+C,CAC/C,oCAOF,CAVA,2HAQE,mCAAoC,CADpC,6CAGF,CAKA,mHACC,WACD,CAID,yCC/HA,+CDiIA,CC9HC,yFACC,qDACD,CAEA,2FACC,sDAA4C,CAC5C,kEACD,CAID,iEACC,wDACD,CDmHA,2DACC,iCACD,CAEA,+DACC,mCACD,CAID,2CC7IC,mDDkJD,CC/IE,2FACC,yDACD,CAEA,6FACC,0DAA4C,CAC5C,sEACD,CAID,mEACC,4DACD,CD6HD,2CAIC,wCACD,CAEA,uCAEC,eACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../mixins/_unselectable.css";\n@import "../tooltip/mixins/_tooltip.css";\n\n.ck.ck-button,\na.ck.ck-button {\n\t@mixin ck-unselectable;\n\t@mixin ck-tooltip_enabled;\n\n\tposition: relative;\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: left;\n\n\t& .ck-button__label {\n\t\tdisplay: none;\n\t}\n\n\t&.ck-button_with-text {\n\t\t& .ck-button__label {\n\t\t\tdisplay: inline-block;\n\t\t}\n\t}\n\n\t/* Center the icon horizontally in a button without text. */\n\t&:not(.ck-button_with-text) {\n\t\tjustify-content: center;\n\t}\n\n\t&:hover {\n\t\t@mixin ck-tooltip_visible;\n\t}\n\n\t/* Get rid of the native focus outline around the tooltip when focused (but not :hover). */\n\t&:focus:not(:hover) {\n\t\t@mixin ck-tooltip_disabled;\n\t}\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Makes element unselectable.\n */\n@define-mixin ck-unselectable {\n\t-moz-user-select: none;\n\t-webkit-user-select: none;\n\t-ms-user-select: none;\n\tuser-select: none\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Enables the tooltip, which is the tooltip is in DOM but\n * not yet displayed.\n */\n@define-mixin ck-tooltip_enabled {\n\t& .ck-tooltip {\n\t\tdisplay: block;\n\n\t\t/*\n\t\t * Don't display tooltips in devices which don't support :hover.\n\t\t * In fact, it's all about iOS, which forces user to click UI elements twice to execute\n\t\t * the primary action, when tooltips are enabled.\n\t\t *\n\t\t * Q: OK, but why not the following query?\n\t\t *\n\t\t * @media (hover) {\n\t\t * display: block;\n\t\t * }\n\t\t *\n\t\t * A: Because FF does not support it and it would completely disable tooltips\n\t\t * in that browser.\n\t\t *\n\t\t * More in https://github.com/ckeditor/ckeditor5/issues/920.\n\t\t */\n\t\t@media (hover:none) {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n}\n\n/**\n * Disables the tooltip making it disappear from DOM.\n */\n@define-mixin ck-tooltip_disabled {\n\t& .ck-tooltip {\n\t\tdisplay: none;\n\t}\n}\n\n/**\n * Shows the tooltip, which is already in DOM.\n * Requires `ck-tooltip_enabled` first.\n */\n@define-mixin ck-tooltip_visible {\n\t& .ck-tooltip {\n\t\tvisibility: visible;\n\t\topacity: 1;\n\t}\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_focus.css";\n@import "../../../mixins/_shadow.css";\n@import "../../../mixins/_disabled.css";\n@import "../../../mixins/_rounded.css";\n@import "../../mixins/_button.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n.ck.ck-button,\na.ck.ck-button {\n\t@mixin ck-button-colors --ck-color-button-default;\n\t@mixin ck-rounded-corners;\n\n\twhite-space: nowrap;\n\tcursor: default;\n\tvertical-align: middle;\n\tpadding: var(--ck-spacing-tiny);\n\ttext-align: center;\n\n\t/* A very important piece of styling. Go to variable declaration to learn more. */\n\tmin-width: var(--ck-ui-component-min-height);\n\tmin-height: var(--ck-ui-component-min-height);\n\n\t/* Normalize the height of the line. Removing this will break consistent height\n\tamong text and text-less buttons (with icons). */\n\tline-height: 1;\n\n\t/* Enable font size inheritance, which allows fluid UI scaling. */\n\tfont-size: inherit;\n\n\t/* Avoid flickering when the foucs border shows up. */\n\tborder: 1px solid transparent;\n\n\t/* Apply some smooth transition to the box-shadow and border. */\n\ttransition: box-shadow .2s ease-in-out, border .2s ease-in-out;\n\n\t/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/189 */\n\t-webkit-appearance: none;\n\n\t&:active,\n\t&:focus {\n\t\t@mixin ck-focus-ring;\n\t\t@mixin ck-box-shadow var(--ck-focus-outer-shadow);\n\t}\n\n\t/* Allow icon coloring using the text "color" property. */\n\t& .ck-button__icon {\n\t\t& use,\n\t\t& use * {\n\t\t\tcolor: inherit;\n\t\t}\n\t}\n\n\t& .ck-button__label {\n\t\t/* Enable font size inheritance, which allows fluid UI scaling. */\n\t\tfont-size: inherit;\n\t\tfont-weight: inherit;\n\t\tcolor: inherit;\n\t\tcursor: inherit;\n\n\t\t/* Must be consistent with .ck-icon\'s vertical align. Otherwise, buttons with and\n\t\twithout labels (but with icons) have different sizes in Chrome */\n\t\tvertical-align: middle;\n\n\t\t@mixin ck-dir ltr {\n\t\t\ttext-align: left;\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\ttext-align: right;\n\t\t}\n\t}\n\n\t& .ck-button__keystroke {\n\t\tcolor: inherit;\n\n\t\t@mixin ck-dir ltr {\n\t\t\tmargin-left: var(--ck-spacing-large);\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\tmargin-right: var(--ck-spacing-large);\n\t\t}\n\n\t\tfont-weight: bold;\n\t\topacity: .7;\n\t}\n\n\t/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/70 */\n\t&.ck-disabled {\n\t\t&:active,\n\t\t&:focus {\n\t\t\t/* The disabled button should have a slightly less visible shadow when focused. */\n\t\t\t@mixin ck-box-shadow var(--ck-focus-disabled-outer-shadow);\n\t\t}\n\n\t\t& .ck-button__icon {\n\t\t\t@mixin ck-disabled;\n\t\t}\n\n\t\t/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/98 */\n\t\t& .ck-button__label {\n\t\t\t@mixin ck-disabled;\n\t\t}\n\n\t\t& .ck-button__keystroke {\n\t\t\topacity: .3;\n\t\t}\n\t}\n\n\t&.ck-button_with-text {\n\t\tpadding: var(--ck-spacing-tiny) var(--ck-spacing-standard);\n\n\t\t/* stylelint-disable-next-line no-descending-specificity */\n\t\t& .ck-button__icon {\n\t\t\t@mixin ck-dir ltr {\n\t\t\t\tmargin-left: calc(-1 * var(--ck-spacing-small));\n\t\t\t\tmargin-right: var(--ck-spacing-small);\n\t\t\t}\n\n\t\t\t@mixin ck-dir rtl {\n\t\t\t\tmargin-right: calc(-1 * var(--ck-spacing-small));\n\t\t\t\tmargin-left: var(--ck-spacing-small);\n\t\t\t}\n\t\t}\n\t}\n\n\t&.ck-button_with-keystroke {\n\t\t/* stylelint-disable-next-line no-descending-specificity */\n\t\t& .ck-button__label {\n\t\t\tflex-grow: 1;\n\t\t}\n\t}\n\n\t/* A style of the button which is currently on, e.g. its feature is active. */\n\t&.ck-on {\n\t\t@mixin ck-button-colors --ck-color-button-on;\n\t}\n\n\t&.ck-button-save {\n\t\tcolor: var(--ck-color-button-save);\n\t}\n\n\t&.ck-button-cancel {\n\t\tcolor: var(--ck-color-button-cancel);\n\t}\n}\n\n/* A style of the button which handles the primary action. */\n.ck.ck-button-action,\na.ck.ck-button-action {\n\t@mixin ck-button-colors --ck-color-button-action;\n\n\tcolor: var(--ck-color-button-action-text);\n}\n\n.ck.ck-button-bold,\na.ck.ck-button-bold {\n\tfont-weight: bold;\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements a button of given background color.\n *\n * @param {String} $background - Background color of the button.\n * @param {String} $border - Border color of the button.\n */\n@define-mixin ck-button-colors $prefix {\n\tbackground: var($(prefix)-background);\n\n\t&:not(.ck-disabled) {\n\t\t&:hover {\n\t\t\tbackground: var($(prefix)-hover-background);\n\t\t}\n\n\t\t&:active {\n\t\t\tbackground: var($(prefix)-active-background);\n\t\t\tbox-shadow: inset 0 2px 2px var($(prefix)-active-shadow);\n\t\t}\n\t}\n\n\t/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/98 */\n\t&.ck-disabled {\n\t\tbackground: var($(prefix)-disabled-background);\n\t}\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A visual style of focused element's border.\n */\n@define-mixin ck-focus-ring {\n\t/* Disable native outline. */\n\toutline: none;\n\tborder: var(--ck-focus-ring)\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A helper to combine multiple shadows.\n */\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\n\tbox-shadow: $shadowA, $shadowB;\n}\n\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n@define-mixin ck-drop-shadow {\n\t@mixin ck-box-shadow var(--ck-drop-shadow);\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A class which indicates that an element holding it is disabled.\n */\n@define-mixin ck-disabled {\n\topacity: var(--ck-disabled-opacity);\n}\n"],sourceRoot:""}]);const a=s},681:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(15),o=n.n(i),r=n(645),s=n.n(r)()(o());s.push([e.id,".ck.ck-button.ck-switchbutton .ck-button__toggle,.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{display:block}:root{--ck-switch-button-toggle-width:2.6153846154em;--ck-switch-button-toggle-inner-size:1.0769230769em;--ck-switch-button-toggle-spacing:1px;--ck-switch-button-translation:calc(var(--ck-switch-button-toggle-width) - var(--ck-switch-button-toggle-inner-size) - var(--ck-switch-button-toggle-spacing)*2)}[dir=ltr] .ck.ck-button.ck-switchbutton .ck-button__label{margin-right:calc(var(--ck-spacing-large)*2)}[dir=rtl] .ck.ck-button.ck-switchbutton .ck-button__label{margin-left:calc(var(--ck-spacing-large)*2)}.ck.ck-button.ck-switchbutton .ck-button__toggle{border-radius:0}.ck-rounded-corners .ck.ck-button.ck-switchbutton .ck-button__toggle,.ck.ck-button.ck-switchbutton .ck-button__toggle.ck-rounded-corners{border-radius:var(--ck-border-radius)}[dir=ltr] .ck.ck-button.ck-switchbutton .ck-button__toggle{margin-left:auto}[dir=rtl] .ck.ck-button.ck-switchbutton .ck-button__toggle{margin-right:auto}.ck.ck-button.ck-switchbutton .ck-button__toggle{background:var(--ck-color-switch-button-off-background);transition:background .4s ease;width:var(--ck-switch-button-toggle-width)}.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{border-radius:0}.ck-rounded-corners .ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner,.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner.ck-rounded-corners{border-radius:var(--ck-border-radius);border-radius:calc(var(--ck-border-radius)*.5)}.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{background:var(--ck-color-switch-button-inner-background);height:var(--ck-switch-button-toggle-inner-size);margin:var(--ck-switch-button-toggle-spacing);transition:all .3s ease;width:var(--ck-switch-button-toggle-inner-size)}.ck.ck-button.ck-switchbutton .ck-button__toggle:hover{background:var(--ck-color-switch-button-off-hover-background)}.ck.ck-button.ck-switchbutton .ck-button__toggle:hover .ck-button__toggle__inner{box-shadow:0 0 0 5px var(--ck-color-switch-button-inner-shadow)}.ck.ck-button.ck-switchbutton.ck-disabled .ck-button__toggle{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle{background:var(--ck-color-switch-button-on-background)}.ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle:hover{background:var(--ck-color-switch-button-on-hover-background)}[dir=ltr] .ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle .ck-button__toggle__inner{transform:translateX(var( --ck-switch-button-translation ))}[dir=rtl] .ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle .ck-button__toggle__inner{transform:translateX(calc(var( --ck-switch-button-translation )*-1))}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/button/switchbutton.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/button/switchbutton.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_rounded.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_disabled.css"],names:[],mappings:"AASE,4HACC,aACD,CCCF,MAEC,8CAA+C,CAE/C,mDAAoD,CACpD,qCAAsC,CACtC,gKAKD,CAGC,0DAGE,4CAOF,CAVA,0DAQE,2CAEF,CAEA,iDC3BA,eDoEA,CAzCA,yICvBC,qCDgED,CAzCA,2DAKE,gBAoCF,CAzCA,2DAUE,iBA+BF,CAzCA,iDAiBC,uDAAwD,CAHxD,8BAAiC,CAEjC,0CAyBD,CAtBC,2EC9CD,eD2DC,CAbA,6LC1CA,qCAAsC,CD4CpC,8CAWF,CAbA,2EASC,yDAA0D,CAD1D,gDAAiD,CAFjD,6CAA8C,CAM9C,uBAA0B,CAL1B,+CAMD,CAEA,uDACC,6DAKD,CAHC,iFACC,+DACD,CAIF,6DExEA,kCF0EA,CAEA,uDACC,sDAkBD,CAhBC,6DACC,4DACD,CAEA,2FAKE,2DAMF,CAXA,2FASE,oEAEF",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-button.ck-switchbutton {\n\t& .ck-button__toggle {\n\t\tdisplay: block;\n\n\t\t& .ck-button__toggle__inner {\n\t\t\tdisplay: block;\n\t\t}\n\t}\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n@import "../../../mixins/_disabled.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n/* Note: To avoid rendering issues (aliasing) but to preserve the responsive nature\nof the component, floating–point numbers have been used which, for the default font size\n(see: --ck-font-size-base), will generate simple integers. */\n:root {\n\t/* 34px at 13px font-size */\n\t--ck-switch-button-toggle-width: 2.6153846154em;\n\t/* 14px at 13px font-size */\n\t--ck-switch-button-toggle-inner-size: 1.0769230769em;\n\t--ck-switch-button-toggle-spacing: 1px;\n\t--ck-switch-button-translation: calc(\n\t\tvar(--ck-switch-button-toggle-width) -\n\t\tvar(--ck-switch-button-toggle-inner-size) -\n\t\t2 * var(--ck-switch-button-toggle-spacing)\n\t);\n}\n\n.ck.ck-button.ck-switchbutton {\n\t& .ck-button__label {\n\t\t@mixin ck-dir ltr {\n\t\t\t/* Separate the label from the switch */\n\t\t\tmargin-right: calc(2 * var(--ck-spacing-large));\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\t/* Separate the label from the switch */\n\t\t\tmargin-left: calc(2 * var(--ck-spacing-large));\n\t\t}\n\t}\n\n\t& .ck-button__toggle {\n\t\t@mixin ck-rounded-corners;\n\n\t\t@mixin ck-dir ltr {\n\t\t\t/* Make sure the toggle is always to the right as far as possible. */\n\t\t\tmargin-left: auto;\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\t/* Make sure the toggle is always to the left as far as possible. */\n\t\t\tmargin-right: auto;\n\t\t}\n\n\t\t/* Gently animate the background color of the toggle switch */\n\t\ttransition: background 400ms ease;\n\n\t\twidth: var(--ck-switch-button-toggle-width);\n\t\tbackground: var(--ck-color-switch-button-off-background);\n\n\t\t& .ck-button__toggle__inner {\n\t\t\t@mixin ck-rounded-corners {\n\t\t\t\tborder-radius: calc(.5 * var(--ck-border-radius));\n\t\t\t}\n\n\t\t\t/* Leave some tiny bit of space around the inner part of the switch */\n\t\t\tmargin: var(--ck-switch-button-toggle-spacing);\n\t\t\twidth: var(--ck-switch-button-toggle-inner-size);\n\t\t\theight: var(--ck-switch-button-toggle-inner-size);\n\t\t\tbackground: var(--ck-color-switch-button-inner-background);\n\n\t\t\t/* Gently animate the inner part of the toggle switch */\n\t\t\ttransition: all 300ms ease;\n\t\t}\n\n\t\t&:hover {\n\t\t\tbackground: var(--ck-color-switch-button-off-hover-background);\n\n\t\t\t& .ck-button__toggle__inner {\n\t\t\t\tbox-shadow: 0 0 0 5px var(--ck-color-switch-button-inner-shadow);\n\t\t\t}\n\t\t}\n\t}\n\n\t&.ck-disabled .ck-button__toggle {\n\t\t@mixin ck-disabled;\n\t}\n\n\t&.ck-on .ck-button__toggle {\n\t\tbackground: var(--ck-color-switch-button-on-background);\n\n\t\t&:hover {\n\t\t\tbackground: var(--ck-color-switch-button-on-hover-background);\n\t\t}\n\n\t\t& .ck-button__toggle__inner {\n\t\t\t/*\n\t\t\t * Move the toggle switch to the right. It will be animated.\n\t\t\t */\n\t\t\t@mixin ck-dir ltr {\n\t\t\t\ttransform: translateX( var( --ck-switch-button-translation ) );\n\t\t\t}\n\n\t\t\t@mixin ck-dir rtl {\n\t\t\t\ttransform: translateX( calc( -1 * var( --ck-switch-button-translation ) ) );\n\t\t\t}\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A class which indicates that an element holding it is disabled.\n */\n@define-mixin ck-disabled {\n\topacity: var(--ck-disabled-opacity);\n}\n"],sourceRoot:""}]);const a=s},923:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(15),o=n.n(i),r=n(645),s=n.n(r)()(o());s.push([e.id,".ck.ck-color-grid{display:grid}:root{--ck-color-grid-tile-size:24px;--ck-color-color-grid-check-icon:#000}.ck.ck-color-grid{grid-gap:5px;padding:8px}.ck.ck-color-grid__tile{border:0;height:var(--ck-color-grid-tile-size);min-height:var(--ck-color-grid-tile-size);min-width:var(--ck-color-grid-tile-size);padding:0;transition:box-shadow .2s ease;width:var(--ck-color-grid-tile-size)}.ck.ck-color-grid__tile.ck-disabled{cursor:unset;transition:unset}.ck.ck-color-grid__tile.ck-color-table__color-tile_bordered{box-shadow:0 0 0 1px var(--ck-color-base-border)}.ck.ck-color-grid__tile .ck.ck-icon{color:var(--ck-color-color-grid-check-icon);display:none}.ck.ck-color-grid__tile.ck-on{box-shadow:inset 0 0 0 1px var(--ck-color-base-background),0 0 0 2px var(--ck-color-base-text)}.ck.ck-color-grid__tile.ck-on .ck.ck-icon{display:block}.ck.ck-color-grid__tile.ck-on,.ck.ck-color-grid__tile:focus:not(.ck-disabled),.ck.ck-color-grid__tile:hover:not(.ck-disabled){border:0}.ck.ck-color-grid__tile:focus:not(.ck-disabled),.ck.ck-color-grid__tile:hover:not(.ck-disabled){box-shadow:inset 0 0 0 1px var(--ck-color-base-background),0 0 0 2px var(--ck-color-focus-border)}.ck.ck-color-grid__label{padding:0 var(--ck-spacing-standard)}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/colorgrid/colorgrid.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/colorgrid/colorgrid.css"],names:[],mappings:"AAKA,kBACC,YACD,CCAA,MACC,8BAA+B,CAK/B,qCACD,CAEA,kBACC,YAAa,CACb,WACD,CAEA,wBAOC,QAAS,CALT,qCAAsC,CAEtC,yCAA0C,CAD1C,wCAAyC,CAEzC,SAAU,CACV,8BAA+B,CAL/B,oCAyCD,CAjCC,oCACC,YAAa,CACb,gBACD,CAEA,4DACC,gDACD,CAEA,oCAEC,2CAA4C,CAD5C,YAED,CAEA,8BACC,8FAKD,CAHC,0CACC,aACD,CAGD,8HAIC,QACD,CAEA,gGAEC,iGACD,CAGD,yBACC,oCACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-color-grid {\n\tdisplay: grid;\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n\n:root {\n\t--ck-color-grid-tile-size: 24px;\n\n\t/* Not using global colors here because these may change but some colors in a pallette\n\t * require special treatment. For instance, this ensures no matter what the UI text color is,\n\t * the check icon will look good on the black color tile. */\n\t--ck-color-color-grid-check-icon: hsl(0, 0%, 0%);\n}\n\n.ck.ck-color-grid {\n\tgrid-gap: 5px;\n\tpadding: 8px;\n}\n\n.ck.ck-color-grid__tile {\n\twidth: var(--ck-color-grid-tile-size);\n\theight: var(--ck-color-grid-tile-size);\n\tmin-width: var(--ck-color-grid-tile-size);\n\tmin-height: var(--ck-color-grid-tile-size);\n\tpadding: 0;\n\ttransition: .2s ease box-shadow;\n\tborder: 0;\n\n\t&.ck-disabled {\n\t\tcursor: unset;\n\t\ttransition: unset;\n\t}\n\n\t&.ck-color-table__color-tile_bordered {\n\t\tbox-shadow: 0 0 0 1px var(--ck-color-base-border);\n\t}\n\n\t& .ck.ck-icon {\n\t\tdisplay: none;\n\t\tcolor: var(--ck-color-color-grid-check-icon);\n\t}\n\n\t&.ck-on {\n\t\tbox-shadow: inset 0 0 0 1px var(--ck-color-base-background), 0 0 0 2px var(--ck-color-base-text);\n\n\t\t& .ck.ck-icon {\n\t\t\tdisplay: block;\n\t\t}\n\t}\n\n\t&.ck-on,\n\t&:focus:not( .ck-disabled ),\n\t&:hover:not( .ck-disabled ) {\n\t\t/* Disable the default .ck-button\'s border ring. */\n\t\tborder: 0;\n\t}\n\n\t&:focus:not( .ck-disabled ),\n\t&:hover:not( .ck-disabled ) {\n\t\tbox-shadow: inset 0 0 0 1px var(--ck-color-base-background), 0 0 0 2px var(--ck-color-focus-border);\n\t}\n}\n\n.ck.ck-color-grid__label {\n\tpadding: 0 var(--ck-spacing-standard);\n}\n'],sourceRoot:""}]);const a=s},488:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(15),o=n.n(i),r=n(645),s=n.n(r)()(o());s.push([e.id,":root{--ck-dropdown-max-width:75vw}.ck.ck-dropdown{display:inline-block;position:relative}.ck.ck-dropdown .ck-dropdown__arrow{pointer-events:none;z-index:var(--ck-z-default)}.ck.ck-dropdown .ck-button.ck-dropdown__button{width:100%}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on .ck-tooltip{display:none}.ck.ck-dropdown .ck-dropdown__panel{-webkit-backface-visibility:hidden;display:none;max-width:var(--ck-dropdown-max-width);position:absolute;z-index:var(--ck-z-modal)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel-visible{display:inline-block}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_n,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_ne,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nmw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nw{bottom:100%}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_s,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_se,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_smw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sw{bottom:auto;top:100%}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_ne,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_se{left:0}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sw{right:0}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_n,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_s{left:50%;transform:translateX(-50%)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nmw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_smw{left:75%;transform:translateX(-75%)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sme{left:25%;transform:translateX(-25%)}.ck.ck-toolbar .ck-dropdown__panel{z-index:calc(var(--ck-z-modal) + 1)}:root{--ck-dropdown-arrow-size:calc(var(--ck-icon-size)*0.5)}.ck.ck-dropdown{font-size:inherit}.ck.ck-dropdown .ck-dropdown__arrow{width:var(--ck-dropdown-arrow-size)}[dir=ltr] .ck.ck-dropdown .ck-dropdown__arrow{margin-left:var(--ck-spacing-standard);right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-dropdown .ck-dropdown__arrow{left:var(--ck-spacing-standard);margin-right:var(--ck-spacing-small)}.ck.ck-dropdown.ck-disabled .ck-dropdown__arrow{opacity:var(--ck-disabled-opacity)}[dir=ltr] .ck.ck-dropdown .ck-button.ck-dropdown__button:not(.ck-button_with-text){padding-left:var(--ck-spacing-small)}[dir=rtl] .ck.ck-dropdown .ck-button.ck-dropdown__button:not(.ck-button_with-text){padding-right:var(--ck-spacing-small)}.ck.ck-dropdown .ck-button.ck-dropdown__button .ck-button__label{overflow:hidden;text-overflow:ellipsis;width:7em}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-disabled .ck-button__label{opacity:var(--ck-disabled-opacity)}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on{border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-dropdown__button_label-width_auto .ck-button__label{width:auto}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-off:active,.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on:active{box-shadow:none}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-off:active:focus,.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on:active:focus{box-shadow:var(--ck-focus-outer-shadow),0 0}.ck.ck-dropdown__panel{border-radius:0}.ck-rounded-corners .ck.ck-dropdown__panel,.ck.ck-dropdown__panel.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-dropdown__panel{background:var(--ck-color-dropdown-panel-background);border:1px solid var(--ck-color-dropdown-panel-border);bottom:0;box-shadow:var(--ck-drop-shadow),0 0;min-width:100%}.ck.ck-dropdown__panel.ck-dropdown__panel_se{border-top-left-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_sw{border-top-right-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_ne{border-bottom-left-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_nw{border-bottom-right-radius:0}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/dropdown/dropdown.css","webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/tooltip/mixins/_tooltip.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/dropdown/dropdown.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_disabled.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_shadow.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAOA,MACC,4BACD,CAEA,gBACC,oBAAqB,CACrB,iBAqFD,CAnFC,oCACC,mBAAoB,CACpB,2BACD,CAGA,+CACC,UAOD,CCUA,iEACC,YACD,CDVA,oCAGC,kCAAmC,CAEnC,YAAa,CAEb,sCAAuC,CAEvC,iBAAkB,CAHlB,yBA4DD,CAvDC,+DACC,oBACD,CAEA,mSAKC,WACD,CAEA,mSAUC,WAAY,CADZ,QAED,CAEA,oHAEC,MACD,CAEA,oHAEC,OACD,CAEA,kHAGC,QAAS,CACT,0BACD,CAEA,sHAGC,QAAS,CACT,0BACD,CAEA,sHAGC,QAAS,CACT,0BACD,CAQF,mCACC,mCACD,CEhGA,MACC,sDACD,CAEA,gBAEC,iBA2ED,CAzEC,oCACC,mCACD,CAGC,8CAIC,sCAAuC,CAHvC,gCAID,CAIA,8CACC,+BAAgC,CAGhC,oCACD,CAGD,gDC/BA,kCDiCA,CAIE,mFAEC,oCACD,CAIA,mFAEC,qCACD,CAID,iEAEC,eAAgB,CAChB,sBAAuB,CAFvB,SAGD,CAGA,6EC1DD,kCD4DC,CAGA,qDACC,2BAA4B,CAC5B,4BACD,CAEA,sGACC,UACD,CAGA,yHAEC,eAKD,CAHC,qIE7EF,2CF+EE,CAKH,uBGlFC,eH8GD,CA5BA,qFG9EE,qCH0GF,CA5BA,uBAIC,oDAAqD,CACrD,sDAAuD,CACvD,QAAS,CE1FT,oCAA8B,CF6F9B,cAmBD,CAfC,6CACC,wBACD,CAEA,6CACC,yBACD,CAEA,6CACC,2BACD,CAEA,6CACC,4BACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import \"../tooltip/mixins/_tooltip.css\";\n\n:root {\n\t--ck-dropdown-max-width: 75vw;\n}\n\n.ck.ck-dropdown {\n\tdisplay: inline-block;\n\tposition: relative;\n\n\t& .ck-dropdown__arrow {\n\t\tpointer-events: none;\n\t\tz-index: var(--ck-z-default);\n\t}\n\n\t/* Dropdown button should span horizontally, e.g. in vertical toolbars */\n\t& .ck-button.ck-dropdown__button {\n\t\twidth: 100%;\n\n\t\t/* Disable main button's tooltip when the dropdown is open. Otherwise the panel may\n\t\tpartially cover the tooltip */\n\t\t&.ck-on {\n\t\t\t@mixin ck-tooltip_disabled;\n\t\t}\n\t}\n\n\t& .ck-dropdown__panel {\n\t\t/* This is to get rid of flickering when the tooltip is shown under the panel,\n\t\twhich looks like the panel moves vertically a pixel down and up. */\n\t\t-webkit-backface-visibility: hidden;\n\n\t\tdisplay: none;\n\t\tz-index: var(--ck-z-modal);\n\t\tmax-width: var(--ck-dropdown-max-width);\n\n\t\tposition: absolute;\n\n\t\t&.ck-dropdown__panel-visible {\n\t\t\tdisplay: inline-block;\n\t\t}\n\n\t\t&.ck-dropdown__panel_ne,\n\t\t&.ck-dropdown__panel_nw,\n\t\t&.ck-dropdown__panel_n,\n\t\t&.ck-dropdown__panel_nmw,\n\t\t&.ck-dropdown__panel_nme {\n\t\t\tbottom: 100%;\n\t\t}\n\n\t\t&.ck-dropdown__panel_se,\n\t\t&.ck-dropdown__panel_sw,\n\t\t&.ck-dropdown__panel_smw,\n\t\t&.ck-dropdown__panel_sme,\n\t\t&.ck-dropdown__panel_s {\n\t\t\t/*\n\t\t\t * Using transform: translate3d( 0, 100%, 0 ) causes blurry dropdown on Chrome 67-78+ on non-retina displays.\n\t\t\t * See https://github.com/ckeditor/ckeditor5/issues/1053.\n\t\t\t */\n\t\t\ttop: 100%;\n\t\t\tbottom: auto;\n\t\t}\n\n\t\t&.ck-dropdown__panel_ne,\n\t\t&.ck-dropdown__panel_se {\n\t\t\tleft: 0px;\n\t\t}\n\n\t\t&.ck-dropdown__panel_nw,\n\t\t&.ck-dropdown__panel_sw {\n\t\t\tright: 0px;\n\t\t}\n\n\t\t&.ck-dropdown__panel_s,\n\t\t&.ck-dropdown__panel_n {\n\t\t\t/* Positioning panels relative to the center of the button */\n\t\t\tleft: 50%;\n\t\t\ttransform: translateX(-50%);\n\t\t}\n\n\t\t&.ck-dropdown__panel_nmw,\n\t\t&.ck-dropdown__panel_smw {\n\t\t\t/* Positioning panels relative to the middle-west of the button */\n\t\t\tleft: 75%;\n\t\t\ttransform: translateX(-75%);\n\t\t}\n\n\t\t&.ck-dropdown__panel_nme,\n\t\t&.ck-dropdown__panel_sme {\n\t\t\t/* Positioning panels relative to the middle-east of the button */\n\t\t\tleft: 25%;\n\t\t\ttransform: translateX(-25%);\n\t\t}\n\t}\n}\n\n/*\n * Toolbar dropdown panels should be always above the UI (eg. other dropdown panels) from the editor's content.\n * See https://github.com/ckeditor/ckeditor5/issues/7874\n */\n.ck.ck-toolbar .ck-dropdown__panel {\n\tz-index: calc( var(--ck-z-modal) + 1 );\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Enables the tooltip, which is the tooltip is in DOM but\n * not yet displayed.\n */\n@define-mixin ck-tooltip_enabled {\n\t& .ck-tooltip {\n\t\tdisplay: block;\n\n\t\t/*\n\t\t * Don't display tooltips in devices which don't support :hover.\n\t\t * In fact, it's all about iOS, which forces user to click UI elements twice to execute\n\t\t * the primary action, when tooltips are enabled.\n\t\t *\n\t\t * Q: OK, but why not the following query?\n\t\t *\n\t\t * @media (hover) {\n\t\t * display: block;\n\t\t * }\n\t\t *\n\t\t * A: Because FF does not support it and it would completely disable tooltips\n\t\t * in that browser.\n\t\t *\n\t\t * More in https://github.com/ckeditor/ckeditor5/issues/920.\n\t\t */\n\t\t@media (hover:none) {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n}\n\n/**\n * Disables the tooltip making it disappear from DOM.\n */\n@define-mixin ck-tooltip_disabled {\n\t& .ck-tooltip {\n\t\tdisplay: none;\n\t}\n}\n\n/**\n * Shows the tooltip, which is already in DOM.\n * Requires `ck-tooltip_enabled` first.\n */\n@define-mixin ck-tooltip_visible {\n\t& .ck-tooltip {\n\t\tvisibility: visible;\n\t\topacity: 1;\n\t}\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n@import "../../../mixins/_disabled.css";\n@import "../../../mixins/_shadow.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n:root {\n\t--ck-dropdown-arrow-size: calc(0.5 * var(--ck-icon-size));\n}\n\n.ck.ck-dropdown {\n\t/* Enable font size inheritance, which allows fluid UI scaling. */\n\tfont-size: inherit;\n\n\t& .ck-dropdown__arrow {\n\t\twidth: var(--ck-dropdown-arrow-size);\n\t}\n\n\t@mixin ck-dir ltr {\n\t\t& .ck-dropdown__arrow {\n\t\t\tright: var(--ck-spacing-standard);\n\n\t\t\t/* A space to accommodate the triangle. */\n\t\t\tmargin-left: var(--ck-spacing-standard);\n\t\t}\n\t}\n\n\t@mixin ck-dir rtl {\n\t\t& .ck-dropdown__arrow {\n\t\t\tleft: var(--ck-spacing-standard);\n\n\t\t\t/* A space to accommodate the triangle. */\n\t\t\tmargin-right: var(--ck-spacing-small);\n\t\t}\n\t}\n\n\t&.ck-disabled .ck-dropdown__arrow {\n\t\t@mixin ck-disabled;\n\t}\n\n\t& .ck-button.ck-dropdown__button {\n\t\t@mixin ck-dir ltr {\n\t\t\t&:not(.ck-button_with-text) {\n\t\t\t\t/* Make sure dropdowns with just an icon have the right inner spacing */\n\t\t\t\tpadding-left: var(--ck-spacing-small);\n\t\t\t}\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\t&:not(.ck-button_with-text) {\n\t\t\t\t/* Make sure dropdowns with just an icon have the right inner spacing */\n\t\t\t\tpadding-right: var(--ck-spacing-small);\n\t\t\t}\n\t\t}\n\n\t\t/* #23 */\n\t\t& .ck-button__label {\n\t\t\twidth: 7em;\n\t\t\toverflow: hidden;\n\t\t\ttext-overflow: ellipsis;\n\t\t}\n\n\t\t/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/70 */\n\t\t&.ck-disabled .ck-button__label {\n\t\t\t@mixin ck-disabled;\n\t\t}\n\n\t\t/* https://github.com/ckeditor/ckeditor5/issues/816 */\n\t\t&.ck-on {\n\t\t\tborder-bottom-left-radius: 0;\n\t\t\tborder-bottom-right-radius: 0;\n\t\t}\n\n\t\t&.ck-dropdown__button_label-width_auto .ck-button__label {\n\t\t\twidth: auto;\n\t\t}\n\n\t\t/* https://github.com/ckeditor/ckeditor5/issues/8699 */\n\t\t&.ck-off:active,\n\t\t&.ck-on:active {\n\t\t\tbox-shadow: none;\n\t\t\t\n\t\t\t&:focus {\n\t\t\t\t@mixin ck-box-shadow var(--ck-focus-outer-shadow);\n\t\t\t}\n\t\t}\n\t}\n}\n\n.ck.ck-dropdown__panel {\n\t@mixin ck-rounded-corners;\n\t@mixin ck-drop-shadow;\n\n\tbackground: var(--ck-color-dropdown-panel-background);\n\tborder: 1px solid var(--ck-color-dropdown-panel-border);\n\tbottom: 0;\n\n\t/* Make sure the panel is at least as wide as the drop-down\'s button. */\n\tmin-width: 100%;\n\n\t/* Disabled corner border radius to be consistent with the .dropdown__button\n\thttps://github.com/ckeditor/ckeditor5/issues/816 */\n\t&.ck-dropdown__panel_se {\n\t\tborder-top-left-radius: 0;\n\t}\n\n\t&.ck-dropdown__panel_sw {\n\t\tborder-top-right-radius: 0;\n\t}\n\n\t&.ck-dropdown__panel_ne {\n\t\tborder-bottom-left-radius: 0;\n\t}\n\n\t&.ck-dropdown__panel_nw {\n\t\tborder-bottom-right-radius: 0;\n\t}\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A class which indicates that an element holding it is disabled.\n */\n@define-mixin ck-disabled {\n\topacity: var(--ck-disabled-opacity);\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A helper to combine multiple shadows.\n */\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\n\tbox-shadow: $shadowA, $shadowB;\n}\n\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n@define-mixin ck-drop-shadow {\n\t@mixin ck-box-shadow var(--ck-drop-shadow);\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]);const a=s},875:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(15),o=n.n(i),r=n(645),s=n.n(r)()(o());s.push([e.id,".ck.ck-dropdown .ck-dropdown__panel .ck-list{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list,.ck.ck-dropdown .ck-dropdown__panel .ck-list.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0}.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:first-child .ck-button{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:first-child .ck-button,.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:first-child .ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius);border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:0}.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button,.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-top-right-radius:0}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/dropdown/listdropdown.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAOA,6CCIC,eDqBD,CAzBA,iICQE,qCAAsC,CDJtC,wBAqBF,CAfE,mFCND,eDYC,CANA,6MCFA,qCAAsC,CDKpC,2BAA4B,CAC5B,4BAA6B,CAF7B,wBAIF,CAEA,kFCdD,eDmBC,CALA,2MCVA,qCAAsC,CDYpC,wBAAyB,CACzB,yBAEF",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n\n.ck.ck-dropdown .ck-dropdown__panel .ck-list {\n\t/* Disabled radius of top-left border to be consistent with .dropdown__button\n\thttps://github.com/ckeditor/ckeditor5/issues/816 */\n\t@mixin ck-rounded-corners {\n\t\tborder-top-left-radius: 0;\n\t}\n\n\t/* Make sure the button belonging to the first/last child of the list goes well with the\n\tborder radius of the entire panel. */\n\t& .ck-list__item {\n\t\t&:first-child .ck-button {\n\t\t\t@mixin ck-rounded-corners {\n\t\t\t\tborder-top-left-radius: 0;\n\t\t\t\tborder-bottom-left-radius: 0;\n\t\t\t\tborder-bottom-right-radius: 0;\n\t\t\t}\n\t\t}\n\n\t\t&:last-child .ck-button {\n\t\t\t@mixin ck-rounded-corners {\n\t\t\t\tborder-top-left-radius: 0;\n\t\t\t\tborder-top-right-radius: 0;\n\t\t\t}\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]);const a=s},66:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(15),o=n.n(i),r=n(645),s=n.n(r)()(o());s.push([e.id,'.ck.ck-splitbutton{font-size:inherit}.ck.ck-splitbutton .ck-splitbutton__action:focus{z-index:calc(var(--ck-z-default) + 1)}.ck.ck-splitbutton.ck-splitbutton_open>.ck-button .ck-tooltip{display:none}:root{--ck-color-split-button-hover-background:#ebebeb;--ck-color-split-button-hover-border:#b3b3b3}[dir=ltr] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__action,[dir=ltr] .ck.ck-splitbutton:hover>.ck-splitbutton__action{border-bottom-right-radius:unset;border-top-right-radius:unset}[dir=rtl] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__action,[dir=rtl] .ck.ck-splitbutton:hover>.ck-splitbutton__action{border-bottom-left-radius:unset;border-top-left-radius:unset}.ck.ck-splitbutton>.ck-splitbutton__arrow{min-width:unset}[dir=ltr] .ck.ck-splitbutton>.ck-splitbutton__arrow{border-bottom-left-radius:unset;border-top-left-radius:unset}[dir=rtl] .ck.ck-splitbutton>.ck-splitbutton__arrow{border-bottom-right-radius:unset;border-top-right-radius:unset}.ck.ck-splitbutton>.ck-splitbutton__arrow svg{width:var(--ck-dropdown-arrow-size)}.ck.ck-splitbutton.ck-splitbutton_open>.ck-button:not(.ck-on):not(.ck-disabled):not(:hover),.ck.ck-splitbutton:hover>.ck-button:not(.ck-on):not(.ck-disabled):not(:hover){background:var(--ck-color-split-button-hover-background)}.ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,.ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled):after{background-color:var(--ck-color-split-button-hover-border);content:"";height:100%;position:absolute;width:1px}[dir=ltr] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,[dir=ltr] .ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled):after{left:-1px}[dir=rtl] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,[dir=rtl] .ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled):after{right:-1px}.ck.ck-splitbutton.ck-splitbutton_open{border-radius:0}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__action,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners>.ck-splitbutton__action{border-bottom-left-radius:0}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners>.ck-splitbutton__arrow{border-bottom-right-radius:0}',"",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/dropdown/splitbutton.css","webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/tooltip/mixins/_tooltip.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/dropdown/splitbutton.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAOA,mBAEC,iBAUD,CARC,iDACC,qCACD,CC0BA,8DACC,YACD,CClCD,MACC,gDAAyD,CACzD,4CACD,CAMC,oIAKE,gCAAiC,CADjC,6BASF,CAbA,oIAWE,+BAAgC,CADhC,4BAGF,CAEA,0CAGC,eAiBD,CApBA,oDAQE,+BAAgC,CADhC,4BAaF,CApBA,oDAcE,gCAAiC,CADjC,6BAOF,CAHC,8CACC,mCACD,CASA,0KACC,wDACD,CAIA,8JAKC,0DAA2D,CAJ3D,UAAW,CAGX,WAAY,CAFZ,iBAAkB,CAClB,SAGD,CAGC,kLACC,SACD,CAIA,kLACC,UACD,CAMF,uCC7EA,eDuFA,CAVA,qHCzEC,qCDmFD,CARE,qKACC,2BACD,CAEA,mKACC,4BACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../tooltip/mixins/_tooltip.css";\n\n.ck.ck-splitbutton {\n\t/* Enable font size inheritance, which allows fluid UI scaling. */\n\tfont-size: inherit;\n\n\t& .ck-splitbutton__action:focus {\n\t\tz-index: calc(var(--ck-z-default) + 1);\n\t}\n\n\t/* Disable tooltips for the buttons when the button is "open" */\n\t&.ck-splitbutton_open > .ck-button {\n\t\t@mixin ck-tooltip_disabled;\n\t}\n}\n\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Enables the tooltip, which is the tooltip is in DOM but\n * not yet displayed.\n */\n@define-mixin ck-tooltip_enabled {\n\t& .ck-tooltip {\n\t\tdisplay: block;\n\n\t\t/*\n\t\t * Don't display tooltips in devices which don't support :hover.\n\t\t * In fact, it's all about iOS, which forces user to click UI elements twice to execute\n\t\t * the primary action, when tooltips are enabled.\n\t\t *\n\t\t * Q: OK, but why not the following query?\n\t\t *\n\t\t * @media (hover) {\n\t\t * display: block;\n\t\t * }\n\t\t *\n\t\t * A: Because FF does not support it and it would completely disable tooltips\n\t\t * in that browser.\n\t\t *\n\t\t * More in https://github.com/ckeditor/ckeditor5/issues/920.\n\t\t */\n\t\t@media (hover:none) {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n}\n\n/**\n * Disables the tooltip making it disappear from DOM.\n */\n@define-mixin ck-tooltip_disabled {\n\t& .ck-tooltip {\n\t\tdisplay: none;\n\t}\n}\n\n/**\n * Shows the tooltip, which is already in DOM.\n * Requires `ck-tooltip_enabled` first.\n */\n@define-mixin ck-tooltip_visible {\n\t& .ck-tooltip {\n\t\tvisibility: visible;\n\t\topacity: 1;\n\t}\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n\n:root {\n\t--ck-color-split-button-hover-background: hsl(0, 0%, 92%);\n\t--ck-color-split-button-hover-border: hsl(0, 0%, 70%);\n}\n\n.ck.ck-splitbutton {\n\t/*\n\t * Note: ck-rounded and ck-dir mixins don\'t go together (because they both use @nest).\n\t */\n\t&:hover > .ck-splitbutton__action,\n\t&.ck-splitbutton_open > .ck-splitbutton__action {\n\t\t@nest [dir="ltr"] & {\n\t\t\t/* Don\'t round the action button on the right side */\n\t\t\tborder-top-right-radius: unset;\n\t\t\tborder-bottom-right-radius: unset;\n\t\t}\n\n\t\t@nest [dir="rtl"] & {\n\t\t\t/* Don\'t round the action button on the left side */\n\t\t\tborder-top-left-radius: unset;\n\t\t\tborder-bottom-left-radius: unset;\n\t\t}\n\t}\n\n\t& > .ck-splitbutton__arrow {\n\t\t/* It\'s a text-less button and since the icon is positioned absolutely in such situation,\n\t\tit must get some arbitrary min-width. */\n\t\tmin-width: unset;\n\n\t\t@nest [dir="ltr"] & {\n\t\t\t/* Don\'t round the arrow button on the left side */\n\t\t\tborder-top-left-radius: unset;\n\t\t\tborder-bottom-left-radius: unset;\n\t\t}\n\n\t\t@nest [dir="rtl"] & {\n\t\t\t/* Don\'t round the arrow button on the right side */\n\t\t\tborder-top-right-radius: unset;\n\t\t\tborder-bottom-right-radius: unset;\n\t\t}\n\n\t\t& svg {\n\t\t\twidth: var(--ck-dropdown-arrow-size);\n\t\t}\n\t}\n\n\t/* When the split button is "open" (the arrow is on) or being hovered, it should get some styling\n\tas a whole. The background of both buttons should stand out and there should be a visual\n\tseparation between both buttons. */\n\t&.ck-splitbutton_open,\n\t&:hover {\n\t\t/* When the split button hovered as a whole, not as individual buttons. */\n\t\t& > .ck-button:not(.ck-on):not(.ck-disabled):not(:hover) {\n\t\t\tbackground: var(--ck-color-split-button-hover-background);\n\t\t}\n\n\t\t/* Splitbutton separator needs to be set with the ::after pseudoselector\n\t\tto display properly the borders on focus */\n\t\t& > .ck-splitbutton__arrow:not(.ck-disabled)::after {\n\t\t\tcontent: \'\';\n\t\t\tposition: absolute;\n\t\t\twidth: 1px;\n\t\t\theight: 100%;\n\t\t\tbackground-color: var(--ck-color-split-button-hover-border);\n\t\t}\n\n\t\t@nest [dir="ltr"] & {\n\t\t\t& > .ck-splitbutton__arrow:not(.ck-disabled)::after {\n\t\t\t\tleft: -1px;\n\t\t\t}\n\t\t}\n\n\t\t@nest [dir="rtl"] & {\n\t\t\t& > .ck-splitbutton__arrow:not(.ck-disabled)::after {\n\t\t\t\tright: -1px;\n\t\t\t}\n\t\t}\n\t}\n\n\t/* Don\'t round the bottom left and right corners of the buttons when "open"\n\thttps://github.com/ckeditor/ckeditor5/issues/816 */\n\t&.ck-splitbutton_open {\n\t\t@mixin ck-rounded-corners {\n\t\t\t& > .ck-splitbutton__action {\n\t\t\t\tborder-bottom-left-radius: 0;\n\t\t\t}\n\n\t\t\t& > .ck-splitbutton__arrow {\n\t\t\t\tborder-bottom-right-radius: 0;\n\t\t\t}\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]);const a=s},75:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(15),o=n.n(i),r=n(645),s=n.n(r)()(o());s.push([e.id,":root{--ck-toolbar-dropdown-max-width:60vw}.ck.ck-toolbar-dropdown>.ck-dropdown__panel{max-width:var(--ck-toolbar-dropdown-max-width);width:max-content}.ck.ck-toolbar-dropdown>.ck-dropdown__panel .ck-button:focus{z-index:calc(var(--ck-z-default) + 1)}.ck.ck-toolbar-dropdown .ck-toolbar{border:0}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/dropdown/toolbardropdown.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/dropdown/toolbardropdown.css"],names:[],mappings:"AAKA,MACC,oCACD,CAEA,4CAGC,8CAA+C,CAD/C,iBAQD,CAJE,6DACC,qCACD,CCZF,oCACC,QACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-toolbar-dropdown-max-width: 60vw;\n}\n\n.ck.ck-toolbar-dropdown > .ck-dropdown__panel {\n\t/* https://github.com/ckeditor/ckeditor5/issues/5586 */\n\twidth: max-content;\n\tmax-width: var(--ck-toolbar-dropdown-max-width);\n\n\t& .ck-button {\n\t\t&:focus {\n\t\t\tz-index: calc(var(--ck-z-default) + 1);\n\t\t}\n\t}\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-toolbar-dropdown .ck-toolbar {\n\tborder: 0;\n}\n"],sourceRoot:""}]);const a=s},547:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(15),o=n.n(i),r=n(645),s=n.n(r)()(o());s.push([e.id,":root{--ck-color-editable-blur-selection:#d9d9d9}.ck.ck-editor__editable:not(.ck-editor__nested-editable){border-radius:0}.ck-rounded-corners .ck.ck-editor__editable:not(.ck-editor__nested-editable),.ck.ck-editor__editable:not(.ck-editor__nested-editable).ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-editor__editable:not(.ck-editor__nested-editable).ck-focused{border:var(--ck-focus-ring);box-shadow:var(--ck-inner-shadow),0 0;outline:none}.ck.ck-editor__editable_inline{border:1px solid transparent;overflow:auto;padding:0 var(--ck-spacing-standard)}.ck.ck-editor__editable_inline[dir=ltr]{text-align:left}.ck.ck-editor__editable_inline[dir=rtl]{text-align:right}.ck.ck-editor__editable_inline>:first-child{margin-top:var(--ck-spacing-large)}.ck.ck-editor__editable_inline>:last-child{margin-bottom:var(--ck-spacing-large)}.ck.ck-editor__editable_inline.ck-blurred ::selection{background:var(--ck-color-editable-blur-selection)}.ck.ck-balloon-panel.ck-toolbar-container[class*=arrow_n]:after{border-bottom-color:var(--ck-color-base-foreground)}.ck.ck-balloon-panel.ck-toolbar-container[class*=arrow_s]:after{border-top-color:var(--ck-color-base-foreground)}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/editorui/editorui.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_rounded.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_focus.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_shadow.css"],names:[],mappings:"AAWA,MACC,0CACD,CAEA,yDCJC,eDWD,CAPA,yJCAE,qCDOF,CAJC,oEEPA,2BAA2B,CCF3B,qCAA8B,CDC9B,YFWA,CAGD,+BAGC,4BAA6B,CAF7B,aAAc,CACd,oCA6BD,CA1BC,wCACC,eACD,CAEA,wCACC,gBACD,CAGA,4CACC,kCACD,CAGA,2CAKC,qCACD,CAGA,sDACC,kDACD,CAKA,gEACC,mDACD,CAIA,gEACC,gDACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n@import "../../../mixins/_disabled.css";\n@import "../../../mixins/_shadow.css";\n@import "../../../mixins/_focus.css";\n@import "../../mixins/_button.css";\n\n:root {\n\t--ck-color-editable-blur-selection: hsl(0, 0%, 85%);\n}\n\n.ck.ck-editor__editable:not(.ck-editor__nested-editable) {\n\t@mixin ck-rounded-corners;\n\n\t&.ck-focused {\n\t\t@mixin ck-focus-ring;\n\t\t@mixin ck-box-shadow var(--ck-inner-shadow);\n\t}\n}\n\n.ck.ck-editor__editable_inline {\n\toverflow: auto;\n\tpadding: 0 var(--ck-spacing-standard);\n\tborder: 1px solid transparent;\n\n\t&[dir="ltr"] {\n\t\ttext-align: left;\n\t}\n\n\t&[dir="rtl"] {\n\t\ttext-align: right;\n\t}\n\n\t/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/116 */\n\t& > *:first-child {\n\t\tmargin-top: var(--ck-spacing-large);\n\t}\n\n\t/* https://github.com/ckeditor/ckeditor5/issues/847 */\n\t& > *:last-child {\n\t\t/*\n\t\t * This value should match with the default margins of the block elements (like .media or .image)\n\t\t * to avoid a content jumping when the fake selection container shows up (See https://github.com/ckeditor/ckeditor5/issues/9825).\n\t\t */\n\t\tmargin-bottom: var(--ck-spacing-large);\n\t}\n\n\t/* https://github.com/ckeditor/ckeditor5/issues/6517 */\n\t&.ck-blurred ::selection {\n\t\tbackground: var(--ck-color-editable-blur-selection);\n\t}\n}\n\n/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/111 */\n.ck.ck-balloon-panel.ck-toolbar-container[class*="arrow_n"] {\n\t&::after {\n\t\tborder-bottom-color: var(--ck-color-base-foreground);\n\t}\n}\n\n.ck.ck-balloon-panel.ck-toolbar-container[class*="arrow_s"] {\n\t&::after {\n\t\tborder-top-color: var(--ck-color-base-foreground);\n\t}\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A visual style of focused element's border.\n */\n@define-mixin ck-focus-ring {\n\t/* Disable native outline. */\n\toutline: none;\n\tborder: var(--ck-focus-ring)\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A helper to combine multiple shadows.\n */\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\n\tbox-shadow: $shadowA, $shadowB;\n}\n\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n@define-mixin ck-drop-shadow {\n\t@mixin ck-box-shadow var(--ck-drop-shadow);\n}\n"],sourceRoot:""}]);const a=s},523:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(15),o=n.n(i),r=n(645),s=n.n(r)()(o());s.push([e.id,".ck.ck-form__header{align-items:center;display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between}:root{--ck-form-header-height:38px}.ck.ck-form__header{border-bottom:1px solid var(--ck-color-base-border);height:var(--ck-form-header-height);line-height:var(--ck-form-header-height);padding:var(--ck-spacing-small) var(--ck-spacing-large)}.ck.ck-form__header .ck-form__header__label{font-weight:700}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/formheader/formheader.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/formheader/formheader.css"],names:[],mappings:"AAKA,oBAIC,kBAAmB,CAHnB,YAAa,CACb,kBAAmB,CACnB,gBAAiB,CAEjB,6BACD,CCNA,MACC,4BACD,CAEA,oBAIC,mDAAoD,CAFpD,mCAAoC,CACpC,wCAAyC,CAFzC,uDAQD,CAHC,4CACC,eACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-form__header {\n\tdisplay: flex;\n\tflex-direction: row;\n\tflex-wrap: nowrap;\n\talign-items: center;\n\tjustify-content: space-between;\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-form-header-height: 38px;\n}\n\n.ck.ck-form__header {\n\tpadding: var(--ck-spacing-small) var(--ck-spacing-large);\n\theight: var(--ck-form-header-height);\n\tline-height: var(--ck-form-header-height);\n\tborder-bottom: 1px solid var(--ck-color-base-border);\n\n\t& .ck-form__header__label {\n\t\tfont-weight: bold;\n\t}\n}\n"],sourceRoot:""}]);const a=s},174:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(15),o=n.n(i),r=n(645),s=n.n(r)()(o());s.push([e.id,".ck.ck-icon{vertical-align:middle}:root{--ck-icon-size:calc(var(--ck-line-height-base)*var(--ck-font-size-normal))}.ck.ck-icon{font-size:.8333350694em;height:var(--ck-icon-size);width:var(--ck-icon-size);will-change:transform}.ck.ck-icon,.ck.ck-icon *{color:inherit;cursor:inherit}.ck.ck-icon :not([fill]){fill:currentColor}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/icon/icon.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/icon/icon.css"],names:[],mappings:"AAKA,YACC,qBACD,CCFA,MACC,0EACD,CAEA,YAKC,uBAAwB,CAHxB,0BAA2B,CAD3B,yBAA0B,CAY1B,qBAcD,CAZC,0BARA,aAAc,CAGd,cAgBA,CAJC,yBAEC,iBACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-icon {\n\tvertical-align: middle;\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-icon-size: calc(var(--ck-line-height-base) * var(--ck-font-size-normal));\n}\n\n.ck.ck-icon {\n\twidth: var(--ck-icon-size);\n\theight: var(--ck-icon-size);\n\n\t/* Multiplied by the height of the line in "px" should give SVG "viewport" dimensions */\n\tfont-size: .8333350694em;\n\n\tcolor: inherit;\n\n\t/* Inherit cursor style (#5). */\n\tcursor: inherit;\n\n\t/* This will prevent blurry icons on Firefox. See #340. */\n\twill-change: transform;\n\n\t& * {\n\t\t/* Inherit cursor style (#5). */\n\t\tcursor: inherit;\n\n\t\t/* Allows dynamic coloring of the icons. */\n\t\tcolor: inherit;\n\n\t\t&:not([fill]) {\n\t\t\t/* Needed by FF. */\n\t\t\tfill: currentColor;\n\t\t}\n\t}\n}\n'],sourceRoot:""}]);const a=s},985:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(15),o=n.n(i),r=n(645),s=n.n(r)()(o());s.push([e.id,":root{--ck-input-width:18em;--ck-input-text-width:var(--ck-input-width)}.ck.ck-input{border-radius:0}.ck-rounded-corners .ck.ck-input,.ck.ck-input.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-input{background:var(--ck-color-input-background);border:1px solid var(--ck-color-input-border);min-height:var(--ck-ui-component-min-height);min-width:var(--ck-input-width);padding:var(--ck-spacing-extra-tiny) var(--ck-spacing-medium);transition:box-shadow .1s ease-in-out,border .1s ease-in-out}.ck.ck-input:focus{border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck.ck-input[readonly]{background:var(--ck-color-input-disabled-background);border:1px solid var(--ck-color-input-disabled-border);color:var(--ck-color-input-disabled-text)}.ck.ck-input[readonly]:focus{box-shadow:var(--ck-focus-disabled-outer-shadow),0 0}.ck.ck-input.ck-error{animation:ck-input-shake .3s ease both;border-color:var(--ck-color-input-error-border)}.ck.ck-input.ck-error:focus{box-shadow:var(--ck-focus-error-outer-shadow),0 0}@keyframes ck-input-shake{20%{transform:translateX(-2px)}40%{transform:translateX(2px)}60%{transform:translateX(-1px)}80%{transform:translateX(1px)}}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/input/input.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_rounded.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_focus.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_shadow.css"],names:[],mappings:"AASA,MACC,qBAAsB,CAGtB,2CACD,CAEA,aCLC,eD2CD,CAtCA,iECDE,qCDuCF,CAtCA,aAGC,2CAA4C,CAC5C,6CAA8C,CAK9C,4CAA6C,CAH7C,+BAAgC,CADhC,6DAA8D,CAO9D,4DA0BD,CAxBC,mBEnBA,2BAA2B,CCF3B,2CAA8B,CDC9B,YFuBA,CAEA,uBAEC,oDAAqD,CADrD,sDAAuD,CAEvD,yCAMD,CAJC,6BG/BD,oDHkCC,CAGD,sBAEC,sCAAuC,CADvC,+CAMD,CAHC,4BGzCD,iDH2CC,CAIF,0BACC,IACC,0BACD,CAEA,IACC,yBACD,CAEA,IACC,0BACD,CAEA,IACC,yBACD,CACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n@import "../../../mixins/_focus.css";\n@import "../../../mixins/_shadow.css";\n\n:root {\n\t--ck-input-width: 18em;\n\n\t/* Backward compatibility. */\n\t--ck-input-text-width: var(--ck-input-width);\n}\n\n.ck.ck-input {\n\t@mixin ck-rounded-corners;\n\n\tbackground: var(--ck-color-input-background);\n\tborder: 1px solid var(--ck-color-input-border);\n\tpadding: var(--ck-spacing-extra-tiny) var(--ck-spacing-medium);\n\tmin-width: var(--ck-input-width);\n\n\t/* This is important to stay of the same height as surrounding buttons */\n\tmin-height: var(--ck-ui-component-min-height);\n\n\t/* Apply some smooth transition to the box-shadow and border. */\n\ttransition: box-shadow .1s ease-in-out, border .1s ease-in-out;\n\n\t&:focus {\n\t\t@mixin ck-focus-ring;\n\t\t@mixin ck-box-shadow var(--ck-focus-outer-shadow);\n\t}\n\n\t&[readonly] {\n\t\tborder: 1px solid var(--ck-color-input-disabled-border);\n\t\tbackground: var(--ck-color-input-disabled-background);\n\t\tcolor: var(--ck-color-input-disabled-text);\n\n\t\t&:focus {\n\t\t\t/* The read-only input should have a slightly less visible shadow when focused. */\n\t\t\t@mixin ck-box-shadow var(--ck-focus-disabled-outer-shadow);\n\t\t}\n\t}\n\n\t&.ck-error {\n\t\tborder-color: var(--ck-color-input-error-border);\n\t\tanimation: ck-input-shake .3s ease both;\n\n\t\t&:focus {\n\t\t\t@mixin ck-box-shadow var(--ck-focus-error-outer-shadow);\n\t\t}\n\t}\n}\n\n@keyframes ck-input-shake {\n\t20% {\n\t\ttransform: translateX(-2px);\n\t}\n\n\t40% {\n\t\ttransform: translateX(2px);\n\t}\n\n\t60% {\n\t\ttransform: translateX(-1px);\n\t}\n\n\t80% {\n\t\ttransform: translateX(1px);\n\t}\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A visual style of focused element's border.\n */\n@define-mixin ck-focus-ring {\n\t/* Disable native outline. */\n\toutline: none;\n\tborder: var(--ck-focus-ring)\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A helper to combine multiple shadows.\n */\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\n\tbox-shadow: $shadowA, $shadowB;\n}\n\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n@define-mixin ck-drop-shadow {\n\t@mixin ck-box-shadow var(--ck-drop-shadow);\n}\n"],sourceRoot:""}]);const a=s},751:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(15),o=n.n(i),r=n(645),s=n.n(r)()(o());s.push([e.id,".ck.ck-label{display:block}.ck.ck-voice-label{display:none}.ck.ck-label{font-weight:700}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/label/label.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/label/label.css"],names:[],mappings:"AAKA,aACC,aACD,CAEA,mBACC,YACD,CCNA,aACC,eACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-label {\n\tdisplay: block;\n}\n\n.ck.ck-voice-label {\n\tdisplay: none;\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-label {\n\tfont-weight: bold;\n}\n"],sourceRoot:""}]);const a=s},111:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(15),o=n.n(i),r=n(645),s=n.n(r)()(o());s.push([e.id,".ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper{display:flex;position:relative}.ck.ck-labeled-field-view .ck.ck-label{display:block;position:absolute}:root{--ck-labeled-field-view-transition:.1s cubic-bezier(0,0,0.24,0.95);--ck-labeled-field-empty-unfocused-max-width:100% - 2 * var(--ck-spacing-medium);--ck-color-labeled-field-label-background:var(--ck-color-base-background)}.ck.ck-labeled-field-view{border-radius:0}.ck-rounded-corners .ck.ck-labeled-field-view,.ck.ck-labeled-field-view.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper{width:100%}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{top:0}[dir=ltr] .ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{left:0}[dir=rtl] .ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{right:0}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{background:var(--ck-color-labeled-field-label-background);font-weight:400;line-height:normal;max-width:100%;overflow:hidden;padding:0 calc(var(--ck-font-size-tiny)*.5);pointer-events:none;text-overflow:ellipsis;transform:translate(var(--ck-spacing-medium),-6px) scale(.75);transform-origin:0 0;transition:transform var(--ck-labeled-field-view-transition),padding var(--ck-labeled-field-view-transition),background var(--ck-labeled-field-view-transition)}.ck.ck-labeled-field-view.ck-error .ck-input:not([readonly])+.ck.ck-label,.ck.ck-labeled-field-view.ck-error>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{color:var(--ck-color-base-error)}.ck.ck-labeled-field-view .ck-labeled-field-view__status{font-size:var(--ck-font-size-small);margin-top:var(--ck-spacing-small);white-space:normal}.ck.ck-labeled-field-view .ck-labeled-field-view__status.ck-labeled-field-view__status_error{color:var(--ck-color-base-error)}.ck.ck-labeled-field-view.ck-disabled>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{color:var(--ck-color-input-disabled-text)}[dir=ltr] .ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,[dir=ltr] .ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{transform:translate(var(--ck-spacing-medium),calc(var(--ck-font-size-base)*.6)) scale(1)}[dir=rtl] .ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,[dir=rtl] .ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{transform:translate(calc(var(--ck-spacing-medium)*-1),calc(var(--ck-font-size-base)*.6)) scale(1)}.ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{background:transparent;max-width:calc(var(--ck-labeled-field-empty-unfocused-max-width));padding:0}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown>.ck.ck-button{background:transparent}.ck.ck-labeled-field-view.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown>.ck-button>.ck-button__label{opacity:0}.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown+.ck-label{max-width:calc(var(--ck-labeled-field-empty-unfocused-max-width) - var(--ck-dropdown-arrow-size) - var(--ck-spacing-standard))}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/labeledfield/labeledfieldview.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/labeledfield/labeledfieldview.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAMC,mEACC,YAAa,CACb,iBACD,CAEA,uCACC,aAAc,CACd,iBACD,CCND,MACC,kEAAsE,CACtE,gFAAiF,CACjF,yEACD,CAEA,0BCHC,eD4GD,CAzGA,2FCCE,qCDwGF,CAtGC,mEACC,UAmCD,CAjCC,gFACC,KA+BD,CAhCA,0FAIE,MA4BF,CAhCA,0FAQE,OAwBF,CAhCA,gFAiBC,yDAA0D,CAG1D,eAAmB,CADnB,kBAAoB,CAOpB,cAAe,CAFf,eAAgB,CANhB,2CAA8C,CAP9C,mBAAoB,CAYpB,sBAAuB,CARvB,6DAA+D,CAH/D,oBAAqB,CAgBrB,+JAID,CAQA,mKACC,gCACD,CAGD,yDACC,mCAAoC,CACpC,kCAAmC,CAInC,kBAKD,CAHC,6FACC,gCACD,CAID,4OAEC,yCACD,CAIA,oUAGE,wFAYF,CAfA,oUAOE,iGAQF,CAfA,gTAaC,sBAAuB,CAFvB,iEAAkE,CAGlE,SACD,CAKA,8FACC,sBACD,CAGA,yIACC,SACD,CAGA,kMACC,8HACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-labeled-field-view {\n\t& > .ck.ck-labeled-field-view__input-wrapper {\n\t\tdisplay: flex;\n\t\tposition: relative;\n\t}\n\n\t& .ck.ck-label {\n\t\tdisplay: block;\n\t\tposition: absolute;\n\t}\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n@import "../../../mixins/_rounded.css";\n\n:root {\n\t--ck-labeled-field-view-transition: .1s cubic-bezier(0, 0, 0.24, 0.95);\n\t--ck-labeled-field-empty-unfocused-max-width: 100% - 2 * var(--ck-spacing-medium);\n\t--ck-color-labeled-field-label-background: var(--ck-color-base-background);\n}\n\n.ck.ck-labeled-field-view {\n\t@mixin ck-rounded-corners;\n\n\t& > .ck.ck-labeled-field-view__input-wrapper {\n\t\twidth: 100%;\n\n\t\t& > .ck.ck-label {\n\t\t\ttop: 0px;\n\n\t\t\t@mixin ck-dir ltr {\n\t\t\t\tleft: 0px;\n\t\t\t}\n\n\t\t\t@mixin ck-dir rtl {\n\t\t\t\tright: 0px;\n\t\t\t}\n\n\t\t\tpointer-events: none;\n\t\t\ttransform-origin: 0 0;\n\n\t\t\t/* By default, display the label scaled down above the field. */\n\t\t\ttransform: translate(var(--ck-spacing-medium), -6px) scale(.75);\n\n\t\t\tbackground: var(--ck-color-labeled-field-label-background);\n\t\t\tpadding: 0 calc(.5 * var(--ck-font-size-tiny));\n\t\t\tline-height: initial;\n\t\t\tfont-weight: normal;\n\n\t\t\t/* Prevent overflow when the label is longer than the input */\n\t\t\ttext-overflow: ellipsis;\n\t\t\toverflow: hidden;\n\n\t\t\tmax-width: 100%;\n\n\t\t\ttransition:\n\t\t\t\ttransform var(--ck-labeled-field-view-transition),\n\t\t\t\tpadding var(--ck-labeled-field-view-transition),\n\t\t\t\tbackground var(--ck-labeled-field-view-transition);\n\t\t}\n\t}\n\n\t&.ck-error {\n\t\t& > .ck.ck-labeled-field-view__input-wrapper > .ck.ck-label {\n\t\t\tcolor: var(--ck-color-base-error);\n\t\t}\n\n\t\t& .ck-input:not([readonly]) + .ck.ck-label {\n\t\t\tcolor: var(--ck-color-base-error);\n\t\t}\n\t}\n\n\t& .ck-labeled-field-view__status {\n\t\tfont-size: var(--ck-font-size-small);\n\t\tmargin-top: var(--ck-spacing-small);\n\n\t\t/* Let the info wrap to the next line to avoid stretching the layout horizontally.\n\t\tThe status could be very long. */\n\t\twhite-space: normal;\n\n\t\t&.ck-labeled-field-view__status_error {\n\t\t\tcolor: var(--ck-color-base-error);\n\t\t}\n\t}\n\n\t/* Disabled fields and fields that have no focus should fade out. */\n\t&.ck-disabled > .ck.ck-labeled-field-view__input-wrapper > .ck.ck-label,\n\t&.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused) > .ck.ck-labeled-field-view__input-wrapper > .ck.ck-label {\n\t\tcolor: var(--ck-color-input-disabled-text);\n\t}\n\n\t/* Fields that are disabled or not focused and without a placeholder should have full-sized labels. */\n\t/* stylelint-disable-next-line no-descending-specificity */\n\t&.ck-disabled.ck-labeled-field-view_empty > .ck.ck-labeled-field-view__input-wrapper > .ck.ck-label,\n\t&.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder) > .ck.ck-labeled-field-view__input-wrapper > .ck.ck-label {\n\t\t@mixin ck-dir ltr {\n\t\t\ttransform: translate(var(--ck-spacing-medium), calc(0.6 * var(--ck-font-size-base))) scale(1);\n\t\t}\n\n\t\t@mixin ck-dir rtl {\n\t\t\ttransform: translate(calc(-1 * var(--ck-spacing-medium)), calc(0.6 * var(--ck-font-size-base))) scale(1);\n\t\t}\n\n\t\t/* Compensate for the default translate position. */\n\t\tmax-width: calc(var(--ck-labeled-field-empty-unfocused-max-width));\n\n\t\tbackground: transparent;\n\t\tpadding: 0;\n\t}\n\n\t/*------ DropdownView integration ----------------------------------------------------------------------------------- */\n\n\t/* Make sure dropdown\' background color in any of dropdown\'s state does not collide with labeled field. */\n\t& > .ck.ck-labeled-field-view__input-wrapper > .ck-dropdown > .ck.ck-button {\n\t\tbackground: transparent;\n\t}\n\n\t/* When the dropdown is "empty", the labeled field label replaces its label. */\n\t&.ck-labeled-field-view_empty > .ck.ck-labeled-field-view__input-wrapper > .ck-dropdown > .ck-button > .ck-button__label {\n\t\topacity: 0;\n\t}\n\n\t/* Make sure the label of the empty, unfocused input does not cover the dropdown arrow. */\n\t&.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder) > .ck.ck-labeled-field-view__input-wrapper > .ck-dropdown + .ck-label {\n\t\tmax-width: calc(var(--ck-labeled-field-empty-unfocused-max-width) - var(--ck-dropdown-arrow-size) - var(--ck-spacing-standard));\n\t}\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]);const a=s},162:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(15),o=n.n(i),r=n(645),s=n.n(r)()(o());s.push([e.id,".ck.ck-list{display:flex;flex-direction:column;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ck.ck-list .ck-list__item,.ck.ck-list .ck-list__separator{display:block}.ck.ck-list .ck-list__item>:focus{position:relative;z-index:var(--ck-z-default)}.ck.ck-list{border-radius:0}.ck-rounded-corners .ck.ck-list,.ck.ck-list.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-list{background:var(--ck-color-list-background);list-style-type:none}.ck.ck-list__item{cursor:default;min-width:12em}.ck.ck-list__item .ck-button{border-radius:0;min-height:unset;padding:calc(var(--ck-line-height-base)*.2*var(--ck-font-size-base)) calc(var(--ck-line-height-base)*.4*var(--ck-font-size-base));text-align:left;width:100%}.ck.ck-list__item .ck-button .ck-button__label{line-height:calc(var(--ck-line-height-base)*1.2*var(--ck-font-size-base))}.ck.ck-list__item .ck-button:active{box-shadow:none}.ck.ck-list__item .ck-button.ck-on{background:var(--ck-color-list-button-on-background);color:var(--ck-color-list-button-on-text)}.ck.ck-list__item .ck-button.ck-on:active{box-shadow:none}.ck.ck-list__item .ck-button.ck-on:hover:not(.ck-disabled){background:var(--ck-color-list-button-on-background-focus)}.ck.ck-list__item .ck-button.ck-on:focus:not(.ck-disabled){border-color:var(--ck-color-base-background)}.ck.ck-list__item .ck-button:hover:not(.ck-disabled){background:var(--ck-color-list-button-hover-background)}.ck.ck-list__item .ck-switchbutton.ck-on{background:var(--ck-color-list-background);color:inherit}.ck.ck-list__item .ck-switchbutton.ck-on:hover:not(.ck-disabled){background:var(--ck-color-list-button-hover-background);color:inherit}.ck.ck-list__separator{background:var(--ck-color-base-border);height:1px;width:100%}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/list/list.css","webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/mixins/_unselectable.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/list/list.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAOA,YAGC,YAAa,CACb,qBAAsB,CCFtB,qBAAsB,CACtB,wBAAyB,CACzB,oBAAqB,CACrB,gBDaD,CAZC,2DAEC,aACD,CAKA,kCACC,iBAAkB,CAClB,2BACD,CEfD,YCEC,eDGD,CALA,+DCME,qCDDF,CALA,YAIC,0CAA2C,CAD3C,oBAED,CAEA,kBACC,cAAe,CACf,cA2DD,CAzDC,6BAIC,eAAgB,CAHhB,gBAAiB,CAQjB,iIAEiE,CARjE,eAAgB,CADhB,UAwCD,CA7BC,+CAEC,yEACD,CAEA,oCACC,eACD,CAEA,mCACC,oDAAqD,CACrD,yCAaD,CAXC,0CACC,eACD,CAEA,2DACC,0DACD,CAEA,2DACC,4CACD,CAGD,qDACC,uDACD,CAMA,yCACC,0CAA2C,CAC3C,aAMD,CAJC,iEACC,uDAAwD,CACxD,aACD,CAKH,uBAGC,sCAAuC,CAFvC,UAAW,CACX,UAED",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../mixins/_unselectable.css";\n\n.ck.ck-list {\n\t@mixin ck-unselectable;\n\n\tdisplay: flex;\n\tflex-direction: column;\n\n\t& .ck-list__item,\n\t& .ck-list__separator {\n\t\tdisplay: block;\n\t}\n\n\t/* Make sure that whatever child of the list item gets focus, it remains on the\n\ttop. Thanks to that, styles like box-shadow, outline, etc. are not masked by\n\tadjacent list items. */\n\t& .ck-list__item > *:focus {\n\t\tposition: relative;\n\t\tz-index: var(--ck-z-default);\n\t}\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Makes element unselectable.\n */\n@define-mixin ck-unselectable {\n\t-moz-user-select: none;\n\t-webkit-user-select: none;\n\t-ms-user-select: none;\n\tuser-select: none\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_disabled.css";\n@import "../../../mixins/_rounded.css";\n@import "../../../mixins/_shadow.css";\n\n.ck.ck-list {\n\t@mixin ck-rounded-corners;\n\n\tlist-style-type: none;\n\tbackground: var(--ck-color-list-background);\n}\n\n.ck.ck-list__item {\n\tcursor: default;\n\tmin-width: 12em;\n\n\t& .ck-button {\n\t\tmin-height: unset;\n\t\twidth: 100%;\n\t\ttext-align: left;\n\t\tborder-radius: 0;\n\n\t\t/* List items should have the same height. Use absolute units to make sure it is so\n\t\t because e.g. different heading styles may have different height\n\t\t https://github.com/ckeditor/ckeditor5-heading/issues/63 */\n\t\tpadding:\n\t\t\tcalc(.2 * var(--ck-line-height-base) * var(--ck-font-size-base))\n\t\t\tcalc(.4 * var(--ck-line-height-base) * var(--ck-font-size-base));\n\n\t\t& .ck-button__label {\n\t\t\t/* https://github.com/ckeditor/ckeditor5-heading/issues/63 */\n\t\t\tline-height: calc(1.2 * var(--ck-line-height-base) * var(--ck-font-size-base));\n\t\t}\n\n\t\t&:active {\n\t\t\tbox-shadow: none;\n\t\t}\n\n\t\t&.ck-on {\n\t\t\tbackground: var(--ck-color-list-button-on-background);\n\t\t\tcolor: var(--ck-color-list-button-on-text);\n\n\t\t\t&:active {\n\t\t\t\tbox-shadow: none;\n\t\t\t}\n\n\t\t\t&:hover:not(.ck-disabled) {\n\t\t\t\tbackground: var(--ck-color-list-button-on-background-focus);\n\t\t\t}\n\n\t\t\t&:focus:not(.ck-disabled) {\n\t\t\t\tborder-color: var(--ck-color-base-background);\n\t\t\t}\n\t\t}\n\n\t\t&:hover:not(.ck-disabled) {\n\t\t\tbackground: var(--ck-color-list-button-hover-background);\n\t\t}\n\t}\n\n\t/* It\'s unnecessary to change the background/text of a switch toggle; it has different ways\n\tof conveying its state (like the switcher) */\n\t& .ck-switchbutton {\n\t\t&.ck-on {\n\t\t\tbackground: var(--ck-color-list-background);\n\t\t\tcolor: inherit;\n\n\t\t\t&:hover:not(.ck-disabled) {\n\t\t\t\tbackground: var(--ck-color-list-button-hover-background);\n\t\t\t\tcolor: inherit;\n\t\t\t}\n\t\t}\n\t}\n}\n\n.ck.ck-list__separator {\n\theight: 1px;\n\twidth: 100%;\n\tbackground: var(--ck-color-base-border);\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]);const a=s},245:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(15),o=n.n(i),r=n(645),s=n.n(r)()(o());s.push([e.id,':root{--ck-balloon-panel-arrow-z-index:calc(var(--ck-z-default) - 3)}.ck.ck-balloon-panel{display:none;position:absolute;z-index:var(--ck-z-modal)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{content:"";position:absolute}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel[class*=arrow_n]:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel[class*=arrow_n]:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel[class*=arrow_s]:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel[class*=arrow_s]:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel.ck-balloon-panel_visible{display:block}:root{--ck-balloon-arrow-offset:2px;--ck-balloon-arrow-height:10px;--ck-balloon-arrow-half-width:8px;--ck-balloon-arrow-drop-shadow:0 2px 2px var(--ck-color-shadow-drop)}.ck.ck-balloon-panel{border-radius:0}.ck-rounded-corners .ck.ck-balloon-panel,.ck.ck-balloon-panel.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-balloon-panel{background:var(--ck-color-panel-background);border:1px solid var(--ck-color-panel-border);box-shadow:var(--ck-drop-shadow),0 0;min-height:15px}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{border-style:solid;height:0;width:0}.ck.ck-balloon-panel[class*=arrow_n]:after,.ck.ck-balloon-panel[class*=arrow_n]:before{border-width:0 var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width)}.ck.ck-balloon-panel[class*=arrow_n]:before{border-color:transparent transparent var(--ck-color-panel-border) transparent}.ck.ck-balloon-panel[class*=arrow_n]:after{border-color:transparent transparent var(--ck-color-panel-background) transparent;margin-top:var(--ck-balloon-arrow-offset)}.ck.ck-balloon-panel[class*=arrow_s]:after,.ck.ck-balloon-panel[class*=arrow_s]:before{border-width:var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width) 0 var(--ck-balloon-arrow-half-width)}.ck.ck-balloon-panel[class*=arrow_s]:before{border-color:var(--ck-color-panel-border) transparent transparent;filter:drop-shadow(var(--ck-balloon-arrow-drop-shadow))}.ck.ck-balloon-panel[class*=arrow_s]:after{border-color:var(--ck-color-panel-background) transparent transparent transparent;margin-bottom:var(--ck-balloon-arrow-offset)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_n:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_n:before{left:50%;margin-left:calc(var(--ck-balloon-arrow-half-width)*-1);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:before{left:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:before{right:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_s:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_s:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);left:50%;margin-left:calc(var(--ck-balloon-arrow-half-width)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);left:calc(var(--ck-balloon-arrow-half-width)*2)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);right:calc(var(--ck-balloon-arrow-half-width)*2)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sme:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sme:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);margin-right:calc(var(--ck-balloon-arrow-half-width)*2);right:25%}.ck.ck-balloon-panel.ck-balloon-panel_arrow_smw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_smw:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);left:25%;margin-left:calc(var(--ck-balloon-arrow-half-width)*2)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nme:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nme:before{margin-right:calc(var(--ck-balloon-arrow-half-width)*2);right:25%;top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nmw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nmw:before{left:25%;margin-left:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}',"",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/panel/balloonpanel.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/panel/balloonpanel.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_rounded.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_shadow.css"],names:[],mappings:"AAKA,MAEC,8DACD,CAEA,qBACC,YAAa,CACb,iBAAkB,CAElB,yBAyCD,CAtCE,+GAEC,UAAW,CACX,iBACD,CAEA,wDACC,6CACD,CAEA,uDACC,uDACD,CAIA,4CACC,6CACD,CAEA,2CACC,uDACD,CAIA,4CACC,6CACD,CAEA,2CACC,uDACD,CAGD,8CACC,aACD,CC9CD,MACC,6BAA8B,CAC9B,8BAA+B,CAC/B,iCAAkC,CAClC,oEACD,CAEA,qBCJC,eD4ID,CAxIA,iFCAE,qCDwIF,CAxIA,qBAMC,2CAA4C,CAC5C,6CAA8C,CEb9C,oCAA8B,CFU9B,eAoID,CA9HE,+GAIC,kBAAmB,CADnB,QAAS,CADT,OAGD,CAIA,uFAEC,mHACD,CAEA,4CACC,6EACD,CAEA,2CACC,iFAAkF,CAClF,yCACD,CAIA,uFAEC,mHACD,CAEA,4CACC,iEAAkE,CAClE,uDACD,CAEA,2CACC,iFAAkF,CAClF,4CACD,CAIA,yGAEC,QAAS,CACT,uDAA0D,CAC1D,2CACD,CAIA,2GAEC,+CAAkD,CAClD,2CACD,CAIA,2GAEC,gDAAmD,CACnD,2CACD,CAIA,yGAIC,8CAAiD,CAFjD,QAAS,CACT,uDAED,CAIA,2GAGC,8CAAiD,CADjD,+CAED,CAIA,2GAGC,8CAAiD,CADjD,gDAED,CAIA,6GAIC,8CAAiD,CADjD,uDAA0D,CAD1D,SAGD,CAIA,6GAIC,8CAAiD,CAFjD,QAAS,CACT,sDAED,CAIA,6GAGC,uDAA0D,CAD1D,SAAU,CAEV,2CACD,CAIA,6GAEC,QAAS,CACT,sDAAyD,CACzD,2CACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t/* Make sure the balloon arrow does not float over its children. */\n\t--ck-balloon-panel-arrow-z-index: calc(var(--ck-z-default) - 3);\n}\n\n.ck.ck-balloon-panel {\n\tdisplay: none;\n\tposition: absolute;\n\n\tz-index: var(--ck-z-modal);\n\n\t&.ck-balloon-panel_with-arrow {\n\t\t&::before,\n\t\t&::after {\n\t\t\tcontent: "";\n\t\t\tposition: absolute;\n\t\t}\n\n\t\t&::before {\n\t\t\tz-index: var(--ck-balloon-panel-arrow-z-index);\n\t\t}\n\n\t\t&::after {\n\t\t\tz-index: calc(var(--ck-balloon-panel-arrow-z-index) + 1);\n\t\t}\n\t}\n\n\t&[class*="arrow_n"] {\n\t\t&::before {\n\t\t\tz-index: var(--ck-balloon-panel-arrow-z-index);\n\t\t}\n\n\t\t&::after {\n\t\t\tz-index: calc(var(--ck-balloon-panel-arrow-z-index) + 1);\n\t\t}\n\t}\n\n\t&[class*="arrow_s"] {\n\t\t&::before {\n\t\t\tz-index: var(--ck-balloon-panel-arrow-z-index);\n\t\t}\n\n\t\t&::after {\n\t\t\tz-index: calc(var(--ck-balloon-panel-arrow-z-index) + 1);\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_visible {\n\t\tdisplay: block;\n\t}\n}\n','/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n@import "../../../mixins/_shadow.css";\n\n:root {\n\t--ck-balloon-arrow-offset: 2px;\n\t--ck-balloon-arrow-height: 10px;\n\t--ck-balloon-arrow-half-width: 8px;\n\t--ck-balloon-arrow-drop-shadow: 0 2px 2px var(--ck-color-shadow-drop);\n}\n\n.ck.ck-balloon-panel {\n\t@mixin ck-rounded-corners;\n\t@mixin ck-drop-shadow;\n\n\tmin-height: 15px;\n\n\tbackground: var(--ck-color-panel-background);\n\tborder: 1px solid var(--ck-color-panel-border);\n\n\t&.ck-balloon-panel_with-arrow {\n\t\t&::before,\n\t\t&::after {\n\t\t\twidth: 0;\n\t\t\theight: 0;\n\t\t\tborder-style: solid;\n\t\t}\n\t}\n\n\t&[class*="arrow_n"] {\n\t\t&::before,\n\t\t&::after {\n\t\t\tborder-width: 0 var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width);\n\t\t}\n\n\t\t&::before {\n\t\t\tborder-color: transparent transparent var(--ck-color-panel-border) transparent;\n\t\t}\n\n\t\t&::after {\n\t\t\tborder-color: transparent transparent var(--ck-color-panel-background) transparent;\n\t\t\tmargin-top: var(--ck-balloon-arrow-offset);\n\t\t}\n\t}\n\n\t&[class*="arrow_s"] {\n\t\t&::before,\n\t\t&::after {\n\t\t\tborder-width: var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width) 0 var(--ck-balloon-arrow-half-width);\n\t\t}\n\n\t\t&::before {\n\t\t\tborder-color: var(--ck-color-panel-border) transparent transparent;\n\t\t\tfilter: drop-shadow(var(--ck-balloon-arrow-drop-shadow));\n\t\t}\n\n\t\t&::after {\n\t\t\tborder-color: var(--ck-color-panel-background) transparent transparent transparent;\n\t\t\tmargin-bottom: var(--ck-balloon-arrow-offset);\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_n {\n\t\t&::before,\n\t\t&::after {\n\t\t\tleft: 50%;\n\t\t\tmargin-left: calc(-1 * var(--ck-balloon-arrow-half-width));\n\t\t\ttop: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_nw {\n\t\t&::before,\n\t\t&::after {\n\t\t\tleft: calc(2 * var(--ck-balloon-arrow-half-width));\n\t\t\ttop: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_ne {\n\t\t&::before,\n\t\t&::after {\n\t\t\tright: calc(2 * var(--ck-balloon-arrow-half-width));\n\t\t\ttop: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_s {\n\t\t&::before,\n\t\t&::after {\n\t\t\tleft: 50%;\n\t\t\tmargin-left: calc(-1 * var(--ck-balloon-arrow-half-width));\n\t\t\tbottom: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_sw {\n\t\t&::before,\n\t\t&::after {\n\t\t\tleft: calc(2 * var(--ck-balloon-arrow-half-width));\n\t\t\tbottom: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_se {\n\t\t&::before,\n\t\t&::after {\n\t\t\tright: calc(2 * var(--ck-balloon-arrow-half-width));\n\t\t\tbottom: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_sme {\n\t\t&::before,\n\t\t&::after {\n\t\t\tright: 25%;\n\t\t\tmargin-right: calc(2 * var(--ck-balloon-arrow-half-width));\n\t\t\tbottom: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_smw {\n\t\t&::before,\n\t\t&::after {\n\t\t\tleft: 25%;\n\t\t\tmargin-left: calc(2 * var(--ck-balloon-arrow-half-width));\n\t\t\tbottom: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_nme {\n\t\t&::before,\n\t\t&::after {\n\t\t\tright: 25%;\n\t\t\tmargin-right: calc(2 * var(--ck-balloon-arrow-half-width));\n\t\t\ttop: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n\n\t&.ck-balloon-panel_arrow_nmw {\n\t\t&::before,\n\t\t&::after {\n\t\t\tleft: 25%;\n\t\t\tmargin-left: calc(2 * var(--ck-balloon-arrow-half-width));\n\t\t\ttop: calc(-1 * var(--ck-balloon-arrow-height));\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A helper to combine multiple shadows.\n */\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\n\tbox-shadow: $shadowA, $shadowB;\n}\n\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n@define-mixin ck-drop-shadow {\n\t@mixin ck-box-shadow var(--ck-drop-shadow);\n}\n"],sourceRoot:""}]);const a=s},757:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(15),o=n.n(i),r=n(645),s=n.n(r)()(o());s.push([e.id,".ck .ck-balloon-rotator__navigation{align-items:center;display:flex;justify-content:center}.ck .ck-balloon-rotator__content .ck-toolbar{justify-content:center}.ck .ck-balloon-rotator__navigation{background:var(--ck-color-toolbar-background);border-bottom:1px solid var(--ck-color-toolbar-border);padding:0 var(--ck-spacing-small)}.ck .ck-balloon-rotator__navigation>*{margin-bottom:var(--ck-spacing-small);margin-right:var(--ck-spacing-small);margin-top:var(--ck-spacing-small)}.ck .ck-balloon-rotator__navigation .ck-balloon-rotator__counter{margin-left:var(--ck-spacing-small);margin-right:var(--ck-spacing-standard)}.ck .ck-balloon-rotator__content .ck.ck-annotation-wrapper{box-shadow:none}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/panel/balloonrotator.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/panel/balloonrotator.css"],names:[],mappings:"AAKA,oCAEC,kBAAmB,CADnB,YAAa,CAEb,sBACD,CAKA,6CACC,sBACD,CCXA,oCACC,6CAA8C,CAC9C,sDAAuD,CACvD,iCAgBD,CAbC,sCAGC,qCAAsC,CAFtC,oCAAqC,CACrC,kCAED,CAGA,iEAIC,mCAAoC,CAHpC,uCAID,CAMA,2DACC,eACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck .ck-balloon-rotator__navigation {\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n/* Buttons inside a toolbar should be centered when rotator bar is wider.\n * See: https://github.com/ckeditor/ckeditor5-ui/issues/495\n */\n.ck .ck-balloon-rotator__content .ck-toolbar {\n\tjustify-content: center;\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck .ck-balloon-rotator__navigation {\n\tbackground: var(--ck-color-toolbar-background);\n\tborder-bottom: 1px solid var(--ck-color-toolbar-border);\n\tpadding: 0 var(--ck-spacing-small);\n\n\t/* Let's keep similar appearance to `ck-toolbar`. */\n\t& > * {\n\t\tmargin-right: var(--ck-spacing-small);\n\t\tmargin-top: var(--ck-spacing-small);\n\t\tmargin-bottom: var(--ck-spacing-small);\n\t}\n\n\t/* Gives counter more breath than buttons. */\n\t& .ck-balloon-rotator__counter {\n\t\tmargin-right: var(--ck-spacing-standard);\n\n\t\t/* We need to use smaller margin because of previous button's right margin. */\n\t\tmargin-left: var(--ck-spacing-small);\n\t}\n}\n\n.ck .ck-balloon-rotator__content {\n\n\t/* Disable default annotation shadow inside rotator with fake panels. */\n\t& .ck.ck-annotation-wrapper {\n\t\tbox-shadow: none;\n\t}\n}\n"],sourceRoot:""}]);const a=s},553:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(15),o=n.n(i),r=n(645),s=n.n(r)()(o());s.push([e.id,".ck .ck-fake-panel{position:absolute;z-index:calc(var(--ck-z-modal) - 1)}.ck .ck-fake-panel div{position:absolute}.ck .ck-fake-panel div:first-child{z-index:2}.ck .ck-fake-panel div:nth-child(2){z-index:1}:root{--ck-balloon-fake-panel-offset-horizontal:6px;--ck-balloon-fake-panel-offset-vertical:6px}.ck .ck-fake-panel div{background:var(--ck-color-panel-background);border:1px solid var(--ck-color-panel-border);border-radius:var(--ck-border-radius);box-shadow:var(--ck-drop-shadow),0 0;height:100%;min-height:15px;width:100%}.ck .ck-fake-panel div:first-child{margin-left:var(--ck-balloon-fake-panel-offset-horizontal);margin-top:var(--ck-balloon-fake-panel-offset-vertical)}.ck .ck-fake-panel div:nth-child(2){margin-left:calc(var(--ck-balloon-fake-panel-offset-horizontal)*2);margin-top:calc(var(--ck-balloon-fake-panel-offset-vertical)*2)}.ck .ck-fake-panel div:nth-child(3){margin-left:calc(var(--ck-balloon-fake-panel-offset-horizontal)*3);margin-top:calc(var(--ck-balloon-fake-panel-offset-vertical)*3)}.ck .ck-balloon-panel_arrow_s+.ck-fake-panel,.ck .ck-balloon-panel_arrow_se+.ck-fake-panel,.ck .ck-balloon-panel_arrow_sw+.ck-fake-panel{--ck-balloon-fake-panel-offset-vertical:-6px}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/panel/fakepanel.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/panel/fakepanel.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_shadow.css"],names:[],mappings:"AAKA,mBACC,iBAAkB,CAGlB,mCACD,CAEA,uBACC,iBACD,CAEA,mCACC,SACD,CAEA,oCACC,SACD,CCfA,MACC,6CAA8C,CAC9C,2CACD,CAGA,uBAKC,2CAA4C,CAC5C,6CAA8C,CAC9C,qCAAsC,CCXtC,oCAA8B,CDc9B,WAAY,CAPZ,eAAgB,CAMhB,UAED,CAEA,mCACC,0DAA2D,CAC3D,uDACD,CAEA,oCACC,kEAAqE,CACrE,+DACD,CACA,oCACC,kEAAqE,CACrE,+DACD,CAGA,yIAGC,4CACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck .ck-fake-panel {\n\tposition: absolute;\n\n\t/* Fake panels should be placed under main balloon content. */\n\tz-index: calc(var(--ck-z-modal) - 1);\n}\n\n.ck .ck-fake-panel div {\n\tposition: absolute;\n}\n\n.ck .ck-fake-panel div:nth-child( 1 ) {\n\tz-index: 2;\n}\n\n.ck .ck-fake-panel div:nth-child( 2 ) {\n\tz-index: 1;\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_shadow.css";\n\n:root {\n\t--ck-balloon-fake-panel-offset-horizontal: 6px;\n\t--ck-balloon-fake-panel-offset-vertical: 6px;\n}\n\n/* Let\'s use `.ck-balloon-panel` appearance. See: balloonpanel.css. */\n.ck .ck-fake-panel div {\n\t@mixin ck-drop-shadow;\n\n\tmin-height: 15px;\n\n\tbackground: var(--ck-color-panel-background);\n\tborder: 1px solid var(--ck-color-panel-border);\n\tborder-radius: var(--ck-border-radius);\n\n\twidth: 100%;\n\theight: 100%;\n}\n\n.ck .ck-fake-panel div:nth-child( 1 ) {\n\tmargin-left: var(--ck-balloon-fake-panel-offset-horizontal);\n\tmargin-top: var(--ck-balloon-fake-panel-offset-vertical);\n}\n\n.ck .ck-fake-panel div:nth-child( 2 ) {\n\tmargin-left: calc(var(--ck-balloon-fake-panel-offset-horizontal) * 2);\n\tmargin-top: calc(var(--ck-balloon-fake-panel-offset-vertical) * 2);\n}\n.ck .ck-fake-panel div:nth-child( 3 ) {\n\tmargin-left: calc(var(--ck-balloon-fake-panel-offset-horizontal) * 3);\n\tmargin-top: calc(var(--ck-balloon-fake-panel-offset-vertical) * 3);\n}\n\n/* If balloon is positioned above element, we need to move fake panel to the top. */\n.ck .ck-balloon-panel_arrow_s + .ck-fake-panel,\n.ck .ck-balloon-panel_arrow_se + .ck-fake-panel,\n.ck .ck-balloon-panel_arrow_sw + .ck-fake-panel {\n\t--ck-balloon-fake-panel-offset-vertical: -6px;\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A helper to combine multiple shadows.\n */\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\n\tbox-shadow: $shadowA, $shadowB;\n}\n\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n@define-mixin ck-drop-shadow {\n\t@mixin ck-box-shadow var(--ck-drop-shadow);\n}\n"],sourceRoot:""}]);const a=s},609:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(15),o=n.n(i),r=n(645),s=n.n(r)()(o());s.push([e.id,".ck.ck-sticky-panel .ck-sticky-panel__content_sticky{position:fixed;top:0;z-index:var(--ck-z-modal)}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky_bottom-limit{position:absolute;top:auto}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky{border-top-left-radius:0;border-top-right-radius:0;border-width:0 1px 1px;box-shadow:var(--ck-drop-shadow),0 0}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/panel/stickypanel.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/panel/stickypanel.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_shadow.css"],names:[],mappings:"AAMC,qDAEC,cAAe,CACf,KAAM,CAFN,yBAGD,CAEA,kEAEC,iBAAkB,CADlB,QAED,CCPA,qDAIC,wBAAyB,CACzB,yBAA0B,CAF1B,sBAAuB,CCFxB,oCDKA",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-sticky-panel {\n\t& .ck-sticky-panel__content_sticky {\n\t\tz-index: var(--ck-z-modal); /* #315 */\n\t\tposition: fixed;\n\t\ttop: 0;\n\t}\n\n\t& .ck-sticky-panel__content_sticky_bottom-limit {\n\t\ttop: auto;\n\t\tposition: absolute;\n\t}\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_shadow.css";\n\n.ck.ck-sticky-panel {\n\t& .ck-sticky-panel__content_sticky {\n\t\t@mixin ck-drop-shadow;\n\n\t\tborder-width: 0 1px 1px;\n\t\tborder-top-left-radius: 0;\n\t\tborder-top-right-radius: 0;\n\t}\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A helper to combine multiple shadows.\n */\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\n\tbox-shadow: $shadowA, $shadowB;\n}\n\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n@define-mixin ck-drop-shadow {\n\t@mixin ck-box-shadow var(--ck-drop-shadow);\n}\n"],sourceRoot:""}]);const a=s},590:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(15),o=n.n(i),r=n(645),s=n.n(r)()(o());s.push([e.id,'.ck-vertical-form .ck-button:after{bottom:var(--ck-spacing-small);content:"";position:absolute;right:-1px;top:var(--ck-spacing-small);width:0;z-index:1}@media screen and (max-width:600px){.ck.ck-responsive-form .ck-button:after{bottom:var(--ck-spacing-small);content:"";position:absolute;right:-1px;top:var(--ck-spacing-small);width:0;z-index:1}}.ck-vertical-form>.ck-button:nth-last-child(2):after{border-right:1px solid var(--ck-color-base-border)}.ck.ck-responsive-form{padding:var(--ck-spacing-large)}.ck.ck-responsive-form:focus{outline:none}[dir=ltr] .ck.ck-responsive-form>:not(:first-child),[dir=rtl] .ck.ck-responsive-form>:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-responsive-form{padding:0;width:calc(var(--ck-input-width)*.8)}.ck.ck-responsive-form .ck-labeled-field-view{margin:var(--ck-spacing-large) var(--ck-spacing-large) 0}.ck.ck-responsive-form .ck-labeled-field-view .ck-input-text{min-width:0;width:100%}.ck.ck-responsive-form .ck-labeled-field-view .ck-labeled-field-view__error{white-space:normal}.ck.ck-responsive-form>.ck-button:last-child,.ck.ck-responsive-form>.ck-button:nth-last-child(2){border:0;border-radius:0;border-top:1px solid var(--ck-color-base-border);margin-top:var(--ck-spacing-large);padding:var(--ck-spacing-standard)}[dir=ltr] .ck.ck-responsive-form>.ck-button:last-child,[dir=ltr] .ck.ck-responsive-form>.ck-button:nth-last-child(2),[dir=rtl] .ck.ck-responsive-form>.ck-button:last-child,[dir=rtl] .ck.ck-responsive-form>.ck-button:nth-last-child(2){margin-left:0}.ck.ck-responsive-form>.ck-button:nth-last-child(2):after,[dir=rtl] .ck.ck-responsive-form>.ck-button:last-child:last-of-type,[dir=rtl] .ck.ck-responsive-form>.ck-button:nth-last-child(2):last-of-type{border-right:1px solid var(--ck-color-base-border)}}',"",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/responsive-form/responsiveform.css","webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/responsive-form/responsiveform.css"],names:[],mappings:"AAOA,mCAMC,8BAA+B,CAL/B,UAAW,CAEX,iBAAkB,CAClB,UAAW,CACX,2BAA4B,CAH5B,OAAQ,CAKR,SACD,CCTC,oCDaC,wCAMC,8BAA+B,CAL/B,UAAW,CAEX,iBAAkB,CAClB,UAAW,CACX,2BAA4B,CAH5B,OAAQ,CAKR,SACD,CCnBD,CCAD,qDACC,kDACD,CAEA,uBACC,+BAkED,CAhEC,6BAEC,YACD,CASC,uGACC,sCACD,CDvBD,oCCMD,uBAqBE,SAAU,CACV,oCA6CF,CA3CE,8CACC,wDAWD,CATC,6DACC,WAAY,CACZ,UACD,CAGA,4EACC,kBACD,CAID,iGAMC,QAAS,CADT,eAAgB,CAEhB,gDAAiD,CAJjD,kCAAmC,CADnC,kCAkBD,CApBA,0OAcE,aAMF,CAGC,yMACC,kDACD,CDpEF",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";\n\n.ck-vertical-form .ck-button::after {\n\tcontent: "";\n\twidth: 0;\n\tposition: absolute;\n\tright: -1px;\n\ttop: var(--ck-spacing-small);\n\tbottom: var(--ck-spacing-small);\n\tz-index: 1;\n}\n\n.ck.ck-responsive-form {\n\t@mixin ck-media-phone {\n\t\t& .ck-button::after {\n\t\t\tcontent: "";\n\t\t\twidth: 0;\n\t\t\tposition: absolute;\n\t\t\tright: -1px;\n\t\t\ttop: var(--ck-spacing-small);\n\t\t\tbottom: var(--ck-spacing-small);\n\t\t\tz-index: 1;\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@define-mixin ck-media-phone {\n\t@media screen and (max-width: 600px) {\n\t\t@mixin-content;\n\t}\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_rwd.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n.ck-vertical-form > .ck-button:nth-last-child(2)::after {\n\tborder-right: 1px solid var(--ck-color-base-border);\n}\n\n.ck.ck-responsive-form {\n\tpadding: var(--ck-spacing-large);\n\n\t&:focus {\n\t\t/* See: https://github.com/ckeditor/ckeditor5/issues/4773 */\n\t\toutline: none;\n\t}\n\n\t@mixin ck-dir ltr {\n\t\t& > :not(:first-child) {\n\t\t\tmargin-left: var(--ck-spacing-standard);\n\t\t}\n\t}\n\n\t@mixin ck-dir rtl {\n\t\t& > :not(:last-child) {\n\t\t\tmargin-left: var(--ck-spacing-standard);\n\t\t}\n\t}\n\n\t@mixin ck-media-phone {\n\t\tpadding: 0;\n\t\twidth: calc(.8 * var(--ck-input-width));\n\n\t\t& .ck-labeled-field-view {\n\t\t\tmargin: var(--ck-spacing-large) var(--ck-spacing-large) 0;\n\n\t\t\t& .ck-input-text {\n\t\t\t\tmin-width: 0;\n\t\t\t\twidth: 100%;\n\t\t\t}\n\n\t\t\t/* Let the long error messages wrap in the narrow form. */\n\t\t\t& .ck-labeled-field-view__error {\n\t\t\t\twhite-space: normal;\n\t\t\t}\n\t\t}\n\n\t\t/* Styles for two last buttons in the form (save&cancel, edit&unlink, etc.). */\n\t\t& > .ck-button:nth-last-child(1),\n\t\t& > .ck-button:nth-last-child(2) {\n\t\t\tpadding: var(--ck-spacing-standard);\n\t\t\tmargin-top: var(--ck-spacing-large);\n\n\t\t\tborder-radius: 0;\n\t\t\tborder: 0;\n\t\t\tborder-top: 1px solid var(--ck-color-base-border);\n\n\t\t\t@mixin ck-dir ltr {\n\t\t\t\tmargin-left: 0;\n\t\t\t}\n\n\t\t\t@mixin ck-dir rtl {\n\t\t\t\tmargin-left: 0;\n\n\t\t\t\t&:last-of-type {\n\t\t\t\t\tborder-right: 1px solid var(--ck-color-base-border);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t& > .ck-button:nth-last-child(2) {\n\t\t\t&::after {\n\t\t\t\tborder-right: 1px solid var(--ck-color-base-border);\n\t\t\t}\n\t\t}\n\t}\n}\n'],sourceRoot:""}]);const a=s},706:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(15),o=n.n(i),r=n(645),s=n.n(r)()(o());s.push([e.id,".ck.ck-block-toolbar-button{position:absolute;z-index:var(--ck-z-default)}:root{--ck-color-block-toolbar-button:var(--ck-color-text);--ck-block-toolbar-button-size:var(--ck-font-size-normal)}.ck.ck-block-toolbar-button{color:var(--ck-color-block-toolbar-button);font-size:var(--ck-block-toolbar-size)}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/toolbar/blocktoolbar.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/toolbar/blocktoolbar.css"],names:[],mappings:"AAKA,4BACC,iBAAkB,CAClB,2BACD,CCHA,MACC,oDAAqD,CACrD,yDACD,CAEA,4BACC,0CAA2C,CAC3C,sCACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-block-toolbar-button {\n\tposition: absolute;\n\tz-index: var(--ck-z-default);\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-color-block-toolbar-button: var(--ck-color-text);\n\t--ck-block-toolbar-button-size: var(--ck-font-size-normal);\n}\n\n.ck.ck-block-toolbar-button {\n\tcolor: var(--ck-color-block-toolbar-button);\n\tfont-size: var(--ck-block-toolbar-size);\n}\n"],sourceRoot:""}]);const a=s},571:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(15),o=n.n(i),r=n(645),s=n.n(r)()(o());s.push([e.id,".ck.ck-toolbar{align-items:center;display:flex;flex-flow:row nowrap;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ck.ck-toolbar>.ck-toolbar__items{align-items:center;display:flex;flex-flow:row wrap;flex-grow:1}.ck.ck-toolbar .ck.ck-toolbar__separator{display:inline-block}.ck.ck-toolbar .ck.ck-toolbar__separator:first-child,.ck.ck-toolbar .ck.ck-toolbar__separator:last-child{display:none}.ck.ck-toolbar .ck-toolbar__line-break{flex-basis:100%}.ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items{flex-wrap:nowrap}.ck.ck-toolbar.ck-toolbar_vertical>.ck-toolbar__items{flex-direction:column}.ck.ck-toolbar.ck-toolbar_floating>.ck-toolbar__items{flex-wrap:nowrap}.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown>.ck-dropdown__button .ck-dropdown__arrow{display:none}.ck.ck-toolbar{border-radius:0}.ck-rounded-corners .ck.ck-toolbar,.ck.ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-toolbar{background:var(--ck-color-toolbar-background);border:1px solid var(--ck-color-toolbar-border);padding:0 var(--ck-spacing-small)}.ck.ck-toolbar .ck.ck-toolbar__separator{align-self:stretch;background:var(--ck-color-toolbar-border);margin-bottom:var(--ck-spacing-small);margin-top:var(--ck-spacing-small);min-width:1px;width:1px}.ck.ck-toolbar .ck-toolbar__line-break{height:0}.ck.ck-toolbar>.ck-toolbar__items>:not(.ck-toolbar__line-break){margin-right:var(--ck-spacing-small)}.ck.ck-toolbar>.ck-toolbar__items:empty+.ck.ck-toolbar__separator{display:none}.ck.ck-toolbar>.ck-toolbar__items>:not(.ck-toolbar__line-break),.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown{margin-bottom:var(--ck-spacing-small);margin-top:var(--ck-spacing-small)}.ck.ck-toolbar.ck-toolbar_vertical{padding:0}.ck.ck-toolbar.ck-toolbar_vertical>.ck-toolbar__items>.ck{border:0;border-radius:0;margin:0;width:100%}.ck.ck-toolbar.ck-toolbar_compact{padding:0}.ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>*{margin:0}.ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>:not(:first-child):not(:last-child){border-radius:0}.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown>.ck.ck-button.ck-dropdown__button{padding-left:var(--ck-spacing-tiny)}.ck-toolbar-container .ck.ck-toolbar{border:0}.ck.ck-toolbar[dir=rtl]>.ck-toolbar__items>.ck,[dir=rtl] .ck.ck-toolbar>.ck-toolbar__items>.ck{margin-right:0}.ck.ck-toolbar[dir=rtl]:not(.ck-toolbar_compact)>.ck-toolbar__items>.ck,[dir=rtl] .ck.ck-toolbar:not(.ck-toolbar_compact)>.ck-toolbar__items>.ck{margin-left:var(--ck-spacing-small)}.ck.ck-toolbar[dir=rtl]>.ck-toolbar__items>.ck:last-child,[dir=rtl] .ck.ck-toolbar>.ck-toolbar__items>.ck:last-child{margin-left:0}.ck.ck-toolbar[dir=rtl].ck-toolbar_compact>.ck-toolbar__items>.ck:first-child,[dir=rtl] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.ck.ck-toolbar[dir=rtl].ck-toolbar_compact>.ck-toolbar__items>.ck:last-child,[dir=rtl] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:last-child{border-bottom-right-radius:0;border-top-right-radius:0}.ck.ck-toolbar[dir=rtl]>.ck.ck-toolbar__separator,[dir=rtl] .ck.ck-toolbar>.ck.ck-toolbar__separator{margin-left:var(--ck-spacing-small)}.ck.ck-toolbar[dir=rtl].ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child),[dir=rtl] .ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child){margin-left:var(--ck-spacing-small)}.ck.ck-toolbar[dir=ltr]>.ck-toolbar__items>.ck:last-child,[dir=ltr] .ck.ck-toolbar>.ck-toolbar__items>.ck:last-child{margin-right:0}.ck.ck-toolbar[dir=ltr].ck-toolbar_compact>.ck-toolbar__items>.ck:first-child,[dir=ltr] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:first-child{border-bottom-right-radius:0;border-top-right-radius:0}.ck.ck-toolbar[dir=ltr].ck-toolbar_compact>.ck-toolbar__items>.ck:last-child,[dir=ltr] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:last-child{border-bottom-left-radius:0;border-top-left-radius:0}.ck.ck-toolbar[dir=ltr]>.ck.ck-toolbar__separator,[dir=ltr] .ck.ck-toolbar>.ck.ck-toolbar__separator{margin-right:var(--ck-spacing-small)}.ck.ck-toolbar[dir=ltr].ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child),[dir=ltr] .ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child){margin-right:var(--ck-spacing-small)}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/toolbar/toolbar.css","webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/mixins/_unselectable.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/toolbar/toolbar.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAOA,eAKC,kBAAmB,CAFnB,YAAa,CACb,oBAAqB,CCFrB,qBAAsB,CACtB,wBAAyB,CACzB,oBAAqB,CACrB,gBD6CD,CA3CC,kCAGC,kBAAmB,CAFnB,YAAa,CACb,kBAAmB,CAEnB,WAED,CAEA,yCACC,oBAWD,CAJC,yGAEC,YACD,CAGD,uCACC,eACD,CAEA,sDACC,gBACD,CAEA,sDACC,qBACD,CAEA,sDACC,gBACD,CAGC,yFACC,YACD,CE/CF,eCGC,eD0FD,CA7FA,qECOE,qCDsFF,CA7FA,eAGC,6CAA8C,CAE9C,+CAAgD,CADhD,iCAyFD,CAtFC,yCACC,kBAAmB,CAGnB,yCAA0C,CAO1C,qCAAsC,CADtC,kCAAmC,CAPnC,aAAc,CADd,SAUD,CAEA,uCACC,QACD,CAGC,gEAEC,oCACD,CAIA,kEACC,YACD,CAGD,gHAIC,qCAAsC,CADtC,kCAED,CAEA,mCAEC,SAgBD,CAbC,0DAWC,QAAS,CAHT,eAAgB,CAHhB,QAAS,CAHT,UAUD,CAGD,kCAEC,SAWD,CATC,uDAEC,QAMD,CAHC,yFACC,eACD,CASD,kFACC,mCACD,CAvFF,qCA2FE,QAEF,CAYC,+FACC,cACD,CAEA,iJAEC,mCACD,CAEA,qHACC,aACD,CAIC,6JAEC,2BAA4B,CAD5B,wBAED,CAGA,2JAEC,4BAA6B,CAD7B,yBAED,CAID,qGACC,mCACD,CAGA,yLACC,mCACD,CAWA,qHACC,cACD,CAIC,6JAEC,4BAA6B,CAD7B,yBAED,CAGA,2JAEC,2BAA4B,CAD5B,wBAED,CAID,qGACC,oCACD,CAGA,yLACC,oCACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../mixins/_unselectable.css";\n\n.ck.ck-toolbar {\n\t@mixin ck-unselectable;\n\n\tdisplay: flex;\n\tflex-flow: row nowrap;\n\talign-items: center;\n\n\t& > .ck-toolbar__items {\n\t\tdisplay: flex;\n\t\tflex-flow: row wrap;\n\t\talign-items: center;\n\t\tflex-grow: 1;\n\n\t}\n\n\t& .ck.ck-toolbar__separator {\n\t\tdisplay: inline-block;\n\n\t\t/*\n\t\t * A leading or trailing separator makes no sense (separates from nothing on one side).\n\t\t * For instance, it can happen when toolbar items (also separators) are getting grouped one by one and\n\t\t * moved to another toolbar in the dropdown.\n\t\t */\n\t\t&:first-child,\n\t\t&:last-child {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n\n\t& .ck-toolbar__line-break {\n\t\tflex-basis: 100%;\n\t}\n\n\t&.ck-toolbar_grouping > .ck-toolbar__items {\n\t\tflex-wrap: nowrap;\n\t}\n\n\t&.ck-toolbar_vertical > .ck-toolbar__items {\n\t\tflex-direction: column;\n\t}\n\n\t&.ck-toolbar_floating > .ck-toolbar__items {\n\t\tflex-wrap: nowrap;\n\t}\n\n\t& > .ck.ck-toolbar__grouped-dropdown {\n\t\t& > .ck-dropdown__button .ck-dropdown__arrow {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Makes element unselectable.\n */\n@define-mixin ck-unselectable {\n\t-moz-user-select: none;\n\t-webkit-user-select: none;\n\t-ms-user-select: none;\n\tuser-select: none\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n@import "@ckeditor/ckeditor5-ui/theme/mixins/_dir.css";\n\n.ck.ck-toolbar {\n\t@mixin ck-rounded-corners;\n\n\tbackground: var(--ck-color-toolbar-background);\n\tpadding: 0 var(--ck-spacing-small);\n\tborder: 1px solid var(--ck-color-toolbar-border);\n\n\t& .ck.ck-toolbar__separator {\n\t\talign-self: stretch;\n\t\twidth: 1px;\n\t\tmin-width: 1px;\n\t\tbackground: var(--ck-color-toolbar-border);\n\n\t\t/*\n\t\t * These margins make the separators look better in balloon toolbars (when aligned with the "tip").\n\t\t * See https://github.com/ckeditor/ckeditor5/issues/7493.\n\t\t */\n\t\tmargin-top: var(--ck-spacing-small);\n\t\tmargin-bottom: var(--ck-spacing-small);\n\t}\n\n\t& .ck-toolbar__line-break {\n\t\theight: 0;\n\t}\n\n\t& > .ck-toolbar__items {\n\t\t& > *:not(.ck-toolbar__line-break) {\n\t\t\t/* (#11) Separate toolbar items. */\n\t\t\tmargin-right: var(--ck-spacing-small);\n\t\t}\n\n\t\t/* Don\'t display a separator after an empty items container, for instance,\n\t\twhen all items were grouped */\n\t\t&:empty + .ck.ck-toolbar__separator {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n\n\t& > .ck-toolbar__items > *:not(.ck-toolbar__line-break),\n\t& > .ck.ck-toolbar__grouped-dropdown {\n\t\t/* Make sure items wrapped to the next line have v-spacing */\n\t\tmargin-top: var(--ck-spacing-small);\n\t\tmargin-bottom: var(--ck-spacing-small);\n\t}\n\n\t&.ck-toolbar_vertical {\n\t\t/* Items in a vertical toolbar span the entire width. */\n\t\tpadding: 0;\n\n\t\t/* Specificity matters here. See https://github.com/ckeditor/ckeditor5-theme-lark/issues/168. */\n\t\t& > .ck-toolbar__items > .ck {\n\t\t\t/* Items in a vertical toolbar should span the horizontal space. */\n\t\t\twidth: 100%;\n\n\t\t\t/* Items in a vertical toolbar should have no margin. */\n\t\t\tmargin: 0;\n\n\t\t\t/* Items in a vertical toolbar span the entire width so rounded corners are pointless. */\n\t\t\tborder-radius: 0;\n\n\t\t\t/* Items in a vertical toolbar span the entire width so any border is pointless. */\n\t\t\tborder: 0;\n\t\t}\n\t}\n\n\t&.ck-toolbar_compact {\n\t\t/* No spacing around items. */\n\t\tpadding: 0;\n\n\t\t& > .ck-toolbar__items > * {\n\t\t\t/* Compact toolbar items have no spacing between them. */\n\t\t\tmargin: 0;\n\n\t\t\t/* "Middle" children should have no rounded corners. */\n\t\t\t&:not(:first-child):not(:last-child) {\n\t\t\t\tborder-radius: 0;\n\t\t\t}\n\t\t}\n\t}\n\n\t& > .ck.ck-toolbar__grouped-dropdown {\n\t\t/*\n\t\t * Dropdown button has asymmetric padding to fit the arrow.\n\t\t * This button has no arrow so let\'s revert that padding back to normal.\n\t\t */\n\t\t& > .ck.ck-button.ck-dropdown__button {\n\t\t\tpadding-left: var(--ck-spacing-tiny);\n\t\t}\n\t}\n\n\t@nest .ck-toolbar-container & {\n\t\tborder: 0;\n\t}\n}\n\n/* stylelint-disable */\n\n/*\n * Styles for RTL toolbars.\n *\n * Note: In some cases (e.g. a decoupled editor), the toolbar has its own "dir"\n * because its parent is not controlled by the editor framework.\n */\n[dir="rtl"] .ck.ck-toolbar,\n.ck.ck-toolbar[dir="rtl"] {\n\t& > .ck-toolbar__items > .ck {\n\t\tmargin-right: 0;\n\t}\n\n\t&:not(.ck-toolbar_compact) > .ck-toolbar__items > .ck {\n\t\t/* (#11) Separate toolbar items. */\n\t\tmargin-left: var(--ck-spacing-small);\n\t}\n\n\t& > .ck-toolbar__items > .ck:last-child {\n\t\tmargin-left: 0;\n\t}\n\n\t&.ck-toolbar_compact > .ck-toolbar__items > .ck {\n\t\t/* No rounded corners on the right side of the first child. */\n\t\t&:first-child {\n\t\t\tborder-top-left-radius: 0;\n\t\t\tborder-bottom-left-radius: 0;\n\t\t}\n\n\t\t/* No rounded corners on the left side of the last child. */\n\t\t&:last-child {\n\t\t\tborder-top-right-radius: 0;\n\t\t\tborder-bottom-right-radius: 0;\n\t\t}\n\t}\n\n\t/* Separate the the separator form the grouping dropdown when some items are grouped. */\n\t& > .ck.ck-toolbar__separator {\n\t\tmargin-left: var(--ck-spacing-small);\n\t}\n\n\t/* Some spacing between the items and the separator before the grouped items dropdown. */\n\t&.ck-toolbar_grouping > .ck-toolbar__items:not(:empty):not(:only-child) {\n\t\tmargin-left: var(--ck-spacing-small);\n\t}\n}\n\n/*\n * Styles for LTR toolbars.\n *\n * Note: In some cases (e.g. a decoupled editor), the toolbar has its own "dir"\n * because its parent is not controlled by the editor framework.\n */\n[dir="ltr"] .ck.ck-toolbar,\n.ck.ck-toolbar[dir="ltr"] {\n\t& > .ck-toolbar__items > .ck:last-child {\n\t\tmargin-right: 0;\n\t}\n\n\t&.ck-toolbar_compact > .ck-toolbar__items > .ck {\n\t\t/* No rounded corners on the right side of the first child. */\n\t\t&:first-child {\n\t\t\tborder-top-right-radius: 0;\n\t\t\tborder-bottom-right-radius: 0;\n\t\t}\n\n\t\t/* No rounded corners on the left side of the last child. */\n\t\t&:last-child {\n\t\t\tborder-top-left-radius: 0;\n\t\t\tborder-bottom-left-radius: 0;\n\t\t}\n\t}\n\n\t/* Separate the the separator form the grouping dropdown when some items are grouped. */\n\t& > .ck.ck-toolbar__separator {\n\t\tmargin-right: var(--ck-spacing-small);\n\t}\n\n\t/* Some spacing between the items and the separator before the grouped items dropdown. */\n\t&.ck-toolbar_grouping > .ck-toolbar__items:not(:empty):not(:only-child) {\n\t\tmargin-right: var(--ck-spacing-small);\n\t}\n}\n\n/* stylelint-enable */\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]);const a=s},948:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(15),o=n.n(i),r=n(645),s=n.n(r)()(o());s.push([e.id,'.ck.ck-tooltip,.ck.ck-tooltip .ck-tooltip__text:after{-webkit-backface-visibility:hidden;pointer-events:none;position:absolute}.ck.ck-tooltip{display:none;opacity:0;visibility:hidden;z-index:var(--ck-z-modal)}.ck.ck-tooltip .ck-tooltip__text{display:inline-block}.ck.ck-tooltip .ck-tooltip__text:after{content:"";height:0;width:0}:root{--ck-tooltip-arrow-size:5px}.ck.ck-tooltip{left:50%;top:0;transition:opacity .2s ease-in-out .2s}.ck.ck-tooltip .ck-tooltip__text{border-radius:0}.ck-rounded-corners .ck.ck-tooltip .ck-tooltip__text,.ck.ck-tooltip .ck-tooltip__text.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-tooltip .ck-tooltip__text{background:var(--ck-color-tooltip-background);color:var(--ck-color-tooltip-text);font-size:.9em;left:-50%;line-height:1.5;padding:var(--ck-spacing-small) var(--ck-spacing-medium);position:relative}.ck.ck-tooltip .ck-tooltip__text:after{border-style:solid;left:50%;transition:opacity .2s ease-in-out .2s}.ck.ck-tooltip.ck-tooltip_s,.ck.ck-tooltip.ck-tooltip_se,.ck.ck-tooltip.ck-tooltip_sw{bottom:calc(var(--ck-tooltip-arrow-size)*-1);transform:translateY(100%)}.ck.ck-tooltip.ck-tooltip_s .ck-tooltip__text:after,.ck.ck-tooltip.ck-tooltip_se .ck-tooltip__text:after,.ck.ck-tooltip.ck-tooltip_sw .ck-tooltip__text:after{border-color:transparent transparent var(--ck-color-tooltip-background) transparent;border-width:0 var(--ck-tooltip-arrow-size) var(--ck-tooltip-arrow-size) var(--ck-tooltip-arrow-size);top:calc(var(--ck-tooltip-arrow-size)*-1 + 1px);transform:translateX(-50%)}.ck.ck-tooltip.ck-tooltip_sw{left:auto;right:50%}.ck.ck-tooltip.ck-tooltip_sw .ck-tooltip__text{left:auto;right:calc(var(--ck-tooltip-arrow-size)*-2)}.ck.ck-tooltip.ck-tooltip_sw .ck-tooltip__text:after{left:auto;right:0}.ck.ck-tooltip.ck-tooltip_se{left:50%;right:auto}.ck.ck-tooltip.ck-tooltip_se .ck-tooltip__text{left:calc(var(--ck-tooltip-arrow-size)*-2);right:auto}.ck.ck-tooltip.ck-tooltip_se .ck-tooltip__text:after{left:0;right:auto;transform:translateX(50%)}.ck.ck-tooltip.ck-tooltip_n{top:calc(var(--ck-tooltip-arrow-size)*-1);transform:translateY(-100%)}.ck.ck-tooltip.ck-tooltip_n .ck-tooltip__text:after{border-color:var(--ck-color-tooltip-background) transparent transparent transparent;border-width:var(--ck-tooltip-arrow-size) var(--ck-tooltip-arrow-size) 0 var(--ck-tooltip-arrow-size);bottom:calc(var(--ck-tooltip-arrow-size)*-1);transform:translateX(-50%)}.ck.ck-tooltip.ck-tooltip_e{left:calc(100% + var(--ck-tooltip-arrow-size));top:50%}.ck.ck-tooltip.ck-tooltip_e .ck-tooltip__text{left:0;transform:translateY(-50%)}.ck.ck-tooltip.ck-tooltip_e .ck-tooltip__text:after{border-color:transparent var(--ck-color-tooltip-background) transparent transparent;border-width:var(--ck-tooltip-arrow-size) var(--ck-tooltip-arrow-size) var(--ck-tooltip-arrow-size) 0;left:calc(var(--ck-tooltip-arrow-size)*-1);top:calc(50% - var(--ck-tooltip-arrow-size)*1)}.ck.ck-tooltip.ck-tooltip_w{left:auto;right:calc(100% + var(--ck-tooltip-arrow-size));top:50%}.ck.ck-tooltip.ck-tooltip_w .ck-tooltip__text{left:0;transform:translateY(-50%)}.ck.ck-tooltip.ck-tooltip_w .ck-tooltip__text:after{border-color:transparent transparent transparent var(--ck-color-tooltip-background);border-width:var(--ck-tooltip-arrow-size) 0 var(--ck-tooltip-arrow-size) var(--ck-tooltip-arrow-size);left:100%;top:calc(50% - var(--ck-tooltip-arrow-size)*1)}',"",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/components/tooltip/tooltip.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/components/tooltip/tooltip.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_rounded.css"],names:[],mappings:"AAKA,sDASC,kCAAmC,CAJnC,mBAAoB,CAHpB,iBAQD,CAEA,eAIC,YAAa,CADb,SAAU,CADV,iBAAkB,CAGlB,yBAWD,CATC,iCACC,oBAOD,CALC,uCACC,UAAW,CAEX,QAAS,CADT,OAED,CCxBF,MACC,2BACD,CAEA,eACC,QAAS,CAMT,KAAM,CAON,sCAwKD,CAtKC,iCChBA,eDqCA,CArBA,yGCZC,qCDiCD,CArBA,iCAOC,6CAA8C,CAF9C,kCAAmC,CAFnC,cAAe,CAMf,SAAU,CALV,eAAgB,CAEhB,wDAAyD,CAEzD,iBAaD,CAVC,uCAOC,kBAAmB,CACnB,QAAS,CAFT,sCAGD,CAYD,sFAGC,4CAA+C,CAC/C,0BASD,CAPC,8JAIC,mFAAoF,CACpF,qGAAsG,CAHtG,+CAAkD,CAClD,0BAGD,CAaD,6BAEC,SAAU,CADV,SAYD,CATC,+CACC,SAAU,CACV,2CACD,CAEA,qDACC,SAAU,CACV,OACD,CAYD,6BACC,QAAS,CACT,UAYD,CAVC,+CAEC,0CAA8C,CAD9C,UAED,CAEA,qDAEC,MAAO,CADP,UAAW,CAEX,yBACD,CAYD,4BACC,yCAA4C,CAC5C,2BAQD,CANC,oDAGC,mFAAoF,CACpF,qGAAsG,CAHtG,4CAA+C,CAC/C,0BAGD,CAUD,4BACC,8CAA+C,CAC/C,OAaD,CAXC,8CACC,MAAO,CACP,0BAQD,CANC,oDAGC,mFAAoF,CACpF,qGAAsG,CAHtG,0CAA6C,CAC7C,8CAGD,CAWF,4BAEC,SAAU,CADV,+CAAgD,CAEhD,OAaD,CAXC,8CACC,MAAO,CACP,0BAQD,CANC,oDAGC,mFAAoF,CACpF,qGAAsG,CAHtG,SAAU,CACV,8CAGD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-tooltip,\n.ck.ck-tooltip .ck-tooltip__text::after {\n\tposition: absolute;\n\n\t/* Without this, hovering the tooltip could keep it visible. */\n\tpointer-events: none;\n\n\t/* This is to get rid of flickering when transitioning opacity in Chrome.\n\tIt\'s weird but it works. */\n\t-webkit-backface-visibility: hidden;\n}\n\n.ck.ck-tooltip {\n\t/* Tooltip is hidden by default. */\n\tvisibility: hidden;\n\topacity: 0;\n\tdisplay: none;\n\tz-index: var(--ck-z-modal);\n\n\t& .ck-tooltip__text {\n\t\tdisplay: inline-block;\n\n\t\t&::after {\n\t\t\tcontent: "";\n\t\t\twidth: 0;\n\t\t\theight: 0;\n\t\t}\n\t}\n}\n','/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../../../mixins/_rounded.css";\n\n:root {\n\t--ck-tooltip-arrow-size: 5px;\n}\n\n.ck.ck-tooltip {\n\tleft: 50%;\n\n\t/*\n\t * Prevent blurry tooltips in LoDPI environments.\n\t * See https://github.com/ckeditor/ckeditor5/issues/1802.\n\t */\n\ttop: 0;\n\n\t/*\n\t * For the transition to work, the tooltip must be controlled\n\t * using visibility+opacity. A delay prevents a "tooltip avalanche"\n\t * i.e. when scanning the toolbar with mouse cursor.\n\t */\n\ttransition: opacity .2s ease-in-out .2s;\n\n\t& .ck-tooltip__text {\n\t\t@mixin ck-rounded-corners;\n\n\t\tfont-size: .9em;\n\t\tline-height: 1.5;\n\t\tcolor: var(--ck-color-tooltip-text);\n\t\tpadding: var(--ck-spacing-small) var(--ck-spacing-medium);\n\t\tbackground: var(--ck-color-tooltip-background);\n\t\tposition: relative;\n\t\tleft: -50%;\n\n\t\t&::after {\n\t\t\t/*\n\t\t\t * For the transition to work, the tooltip must be controlled\n\t\t\t * using visibility+opacity. A delay prevents a "tooltip avalanche"\n\t\t\t * i.e. when scanning the toolbar with mouse cursor.\n\t\t\t */\n\t\t\ttransition: opacity .2s ease-in-out .2s;\n\t\t\tborder-style: solid;\n\t\t\tleft: 50%;\n\t\t}\n\t}\n\n\t/**\n\t * A class that displays the tooltip south of the element.\n\t *\n\t * [element]\n\t * ^\n\t * +-----------+\n\t * | Tooltip |\n\t * +-----------+\n\t */\n\t&.ck-tooltip_s,\n\t&.ck-tooltip_sw,\n\t&.ck-tooltip_se {\n\t\tbottom: calc(-1 * var(--ck-tooltip-arrow-size));\n\t\ttransform: translateY( 100% );\n\n\t\t& .ck-tooltip__text::after {\n\t\t\t/* 1px addresses gliches in rendering causing gap between the triangle and the text */\n\t\t\ttop: calc(-1 * var(--ck-tooltip-arrow-size) + 1px);\n\t\t\ttransform: translateX( -50% );\n\t\t\tborder-color: transparent transparent var(--ck-color-tooltip-background) transparent;\n\t\t\tborder-width: 0 var(--ck-tooltip-arrow-size) var(--ck-tooltip-arrow-size) var(--ck-tooltip-arrow-size);\n\t\t}\n\t}\n\n\t/**\n\t * A class that displays the tooltip south-west of the element.\n\t *\n\t * [element]\n\t * ^\n\t * +-----------+\n\t * | Tooltip |\n\t * +-----------+\n\t */\n\n\t&.ck-tooltip_sw {\n\t\tright: 50%;\n\t\tleft: auto;\n\n\t\t& .ck-tooltip__text {\n\t\t\tleft: auto;\n\t\t\tright: calc( -2 * var(--ck-tooltip-arrow-size));\n\t\t}\n\n\t\t& .ck-tooltip__text::after {\n\t\t\tleft: auto;\n\t\t\tright: 0;\n\t\t}\n\t}\n\n\t/**\n\t * A class that displays the tooltip south-east of the element.\n\t *\n\t * [element]\n\t * ^\n\t * +-----------+\n\t * | Tooltip |\n\t * +-----------+\n\t */\n\t&.ck-tooltip_se {\n\t\tleft: 50%;\n\t\tright: auto;\n\n\t\t& .ck-tooltip__text {\n\t\t\tright: auto;\n\t\t\tleft: calc( -2 * var(--ck-tooltip-arrow-size));\n\t\t}\n\n\t\t& .ck-tooltip__text::after {\n\t\t\tright: auto;\n\t\t\tleft: 0;\n\t\t\ttransform: translateX( 50% );\n\t\t}\n\t}\n\n\t/**\n\t * A class that displays the tooltip north of the element.\n\t *\n\t * +-----------+\n\t * | Tooltip |\n\t * +-----------+\n\t * V\n\t * [element]\n\t */\n\t&.ck-tooltip_n {\n\t\ttop: calc(-1 * var(--ck-tooltip-arrow-size));\n\t\ttransform: translateY( -100% );\n\n\t\t& .ck-tooltip__text::after {\n\t\t\tbottom: calc(-1 * var(--ck-tooltip-arrow-size));\n\t\t\ttransform: translateX( -50% );\n\t\t\tborder-color: var(--ck-color-tooltip-background) transparent transparent transparent;\n\t\t\tborder-width: var(--ck-tooltip-arrow-size) var(--ck-tooltip-arrow-size) 0 var(--ck-tooltip-arrow-size);\n\t\t}\n\t}\n\n\t/**\n\t * A class that displays the tooltip east of the element.\n\t *\n\t * +----------+\n\t * [element] < | east |\n\t * +----------+\n\t */\n\t&.ck-tooltip_e {\n\t\tleft: calc(100% + var(--ck-tooltip-arrow-size));\n\t\ttop: 50%;\n\n\t\t& .ck-tooltip__text {\n\t\t\tleft: 0;\n\t\t\ttransform: translateY( -50% );\n\n\t\t\t&::after {\n\t\t\t\tleft: calc(-1 * var(--ck-tooltip-arrow-size));\n\t\t\t\ttop: calc(50% - 1 * var(--ck-tooltip-arrow-size));\n\t\t\t\tborder-color: transparent var(--ck-color-tooltip-background) transparent transparent;\n\t\t\t\tborder-width: var(--ck-tooltip-arrow-size) var(--ck-tooltip-arrow-size) var(--ck-tooltip-arrow-size) 0;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * A class that displays the tooltip west of the element.\n\t *\n\t * +----------+\n\t * | west | > [element]\n\t * +----------+\n\t */\n\t&.ck-tooltip_w {\n\t\tright: calc(100% + var(--ck-tooltip-arrow-size));\n\t\tleft: auto;\n\t\ttop: 50%;\n\n\t\t& .ck-tooltip__text {\n\t\t\tleft: 0;\n\t\t\ttransform: translateY( -50% );\n\n\t\t\t&::after {\n\t\t\t\tleft: 100%;\n\t\t\t\ttop: calc(50% - 1 * var(--ck-tooltip-arrow-size));\n\t\t\t\tborder-color: transparent transparent transparent var(--ck-color-tooltip-background);\n\t\t\t\tborder-width: var(--ck-tooltip-arrow-size) 0 var(--ck-tooltip-arrow-size) var(--ck-tooltip-arrow-size);\n\t\t\t}\n\t\t}\n\t}\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n"],sourceRoot:""}]);const a=s},150:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(15),o=n.n(i),r=n(645),s=n.n(r)()(o());s.push([e.id,".ck-hidden{display:none!important}.ck-reset_all :not(.ck-reset_all-excluded *),.ck.ck-reset,.ck.ck-reset_all{box-sizing:border-box;height:auto;position:static;width:auto}:root{--ck-z-default:1;--ck-z-modal:calc(var(--ck-z-default) + 999)}.ck-transitions-disabled,.ck-transitions-disabled *{transition:none!important}:root{--ck-color-base-foreground:#fafafa;--ck-color-base-background:#fff;--ck-color-base-border:#c4c4c4;--ck-color-base-action:#61b045;--ck-color-base-focus:#6cb5f9;--ck-color-base-text:#333;--ck-color-base-active:#198cf0;--ck-color-base-active-focus:#0e7fe1;--ck-color-base-error:#db3700;--ck-color-focus-border-coordinates:208,79%,51%;--ck-color-focus-border:hsl(var(--ck-color-focus-border-coordinates));--ck-color-focus-outer-shadow:#bcdefb;--ck-color-focus-disabled-shadow:rgba(119,186,248,.3);--ck-color-focus-error-shadow:rgba(255,64,31,.3);--ck-color-text:var(--ck-color-base-text);--ck-color-shadow-drop:rgba(0,0,0,.15);--ck-color-shadow-drop-active:rgba(0,0,0,.2);--ck-color-shadow-inner:rgba(0,0,0,.1);--ck-color-button-default-background:transparent;--ck-color-button-default-hover-background:#e6e6e6;--ck-color-button-default-active-background:#d9d9d9;--ck-color-button-default-active-shadow:#bfbfbf;--ck-color-button-default-disabled-background:transparent;--ck-color-button-on-background:#dedede;--ck-color-button-on-hover-background:#c4c4c4;--ck-color-button-on-active-background:#bababa;--ck-color-button-on-active-shadow:#a1a1a1;--ck-color-button-on-disabled-background:#dedede;--ck-color-button-action-background:var(--ck-color-base-action);--ck-color-button-action-hover-background:#579e3d;--ck-color-button-action-active-background:#53973b;--ck-color-button-action-active-shadow:#498433;--ck-color-button-action-disabled-background:#7ec365;--ck-color-button-action-text:var(--ck-color-base-background);--ck-color-button-save:#008a00;--ck-color-button-cancel:#db3700;--ck-color-switch-button-off-background:#b0b0b0;--ck-color-switch-button-off-hover-background:#a3a3a3;--ck-color-switch-button-on-background:var(--ck-color-button-action-background);--ck-color-switch-button-on-hover-background:#579e3d;--ck-color-switch-button-inner-background:var(--ck-color-base-background);--ck-color-switch-button-inner-shadow:rgba(0,0,0,.1);--ck-color-dropdown-panel-background:var(--ck-color-base-background);--ck-color-dropdown-panel-border:var(--ck-color-base-border);--ck-color-input-background:var(--ck-color-base-background);--ck-color-input-border:#c7c7c7;--ck-color-input-error-border:var(--ck-color-base-error);--ck-color-input-text:var(--ck-color-base-text);--ck-color-input-disabled-background:#f2f2f2;--ck-color-input-disabled-border:#c7c7c7;--ck-color-input-disabled-text:#757575;--ck-color-list-background:var(--ck-color-base-background);--ck-color-list-button-hover-background:var(--ck-color-button-default-hover-background);--ck-color-list-button-on-background:var(--ck-color-base-active);--ck-color-list-button-on-background-focus:var(--ck-color-base-active-focus);--ck-color-list-button-on-text:var(--ck-color-base-background);--ck-color-panel-background:var(--ck-color-base-background);--ck-color-panel-border:var(--ck-color-base-border);--ck-color-toolbar-background:var(--ck-color-base-foreground);--ck-color-toolbar-border:var(--ck-color-base-border);--ck-color-tooltip-background:var(--ck-color-base-text);--ck-color-tooltip-text:var(--ck-color-base-background);--ck-color-engine-placeholder-text:#707070;--ck-color-upload-bar-background:#6cb5f9;--ck-color-link-default:#0000f0;--ck-color-link-selected-background:rgba(31,176,255,.1);--ck-color-link-fake-selection:rgba(31,176,255,.3);--ck-disabled-opacity:.5;--ck-focus-outer-shadow-geometry:0 0 0 3px;--ck-focus-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-outer-shadow);--ck-focus-disabled-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-disabled-shadow);--ck-focus-error-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-error-shadow);--ck-focus-ring:1px solid var(--ck-color-focus-border);--ck-font-size-base:13px;--ck-line-height-base:1.84615;--ck-font-face:Helvetica,Arial,Tahoma,Verdana,Sans-Serif;--ck-font-size-tiny:0.7em;--ck-font-size-small:0.75em;--ck-font-size-normal:1em;--ck-font-size-big:1.4em;--ck-font-size-large:1.8em;--ck-ui-component-min-height:2.3em}.ck-reset_all :not(.ck-reset_all-excluded *),.ck.ck-reset,.ck.ck-reset_all{word-wrap:break-word;background:transparent;border:0;margin:0;padding:0;text-decoration:none;transition:none;vertical-align:middle}.ck-reset_all :not(.ck-reset_all-excluded *),.ck.ck-reset_all{border-collapse:collapse;color:var(--ck-color-text);cursor:auto;float:none;font:normal normal normal var(--ck-font-size-base)/var(--ck-line-height-base) var(--ck-font-face);text-align:left;white-space:nowrap}.ck-reset_all .ck-rtl :not(.ck-reset_all-excluded *){text-align:right}.ck-reset_all iframe:not(.ck-reset_all-excluded *){vertical-align:inherit}.ck-reset_all textarea:not(.ck-reset_all-excluded *){white-space:pre-wrap}.ck-reset_all input[type=password]:not(.ck-reset_all-excluded *),.ck-reset_all input[type=text]:not(.ck-reset_all-excluded *),.ck-reset_all textarea:not(.ck-reset_all-excluded *){cursor:text}.ck-reset_all input[type=password][disabled]:not(.ck-reset_all-excluded *),.ck-reset_all input[type=text][disabled]:not(.ck-reset_all-excluded *),.ck-reset_all textarea[disabled]:not(.ck-reset_all-excluded *){cursor:default}.ck-reset_all fieldset:not(.ck-reset_all-excluded *){border:2px groove #dfdee3;padding:10px}.ck-reset_all button:not(.ck-reset_all-excluded *)::-moz-focus-inner{border:0;padding:0}.ck[dir=rtl],.ck[dir=rtl] .ck{text-align:right}:root{--ck-border-radius:2px;--ck-inner-shadow:2px 2px 3px var(--ck-color-shadow-inner) inset;--ck-drop-shadow:0 1px 2px 1px var(--ck-color-shadow-drop);--ck-drop-shadow-active:0 3px 6px 1px var(--ck-color-shadow-drop-active);--ck-spacing-unit:0.6em;--ck-spacing-large:calc(var(--ck-spacing-unit)*1.5);--ck-spacing-standard:var(--ck-spacing-unit);--ck-spacing-medium:calc(var(--ck-spacing-unit)*0.8);--ck-spacing-small:calc(var(--ck-spacing-unit)*0.5);--ck-spacing-tiny:calc(var(--ck-spacing-unit)*0.3);--ck-spacing-extra-tiny:calc(var(--ck-spacing-unit)*0.16)}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/globals/_hidden.css","webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/globals/_reset.css","webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/globals/_zindex.css","webpack://./node_modules/@ckeditor/ckeditor5-ui/theme/globals/_transition.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_colors.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_disabled.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_focus.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_fonts.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_reset.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_rounded.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_shadow.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-ui/globals/_spacing.css"],names:[],mappings:"AAQA,WAGC,sBACD,CCPA,2EAGC,qBAAsB,CAEtB,WAAY,CACZ,eAAgB,CAFhB,UAGD,CCPA,MACC,gBAAiB,CACjB,4CACD,CCAA,oDAEC,yBACD,CCNA,MACC,kCAAmD,CACnD,+BAAoD,CACpD,8BAAgD,CAChD,8BAAmD,CACnD,6BAAmD,CACnD,yBAA+C,CAC/C,8BAAmD,CACnD,oCAAuD,CACvD,6BAAkD,CAIlD,+CAAwD,CACxD,qEAA+E,CAC/E,qCAAwD,CACxD,qDAA8D,CAC9D,gDAAyD,CACzD,yCAAqD,CACrD,sCAAsD,CACtD,4CAA0D,CAC1D,sCAAsD,CAItD,gDAAuD,CACvD,kDAA+D,CAC/D,mDAAgE,CAChE,+CAA6D,CAC7D,yDAA8D,CAE9D,uCAAuD,CACvD,6CAA4D,CAC5D,8CAA4D,CAC5D,0CAAyD,CACzD,gDAA8D,CAE9D,+DAAsE,CACtE,iDAAkE,CAClE,kDAAkE,CAClE,8CAA+D,CAC/D,oDAAoE,CACpE,6DAAsE,CAEtE,8BAAoD,CACpD,gCAAqD,CAErD,+CAA4D,CAC5D,qDAAiE,CACjE,+EAAqF,CACrF,oDAAmE,CACnE,yEAA8E,CAC9E,oDAAgE,CAIhE,oEAA2E,CAC3E,4DAAoE,CAIpE,2DAAoE,CACpE,+BAAiD,CACjD,wDAAgE,CAChE,+CAA0D,CAC1D,4CAA2D,CAC3D,wCAAwD,CACxD,sCAAsD,CAItD,0DAAmE,CACnE,uFAA6F,CAC7F,gEAAuE,CACvE,4EAAiF,CACjF,8DAAsE,CAItE,2DAAoE,CACpE,mDAA6D,CAI7D,6DAAsE,CACtE,qDAA+D,CAI/D,uDAAgE,CAChE,uDAAiE,CAIjE,0CAAyD,CAIzD,wCAA2D,CAI3D,+BAAoD,CACpD,uDAAmE,CACnE,kDAAgE,CCpGhE,wBAAyB,CCAzB,0CAA2C,CAK3C,gGAAiG,CAKjG,4GAA6G,CAK7G,sGAAuG,CAKvG,sDAAuD,CCvBvD,wBAAyB,CACzB,6BAA8B,CAC9B,wDAA6D,CAE7D,yBAA0B,CAC1B,2BAA4B,CAC5B,yBAA0B,CAC1B,wBAAyB,CACzB,0BAA2B,CCJ3B,kCJoGD,CI9FA,2EAaC,oBAAqB,CANrB,sBAAuB,CADvB,QAAS,CAFT,QAAS,CACT,SAAU,CAGV,oBAAqB,CAErB,eAAgB,CADhB,qBAKD,CAKA,8DAGC,wBAAyB,CAEzB,0BAA2B,CAG3B,WAAY,CACZ,UAAW,CALX,iGAAkG,CAElG,eAAgB,CAChB,kBAGD,CAGC,qDACC,gBACD,CAEA,mDAEC,sBACD,CAEA,qDACC,oBACD,CAEA,mLAGC,WACD,CAEA,iNAGC,cACD,CAEA,qDAEC,yBAAoC,CADpC,YAED,CAEA,qEAGC,QAAQ,CADR,SAED,CAMD,8BAEC,gBACD,CCnFA,MACC,sBAAuB,CCAvB,gEAAiE,CAKjE,0DAA2D,CAK3D,wEAAyE,CCbzE,uBAA8B,CAC9B,mDAA2D,CAC3D,4CAAkD,CAClD,oDAA4D,CAC5D,mDAA2D,CAC3D,kDAA2D,CAC3D,yDFFD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A class which hides an element in DOM.\n */\n.ck-hidden {\n\t/* Override selector specificity. Otherwise, all elements with some display\n\tstyle defined will override this one, which is not a desired result. */\n\tdisplay: none !important;\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck.ck-reset,\n.ck.ck-reset_all,\n.ck-reset_all *:not(.ck-reset_all-excluded *) {\n\tbox-sizing: border-box;\n\twidth: auto;\n\theight: auto;\n\tposition: static;\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-z-default: 1;\n\t--ck-z-modal: calc( var(--ck-z-default) + 999 );\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A class that disables all transitions of the element and its children.\n */\n.ck-transitions-disabled,\n.ck-transitions-disabled * {\n\ttransition: none !important;\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-color-base-foreground: \t\t\t\t\t\t\t\thsl(0, 0%, 98%);\n\t--ck-color-base-background: \t\t\t\t\t\t\t\thsl(0, 0%, 100%);\n\t--ck-color-base-border: \t\t\t\t\t\t\t\t\thsl(0, 0%, 77%);\n\t--ck-color-base-action: \t\t\t\t\t\t\t\t\thsl(104, 44%, 48%);\n\t--ck-color-base-focus: \t\t\t\t\t\t\t\t\t\thsl(209, 92%, 70%);\n\t--ck-color-base-text: \t\t\t\t\t\t\t\t\t\thsl(0, 0%, 20%);\n\t--ck-color-base-active: \t\t\t\t\t\t\t\t\thsl(208, 88%, 52%);\n\t--ck-color-base-active-focus:\t\t\t\t\t\t\t\thsl(208, 88%, 47%);\n\t--ck-color-base-error:\t\t\t\t\t\t\t\t\t\thsl(15, 100%, 43%);\n\n\t/* -- Generic colors ------------------------------------------------------------------------ */\n\n\t--ck-color-focus-border-coordinates: \t\t\t\t\t\t208, 79%, 51%;\n\t--ck-color-focus-border: \t\t\t\t\t\t\t\t\thsl(var(--ck-color-focus-border-coordinates));\n\t--ck-color-focus-outer-shadow:\t\t\t\t\t\t\t\thsl(207, 89%, 86%);\n\t--ck-color-focus-disabled-shadow:\t\t\t\t\t\t\thsla(209, 90%, 72%,.3);\n\t--ck-color-focus-error-shadow:\t\t\t\t\t\t\t\thsla(9,100%,56%,.3);\n\t--ck-color-text: \t\t\t\t\t\t\t\t\t\t\tvar(--ck-color-base-text);\n\t--ck-color-shadow-drop: \t\t\t\t\t\t\t\t\thsla(0, 0%, 0%, 0.15);\n\t--ck-color-shadow-drop-active:\t\t\t\t\t\t\t\thsla(0, 0%, 0%, 0.2);\n\t--ck-color-shadow-inner: \t\t\t\t\t\t\t\t\thsla(0, 0%, 0%, 0.1);\n\n\t/* -- Buttons ------------------------------------------------------------------------------- */\n\n\t--ck-color-button-default-background: \t\t\t\t\t\ttransparent;\n\t--ck-color-button-default-hover-background: \t\t\t\thsl(0, 0%, 90%);\n\t--ck-color-button-default-active-background: \t\t\t\thsl(0, 0%, 85%);\n\t--ck-color-button-default-active-shadow: \t\t\t\t\thsl(0, 0%, 75%);\n\t--ck-color-button-default-disabled-background: \t\t\t\ttransparent;\n\n\t--ck-color-button-on-background: \t\t\t\t\t\t\thsl(0, 0%, 87%);\n\t--ck-color-button-on-hover-background: \t\t\t\t\t\thsl(0, 0%, 77%);\n\t--ck-color-button-on-active-background: \t\t\t\t\thsl(0, 0%, 73%);\n\t--ck-color-button-on-active-shadow: \t\t\t\t\t\thsl(0, 0%, 63%);\n\t--ck-color-button-on-disabled-background: \t\t\t\t\thsl(0, 0%, 87%);\n\n\t--ck-color-button-action-background: \t\t\t\t\t\tvar(--ck-color-base-action);\n\t--ck-color-button-action-hover-background: \t\t\t\t\thsl(104, 44%, 43%);\n\t--ck-color-button-action-active-background: \t\t\t\thsl(104, 44%, 41%);\n\t--ck-color-button-action-active-shadow: \t\t\t\t\thsl(104, 44%, 36%);\n\t--ck-color-button-action-disabled-background: \t\t\t\thsl(104, 44%, 58%);\n\t--ck-color-button-action-text: \t\t\t\t\t\t\t\tvar(--ck-color-base-background);\n\n\t--ck-color-button-save: \t\t\t\t\t\t\t\t\thsl(120, 100%, 27%);\n\t--ck-color-button-cancel: \t\t\t\t\t\t\t\t\thsl(15, 100%, 43%);\n\n\t--ck-color-switch-button-off-background:\t\t\t\t\thsl(0, 0%, 69%);\n\t--ck-color-switch-button-off-hover-background:\t\t\t\thsl(0, 0%, 64%);\n\t--ck-color-switch-button-on-background:\t\t\t\t\t\tvar(--ck-color-button-action-background);\n\t--ck-color-switch-button-on-hover-background:\t\t\t\thsl(104, 44%, 43%);\n\t--ck-color-switch-button-inner-background:\t\t\t\t\tvar(--ck-color-base-background);\n\t--ck-color-switch-button-inner-shadow:\t\t\t\t\t\thsla(0, 0%, 0%, 0.1);\n\n\t/* -- Dropdown ------------------------------------------------------------------------------ */\n\n\t--ck-color-dropdown-panel-background: \t\t\t\t\t\tvar(--ck-color-base-background);\n\t--ck-color-dropdown-panel-border: \t\t\t\t\t\t\tvar(--ck-color-base-border);\n\n\t/* -- Input --------------------------------------------------------------------------------- */\n\n\t--ck-color-input-background: \t\t\t\t\t\t\t\tvar(--ck-color-base-background);\n\t--ck-color-input-border: \t\t\t\t\t\t\t\t\thsl(0, 0%, 78%);\n\t--ck-color-input-error-border:\t\t\t\t\t\t\t\tvar(--ck-color-base-error);\n\t--ck-color-input-text: \t\t\t\t\t\t\t\t\t\tvar(--ck-color-base-text);\n\t--ck-color-input-disabled-background: \t\t\t\t\t\thsl(0, 0%, 95%);\n\t--ck-color-input-disabled-border: \t\t\t\t\t\t\thsl(0, 0%, 78%);\n\t--ck-color-input-disabled-text: \t\t\t\t\t\t\thsl(0, 0%, 46%);\n\n\t/* -- List ---------------------------------------------------------------------------------- */\n\n\t--ck-color-list-background: \t\t\t\t\t\t\t\tvar(--ck-color-base-background);\n\t--ck-color-list-button-hover-background: \t\t\t\t\tvar(--ck-color-button-default-hover-background);\n\t--ck-color-list-button-on-background: \t\t\t\t\t\tvar(--ck-color-base-active);\n\t--ck-color-list-button-on-background-focus: \t\t\t\tvar(--ck-color-base-active-focus);\n\t--ck-color-list-button-on-text:\t\t\t\t\t\t\t\tvar(--ck-color-base-background);\n\n\t/* -- Panel --------------------------------------------------------------------------------- */\n\n\t--ck-color-panel-background: \t\t\t\t\t\t\t\tvar(--ck-color-base-background);\n\t--ck-color-panel-border: \t\t\t\t\t\t\t\t\tvar(--ck-color-base-border);\n\n\t/* -- Toolbar ------------------------------------------------------------------------------- */\n\n\t--ck-color-toolbar-background: \t\t\t\t\t\t\t\tvar(--ck-color-base-foreground);\n\t--ck-color-toolbar-border: \t\t\t\t\t\t\t\t\tvar(--ck-color-base-border);\n\n\t/* -- Tooltip ------------------------------------------------------------------------------- */\n\n\t--ck-color-tooltip-background: \t\t\t\t\t\t\t\tvar(--ck-color-base-text);\n\t--ck-color-tooltip-text: \t\t\t\t\t\t\t\t\tvar(--ck-color-base-background);\n\n\t/* -- Engine -------------------------------------------------------------------------------- */\n\n\t--ck-color-engine-placeholder-text: \t\t\t\t\t\thsl(0, 0%, 44%);\n\n\t/* -- Upload -------------------------------------------------------------------------------- */\n\n\t--ck-color-upload-bar-background:\t\t \t\t\t\t\thsl(209, 92%, 70%);\n\n\t/* -- Link -------------------------------------------------------------------------------- */\n\n\t--ck-color-link-default:\t\t\t\t\t\t\t\t\thsl(240, 100%, 47%);\n\t--ck-color-link-selected-background:\t\t\t\t\t\thsla(201, 100%, 56%, 0.1);\n\t--ck-color-link-fake-selection:\t\t\t\t\t\t\t\thsla(201, 100%, 56%, 0.3);\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t/**\n\t * An opacity value of disabled UI item.\n\t */\n\t--ck-disabled-opacity: .5;\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t/**\n\t * The geometry of the of focused element's outer shadow.\n\t */\n\t--ck-focus-outer-shadow-geometry: 0 0 0 3px;\n\n\t/**\n\t * A visual style of focused element's outer shadow.\n\t */\n\t--ck-focus-outer-shadow: var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-outer-shadow);\n\n\t/**\n\t * A visual style of focused element's outer shadow (when disabled).\n\t */\n\t--ck-focus-disabled-outer-shadow: var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-disabled-shadow);\n\n\t/**\n\t * A visual style of focused element's outer shadow (when has errors).\n\t */\n\t--ck-focus-error-outer-shadow: var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-error-shadow);\n\n\t/**\n\t * A visual style of focused element's border or outline.\n\t */\n\t--ck-focus-ring: 1px solid var(--ck-color-focus-border);\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-font-size-base: 13px;\n\t--ck-line-height-base: 1.84615;\n\t--ck-font-face: Helvetica, Arial, Tahoma, Verdana, Sans-Serif;\n\n\t--ck-font-size-tiny: 0.7em;\n\t--ck-font-size-small: 0.75em;\n\t--ck-font-size-normal: 1em;\n\t--ck-font-size-big: 1.4em;\n\t--ck-font-size-large: 1.8em;\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t/* This is super-important. This is **manually** adjusted so a button without an icon\n\tis never smaller than a button with icon, additionally making sure that text-less buttons\n\tare perfect squares. The value is also shared by other components which should stay "in-line"\n\twith buttons. */\n\t--ck-ui-component-min-height: 2.3em;\n}\n\n/**\n * Resets an element, ignoring its children.\n */\n.ck.ck-reset,\n.ck.ck-reset_all,\n.ck-reset_all *:not(.ck-reset_all-excluded *) {\n\t/* Do not include inheritable rules here. */\n\tmargin: 0;\n\tpadding: 0;\n\tborder: 0;\n\tbackground: transparent;\n\ttext-decoration: none;\n\tvertical-align: middle;\n\ttransition: none;\n\n\t/* https://github.com/ckeditor/ckeditor5-theme-lark/issues/105 */\n\tword-wrap: break-word;\n}\n\n/**\n * Resets an element AND its children.\n */\n.ck.ck-reset_all,\n.ck-reset_all *:not(.ck-reset_all-excluded *) {\n\t/* These are rule inherited by all children elements. */\n\tborder-collapse: collapse;\n\tfont: normal normal normal var(--ck-font-size-base)/var(--ck-line-height-base) var(--ck-font-face);\n\tcolor: var(--ck-color-text);\n\ttext-align: left;\n\twhite-space: nowrap;\n\tcursor: auto;\n\tfloat: none;\n}\n\n.ck-reset_all {\n\t& .ck-rtl *:not(.ck-reset_all-excluded *) {\n\t\ttext-align: right;\n\t}\n\n\t& iframe:not(.ck-reset_all-excluded *) {\n\t\t/* For IE */\n\t\tvertical-align: inherit;\n\t}\n\n\t& textarea:not(.ck-reset_all-excluded *) {\n\t\twhite-space: pre-wrap;\n\t}\n\n\t& textarea:not(.ck-reset_all-excluded *),\n\t& input[type="text"]:not(.ck-reset_all-excluded *),\n\t& input[type="password"]:not(.ck-reset_all-excluded *) {\n\t\tcursor: text;\n\t}\n\n\t& textarea[disabled]:not(.ck-reset_all-excluded *),\n\t& input[type="text"][disabled]:not(.ck-reset_all-excluded *),\n\t& input[type="password"][disabled]:not(.ck-reset_all-excluded *) {\n\t\tcursor: default;\n\t}\n\n\t& fieldset:not(.ck-reset_all-excluded *) {\n\t\tpadding: 10px;\n\t\tborder: 2px groove hsl(255, 7%, 88%);\n\t}\n\n\t& button:not(.ck-reset_all-excluded *)::-moz-focus-inner {\n\t\t/* See http://stackoverflow.com/questions/5517744/remove-extra-button-spacing-padding-in-firefox */\n\t\tpadding: 0;\n\t\tborder: 0\n\t}\n}\n\n/**\n * Default UI rules for RTL languages.\n */\n.ck[dir="rtl"],\n.ck[dir="rtl"] .ck {\n\ttext-align: right;\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Default border-radius value.\n */\n:root{\n\t--ck-border-radius: 2px;\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t/**\n\t * A visual style of element's inner shadow (i.e. input).\n\t */\n\t--ck-inner-shadow: 2px 2px 3px var(--ck-color-shadow-inner) inset;\n\n\t/**\n\t * A visual style of element's drop shadow (i.e. panel).\n\t */\n\t--ck-drop-shadow: 0 1px 2px 1px var(--ck-color-shadow-drop);\n\n\t/**\n\t * A visual style of element's active shadow (i.e. comment or suggestion).\n\t */\n\t--ck-drop-shadow-active: 0 3px 6px 1px var(--ck-color-shadow-drop-active);\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-spacing-unit: \t\t\t\t\t\t0.6em;\n\t--ck-spacing-large: \t\t\t\t\tcalc(var(--ck-spacing-unit) * 1.5);\n\t--ck-spacing-standard: \t\t\t\t\tvar(--ck-spacing-unit);\n\t--ck-spacing-medium: \t\t\t\t\tcalc(var(--ck-spacing-unit) * 0.8);\n\t--ck-spacing-small: \t\t\t\t\tcalc(var(--ck-spacing-unit) * 0.5);\n\t--ck-spacing-tiny: \t\t\t\t\t\tcalc(var(--ck-spacing-unit) * 0.3);\n\t--ck-spacing-extra-tiny: \t\t\t\tcalc(var(--ck-spacing-unit) * 0.16);\n}\n"],sourceRoot:""}]);const a=s},507:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(15),o=n.n(i),r=n(645),s=n.n(r)()(o());s.push([e.id,":root{--ck-color-resizer:var(--ck-color-focus-border);--ck-color-resizer-tooltip-background:#262626;--ck-color-resizer-tooltip-text:#f2f2f2;--ck-resizer-border-radius:var(--ck-border-radius);--ck-resizer-tooltip-offset:10px;--ck-resizer-tooltip-height:calc(var(--ck-spacing-small)*2 + 10px)}.ck .ck-widget,.ck .ck-widget.ck-widget_with-selection-handle{position:relative}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{position:absolute}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon{display:block}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle{visibility:visible}.ck .ck-size-view{background:var(--ck-color-resizer-tooltip-background);border:1px solid var(--ck-color-resizer-tooltip-text);border-radius:var(--ck-resizer-border-radius);color:var(--ck-color-resizer-tooltip-text);display:block;font-size:var(--ck-font-size-tiny);height:var(--ck-resizer-tooltip-height);line-height:var(--ck-resizer-tooltip-height);padding:0 var(--ck-spacing-small)}.ck .ck-size-view.ck-orientation-above-center,.ck .ck-size-view.ck-orientation-bottom-left,.ck .ck-size-view.ck-orientation-bottom-right,.ck .ck-size-view.ck-orientation-top-left,.ck .ck-size-view.ck-orientation-top-right{position:absolute}.ck .ck-size-view.ck-orientation-top-left{left:var(--ck-resizer-tooltip-offset);top:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-top-right{right:var(--ck-resizer-tooltip-offset);top:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-bottom-right{bottom:var(--ck-resizer-tooltip-offset);right:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-bottom-left{bottom:var(--ck-resizer-tooltip-offset);left:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-above-center{left:50%;top:calc(var(--ck-resizer-tooltip-height)*-1);transform:translate(-50%)}:root{--ck-widget-outline-thickness:3px;--ck-widget-handler-icon-size:16px;--ck-widget-handler-animation-duration:200ms;--ck-widget-handler-animation-curve:ease;--ck-color-widget-blurred-border:#dedede;--ck-color-widget-hover-border:#ffc83d;--ck-color-widget-editable-focus-background:var(--ck-color-base-background);--ck-color-widget-drag-handler-icon-color:var(--ck-color-base-background)}.ck .ck-widget{outline-color:transparent;outline-style:solid;outline-width:var(--ck-widget-outline-thickness);transition:outline-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve)}.ck .ck-widget.ck-widget_selected,.ck .ck-widget.ck-widget_selected:hover{outline:var(--ck-widget-outline-thickness) solid var(--ck-color-focus-border)}.ck .ck-widget:hover{outline-color:var(--ck-color-widget-hover-border)}.ck .ck-editor__nested-editable{border:1px solid transparent}.ck .ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck .ck-editor__nested-editable:focus{background-color:var(--ck-color-widget-editable-focus-background);border:var(--ck-focus-ring);box-shadow:var(--ck-inner-shadow),0 0;outline:none}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{background-color:transparent;border-radius:var(--ck-border-radius) var(--ck-border-radius) 0 0;box-sizing:border-box;left:calc(0px - var(--ck-widget-outline-thickness));opacity:0;padding:4px;top:0;transform:translateY(-100%);transition:background-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),visibility var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),opacity var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve)}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon{color:var(--ck-color-widget-drag-handler-icon-color);height:var(--ck-widget-handler-icon-size);width:var(--ck-widget-handler-icon-size)}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator{opacity:0;transition:opacity .3s var(--ck-widget-handler-animation-curve)}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle:hover .ck-icon .ck-icon__selected-indicator{opacity:1}.ck .ck-widget.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle{background-color:var(--ck-color-widget-hover-border);opacity:1}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle{background-color:var(--ck-color-focus-border);opacity:1}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator,.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator{opacity:1}.ck[dir=rtl] .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{left:auto;right:calc(0px - var(--ck-widget-outline-thickness))}.ck.ck-editor__editable.ck-read-only .ck-widget{transition:none}.ck.ck-editor__editable.ck-read-only .ck-widget:not(.ck-widget_selected){--ck-widget-outline-thickness:0px}.ck.ck-editor__editable.ck-read-only .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle,.ck.ck-editor__editable.ck-read-only .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle:hover{background:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected:hover{outline-color:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle>.ck-widget__selection-handle,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle>.ck-widget__selection-handle:hover,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected:hover.ck-widget_with-selection-handle>.ck-widget__selection-handle,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected:hover.ck-widget_with-selection-handle>.ck-widget__selection-handle:hover{background:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable blockquote>.ck-widget.ck-widget_with-selection-handle:first-child,.ck.ck-editor__editable>.ck-widget.ck-widget_with-selection-handle:first-child{margin-top:calc(1em + var(--ck-widget-handler-icon-size))}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-widget/theme/widget.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-widget/widget.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_focus.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_shadow.css"],names:[],mappings:"AAKA,MACC,+CAAgD,CAChD,6CAAsD,CACtD,uCAAgD,CAEhD,kDAAmD,CACnD,gCAAiC,CACjC,kEACD,CAOA,8DAEC,iBAqBD,CAnBC,4EACC,iBAOD,CALC,qFAGC,aACD,CASD,iLACC,kBACD,CAGD,kBACC,qDAAsD,CAEtD,qDAAsD,CACtD,6CAA8C,CAF9C,0CAA2C,CAI3C,aAAc,CADd,kCAAmC,CAGnC,uCAAwC,CACxC,4CAA6C,CAF7C,iCAsCD,CAlCC,8NAKC,iBACD,CAEA,0CAEC,qCAAsC,CADtC,oCAED,CAEA,2CAEC,sCAAuC,CADvC,oCAED,CAEA,8CACC,uCAAwC,CACxC,sCACD,CAEA,6CACC,uCAAwC,CACxC,qCACD,CAGA,8CAEC,QAAS,CADT,6CAAgD,CAEhD,yBACD,CCjFD,MACC,iCAAkC,CAClC,kCAAmC,CACnC,4CAA6C,CAC7C,wCAAyC,CAEzC,wCAAiD,CACjD,sCAAkD,CAClD,2EAA4E,CAC5E,yEACD,CAEA,eAGC,yBAA0B,CAD1B,mBAAoB,CADpB,gDAAiD,CAGjD,6GAUD,CARC,0EAEC,6EACD,CAEA,qBACC,iDACD,CAGD,gCACC,4BAWD,CAPC,yGAKC,iEAAkE,CCnCnE,2BAA2B,CCF3B,qCAA8B,CDC9B,YDqCA,CAIA,4EAKC,4BAA6B,CAa7B,iEAAkE,CAhBlE,qBAAsB,CAoBtB,mDAAoD,CAhBpD,SAAU,CALV,WAAY,CAsBZ,KAAM,CAFN,2BAA4B,CAT5B,6SAgCD,CAnBC,qFAIC,oDAAqD,CADrD,yCAA0C,CAD1C,wCAWD,CANC,kHACC,SAAU,CAGV,+DACD,CAID,wHACC,SACD,CAID,kFAEC,oDAAqD,CADrD,SAED,CAKC,oMAEC,6CAA8C,CAD9C,SAOD,CAHC,gRACC,SACD,CAOH,qFACC,SAAU,CACV,oDACD,CAGA,gDAEC,eAkBD,CAhBC,yEAOC,iCACD,CAGC,gOAEC,gDACD,CAOD,wIAEC,mDAQD,CALE,ghBAEC,gDACD,CAKH,yKAOC,yDACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-color-resizer: var(--ck-color-focus-border);\n\t--ck-color-resizer-tooltip-background: hsl(0, 0%, 15%);\n\t--ck-color-resizer-tooltip-text: hsl(0, 0%, 95%);\n\n\t--ck-resizer-border-radius: var(--ck-border-radius);\n\t--ck-resizer-tooltip-offset: 10px;\n\t--ck-resizer-tooltip-height: calc(var(--ck-spacing-small) * 2 + 10px);\n}\n\n.ck .ck-widget {\n\t/* This is neccessary for type around UI to be positioned properly. */\n\tposition: relative;\n}\n\n.ck .ck-widget.ck-widget_with-selection-handle {\n\t/* Make the widget wrapper a relative positioning container for the drag handle. */\n\tposition: relative;\n\n\t& .ck-widget__selection-handle {\n\t\tposition: absolute;\n\n\t\t& .ck-icon {\n\t\t\t/* Make sure the icon in not a subject to font-size or line-height to avoid\n\t\t\tunnecessary spacing around it. */\n\t\t\tdisplay: block;\n\t\t}\n\t}\n\n\t/* Show the selection handle on mouse hover over the widget, but not for nested widgets. */\n\t&:hover > .ck-widget__selection-handle {\n\t\tvisibility: visible;\n\t}\n\n\t/* Show the selection handle when the widget is selected, but not for nested widgets. */\n\t&.ck-widget_selected > .ck-widget__selection-handle {\n\t\tvisibility: visible;\n\t}\n}\n\n.ck .ck-size-view {\n\tbackground: var(--ck-color-resizer-tooltip-background);\n\tcolor: var(--ck-color-resizer-tooltip-text);\n\tborder: 1px solid var(--ck-color-resizer-tooltip-text);\n\tborder-radius: var(--ck-resizer-border-radius);\n\tfont-size: var(--ck-font-size-tiny);\n\tdisplay: block;\n\tpadding: 0 var(--ck-spacing-small);\n\theight: var(--ck-resizer-tooltip-height);\n\tline-height: var(--ck-resizer-tooltip-height);\n\n\t&.ck-orientation-top-left,\n\t&.ck-orientation-top-right,\n\t&.ck-orientation-bottom-right,\n\t&.ck-orientation-bottom-left,\n\t&.ck-orientation-above-center {\n\t\tposition: absolute;\n\t}\n\n\t&.ck-orientation-top-left {\n\t\ttop: var(--ck-resizer-tooltip-offset);\n\t\tleft: var(--ck-resizer-tooltip-offset);\n\t}\n\n\t&.ck-orientation-top-right {\n\t\ttop: var(--ck-resizer-tooltip-offset);\n\t\tright: var(--ck-resizer-tooltip-offset);\n\t}\n\n\t&.ck-orientation-bottom-right {\n\t\tbottom: var(--ck-resizer-tooltip-offset);\n\t\tright: var(--ck-resizer-tooltip-offset);\n\t}\n\n\t&.ck-orientation-bottom-left {\n\t\tbottom: var(--ck-resizer-tooltip-offset);\n\t\tleft: var(--ck-resizer-tooltip-offset);\n\t}\n\n\t/* Class applied if the widget is too small to contain the size label */\n\t&.ck-orientation-above-center {\n\t\ttop: calc(var(--ck-resizer-tooltip-height) * -1);\n\t\tleft: 50%;\n\t\ttransform: translate(-50%);\n\t}\n}\n",'/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import "../mixins/_focus.css";\n@import "../mixins/_shadow.css";\n\n:root {\n\t--ck-widget-outline-thickness: 3px;\n\t--ck-widget-handler-icon-size: 16px;\n\t--ck-widget-handler-animation-duration: 200ms;\n\t--ck-widget-handler-animation-curve: ease;\n\n\t--ck-color-widget-blurred-border: hsl(0, 0%, 87%);\n\t--ck-color-widget-hover-border: hsl(43, 100%, 62%);\n\t--ck-color-widget-editable-focus-background: var(--ck-color-base-background);\n\t--ck-color-widget-drag-handler-icon-color: var(--ck-color-base-background);\n}\n\n.ck .ck-widget {\n\toutline-width: var(--ck-widget-outline-thickness);\n\toutline-style: solid;\n\toutline-color: transparent;\n\ttransition: outline-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve);\n\n\t&.ck-widget_selected,\n\t&.ck-widget_selected:hover {\n\t\toutline: var(--ck-widget-outline-thickness) solid var(--ck-color-focus-border);\n\t}\n\n\t&:hover {\n\t\toutline-color: var(--ck-color-widget-hover-border);\n\t}\n}\n\n.ck .ck-editor__nested-editable {\n\tborder: 1px solid transparent;\n\n\t/* The :focus style is applied before .ck-editor__nested-editable_focused class is rendered in the view.\n\tThese styles show a different border for a blink of an eye, so `:focus` need to have same styles applied. */\n\t&.ck-editor__nested-editable_focused,\n\t&:focus {\n\t\t@mixin ck-focus-ring;\n\t\t@mixin ck-box-shadow var(--ck-inner-shadow);\n\n\t\tbackground-color: var(--ck-color-widget-editable-focus-background);\n\t}\n}\n\n.ck .ck-widget.ck-widget_with-selection-handle {\n\t& .ck-widget__selection-handle {\n\t\tpadding: 4px;\n\t\tbox-sizing: border-box;\n\n\t\t/* Background and opacity will be animated as the handler shows up or the widget gets selected. */\n\t\tbackground-color: transparent;\n\t\topacity: 0;\n\n\t\t/* Transition:\n\t\t * background-color for the .ck-widget_selected state change,\n\t\t * visibility for hiding the handler,\n\t\t * opacity for the proper look of the icon when the handler disappears. */\n\t\ttransition:\n\t\t\tbackground-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),\n\t\t\tvisibility var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),\n\t\t\topacity var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve);\n\n\t\t/* Make only top corners round. */\n\t\tborder-radius: var(--ck-border-radius) var(--ck-border-radius) 0 0;\n\n\t\t/* Place the drag handler outside the widget wrapper. */\n\t\ttransform: translateY(-100%);\n\t\tleft: calc(0px - var(--ck-widget-outline-thickness));\n\t\ttop: 0;\n\n\t\t& .ck-icon {\n\t\t\t/* Make sure the dimensions of the icon are independent of the fon-size of the content. */\n\t\t\twidth: var(--ck-widget-handler-icon-size);\n\t\t\theight: var(--ck-widget-handler-icon-size);\n\t\t\tcolor: var(--ck-color-widget-drag-handler-icon-color);\n\n\t\t\t/* The "selected" part of the icon is invisible by default */\n\t\t\t& .ck-icon__selected-indicator {\n\t\t\t\topacity: 0;\n\n\t\t\t\t/* Note: The animation is longer on purpose. Simply feels better. */\n\t\t\t\ttransition: opacity 300ms var(--ck-widget-handler-animation-curve);\n\t\t\t}\n\t\t}\n\n\t\t/* Advertise using the look of the icon that once clicked the handler, the widget will be selected. */\n\t\t&:hover .ck-icon .ck-icon__selected-indicator {\n\t\t\topacity: 1;\n\t\t}\n\t}\n\n\t/* Show the selection handler on mouse hover over the widget, but not for nested widgets. */\n\t&:hover > .ck-widget__selection-handle {\n\t\topacity: 1;\n\t\tbackground-color: var(--ck-color-widget-hover-border);\n\t}\n\n\t/* Show the selection handler when the widget is selected, but not for nested widgets. */\n\t&.ck-widget_selected,\n\t&.ck-widget_selected:hover {\n\t\t& > .ck-widget__selection-handle {\n\t\t\topacity: 1;\n\t\t\tbackground-color: var(--ck-color-focus-border);\n\n\t\t\t/* When the widget is selected, notify the user using the proper look of the icon. */\n\t\t\t& .ck-icon .ck-icon__selected-indicator {\n\t\t\t\topacity: 1;\n\t\t\t}\n\t\t}\n\t}\n}\n\n/* In a RTL environment, align the selection handler to the right side of the widget */\n/* stylelint-disable-next-line no-descending-specificity */\n.ck[dir="rtl"] .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle {\n\tleft: auto;\n\tright: calc(0px - var(--ck-widget-outline-thickness));\n}\n\n/* https://github.com/ckeditor/ckeditor5/issues/6415 */\n.ck.ck-editor__editable.ck-read-only .ck-widget {\n\t/* Prevent the :hover outline from showing up because of the used outline-color transition. */\n\ttransition: none;\n\n\t&:not(.ck-widget_selected) {\n\t\t/* Disable visual effects of hover/active widget when CKEditor is in readOnly mode.\n\t\t * See: https://github.com/ckeditor/ckeditor5/issues/1261\n\t\t *\n\t\t * Leave the unit because this custom property is used in calc() by other features.\n\t\t * See: https://github.com/ckeditor/ckeditor5/issues/6775\n\t\t */\n\t\t--ck-widget-outline-thickness: 0px;\n\t}\n\n\t&.ck-widget_with-selection-handle {\n\t\t& .ck-widget__selection-handle,\n\t\t& .ck-widget__selection-handle:hover {\n\t\t\tbackground: var(--ck-color-widget-blurred-border);\n\t\t}\n\t}\n}\n\n/* Style the widget when it\'s selected but the editable it belongs to lost focus. */\n/* stylelint-disable-next-line no-descending-specificity */\n.ck.ck-editor__editable.ck-blurred .ck-widget {\n\t&.ck-widget_selected,\n\t&.ck-widget_selected:hover {\n\t\toutline-color: var(--ck-color-widget-blurred-border);\n\n\t\t&.ck-widget_with-selection-handle {\n\t\t\t& > .ck-widget__selection-handle,\n\t\t\t& > .ck-widget__selection-handle:hover {\n\t\t\t\tbackground: var(--ck-color-widget-blurred-border);\n\t\t\t}\n\t\t}\n\t}\n}\n\n.ck.ck-editor__editable > .ck-widget.ck-widget_with-selection-handle:first-child,\n.ck.ck-editor__editable blockquote > .ck-widget.ck-widget_with-selection-handle:first-child {\n\t/* Do not crop selection handler if a widget is a first-child in the blockquote or in the root editable.\n\tIn fact, anything with overflow: hidden.\n\thttps://github.com/ckeditor/ckeditor5-block-quote/issues/28\n\thttps://github.com/ckeditor/ckeditor5-widget/issues/44\n\thttps://github.com/ckeditor/ckeditor5-widget/issues/66 */\n\tmargin-top: calc(1em + var(--ck-widget-handler-icon-size));\n}\n',"/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A visual style of focused element's border.\n */\n@define-mixin ck-focus-ring {\n\t/* Disable native outline. */\n\toutline: none;\n\tborder: var(--ck-focus-ring)\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A helper to combine multiple shadows.\n */\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\n\tbox-shadow: $shadowA, $shadowB;\n}\n\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n@define-mixin ck-drop-shadow {\n\t@mixin ck-box-shadow var(--ck-drop-shadow);\n}\n"],sourceRoot:""}]);const a=s},263:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(15),o=n.n(i),r=n(645),s=n.n(r)()(o());s.push([e.id,".ck .ck-widget_with-resizer{position:relative}.ck .ck-widget__resizer{display:none;left:0;pointer-events:none;position:absolute;top:0}.ck-focused .ck-widget_with-resizer.ck-widget_selected>.ck-widget__resizer{display:block}.ck .ck-widget__resizer__handle{pointer-events:all;position:absolute}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-right,.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-left{cursor:nwse-resize}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-left,.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-right{cursor:nesw-resize}:root{--ck-resizer-size:10px;--ck-resizer-offset:calc(var(--ck-resizer-size)/-2 - 2px);--ck-resizer-border-width:1px}.ck .ck-widget__resizer{outline:1px solid var(--ck-color-resizer)}.ck .ck-widget__resizer__handle{background:var(--ck-color-focus-border);border:var(--ck-resizer-border-width) solid #fff;border-radius:var(--ck-resizer-border-radius);height:var(--ck-resizer-size);width:var(--ck-resizer-size)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-left{left:var(--ck-resizer-offset);top:var(--ck-resizer-offset)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-right{right:var(--ck-resizer-offset);top:var(--ck-resizer-offset)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-right{bottom:var(--ck-resizer-offset);right:var(--ck-resizer-offset)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-left{bottom:var(--ck-resizer-offset);left:var(--ck-resizer-offset)}","",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-widget/theme/widgetresize.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-widget/widgetresize.css"],names:[],mappings:"AAKA,4BAEC,iBACD,CAEA,wBACC,YAAa,CAMb,MAAO,CAFP,mBAAoB,CAHpB,iBAAkB,CAMlB,KACD,CAGC,2EACC,aACD,CAGD,gCAIC,kBAAmB,CAHnB,iBAcD,CATC,4IAEC,kBACD,CAEA,4IAEC,kBACD,CCpCD,MACC,sBAAuB,CAGvB,yDAAiE,CACjE,6BACD,CAEA,wBACC,yCACD,CAEA,gCAGC,uCAAwC,CACxC,gDAA6D,CAC7D,6CAA8C,CAH9C,6BAA8B,CAD9B,4BAyBD,CAnBC,oEAEC,6BAA8B,CAD9B,4BAED,CAEA,qEAEC,8BAA+B,CAD/B,4BAED,CAEA,wEACC,+BAAgC,CAChC,8BACD,CAEA,uEACC,+BAAgC,CAChC,6BACD",sourcesContent:["/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck .ck-widget_with-resizer {\n\t/* Make the widget wrapper a relative positioning container for the drag handle. */\n\tposition: relative;\n}\n\n.ck .ck-widget__resizer {\n\tdisplay: none;\n\tposition: absolute;\n\n\t/* The wrapper itself should not interfere with the pointer device, only the handles should. */\n\tpointer-events: none;\n\n\tleft: 0;\n\ttop: 0;\n}\n\n.ck-focused .ck-widget_with-resizer.ck-widget_selected {\n\t& > .ck-widget__resizer {\n\t\tdisplay: block;\n\t}\n}\n\n.ck .ck-widget__resizer__handle {\n\tposition: absolute;\n\n\t/* Resizers are the only UI elements that should interfere with a pointer device. */\n\tpointer-events: all;\n\n\t&.ck-widget__resizer__handle-top-left,\n\t&.ck-widget__resizer__handle-bottom-right {\n\t\tcursor: nwse-resize;\n\t}\n\n\t&.ck-widget__resizer__handle-top-right,\n\t&.ck-widget__resizer__handle-bottom-left {\n\t\tcursor: nesw-resize;\n\t}\n}\n","/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-resizer-size: 10px;\n\n\t/* Set the resizer with a 50% offset. */\n\t--ck-resizer-offset: calc( ( var(--ck-resizer-size) / -2 ) - 2px);\n\t--ck-resizer-border-width: 1px;\n}\n\n.ck .ck-widget__resizer {\n\toutline: 1px solid var(--ck-color-resizer);\n}\n\n.ck .ck-widget__resizer__handle {\n\twidth: var(--ck-resizer-size);\n\theight: var(--ck-resizer-size);\n\tbackground: var(--ck-color-focus-border);\n\tborder: var(--ck-resizer-border-width) solid hsl(0, 0%, 100%);\n\tborder-radius: var(--ck-resizer-border-radius);\n\n\t&.ck-widget__resizer__handle-top-left {\n\t\ttop: var(--ck-resizer-offset);\n\t\tleft: var(--ck-resizer-offset);\n\t}\n\n\t&.ck-widget__resizer__handle-top-right {\n\t\ttop: var(--ck-resizer-offset);\n\t\tright: var(--ck-resizer-offset);\n\t}\n\n\t&.ck-widget__resizer__handle-bottom-right {\n\t\tbottom: var(--ck-resizer-offset);\n\t\tright: var(--ck-resizer-offset);\n\t}\n\n\t&.ck-widget__resizer__handle-bottom-left {\n\t\tbottom: var(--ck-resizer-offset);\n\t\tleft: var(--ck-resizer-offset);\n\t}\n}\n"],sourceRoot:""}]);const a=s},137:(e,t,n)=>{n.d(t,{Z:()=>a});var i=n(15),o=n.n(i),r=n(645),s=n.n(r)()(o());s.push([e.id,'.ck .ck-widget .ck-widget__type-around__button{display:block;overflow:hidden;position:absolute;z-index:var(--ck-z-default)}.ck .ck-widget .ck-widget__type-around__button svg{left:50%;position:absolute;top:50%;z-index:calc(var(--ck-z-default) + 2)}.ck .ck-widget .ck-widget__type-around__button.ck-widget__type-around__button_before{left:min(10%,30px);top:calc(var(--ck-widget-outline-thickness)*-.5);transform:translateY(-50%)}.ck .ck-widget .ck-widget__type-around__button.ck-widget__type-around__button_after{bottom:calc(var(--ck-widget-outline-thickness)*-.5);right:min(10%,30px);transform:translateY(50%)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:after,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover:after{content:"";display:block;left:1px;position:absolute;top:1px;z-index:calc(var(--ck-z-default) + 1)}.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__fake-caret{display:none;left:0;position:absolute;right:0}.ck .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__fake-caret{left:calc(var(--ck-widget-outline-thickness)*-1);right:calc(var(--ck-widget-outline-thickness)*-1)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_before>.ck-widget__type-around>.ck-widget__type-around__fake-caret{display:block;top:calc(var(--ck-widget-outline-thickness)*-1 - 1px)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after>.ck-widget__type-around>.ck-widget__type-around__fake-caret{bottom:calc(var(--ck-widget-outline-thickness)*-1 - 1px);display:block}.ck.ck-editor__editable.ck-read-only .ck-widget__type-around,.ck.ck-editor__editable.ck-restricted-editing_mode_restricted .ck-widget__type-around,.ck.ck-editor__editable.ck-widget__type-around_disabled .ck-widget__type-around{display:none}:root{--ck-widget-type-around-button-size:20px;--ck-color-widget-type-around-button-active:var(--ck-color-focus-border);--ck-color-widget-type-around-button-hover:var(--ck-color-widget-hover-border);--ck-color-widget-type-around-button-blurred-editable:var(--ck-color-widget-blurred-border);--ck-color-widget-type-around-button-radar-start-alpha:0;--ck-color-widget-type-around-button-radar-end-alpha:.3;--ck-color-widget-type-around-button-icon:var(--ck-color-base-background)}.ck .ck-widget .ck-widget__type-around__button{background:var(--ck-color-widget-type-around-button);border-radius:100px;height:var(--ck-widget-type-around-button-size);opacity:0;pointer-events:none;transition:opacity var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),background var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve);width:var(--ck-widget-type-around-button-size)}.ck .ck-widget .ck-widget__type-around__button svg{height:8px;margin-top:1px;transform:translate(-50%,-50%);transition:transform .5s ease;width:10px}.ck .ck-widget .ck-widget__type-around__button svg *{stroke-dasharray:10;stroke-dashoffset:0;fill:none;stroke:var(--ck-color-widget-type-around-button-icon);stroke-width:1.5px;stroke-linecap:round;stroke-linejoin:round}.ck .ck-widget .ck-widget__type-around__button svg line{stroke-dasharray:7}.ck .ck-widget .ck-widget__type-around__button:hover{animation:ck-widget-type-around-button-sonar 1s ease infinite}.ck .ck-widget .ck-widget__type-around__button:hover svg polyline{animation:ck-widget-type-around-arrow-dash 2s linear}.ck .ck-widget .ck-widget__type-around__button:hover svg line{animation:ck-widget-type-around-arrow-tip-dash 2s linear}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__button{opacity:1;pointer-events:auto}.ck .ck-widget:not(.ck-widget_selected)>.ck-widget__type-around>.ck-widget__type-around__button{background:var(--ck-color-widget-type-around-button-hover)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover{background:var(--ck-color-widget-type-around-button-active)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:after,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover:after{background:linear-gradient(135deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3));border-radius:100px;height:calc(var(--ck-widget-type-around-button-size) - 2px);width:calc(var(--ck-widget-type-around-button-size) - 2px)}.ck .ck-widget.ck-widget_with-selection-handle>.ck-widget__type-around>.ck-widget__type-around__button_before{margin-left:20px}.ck .ck-widget .ck-widget__type-around__fake-caret{animation:ck-widget-type-around-fake-caret-pulse 1s linear infinite normal forwards;background:var(--ck-color-base-text);height:1px;outline:1px solid hsla(0,0%,100%,.5);pointer-events:none}.ck .ck-widget.ck-widget_selected.ck-widget_type-around_show-fake-caret_after,.ck .ck-widget.ck-widget_selected.ck-widget_type-around_show-fake-caret_before{outline-color:transparent}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_selected:hover,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_selected:hover{outline-color:var(--ck-color-widget-hover-border)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before>.ck-widget__type-around>.ck-widget__type-around__button{opacity:0;pointer-events:none}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle{opacity:0}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_selected.ck-widget_with-resizer>.ck-widget__resizer,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_selected.ck-widget_with-resizer>.ck-widget__resizer{opacity:0}.ck[dir=rtl] .ck-widget.ck-widget_with-selection-handle .ck-widget__type-around>.ck-widget__type-around__button_before{margin-left:0;margin-right:20px}.ck-editor__nested-editable.ck-editor__editable_selected .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck-editor__nested-editable.ck-editor__editable_selected .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__button{opacity:0;pointer-events:none}.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:not(:hover){background:var(--ck-color-widget-type-around-button-blurred-editable)}.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:not(:hover) svg *{stroke:#999}@keyframes ck-widget-type-around-arrow-dash{0%{stroke-dashoffset:10}20%,to{stroke-dashoffset:0}}@keyframes ck-widget-type-around-arrow-tip-dash{0%,20%{stroke-dashoffset:7}40%,to{stroke-dashoffset:0}}@keyframes ck-widget-type-around-button-sonar{0%{box-shadow:0 0 0 0 hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-start-alpha))}50%{box-shadow:0 0 0 5px hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-end-alpha))}to{box-shadow:0 0 0 5px hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-start-alpha))}}@keyframes ck-widget-type-around-fake-caret-pulse{0%{opacity:1}49%{opacity:1}50%{opacity:0}99%{opacity:0}to{opacity:1}}',"",{version:3,sources:["webpack://./node_modules/@ckeditor/ckeditor5-widget/theme/widgettypearound.css","webpack://./node_modules/@ckeditor/ckeditor5-theme-lark/theme/ckeditor5-widget/widgettypearound.css"],names:[],mappings:"AASC,+CACC,aAAc,CAEd,eAAgB,CADhB,iBAAkB,CAElB,2BAwBD,CAtBC,mDAGC,QAAS,CAFT,iBAAkB,CAClB,OAAQ,CAER,qCACD,CAEA,qFAGC,kBAAoB,CADpB,gDAAoD,CAGpD,0BACD,CAEA,oFAEC,mDAAuD,CACvD,mBAAqB,CAErB,yBACD,CAUA,mLACC,UAAW,CACX,aAAc,CAGd,QAAS,CAFT,iBAAkB,CAClB,OAAQ,CAER,qCACD,CAMD,2EACC,YAAa,CAEb,MAAO,CADP,iBAAkB,CAElB,OACD,CAOA,iFACC,gDAAqD,CACrD,iDACD,CAKA,wHAEC,aAAc,CADd,qDAED,CAKA,uHACC,wDAA6D,CAC7D,aACD,CAoBD,mOACC,YACD,CC3GA,MACC,wCAAyC,CACzC,wEAAyE,CACzE,8EAA+E,CAC/E,2FAA4F,CAC5F,wDAAyD,CACzD,uDAAwD,CACxD,yEACD,CAgBC,+CAGC,oDAAqD,CACrD,mBAAoB,CAFpB,+CAAgD,CAVjD,SAAU,CACV,mBAAoB,CAYnB,uMAAyM,CAJzM,8CAkDD,CA1CC,mDAEC,UAAW,CAGX,cAAe,CAFf,8BAA+B,CAC/B,6BAA8B,CAH9B,UAoBD,CAdC,qDACC,mBAAoB,CACpB,mBAAoB,CAEpB,SAAU,CACV,qDAAsD,CACtD,kBAAmB,CACnB,oBAAqB,CACrB,qBACD,CAEA,wDACC,kBACD,CAGD,qDAIC,6DAcD,CARE,kEACC,oDACD,CAEA,8DACC,wDACD,CAUF,uKAvED,SAAU,CACV,mBAwEC,CAOD,gGACC,0DACD,CAOA,uKAEC,2DAQD,CANC,mLAIC,uEAAkF,CADlF,mBAAoB,CADpB,2DAA4D,CAD5D,0DAID,CAOD,8GACC,gBACD,CAKA,mDAGC,mFAAoF,CAOpF,oCAAqC,CARrC,UAAW,CAOX,oCAAwC,CARxC,mBAUD,CAOC,6JAEC,yBACD,CAUA,yKACC,iDACD,CAMA,uOAlJD,SAAU,CACV,mBAmJC,CASE,0jBACC,SACD,CASF,mPACC,SACD,CASF,uHACC,aAAc,CACd,iBACD,CAYG,iRAlMF,SAAU,CACV,mBAmME,CAQH,kIACC,qEAKD,CAHC,wIACC,WACD,CAGD,4CACC,GACC,oBACD,CACA,OACC,mBACD,CACD,CAEA,gDACC,OACC,mBACD,CACA,OACC,mBACD,CACD,CAEA,8CACC,GACC,6HACD,CACA,IACC,6HACD,CACA,GACC,+HACD,CACD,CAEA,kDACC,GACC,SACD,CACA,IACC,SACD,CACA,IACC,SACD,CACA,IACC,SACD,CACA,GACC,SACD,CACD",sourcesContent:['/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n.ck .ck-widget {\n\t/*\n\t * Styles of the type around buttons\n\t */\n\t& .ck-widget__type-around__button {\n\t\tdisplay: block;\n\t\tposition: absolute;\n\t\toverflow: hidden;\n\t\tz-index: var(--ck-z-default);\n\n\t\t& svg {\n\t\t\tposition: absolute;\n\t\t\ttop: 50%;\n\t\t\tleft: 50%;\n\t\t\tz-index: calc(var(--ck-z-default) + 2);\n\t\t}\n\n\t\t&.ck-widget__type-around__button_before {\n\t\t\t/* Place it in the middle of the outline */\n\t\t\ttop: calc(-0.5 * var(--ck-widget-outline-thickness));\n\t\t\tleft: min(10%, 30px);\n\n\t\t\ttransform: translateY(-50%);\n\t\t}\n\n\t\t&.ck-widget__type-around__button_after {\n\t\t\t/* Place it in the middle of the outline */\n\t\t\tbottom: calc(-0.5 * var(--ck-widget-outline-thickness));\n\t\t\tright: min(10%, 30px);\n\n\t\t\ttransform: translateY(50%);\n\t\t}\n\t}\n\n\t/*\n\t * Styles for the buttons when:\n\t * - the widget is selected,\n\t * - or the button is being hovered (regardless of the widget state).\n\t */\n\t&.ck-widget_selected > .ck-widget__type-around > .ck-widget__type-around__button,\n\t& > .ck-widget__type-around > .ck-widget__type-around__button:hover {\n\t\t&::after {\n\t\t\tcontent: "";\n\t\t\tdisplay: block;\n\t\t\tposition: absolute;\n\t\t\ttop: 1px;\n\t\t\tleft: 1px;\n\t\t\tz-index: calc(var(--ck-z-default) + 1);\n\t\t}\n\t}\n\n\t/*\n\t * Styles for the horizontal "fake caret" which is displayed when the user navigates using the keyboard.\n\t */\n\t& > .ck-widget__type-around > .ck-widget__type-around__fake-caret {\n\t\tdisplay: none;\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\tright: 0;\n\t}\n\n\t/*\n\t * When the widget is hovered the "fake caret" would normally be narrower than the\n\t * extra outline displayed around the widget. Let\'s extend the "fake caret" to match\n\t * the full width of the widget.\n\t */\n\t&:hover > .ck-widget__type-around > .ck-widget__type-around__fake-caret {\n\t\tleft: calc( -1 * var(--ck-widget-outline-thickness) );\n\t\tright: calc( -1 * var(--ck-widget-outline-thickness) );\n\t}\n\n\t/*\n\t * Styles for the horizontal "fake caret" when it should be displayed before the widget (backward keyboard navigation).\n\t */\n\t&.ck-widget_type-around_show-fake-caret_before > .ck-widget__type-around > .ck-widget__type-around__fake-caret {\n\t\ttop: calc( -1 * var(--ck-widget-outline-thickness) - 1px );\n\t\tdisplay: block;\n\t}\n\n\t/*\n\t * Styles for the horizontal "fake caret" when it should be displayed after the widget (forward keyboard navigation).\n\t */\n\t&.ck-widget_type-around_show-fake-caret_after > .ck-widget__type-around > .ck-widget__type-around__fake-caret {\n\t\tbottom: calc( -1 * var(--ck-widget-outline-thickness) - 1px );\n\t\tdisplay: block;\n\t}\n}\n\n/*\n * Integration with the read-only mode of the editor.\n */\n.ck.ck-editor__editable.ck-read-only .ck-widget__type-around {\n\tdisplay: none;\n}\n\n/*\n * Integration with the restricted editing mode (feature) of the editor.\n */\n.ck.ck-editor__editable.ck-restricted-editing_mode_restricted .ck-widget__type-around {\n\tdisplay: none;\n}\n\n/*\n * Integration with the #isEnabled property of the WidgetTypeAround plugin.\n */\n.ck.ck-editor__editable.ck-widget__type-around_disabled .ck-widget__type-around {\n\tdisplay: none;\n}\n','/*\n * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n:root {\n\t--ck-widget-type-around-button-size: 20px;\n\t--ck-color-widget-type-around-button-active: var(--ck-color-focus-border);\n\t--ck-color-widget-type-around-button-hover: var(--ck-color-widget-hover-border);\n\t--ck-color-widget-type-around-button-blurred-editable: var(--ck-color-widget-blurred-border);\n\t--ck-color-widget-type-around-button-radar-start-alpha: 0;\n\t--ck-color-widget-type-around-button-radar-end-alpha: .3;\n\t--ck-color-widget-type-around-button-icon: var(--ck-color-base-background);\n}\n\n@define-mixin ck-widget-type-around-button-visible {\n\topacity: 1;\n\tpointer-events: auto;\n}\n\n@define-mixin ck-widget-type-around-button-hidden {\n\topacity: 0;\n\tpointer-events: none;\n}\n\n.ck .ck-widget {\n\t/*\n\t * Styles of the type around buttons\n\t */\n\t& .ck-widget__type-around__button {\n\t\twidth: var(--ck-widget-type-around-button-size);\n\t\theight: var(--ck-widget-type-around-button-size);\n\t\tbackground: var(--ck-color-widget-type-around-button);\n\t\tborder-radius: 100px;\n\t\ttransition: opacity var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve), background var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve);\n\n\t\t@mixin ck-widget-type-around-button-hidden;\n\n\t\t& svg {\n\t\t\twidth: 10px;\n\t\t\theight: 8px;\n\t\t\ttransform: translate(-50%,-50%);\n\t\t\ttransition: transform .5s ease;\n\t\t\tmargin-top: 1px;\n\n\t\t\t& * {\n\t\t\t\tstroke-dasharray: 10;\n\t\t\t\tstroke-dashoffset: 0;\n\n\t\t\t\tfill: none;\n\t\t\t\tstroke: var(--ck-color-widget-type-around-button-icon);\n\t\t\t\tstroke-width: 1.5px;\n\t\t\t\tstroke-linecap: round;\n\t\t\t\tstroke-linejoin: round;\n\t\t\t}\n\n\t\t\t& line {\n\t\t\t\tstroke-dasharray: 7;\n\t\t\t}\n\t\t}\n\n\t\t&:hover {\n\t\t\t/*\n\t\t\t * Display the "sonar" around the button when hovered.\n\t\t\t */\n\t\t\tanimation: ck-widget-type-around-button-sonar 1s ease infinite;\n\n\t\t\t/*\n\t\t\t * Animate active button\'s icon.\n\t\t\t */\n\t\t\t& svg {\n\t\t\t\t& polyline {\n\t\t\t\t\tanimation: ck-widget-type-around-arrow-dash 2s linear;\n\t\t\t\t}\n\n\t\t\t\t& line {\n\t\t\t\t\tanimation: ck-widget-type-around-arrow-tip-dash 2s linear;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/*\n\t * Show type around buttons when the widget gets selected or being hovered.\n\t */\n\t&.ck-widget_selected,\n\t&:hover {\n\t\t& > .ck-widget__type-around > .ck-widget__type-around__button {\n\t\t\t@mixin ck-widget-type-around-button-visible;\n\t\t}\n\t}\n\n\t/*\n\t * Styles for the buttons when the widget is NOT selected (but the buttons are visible\n\t * and still can be hovered).\n\t */\n\t&:not(.ck-widget_selected) > .ck-widget__type-around > .ck-widget__type-around__button {\n\t\tbackground: var(--ck-color-widget-type-around-button-hover);\n\t}\n\n\t/*\n\t * Styles for the buttons when:\n\t * - the widget is selected,\n\t * - or the button is being hovered (regardless of the widget state).\n\t */\n\t&.ck-widget_selected > .ck-widget__type-around > .ck-widget__type-around__button,\n\t& > .ck-widget__type-around > .ck-widget__type-around__button:hover {\n\t\tbackground: var(--ck-color-widget-type-around-button-active);\n\n\t\t&::after {\n\t\t\twidth: calc(var(--ck-widget-type-around-button-size) - 2px);\n\t\t\theight: calc(var(--ck-widget-type-around-button-size) - 2px);\n\t\t\tborder-radius: 100px;\n\t\t\tbackground: linear-gradient(135deg, hsla(0,0%,100%,0) 0%, hsla(0,0%,100%,.3) 100%);\n\t\t}\n\t}\n\n\t/*\n\t * Styles for the "before" button when the widget has a selection handle. Because some space\n\t * is consumed by the handle, the button must be moved slightly to the right to let it breathe.\n\t */\n\t&.ck-widget_with-selection-handle > .ck-widget__type-around > .ck-widget__type-around__button_before {\n\t\tmargin-left: 20px;\n\t}\n\n\t/*\n\t * Styles for the horizontal "fake caret" which is displayed when the user navigates using the keyboard.\n\t */\n\t& .ck-widget__type-around__fake-caret {\n\t\tpointer-events: none;\n\t\theight: 1px;\n\t\tanimation: ck-widget-type-around-fake-caret-pulse linear 1s infinite normal forwards;\n\n\t\t/*\n\t\t * The semi-transparent-outline+background combo improves the contrast\n\t\t * when the background underneath the fake caret is dark.\n\t\t */\n\t\toutline: solid 1px hsla(0, 0%, 100%, .5);\n\t\tbackground: var(--ck-color-base-text);\n\t}\n\n\t/*\n\t * Styles of the widget when the "fake caret" is blinking (e.g. upon keyboard navigation).\n\t * Despite the widget being physically selected in the model, its outline should disappear.\n\t */\n\t&.ck-widget_selected {\n\t\t&.ck-widget_type-around_show-fake-caret_before,\n\t\t&.ck-widget_type-around_show-fake-caret_after {\n\t\t\toutline-color: transparent;\n\t\t}\n\t}\n\n\t&.ck-widget_type-around_show-fake-caret_before,\n\t&.ck-widget_type-around_show-fake-caret_after {\n\t\t/*\n\t\t * When the "fake caret" is visible we simulate that the widget is not selected\n\t\t * (despite being physically selected), so the outline color should be for the\n\t\t * unselected widget.\n\t\t */\n\t\t&.ck-widget_selected:hover {\n\t\t\toutline-color: var(--ck-color-widget-hover-border);\n\t\t}\n\n\t\t/*\n\t\t * Styles of the type around buttons when the "fake caret" is blinking (e.g. upon keyboard navigation).\n\t\t * In this state, the type around buttons would collide with the fake carets so they should disappear.\n\t\t */\n\t\t& > .ck-widget__type-around > .ck-widget__type-around__button {\n\t\t\t@mixin ck-widget-type-around-button-hidden;\n\t\t}\n\n\t\t/*\n\t\t * Fake horizontal caret integration with the selection handle. When the caret is visible, simply\n\t\t * hide the handle because it intersects with the caret (and does not make much sense anyway).\n\t\t */\n\t\t&.ck-widget_with-selection-handle {\n\t\t\t&.ck-widget_selected,\n\t\t\t&.ck-widget_selected:hover {\n\t\t\t\t& > .ck-widget__selection-handle {\n\t\t\t\t\topacity: 0\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/*\n\t\t * Fake horizontal caret integration with the resize UI. When the caret is visible, simply\n\t\t * hide the resize UI because it creates too much noise. It can be visible when the user\n\t\t * hovers the widget, though.\n\t\t */\n\t\t&.ck-widget_selected.ck-widget_with-resizer > .ck-widget__resizer {\n\t\t\topacity: 0\n\t\t}\n\t}\n}\n\n/*\n * Styles for the "before" button when the widget has a selection handle in an RTL environment.\n * The selection handler is aligned to the right side of the widget so there is no need to create\n * additional space for it next to the "before" button.\n */\n.ck[dir="rtl"] .ck-widget.ck-widget_with-selection-handle .ck-widget__type-around > .ck-widget__type-around__button_before {\n\tmargin-left: 0;\n\tmargin-right: 20px;\n}\n\n/*\n * Hide type around buttons when the widget is selected as a child of a selected\n * nested editable (e.g. mulit-cell table selection).\n *\n * See https://github.com/ckeditor/ckeditor5/issues/7263.\n */\n.ck-editor__nested-editable.ck-editor__editable_selected {\n\t& .ck-widget {\n\t\t&.ck-widget_selected,\n\t\t&:hover {\n\t\t\t& > .ck-widget__type-around > .ck-widget__type-around__button {\n\t\t\t\t@mixin ck-widget-type-around-button-hidden;\n\t\t\t}\n\t\t}\n\t}\n}\n\n/*\n * Styles for the buttons when the widget is selected but the user clicked outside of the editor (blurred the editor).\n */\n.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected > .ck-widget__type-around > .ck-widget__type-around__button:not(:hover) {\n\tbackground: var(--ck-color-widget-type-around-button-blurred-editable);\n\n\t& svg * {\n\t\tstroke: hsl(0,0%,60%);\n\t}\n}\n\n@keyframes ck-widget-type-around-arrow-dash {\n\t0% {\n\t\tstroke-dashoffset: 10;\n\t}\n\t20%, 100% {\n\t\tstroke-dashoffset: 0;\n\t}\n}\n\n@keyframes ck-widget-type-around-arrow-tip-dash {\n\t0%, 20% {\n\t\tstroke-dashoffset: 7;\n\t}\n\t40%, 100% {\n\t\tstroke-dashoffset: 0;\n\t}\n}\n\n@keyframes ck-widget-type-around-button-sonar {\n\t0% {\n\t\tbox-shadow: 0 0 0 0 hsla(var(--ck-color-focus-border-coordinates), var(--ck-color-widget-type-around-button-radar-start-alpha));\n\t}\n\t50% {\n\t\tbox-shadow: 0 0 0 5px hsla(var(--ck-color-focus-border-coordinates), var(--ck-color-widget-type-around-button-radar-end-alpha));\n\t}\n\t100% {\n\t\tbox-shadow: 0 0 0 5px hsla(var(--ck-color-focus-border-coordinates), var(--ck-color-widget-type-around-button-radar-start-alpha));\n\t}\n}\n\n@keyframes ck-widget-type-around-fake-caret-pulse {\n\t0% {\n\t\topacity: 1;\n\t}\n\t49% {\n\t\topacity: 1;\n\t}\n\t50% {\n\t\topacity: 0;\n\t}\n\t99% {\n\t\topacity: 0;\n\t}\n\t100% {\n\t\topacity: 1;\n\t}\n}\n'],sourceRoot:""}]);const a=s},645:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=e(t);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n}).join("")},t.i=function(e,n,i){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(i)for(var r=0;r{function t(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=n){var i,o,r=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(i=n.next()).done)&&(r.push(i.value),!t||r.length!==t);s=!0);}catch(e){a=!0,o=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw o}}return r}}(e,t)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?n(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n{var i=function(){var e;return function(){return void 0===e&&(e=Boolean(window&&document&&document.all&&!window.atob)),e}}(),o=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),r=[];function s(e){for(var t=-1,n=0;n{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var s={};return(()=>{r.d(s,{default:()=>I_});class i{constructor(e,t){this.source=e,this.name=t,this.path=[],this.stop=function e(){e.called=!0},this.off=function e(){e.called=!0}}}const o=new Array(256).fill().map((e,t)=>("0"+t.toString(16)).slice(-2));function a(){const e=4294967296*Math.random()>>>0,t=4294967296*Math.random()>>>0,n=4294967296*Math.random()>>>0,i=4294967296*Math.random()>>>0;return"e"+o[255&e]+o[e>>8&255]+o[e>>16&255]+o[e>>24&255]+o[255&t]+o[t>>8&255]+o[t>>16&255]+o[t>>24&255]+o[255&n]+o[n>>8&255]+o[n>>16&255]+o[n>>24&255]+o[255&i]+o[i>>8&255]+o[i>>16&255]+o[i>>24&255]}const c={get(e){return"number"!=typeof e?this[e]||this.normal:e},highest:1e5,high:1e3,normal:0,low:-1e3,lowest:-1e5},l=c;function d(e,t){const n=l.get(t.priority);for(let i=0;i{if("object"==typeof t&&null!==t){if(n.has(t))return`[object ${t.constructor.name}]`;n.add(t)}return t})}`:"";return e+i+m(e)}(e,n)),this.name="CKEditorError",this.context=t,this.data=n}is(e){return"CKEditorError"===e}static rethrowUnexpectedError(e,t){if(e.is&&e.is("CKEditorError"))throw e;const n=new u(e.message,t);throw n.stack=e.stack,n}}function h(e,t){console.warn(...function(e,t){const n=m(e);return t?[e,t,n]:[e,n]}(e,t))}function m(e){return`\nRead more: https://ckeditor.com/docs/ckeditor5/latest/framework/guides/support/error-codes.html#error-${e}`}const g="object"==typeof window?window:r.g;if(g.CKEDITOR_VERSION)throw new u("ckeditor-duplicated-modules",null);g.CKEDITOR_VERSION="34.0.0";const p=Symbol("listeningTo"),f=Symbol("emitterId"),_={on(e,t,n={}){this.listenTo(this,e,t,n)},once(e,t,n){let i=!1;this.listenTo(this,e,function(e,...n){i||(i=!0,e.off(),t.call(this,e,...n))},n)},off(e,t){this.stopListening(this,e,t)},listenTo(e,t,n,i={}){let o,r;this[p]||(this[p]={});const s=this[p];v(e)||k(e);const a=v(e);(o=s[a])||(o=s[a]={emitter:e,callbacks:{}}),(r=o.callbacks[t])||(r=o.callbacks[t]=[]),r.push(n),function(e,t,n,i,o){t._addEventListener?t._addEventListener(n,i,o):e._addEventListener.call(t,n,i,o)}(this,e,t,n,i)},stopListening(e,t,n){const i=this[p];let o=e&&v(e);const r=i&&o&&i[o],s=r&&t&&r.callbacks[t];if(!(!i||e&&!r||t&&!s))if(n)x(this,e,t,n),-1!==s.indexOf(n)&&(1===s.length?delete r.callbacks[t]:x(this,e,t,n));else if(s){for(;n=s.pop();)x(this,e,t,n);delete r.callbacks[t]}else if(r){for(t in r.callbacks)this.stopListening(e,t);delete i[o]}else{for(o in i)this.stopListening(i[o].emitter);delete this[p]}},fire(e,...t){try{const n=e instanceof i?e:new i(this,e),o=n.name;let r=C(this,o);if(n.path.push(this),r){const e=[n,...t];r=Array.from(r);for(let t=0;t{this._delegations||(this._delegations=new Map),e.forEach(e=>{const i=this._delegations.get(e);i?i.set(t,n):this._delegations.set(e,new Map([[t,n]]))})}}},stopDelegating(e,t){if(this._delegations)if(e)if(t){const n=this._delegations.get(e);n&&n.delete(t)}else this._delegations.delete(e);else this._delegations.clear()},_addEventListener(e,t,n){!function(e,t){const n=A(e);if(n[t])return;let i=t,o=null;const r=[];for(;""!==i&&!n[i];)n[i]=y(),r.push(n[i]),o&&n[i].childEvents.push(o),o=i,i=i.substr(0,i.lastIndexOf(":"));if(""!==i){for(const e of r)e.callbacks=n[i].callbacks.slice();n[i].childEvents.push(o)}}(this,e);const i=w(this,e),o={callback:t,priority:l.get(n.priority)};for(const e of i)d(e,o)},_removeEventListener(e,t){const n=w(this,e);for(const e of n)for(let n=0;n-1?C(e,t.substr(0,t.lastIndexOf(":"))):null}function I(e,t,n){for(let[o,r]of e){r?"function"==typeof r&&(r=r(t.name)):r=t.name;const e=new i(t.source,r);e.path=[...t.path],o.fire(e,...n)}}function x(e,t,n,i){t._removeEventListener?t._removeEventListener(n,i):e._removeEventListener.call(t,n,i)}const S=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},E="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;var j="object"==typeof self&&self&&self.Object===Object&&self;const T=E||j||Function("return this")(),D=T.Symbol;var P=Object.prototype,R=P.hasOwnProperty,O=P.toString,F=D?D.toStringTag:void 0;var z=Object.prototype.toString;var M=D?D.toStringTag:void 0;const $=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":M&&M in Object(e)?function(e){var t=R.call(e,F),n=e[F];try{e[F]=void 0;var i=!0}catch(e){}var o=O.call(e);return i&&(t?e[F]=n:delete e[F]),o}(e):function(e){return z.call(e)}(e)},N=function(e){if(!S(e))return!1;var t=$(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},B=T["__core-js_shared__"];var L=function(){var e=/[^.]+$/.exec(B&&B.keys&&B.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();var V=Function.prototype.toString;const U=function(e){if(null!=e){try{return V.call(e)}catch(e){}try{return e+""}catch(e){}}return""};var G=/^\[object .+?Constructor\]$/,W=Function.prototype,q=Object.prototype,H=W.toString,K=q.hasOwnProperty,Y=RegExp("^"+H.call(K).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const Z=function(e){return!(!S(e)||function(e){return!!L&&L in e}(e))&&(N(e)?Y:G).test(U(e))},J=function(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Z(n)?n:void 0};var X=function(){try{var e=J(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();const Q=X,ee=function(e,t,n){"__proto__"==t&&Q?Q(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},te=function(e,t){return e===t||e!=e&&t!=t};var ne=Object.prototype.hasOwnProperty;const ie=function(e,t,n){var i=e[t];ne.call(e,t)&&te(i,n)&&(void 0!==n||t in e)||ee(e,t,n)},oe=function(e,t,n,i){var o=!n;n||(n={});for(var r=-1,s=t.length;++r0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(le),he=function(e,t){return ue(function(e,t,n){return t=se(void 0===t?e.length-1:t,0),function(){for(var i=arguments,o=-1,r=se(i.length-t,0),s=Array(r);++o-1&&e%1==0&&e<=9007199254740991},ge=function(e){return null!=e&&me(e.length)&&!N(e)};var pe=/^(?:0|[1-9]\d*)$/;const fe=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&pe.test(e))&&e>-1&&e%1==0&&e1?n[o-1]:void 0,s=o>2?n[2]:void 0;for(r=e.length>3&&"function"==typeof r?(o--,r):void 0,s&&function(e,t,n){if(!S(n))return!1;var i=typeof t;return!!("number"==i?ge(n)&&fe(t,n.length):"string"==i&&t in n)&&te(n[t],e)}(n[0],n[1],s)&&(r=o<3?void 0:r,o=1),t=Object(t);++i{this.set(t,e[t])},this);et(this);const n=this[He];if(e in this&&!n.has(e))throw new u("observable-set-cannot-override",this);Object.defineProperty(this,e,{enumerable:!0,configurable:!0,get:()=>n.get(e),set(t){const i=n.get(e);let o=this.fire("set:"+e,e,t,i);void 0===o&&(o=t),i===o&&n.has(e)||(n.set(e,o),this.fire("change:"+e,e,o,i))}}),this[e]=t},bind(...e){if(!e.length||!it(e))throw new u("observable-bind-wrong-properties",this);if(new Set(e).size!==e.length)throw new u("observable-bind-duplicate-properties",this);et(this);const t=this[Ye];e.forEach(e=>{if(t.has(e))throw new u("observable-bind-rebind",this)});const n=new Map;return e.forEach(e=>{const i={property:e,to:[]};t.set(e,i),n.set(e,i)}),{to:tt,toMany:nt,_observable:this,_bindProperties:e,_to:[],_bindings:n}},unbind(...e){if(!this[He])return;const t=this[Ye],n=this[Ke];if(e.length){if(!it(e))throw new u("observable-unbind-wrong-properties",this);e.forEach(e=>{const i=t.get(e);if(!i)return;let o,r,s,a;i.to.forEach(e=>{o=e[0],r=e[1],s=n.get(o),a=s[r],a.delete(i),a.size||delete s[r],Object.keys(s).length||(n.delete(o),this.stopListening(o,"change"))}),t.delete(e)})}else n.forEach((e,t)=>{this.stopListening(t,"change")}),n.clear(),t.clear()},decorate(e){const t=this[e];if(!t)throw new u("observablemixin-cannot-decorate-undefined",this,{object:this,methodName:e});this.on(e,(e,n)=>{e.return=t.apply(this,n)}),this[e]=function(...t){return this.fire(e,t)},this[e][Je]=t,this[Ze]||(this[Ze]=[]),this[Ze].push(e)}};qe(Xe,b),Xe.stopListening=function(e,t,n){if(!e&&this[Ze]){for(const e of this[Ze])this[e]=this[e][Je];delete this[Ze]}b.stopListening.call(this,e,t,n)};const Qe=Xe;function et(e){e[He]||(Object.defineProperty(e,He,{value:new Map}),Object.defineProperty(e,Ke,{value:new Map}),Object.defineProperty(e,Ye,{value:new Map}))}function tt(...e){const t=function(...e){if(!e.length)throw new u("observable-bind-to-parse-error",null);const t={to:[]};let n;return"function"==typeof e[e.length-1]&&(t.callback=e.pop()),e.forEach(e=>{if("string"==typeof e)n.properties.push(e);else{if("object"!=typeof e)throw new u("observable-bind-to-parse-error",null);n={observable:e,properties:[]},t.to.push(n)}}),t}(...e),n=Array.from(this._bindings.keys()),i=n.length;if(!t.callback&&t.to.length>1)throw new u("observable-bind-to-no-callback",this);if(i>1&&t.callback)throw new u("observable-bind-to-extra-callback",this);t.to.forEach(e=>{if(e.properties.length&&e.properties.length!==i)throw new u("observable-bind-to-properties-length",this);e.properties.length||(e.properties=this._bindProperties)}),this._to=t.to,t.callback&&(this._bindings.get(n[0]).callback=t.callback),function(e,t){t.forEach(t=>{const n=e[Ke];let i;n.get(t.observable)||e.listenTo(t.observable,"change",(o,r)=>{i=n.get(t.observable)[r],i&&i.forEach(t=>{ot(e,t.property)})})})}(this._observable,this._to),function(e){let t;e._bindings.forEach((n,i)=>{e._to.forEach(o=>{t=o.properties[n.callback?0:e._bindProperties.indexOf(i)],n.to.push([o.observable,t]),function(e,t,n,i){const o=e[Ke],r=o.get(n),s=r||{};s[i]||(s[i]=new Set),s[i].add(t),r||o.set(n,s)}(e._observable,n,o.observable,t)})})}(this),this._bindProperties.forEach(e=>{ot(this._observable,e)})}function nt(e,t,n){if(this._bindings.size>1)throw new u("observable-bind-to-many-not-one-binding",this);this.to(...function(e,t){const n=e.map(e=>[e,t]);return Array.prototype.concat.apply([],n)}(e,t),n)}function it(e){return e.every(e=>"string"==typeof e)}function ot(e,t){const n=e[Ye].get(t);let i;n.callback?i=n.callback.apply(e,n.to.map(e=>e[0][e[1]])):(i=n.to[0],i=i[0][i[1]]),Object.prototype.hasOwnProperty.call(e,t)?e[t]=i:e.set(t,i)}function rt(e,...t){t.forEach(t=>{Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t)).forEach(n=>{if(n in e.prototype)return;const i=Object.getOwnPropertyDescriptor(t,n);i.enumerable=!1,Object.defineProperty(e.prototype,n,i)})})}class st{constructor(e){this.editor=e,this.set("isEnabled",!0),this._disableStack=new Set}forceDisabled(e){this._disableStack.add(e),1==this._disableStack.size&&(this.on("set:isEnabled",at,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(e){this._disableStack.delete(e),0==this._disableStack.size&&(this.off("set:isEnabled",at),this.isEnabled=!0)}destroy(){this.stopListening()}static get isContextPlugin(){return!1}}function at(e){e.return=!1,e.stop()}rt(st,Qe);class ct{constructor(e){this.editor=e,this.set("value",void 0),this.set("isEnabled",!1),this.affectsData=!0,this._disableStack=new Set,this.decorate("execute"),this.listenTo(this.editor.model.document,"change",()=>{this.refresh()}),this.on("execute",e=>{this.isEnabled||e.stop()},{priority:"high"}),this.listenTo(e,"change:isReadOnly",(e,t,n)=>{n&&this.affectsData?this.forceDisabled("readOnlyMode"):this.clearForceDisabled("readOnlyMode")})}refresh(){this.isEnabled=!0}forceDisabled(e){this._disableStack.add(e),1==this._disableStack.size&&(this.on("set:isEnabled",lt,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(e){this._disableStack.delete(e),0==this._disableStack.size&&(this.off("set:isEnabled",lt),this.refresh())}execute(){}destroy(){this.stopListening()}}function lt(e){e.return=!1,e.stop()}rt(ct,Qe);const dt=function(e,t){return function(n){return e(t(n))}},ut=dt(Object.getPrototypeOf,Object);var ht=Function.prototype,mt=Object.prototype,gt=ht.toString,pt=mt.hasOwnProperty,ft=gt.call(Object);const _t=function(e){if(!be(e)||"[object Object]"!=$(e))return!1;var t=ut(e);if(null===t)return!0;var n=pt.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&>.call(n)==ft},bt=function(e,t){for(var n=e.length;n--;)if(te(e[n][0],t))return n;return-1};var kt=Array.prototype.splice;function vt(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1},vt.prototype.set=function(e,t){var n=this.__data__,i=bt(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this};const At=vt,yt=J(T,"Map"),wt=J(Object,"create");var Ct=Object.prototype.hasOwnProperty;var It=Object.prototype.hasOwnProperty;function xt(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t{this._setToTarget(e,i,t[i],n)})}}function Bn(e){return Mn(e,Ln)}function Ln(e){return $n(e)?e:void 0}function Vn(e){return!(!e||!e[Symbol.iterator])}class Un{constructor(e={},t={}){const n=Vn(e);if(n||(t=e),this._items=[],this._itemMap=new Map,this._idProperty=t.idProperty||"id",this._bindToExternalToInternalMap=new WeakMap,this._bindToInternalToExternalMap=new WeakMap,this._skippedIndexesFromExternal=[],n)for(const t of e)this._items.push(t),this._itemMap.set(this._getItemIdBeforeAdding(t),t)}get length(){return this._items.length}get first(){return this._items[0]||null}get last(){return this._items[this.length-1]||null}add(e,t){return this.addMany([e],t)}addMany(e,t){if(void 0===t)t=this._items.length;else if(t>this._items.length||t<0)throw new u("collection-add-item-invalid-index",this);for(let n=0;n{this._setUpBindToBinding(t=>new e(t))},using:e=>{"function"==typeof e?this._setUpBindToBinding(t=>e(t)):this._setUpBindToBinding(t=>t[e])}}}_setUpBindToBinding(e){const t=this._bindToCollection,n=(n,i,o)=>{const r=t._bindToCollection==this,s=t._bindToInternalToExternalMap.get(i);if(r&&s)this._bindToExternalToInternalMap.set(i,s),this._bindToInternalToExternalMap.set(s,i);else{const n=e(i);if(!n)return void this._skippedIndexesFromExternal.push(o);let r=o;for(const e of this._skippedIndexesFromExternal)o>e&&r--;for(const e of t._skippedIndexesFromExternal)r>=e&&r++;this._bindToExternalToInternalMap.set(i,n),this._bindToInternalToExternalMap.set(n,i),this.add(n,r);for(let e=0;e{const i=this._bindToExternalToInternalMap.get(t);i&&this.remove(i),this._skippedIndexesFromExternal=this._skippedIndexesFromExternal.reduce((e,t)=>(nt&&e.push(t),e),[])})}_getItemIdBeforeAdding(e){const t=this._idProperty;let n;if(t in e){if(n=e[t],"string"!=typeof n)throw new u("collection-add-invalid-id",this);if(this.get(n))throw new u("collection-add-item-already-exists",this)}else e[t]=n=a();return n}_remove(e){let t,n,i,o=!1;const r=this._idProperty;if("string"==typeof e?(n=e,i=this._itemMap.get(n),o=!i,i&&(t=this._items.indexOf(i))):"number"==typeof e?(t=e,i=this._items[t],o=!i,i&&(n=i[r])):(i=e,n=i[r],t=this._items.indexOf(i),o=-1==t||!this._itemMap.get(n)),o)throw new u("collection-remove-404",this);this._items.splice(t,1),this._itemMap.delete(n);const s=this._bindToInternalToExternalMap.get(i);return this._bindToInternalToExternalMap.delete(i),this._bindToExternalToInternalMap.delete(s),this.fire("remove",i,t),[i,t]}[Symbol.iterator](){return this._items[Symbol.iterator]()}}rt(Un,b);class Gn{constructor(e,t=[],n=[]){this._context=e,this._plugins=new Map,this._availablePlugins=new Map;for(const e of t)e.pluginName&&this._availablePlugins.set(e.pluginName,e);this._contextPlugins=new Map;for(const[e,t]of n)this._contextPlugins.set(e,t),this._contextPlugins.set(t,e),e.pluginName&&this._availablePlugins.set(e.pluginName,e)}*[Symbol.iterator](){for(const e of this._plugins)"function"==typeof e[0]&&(yield e)}get(e){const t=this._plugins.get(e);if(!t){let t=e;throw"function"==typeof e&&(t=e.pluginName||e.name),new u("plugincollection-plugin-not-loaded",this._context,{plugin:t})}return t}has(e){return this._plugins.has(e)}init(e,t=[],n=[]){const i=this,o=this._context;!function e(t,n=new Set){t.forEach(t=>{a(t)&&(n.has(t)||(n.add(t),t.pluginName&&!i._availablePlugins.has(t.pluginName)&&i._availablePlugins.set(t.pluginName,t),t.requires&&e(t.requires,n)))})}(e),h(e);const r=[...function e(t,n=new Set){return t.map(e=>a(e)?e:i._availablePlugins.get(e)).reduce((t,i)=>n.has(i)?t:(n.add(i),i.requires&&(h(i.requires,i),e(i.requires,n).forEach(e=>t.add(e))),t.add(i)),new Set)}(e.filter(e=>!l(e,t)))];!function(e,t){for(const n of t){if("function"!=typeof n)throw new u("plugincollection-replace-plugin-invalid-type",null,{pluginItem:n});const t=n.pluginName;if(!t)throw new u("plugincollection-replace-plugin-missing-name",null,{pluginItem:n});if(n.requires&&n.requires.length)throw new u("plugincollection-plugin-for-replacing-cannot-have-dependencies",null,{pluginName:t});const o=i._availablePlugins.get(t);if(!o)throw new u("plugincollection-plugin-for-replacing-not-exist",null,{pluginName:t});const r=e.indexOf(o);if(-1===r){if(i._contextPlugins.has(o))return;throw new u("plugincollection-plugin-for-replacing-not-loaded",null,{pluginName:t})}if(o.requires&&o.requires.length)throw new u("plugincollection-replaced-plugin-cannot-have-dependencies",null,{pluginName:t});e.splice(r,1,n),i._availablePlugins.set(t,n)}}(r,n);const s=function(e){return e.map(e=>{const t=i._contextPlugins.get(e)||new e(o);return i._add(e,t),t})}(r);return g(s,"init").then(()=>g(s,"afterInit")).then(()=>s);function a(e){return"function"==typeof e}function c(e){return a(e)&&e.isContextPlugin}function l(e,t){return t.some(t=>t===e||d(e)===t||d(t)===e)}function d(e){return a(e)?e.pluginName||e.name:e}function h(e,t=null){e.map(e=>a(e)?e:i._availablePlugins.get(e)||e).forEach(e=>{!function(e,t){if(!a(e)){if(t)throw new u("plugincollection-soft-required",o,{missingPlugin:e,requiredBy:d(t)});throw new u("plugincollection-plugin-not-found",o,{plugin:e})}}(e,t),function(e,t){if(c(t)&&!c(e))throw new u("plugincollection-context-required",o,{plugin:d(e),requiredBy:d(t)})}(e,t),m(e,t)})}function m(e,n){if(n&&l(e,t))throw new u("plugincollection-required",o,{plugin:d(e),requiredBy:d(n)})}function g(e,t){return e.reduce((e,n)=>n[t]?i._contextPlugins.has(n)?e:e.then(n[t].bind(n)):e,Promise.resolve())}}destroy(){const e=[];for(const[,t]of this)"function"!=typeof t.destroy||this._contextPlugins.has(t)||e.push(t.destroy());return Promise.all(e)}_add(e,t){this._plugins.set(e,t);const n=e.pluginName;if(n){if(this._plugins.has(n))throw new u("plugincollection-plugin-name-conflict",null,{pluginName:n,plugin1:this._plugins.get(n).constructor,plugin2:e});this._plugins.set(n,t)}}}function Wn(e){return Array.isArray(e)?e:[e]}rt(Gn,b),window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={});const qn=["ar","ara","fa","per","fas","he","heb","ku","kur","ug","uig"];function Hn(e){return qn.includes(e)?"rtl":"ltr"}class Kn{constructor(e={}){this.uiLanguage=e.uiLanguage||"en",this.contentLanguage=e.contentLanguage||this.uiLanguage,this.uiLanguageDirection=Hn(this.uiLanguage),this.contentLanguageDirection=Hn(this.contentLanguage),this.t=(e,t)=>this._t(e,t)}get language(){return console.warn("locale-deprecated-language-property: The Locale#language property has been deprecated and will be removed in the near future. Please use #uiLanguage and #contentLanguage properties instead."),this.uiLanguage}_t(e,t=[]){t=Wn(t),"string"==typeof e&&(e={string:e});const n=e.plural?t[0]:1;return function(e,t){return e.replace(/%(\d+)/g,(e,n)=>n1===e?0:1);if("string"==typeof r[o])return r[o];const a=Number(s(n));return r[o][a]}(this.uiLanguage,e,n),t)}}class Yn{constructor(e){this.config=new Nn(e,this.constructor.defaultConfig);const t=this.constructor.builtinPlugins;this.config.define("plugins",t),this.plugins=new Gn(this,t);const n=this.config.get("language")||{};this.locale=new Kn({uiLanguage:"string"==typeof n?n:n.ui,contentLanguage:this.config.get("language.content")}),this.t=this.locale.t,this.editors=new Un,this._contextOwner=null}initPlugins(){const e=this.config.get("plugins")||[],t=this.config.get("substitutePlugins")||[];for(const n of e.concat(t)){if("function"!=typeof n)throw new u("context-initplugins-constructor-only",null,{Plugin:n});if(!0!==n.isContextPlugin)throw new u("context-initplugins-invalid-plugin",null,{Plugin:n})}return this.plugins.init(e,[],t)}destroy(){return Promise.all(Array.from(this.editors,e=>e.destroy())).then(()=>this.plugins.destroy())}_addEditor(e,t){if(this._contextOwner)throw new u("context-addeditor-private-context");this.editors.add(e),t&&(this._contextOwner=e)}_removeEditor(e){return this.editors.has(e)&&this.editors.remove(e),this._contextOwner===e?this.destroy():Promise.resolve()}_getEditorConfig(){const e={};for(const t of this.config.names())["plugins","removePlugins","extraPlugins"].includes(t)||(e[t]=this.config.get(t));return e}static create(e){return new Promise(t=>{const n=new this(e);t(n.initPlugins().then(()=>n))})}}class Zn{constructor(e){this.context=e}destroy(){this.stopListening()}static get isContextPlugin(){return!0}}function Jn(e,t){const n=Math.min(e.length,t.length);for(let i=0;ie.data.length)throw new u("view-textproxy-wrong-offsetintext",this);if(n<0||t+n>e.data.length)throw new u("view-textproxy-wrong-length",this);this.data=e.data.substring(t,t+n),this.offsetInText=t}get offsetSize(){return this.data.length}get isPartial(){return this.data.length!==this.textNode.data.length}get parent(){return this.textNode.parent}get root(){return this.textNode.root}get document(){return this.textNode.document}is(e){return"$textProxy"===e||"view:$textProxy"===e||"textProxy"===e||"view:textProxy"===e}getAncestors(e={includeSelf:!1,parentFirst:!1}){const t=[];let n=e.includeSelf?this.textNode:this.parent;for(;null!==n;)t[e.parentFirst?"push":"unshift"](n),n=n.parent;return t}}function ni(e){return Vn(e)?new Map(e):function(e){const t=new Map;for(const n in e)t.set(n,e[n]);return t}(e)}class ii{constructor(...e){this._patterns=[],this.add(...e)}add(...e){for(let t of e)("string"==typeof t||t instanceof RegExp)&&(t={name:t}),this._patterns.push(t)}match(...e){for(const t of e)for(const e of this._patterns){const n=oi(t,e);if(n)return{element:t,pattern:e,match:n}}return null}matchAll(...e){const t=[];for(const n of e)for(const e of this._patterns){const i=oi(n,e);i&&t.push({element:n,pattern:e,match:i})}return t.length>0?t:null}getElementName(){if(1!==this._patterns.length)return null;const e=this._patterns[0],t=e.name;return"function"==typeof e||!t||t instanceof RegExp?null:t}}function oi(e,t){if("function"==typeof t)return t(e);const n={};return t.name&&(n.name=function(e,t){return e instanceof RegExp?!!t.match(e):e===t}(t.name,e.name),!n.name)||t.attributes&&(n.attributes=function(e,t){const n=new Set(t.getAttributeKeys());return _t(e)?(void 0!==e.style&&h("matcher-pattern-deprecated-attributes-style-key",e),void 0!==e.class&&h("matcher-pattern-deprecated-attributes-class-key",e)):(n.delete("style"),n.delete("class")),ri(e,n,e=>t.getAttribute(e))}(t.attributes,e),!n.attributes)?null:!(t.classes&&(n.classes=function(e,t){return ri(e,t.getClassNames())}(t.classes,e),!n.classes))&&!(t.styles&&(n.styles=function(e,t){return ri(e,t.getStyleNames(!0),e=>t.getStyle(e))}(t.styles,e),!n.styles))&&n}function ri(e,t,n){const i=function(e){return Array.isArray(e)?e.map(e=>_t(e)?(void 0!==e.key&&void 0!==e.value||h("matcher-pattern-missing-key-or-value",e),[e.key,e.value]):[e,!0]):_t(e)?Object.entries(e):[[e,!0]]}(e),o=Array.from(t),r=[];return i.forEach(([e,t])=>{o.forEach(i=>{(function(e,t){return!0===e||e===t||e instanceof RegExp&&t.match(e)})(e,i)&&function(e,t,n){if(!0===e)return!0;const i=n(t);return e===i||e instanceof RegExp&&!!String(i).match(e)}(t,i,n)&&r.push(i)})}),!i.length||r.lengtho?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var r=Array(o);++it===e);return Array.isArray(t)}set(e,t){if(S(e))for(const[t,n]of Object.entries(e))this._styleProcessor.toNormalizedForm(t,n,this._styles);else this._styleProcessor.toNormalizedForm(e,t,this._styles)}remove(e){const t=Mi(e);(function(e,t){null==e||Ii(e,t)})(this._styles,t),delete this._styles[e],this._cleanEmptyObjectsOnPath(t)}getNormalized(e){return this._styleProcessor.getNormalized(e,this._styles)}toString(){return this.isEmpty?"":this._getStylesEntries().map(e=>e.join(":")).sort().join(";")+";"}getAsString(e){if(this.isEmpty)return;if(this._styles[e]&&!S(this._styles[e]))return this._styles[e];const t=this._styleProcessor.getReducedForm(e,this._styles).find(([t])=>t===e);return Array.isArray(t)?t[1]:void 0}getStyleNames(e=!1){return this.isEmpty?[]:e?this._styleProcessor.getStyleNames(this._styles):this._getStylesEntries().map(([e])=>e)}clear(){this._styles={}}_getStylesEntries(){const e=[],t=Object.keys(this._styles);for(const n of t)e.push(...this._styleProcessor.getReducedForm(n,this._styles));return e}_cleanEmptyObjectsOnPath(e){const t=e.split(".");if(!(t.length>1))return;const n=t.splice(0,t.length-1).join("."),i=xi(this._styles,n);i&&!Array.from(Object.keys(i)).length&&this.remove(n)}}class zi{constructor(){this._normalizers=new Map,this._extractors=new Map,this._reducers=new Map,this._consumables=new Map}toNormalizedForm(e,t,n){if(S(t))$i(n,Mi(e),t);else if(this._normalizers.has(e)){const i=this._normalizers.get(e),{path:o,value:r}=i(t);$i(n,o,r)}else $i(n,e,t)}getNormalized(e,t){if(!e)return Ri({},t);if(void 0!==t[e])return t[e];if(this._extractors.has(e)){const n=this._extractors.get(e);if("string"==typeof n)return xi(t,n);const i=n(e,t);if(i)return i}return xi(t,Mi(e))}getReducedForm(e,t){const n=this.getNormalized(e,t);return void 0===n?[]:this._reducers.has(e)?this._reducers.get(e)(n):[[e,n]]}getStyleNames(e){const t=Array.from(this._consumables.keys()).filter(t=>{const n=this.getNormalized(t,e);return n&&"object"==typeof n?Object.keys(n).length:n}),n=new Set([...t,...Object.keys(e)]);return Array.from(n.values())}getRelatedStyles(e){return this._consumables.get(e)||[]}setNormalizer(e,t){this._normalizers.set(e,t)}setExtractor(e,t){this._extractors.set(e,t)}setReducer(e,t){this._reducers.set(e,t)}setStyleRelation(e,t){this._mapStyleNames(e,t);for(const n of t)this._mapStyleNames(n,[e])}_mapStyleNames(e,t){this._consumables.has(e)||this._consumables.set(e,[]),this._consumables.get(e).push(...t)}}function Mi(e){return e.replace("-",".")}function $i(e,t,n){let i=n;S(n)&&(i=Ri({},xi(e,t),n)),Oi(e,t,i)}class Ni extends Qn{constructor(e,t,n,i){if(super(e),this.name=t,this._attrs=function(e){e=ni(e);for(const[t,n]of e)null===n?e.delete(t):"string"!=typeof n&&e.set(t,String(n));return e}(n),this._children=[],i&&this._insertChild(0,i),this._classes=new Set,this._attrs.has("class")){const e=this._attrs.get("class");Bi(this._classes,e),this._attrs.delete("class")}this._styles=new Fi(this.document.stylesProcessor),this._attrs.has("style")&&(this._styles.setTo(this._attrs.get("style")),this._attrs.delete("style")),this._customProperties=new Map,this._unsafeAttributesToRender=[]}get childCount(){return this._children.length}get isEmpty(){return 0===this._children.length}is(e,t=null){return t?t===this.name&&("element"===e||"view:element"===e):"element"===e||"view:element"===e||"node"===e||"view:node"===e}getChild(e){return this._children[e]}getChildIndex(e){return this._children.indexOf(e)}getChildren(){return this._children[Symbol.iterator]()}*getAttributeKeys(){this._classes.size>0&&(yield"class"),this._styles.isEmpty||(yield"style"),yield*this._attrs.keys()}*getAttributes(){yield*this._attrs.entries(),this._classes.size>0&&(yield["class",this.getAttribute("class")]),this._styles.isEmpty||(yield["style",this.getAttribute("style")])}getAttribute(e){if("class"==e)return this._classes.size>0?[...this._classes].join(" "):void 0;if("style"==e){const e=this._styles.toString();return""==e?void 0:e}return this._attrs.get(e)}hasAttribute(e){return"class"==e?this._classes.size>0:"style"==e?!this._styles.isEmpty:this._attrs.has(e)}isSimilar(e){if(!(e instanceof Ni))return!1;if(this===e)return!0;if(this.name!=e.name)return!1;if(this._attrs.size!==e._attrs.size||this._classes.size!==e._classes.size||this._styles.size!==e._styles.size)return!1;for(const[t,n]of this._attrs)if(!e._attrs.has(t)||e._attrs.get(t)!==n)return!1;for(const t of this._classes)if(!e._classes.has(t))return!1;for(const t of this._styles.getStyleNames())if(!e._styles.has(t)||e._styles.getAsString(t)!==this._styles.getAsString(t))return!1;return!0}hasClass(...e){for(const t of e)if(!this._classes.has(t))return!1;return!0}getClassNames(){return this._classes.keys()}getStyle(e){return this._styles.getAsString(e)}getNormalizedStyle(e){return this._styles.getNormalized(e)}getStyleNames(e=!1){return this._styles.getStyleNames(e)}hasStyle(...e){for(const t of e)if(!this._styles.has(t))return!1;return!0}findAncestor(...e){const t=new ii(...e);let n=this.parent;for(;n;){if(t.match(n))return n;n=n.parent}return null}getCustomProperty(e){return this._customProperties.get(e)}*getCustomProperties(){yield*this._customProperties.entries()}getIdentity(){const e=Array.from(this._classes).sort().join(","),t=this._styles.toString(),n=Array.from(this._attrs).map(e=>`${e[0]}="${e[1]}"`).sort().join(" ");return this.name+(""==e?"":` class="${e}"`)+(t?` style="${t}"`:"")+(""==n?"":` ${n}`)}shouldRenderUnsafeAttribute(e){return this._unsafeAttributesToRender.includes(e)}_clone(e=!1){const t=[];if(e)for(const n of this.getChildren())t.push(n._clone(e));const n=new this.constructor(this.document,this.name,this._attrs,t);return n._classes=new Set(this._classes),n._styles.set(this._styles.getNormalized()),n._customProperties=new Map(this._customProperties),n.getFillerOffset=this.getFillerOffset,n}_appendChild(e){return this._insertChild(this.childCount,e)}_insertChild(e,t){this._fireChange("children",this);let n=0;const i=function(e,t){return"string"==typeof t?[new ei(e,t)]:(Vn(t)||(t=[t]),Array.from(t).map(t=>"string"==typeof t?new ei(e,t):t instanceof ti?new ei(e,t.data):t))}(this.document,t);for(const t of i)null!==t.parent&&t._remove(),t.parent=this,t.document=this.document,this._children.splice(e,0,t),e++,n++;return n}_removeChildren(e,t=1){this._fireChange("children",this);for(let n=e;n0&&(this._classes.clear(),!0):"style"==e?!this._styles.isEmpty&&(this._styles.clear(),!0):this._attrs.delete(e)}_addClass(e){this._fireChange("attributes",this);for(const t of Wn(e))this._classes.add(t)}_removeClass(e){this._fireChange("attributes",this);for(const t of Wn(e))this._classes.delete(t)}_setStyle(e,t){this._fireChange("attributes",this),this._styles.set(e,t)}_removeStyle(e){this._fireChange("attributes",this);for(const t of Wn(e))this._styles.remove(t)}_setCustomProperty(e,t){this._customProperties.set(e,t)}_removeCustomProperty(e){return this._customProperties.delete(e)}}function Bi(e,t){const n=t.split(/\s+/);e.clear(),n.forEach(t=>e.add(t))}class Li extends Ni{constructor(e,t,n,i){super(e,t,n,i),this.getFillerOffset=Vi}is(e,t=null){return t?t===this.name&&("containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e}}function Vi(){const e=[...this.getChildren()],t=e[this.childCount-1];if(t&&t.is("element","br"))return this.childCount;for(const t of e)if(!t.is("uiElement"))return null;return this.childCount}class Ui extends Li{constructor(e,t,n,i){super(e,t,n,i),this.set("isReadOnly",!1),this.set("isFocused",!1),this.bind("isReadOnly").to(e),this.bind("isFocused").to(e,"isFocused",t=>t&&e.selection.editableElement==this),this.listenTo(e.selection,"change",()=>{this.isFocused=e.isFocused&&e.selection.editableElement==this})}is(e,t=null){return t?t===this.name&&("editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e}destroy(){this.stopListening()}}rt(Ui,Qe);const Gi=Symbol("rootName");class Wi extends Ui{constructor(e,t){super(e,t),this.rootName="main"}is(e,t=null){return t?t===this.name&&("rootElement"===e||"view:rootElement"===e||"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"rootElement"===e||"view:rootElement"===e||"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e}get rootName(){return this.getCustomProperty(Gi)}set rootName(e){this._setCustomProperty(Gi,e)}set _name(e){this.name=e}}class qi{constructor(e={}){if(!e.boundaries&&!e.startPosition)throw new u("view-tree-walker-no-start-position",null);if(e.direction&&"forward"!=e.direction&&"backward"!=e.direction)throw new u("view-tree-walker-unknown-direction",e.startPosition,{direction:e.direction});this.boundaries=e.boundaries||null,e.startPosition?this.position=Hi._createAt(e.startPosition):this.position=Hi._createAt(e.boundaries["backward"==e.direction?"end":"start"]),this.direction=e.direction||"forward",this.singleCharacters=!!e.singleCharacters,this.shallow=!!e.shallow,this.ignoreElementEnd=!!e.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null}[Symbol.iterator](){return this}skip(e){let t,n,i;do{i=this.position,({done:t,value:n}=this.next())}while(!t&&e(n));t||(this.position=i)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){let e=this.position.clone();const t=this.position,n=e.parent;if(null===n.parent&&e.offset===n.childCount)return{done:!0};if(n===this._boundaryEndParent&&e.offset==this.boundaries.end.offset)return{done:!0};let i;if(n instanceof ei){if(e.isAtEnd)return this.position=Hi._createAfter(n),this._next();i=n.data[e.offset]}else i=n.getChild(e.offset);if(i instanceof Ni)return this.shallow?e.offset++:e=new Hi(i,0),this.position=e,this._formatReturnValue("elementStart",i,t,e,1);if(i instanceof ei){if(this.singleCharacters)return e=new Hi(i,0),this.position=e,this._next();{let n,o=i.data.length;return i==this._boundaryEndParent?(o=this.boundaries.end.offset,n=new ti(i,0,o),e=Hi._createAfter(n)):(n=new ti(i,0,i.data.length),e.offset++),this.position=e,this._formatReturnValue("text",n,t,e,o)}}if("string"==typeof i){let i;i=this.singleCharacters?1:(n===this._boundaryEndParent?this.boundaries.end.offset:n.data.length)-e.offset;const o=new ti(n,e.offset,i);return e.offset+=i,this.position=e,this._formatReturnValue("text",o,t,e,i)}return e=Hi._createAfter(n),this.position=e,this.ignoreElementEnd?this._next():this._formatReturnValue("elementEnd",n,t,e)}_previous(){let e=this.position.clone();const t=this.position,n=e.parent;if(null===n.parent&&0===e.offset)return{done:!0};if(n==this._boundaryStartParent&&e.offset==this.boundaries.start.offset)return{done:!0};let i;if(n instanceof ei){if(e.isAtStart)return this.position=Hi._createBefore(n),this._previous();i=n.data[e.offset-1]}else i=n.getChild(e.offset-1);if(i instanceof Ni)return this.shallow?(e.offset--,this.position=e,this._formatReturnValue("elementStart",i,t,e,1)):(e=new Hi(i,i.childCount),this.position=e,this.ignoreElementEnd?this._previous():this._formatReturnValue("elementEnd",i,t,e));if(i instanceof ei){if(this.singleCharacters)return e=new Hi(i,i.data.length),this.position=e,this._previous();{let n,o=i.data.length;if(i==this._boundaryStartParent){const t=this.boundaries.start.offset;n=new ti(i,t,i.data.length-t),o=n.data.length,e=Hi._createBefore(n)}else n=new ti(i,0,i.data.length),e.offset--;return this.position=e,this._formatReturnValue("text",n,t,e,o)}}if("string"==typeof i){let i;if(this.singleCharacters)i=1;else{const t=n===this._boundaryStartParent?this.boundaries.start.offset:0;i=e.offset-t}e.offset-=i;const o=new ti(n,e.offset,i);return this.position=e,this._formatReturnValue("text",o,t,e,i)}return e=Hi._createBefore(n),this.position=e,this._formatReturnValue("elementStart",n,t,e,1)}_formatReturnValue(e,t,n,i,o){return t instanceof ti&&(t.offsetInText+t.data.length==t.textNode.data.length&&("forward"!=this.direction||this.boundaries&&this.boundaries.end.isEqual(this.position)?n=Hi._createAfter(t.textNode):(i=Hi._createAfter(t.textNode),this.position=i)),0===t.offsetInText&&("backward"!=this.direction||this.boundaries&&this.boundaries.start.isEqual(this.position)?n=Hi._createBefore(t.textNode):(i=Hi._createBefore(t.textNode),this.position=i))),{done:!1,value:{type:e,item:t,previousPosition:n,nextPosition:i,length:o}}}}class Hi{constructor(e,t){this.parent=e,this.offset=t}get nodeAfter(){return this.parent.is("$text")?null:this.parent.getChild(this.offset)||null}get nodeBefore(){return this.parent.is("$text")?null:this.parent.getChild(this.offset-1)||null}get isAtStart(){return 0===this.offset}get isAtEnd(){const e=this.parent.is("$text")?this.parent.data.length:this.parent.childCount;return this.offset===e}get root(){return this.parent.root}get editableElement(){let e=this.parent;for(;!(e instanceof Ui);){if(!e.parent)return null;e=e.parent}return e}getShiftedBy(e){const t=Hi._createAt(this),n=t.offset+e;return t.offset=n<0?0:n,t}getLastMatchingPosition(e,t={}){t.startPosition=this;const n=new qi(t);return n.skip(e),n.position}getAncestors(){return this.parent.is("documentFragment")?[this.parent]:this.parent.getAncestors({includeSelf:!0})}getCommonAncestor(e){const t=this.getAncestors(),n=e.getAncestors();let i=0;for(;t[i]==n[i]&&t[i];)i++;return 0===i?null:t[i-1]}is(e){return"position"===e||"view:position"===e}isEqual(e){return this.parent==e.parent&&this.offset==e.offset}isBefore(e){return"before"==this.compareWith(e)}isAfter(e){return"after"==this.compareWith(e)}compareWith(e){if(this.root!==e.root)return"different";if(this.isEqual(e))return"same";const t=this.parent.is("node")?this.parent.getPath():[],n=e.parent.is("node")?e.parent.getPath():[];t.push(this.offset),n.push(e.offset);const i=Jn(t,n);switch(i){case"prefix":return"before";case"extension":return"after";default:return t[i]0?new this(n,i):new this(i,n)}static _createIn(e){return this._createFromParentsAndOffsets(e,0,e,e.childCount)}static _createOn(e){const t=e.is("$textProxy")?e.offsetSize:1;return this._createFromPositionAndShift(Hi._createBefore(e),t)}}function Yi(e){return!(!e.item.is("attributeElement")&&!e.item.is("uiElement"))}function Zi(e){let t=0;for(const n of e)t++;return t}class Ji{constructor(e=null,t,n){this._ranges=[],this._lastRangeBackward=!1,this._isFake=!1,this._fakeSelectionLabel="",this.setTo(e,t,n)}get isFake(){return this._isFake}get fakeSelectionLabel(){return this._fakeSelectionLabel}get anchor(){if(!this._ranges.length)return null;const e=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?e.end:e.start).clone()}get focus(){if(!this._ranges.length)return null;const e=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?e.start:e.end).clone()}get isCollapsed(){return 1===this.rangeCount&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}get editableElement(){return this.anchor?this.anchor.editableElement:null}*getRanges(){for(const e of this._ranges)yield e.clone()}getFirstRange(){let e=null;for(const t of this._ranges)e&&!t.start.isBefore(e.start)||(e=t);return e?e.clone():null}getLastRange(){let e=null;for(const t of this._ranges)e&&!t.end.isAfter(e.end)||(e=t);return e?e.clone():null}getFirstPosition(){const e=this.getFirstRange();return e?e.start.clone():null}getLastPosition(){const e=this.getLastRange();return e?e.end.clone():null}isEqual(e){if(this.isFake!=e.isFake)return!1;if(this.isFake&&this.fakeSelectionLabel!=e.fakeSelectionLabel)return!1;if(this.rangeCount!=e.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(e.anchor)||!this.focus.isEqual(e.focus))return!1;for(const t of this._ranges){let n=!1;for(const i of e._ranges)if(t.isEqual(i)){n=!0;break}if(!n)return!1}return!0}isSimilar(e){if(this.isBackward!=e.isBackward)return!1;const t=Zi(this.getRanges());if(t!=Zi(e.getRanges()))return!1;if(0==t)return!0;for(let t of this.getRanges()){t=t.getTrimmed();let n=!1;for(let i of e.getRanges())if(i=i.getTrimmed(),t.start.isEqual(i.start)&&t.end.isEqual(i.end)){n=!0;break}if(!n)return!1}return!0}getSelectedElement(){return 1!==this.rangeCount?null:this.getFirstRange().getContainedElement()}setTo(e,t,n){if(null===e)this._setRanges([]),this._setFakeOptions(t);else if(e instanceof Ji||e instanceof Xi)this._setRanges(e.getRanges(),e.isBackward),this._setFakeOptions({fake:e.isFake,label:e.fakeSelectionLabel});else if(e instanceof Ki)this._setRanges([e],t&&t.backward),this._setFakeOptions(t);else if(e instanceof Hi)this._setRanges([new Ki(e)]),this._setFakeOptions(t);else if(e instanceof Qn){const i=!!n&&!!n.backward;let o;if(void 0===t)throw new u("view-selection-setto-required-second-parameter",this);o="in"==t?Ki._createIn(e):"on"==t?Ki._createOn(e):new Ki(Hi._createAt(e,t)),this._setRanges([o],i),this._setFakeOptions(n)}else{if(!Vn(e))throw new u("view-selection-setto-not-selectable",this);this._setRanges(e,t&&t.backward),this._setFakeOptions(t)}this.fire("change")}setFocus(e,t){if(null===this.anchor)throw new u("view-selection-setfocus-no-ranges",this);const n=Hi._createAt(e,t);if("same"==n.compareWith(this.focus))return;const i=this.anchor;this._ranges.pop(),"before"==n.compareWith(i)?this._addRange(new Ki(n,i),!0):this._addRange(new Ki(i,n)),this.fire("change")}is(e){return"selection"===e||"view:selection"===e}_setRanges(e,t=!1){e=Array.from(e),this._ranges=[];for(const t of e)this._addRange(t);this._lastRangeBackward=!!t}_setFakeOptions(e={}){this._isFake=!!e.fake,this._fakeSelectionLabel=e.fake&&e.label||""}_addRange(e,t=!1){if(!(e instanceof Ki))throw new u("view-selection-add-range-not-range",this);this._pushRange(e),this._lastRangeBackward=!!t}_pushRange(e){for(const t of this._ranges)if(e.isIntersecting(t))throw new u("view-selection-range-intersects",this,{addedRange:e,intersectingRange:t});this._ranges.push(new Ki(e.start,e.end))}}rt(Ji,b);class Xi{constructor(e=null,t,n){this._selection=new Ji,this._selection.delegate("change").to(this),this._selection.setTo(e,t,n)}get isFake(){return this._selection.isFake}get fakeSelectionLabel(){return this._selection.fakeSelectionLabel}get anchor(){return this._selection.anchor}get focus(){return this._selection.focus}get isCollapsed(){return this._selection.isCollapsed}get rangeCount(){return this._selection.rangeCount}get isBackward(){return this._selection.isBackward}get editableElement(){return this._selection.editableElement}get _ranges(){return this._selection._ranges}*getRanges(){yield*this._selection.getRanges()}getFirstRange(){return this._selection.getFirstRange()}getLastRange(){return this._selection.getLastRange()}getFirstPosition(){return this._selection.getFirstPosition()}getLastPosition(){return this._selection.getLastPosition()}getSelectedElement(){return this._selection.getSelectedElement()}isEqual(e){return this._selection.isEqual(e)}isSimilar(e){return this._selection.isSimilar(e)}is(e){return"selection"===e||"documentSelection"==e||"view:selection"==e||"view:documentSelection"==e}_setTo(e,t,n){this._selection.setTo(e,t,n)}_setFocus(e,t){this._selection.setFocus(e,t)}}rt(Xi,b);class Qi extends i{constructor(e,t,n){super(e,t),this.startRange=n,this._eventPhase="none",this._currentTarget=null}get eventPhase(){return this._eventPhase}get currentTarget(){return this._currentTarget}}const eo=Symbol("bubbling contexts"),to={fire(e,...t){try{const n=e instanceof i?e:new i(this,e),o=so(this);if(!o.size)return;if(io(n,"capturing",this),oo(o,"$capture",n,...t))return n.return;const r=n.startRange||this.selection.getFirstRange(),s=r?r.getContainedElement():null,a=!!s&&Boolean(ro(o,s));let c=s||function(e){if(!e)return null;const t=e.start.parent,n=e.end.parent,i=t.getPath(),o=n.getPath();return i.length>o.length?t:n}(r);if(io(n,"atTarget",c),!a){if(oo(o,"$text",n,...t))return n.return;io(n,"bubbling",c)}for(;c;){if(c.is("rootElement")){if(oo(o,"$root",n,...t))return n.return}else if(c.is("element")&&oo(o,c.name,n,...t))return n.return;if(oo(o,c,n,...t))return n.return;c=c.parent,io(n,"bubbling",c)}return io(n,"bubbling",this),oo(o,"$document",n,...t),n.return}catch(e){u.rethrowUnexpectedError(e,this)}},_addEventListener(e,t,n){const i=Wn(n.context||"$document"),o=so(this);for(const r of i){let i=o.get(r);i||(i=Object.create(b),o.set(r,i)),this.listenTo(i,e,t,n)}},_removeEventListener(e,t){const n=so(this);for(const i of n.values())this.stopListening(i,e,t)}},no=to;function io(e,t,n){e instanceof Qi&&(e._eventPhase=t,e._currentTarget=n)}function oo(e,t,n,...i){const o="string"==typeof t?e.get(t):ro(e,t);return!!o&&(o.fire(n,...i),n.stop.called)}function ro(e,t){for(const[n,i]of e)if("function"==typeof n&&n(t))return i;return null}function so(e){return e[eo]||(e[eo]=new Map),e[eo]}class ao{constructor(e){this.selection=new Xi,this.roots=new Un({idProperty:"rootName"}),this.stylesProcessor=e,this.set("isReadOnly",!1),this.set("isFocused",!1),this.set("isSelecting",!1),this.set("isComposing",!1),this._postFixers=new Set}getRoot(e="main"){return this.roots.get(e)}registerPostFixer(e){this._postFixers.add(e)}destroy(){this.roots.map(e=>e.destroy()),this.stopListening()}_callPostFixers(e){let t=!1;do{for(const n of this._postFixers)if(t=n(e),t)break}while(t)}}rt(ao,no),rt(ao,Qe);class co extends Ni{constructor(e,t,n,i){super(e,t,n,i),this.getFillerOffset=lo,this._priority=10,this._id=null,this._clonesGroup=null}get priority(){return this._priority}get id(){return this._id}getElementsWithSameId(){if(null===this.id)throw new u("attribute-element-get-elements-with-same-id-no-id",this);return new Set(this._clonesGroup)}is(e,t=null){return t?t===this.name&&("attributeElement"===e||"view:attributeElement"===e||"element"===e||"view:element"===e):"attributeElement"===e||"view:attributeElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e}isSimilar(e){return null!==this.id||null!==e.id?this.id===e.id:super.isSimilar(e)&&this.priority==e.priority}_clone(e){const t=super._clone(e);return t._priority=this._priority,t._id=this._id,t}}function lo(){if(uo(this))return null;let e=this.parent;for(;e&&e.is("attributeElement");){if(uo(e)>1)return null;e=e.parent}return!e||uo(e)>1?null:this.childCount}function uo(e){return Array.from(e.getChildren()).filter(e=>!e.is("uiElement")).length}co.DEFAULT_PRIORITY=10;class ho extends Ni{constructor(e,t,n,i){super(e,t,n,i),this.getFillerOffset=mo}is(e,t=null){return t?t===this.name&&("emptyElement"===e||"view:emptyElement"===e||"element"===e||"view:element"===e):"emptyElement"===e||"view:emptyElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e}_insertChild(e,t){if(t&&(t instanceof Qn||Array.from(t).length>0))throw new u("view-emptyelement-cannot-add",[this,t])}}function mo(){return null}const go=navigator.userAgent.toLowerCase(),po={isMac:_o(go),isWindows:function(e){return e.indexOf("windows")>-1}(go),isGecko:function(e){return!!e.match(/gecko\/\d+/)}(go),isSafari:function(e){return e.indexOf(" applewebkit/")>-1&&-1===e.indexOf("chrome")}(go),isiOS:function(e){return!!e.match(/iphone|ipad/i)||_o(e)&&navigator.maxTouchPoints>0}(go),isAndroid:function(e){return e.indexOf("android")>-1}(go),isBlink:function(e){return e.indexOf("chrome/")>-1&&e.indexOf("edge/")<0}(go),features:{isRegExpUnicodePropertySupported:function(){let e=!1;try{e=0==="ć".search(new RegExp("[\\p{L}]","u"))}catch(e){}return e}()}},fo=po;function _o(e){return e.indexOf("macintosh")>-1}const bo={ctrl:"⌃",cmd:"⌘",alt:"⌥",shift:"⇧"},ko={ctrl:"Ctrl+",alt:"Alt+",shift:"Shift+"},vo=function(){const e={arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,backspace:8,delete:46,enter:13,space:32,esc:27,tab:9,ctrl:1114112,shift:2228224,alt:4456448,cmd:8912896};for(let t=65;t<=90;t++)e[String.fromCharCode(t).toLowerCase()]=t;for(let t=48;t<=57;t++)e[t-48]=t;for(let t=112;t<=123;t++)e["f"+(t-111)]=t;for(const t of"`-=[];',./\\")e[t]=t.charCodeAt(0);return e}(),Ao=Object.fromEntries(Object.entries(vo).map(([e,t])=>[t,e.charAt(0).toUpperCase()+e.slice(1)]));function yo(e){let t;if("string"==typeof e){if(t=vo[e.toLowerCase()],!t)throw new u("keyboard-unknown-key",null,{key:e})}else t=e.keyCode+(e.altKey?vo.alt:0)+(e.ctrlKey?vo.ctrl:0)+(e.shiftKey?vo.shift:0)+(e.metaKey?vo.cmd:0);return t}function wo(e){return"string"==typeof e&&(e=function(e){return e.split("+").map(e=>e.trim())}(e)),e.map(e=>"string"==typeof e?function(e){if(e.endsWith("!"))return yo(e.slice(0,-1));const t=yo(e);return fo.isMac&&t==vo.ctrl?vo.cmd:t}(e):e).reduce((e,t)=>t+e,0)}function Co(e){let t=wo(e);const n=Object.entries(fo.isMac?bo:ko).reduce((e,[n,i])=>(0!=(t&vo[n])&&(t&=~vo[n],e+=i),e),"");return n+(t?Ao[t]:"")}function Io(e,t){const n="ltr"===t;switch(e){case vo.arrowleft:return n?"left":"right";case vo.arrowright:return n?"right":"left";case vo.arrowup:return"up";case vo.arrowdown:return"down"}}class xo extends Ni{constructor(e,t,n,i){super(e,t,n,i),this.getFillerOffset=So}is(e,t=null){return t?t===this.name&&("uiElement"===e||"view:uiElement"===e||"element"===e||"view:element"===e):"uiElement"===e||"view:uiElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e}_insertChild(e,t){if(t&&(t instanceof Qn||Array.from(t).length>0))throw new u("view-uielement-cannot-add",this)}render(e){return this.toDomElement(e)}toDomElement(e){const t=e.createElement(this.name);for(const e of this.getAttributeKeys())t.setAttribute(e,this.getAttribute(e));return t}}function So(){return null}class Eo extends Ni{constructor(e,t,n,i){super(e,t,n,i),this.getFillerOffset=jo}is(e,t=null){return t?t===this.name&&("rawElement"===e||"view:rawElement"===e||"element"===e||"view:element"===e):"rawElement"===e||"view:rawElement"===e||e===this.name||e==="view:"+this.name||"element"===e||"view:element"===e||"node"===e||"view:node"===e}_insertChild(e,t){if(t&&(t instanceof Qn||Array.from(t).length>0))throw new u("view-rawelement-cannot-add",[this,t])}}function jo(){return null}class To{constructor(e,t){this.document=e,this._children=[],t&&this._insertChild(0,t)}[Symbol.iterator](){return this._children[Symbol.iterator]()}get childCount(){return this._children.length}get isEmpty(){return 0===this.childCount}get root(){return this}get parent(){return null}is(e){return"documentFragment"===e||"view:documentFragment"===e}_appendChild(e){return this._insertChild(this.childCount,e)}getChild(e){return this._children[e]}getChildIndex(e){return this._children.indexOf(e)}getChildren(){return this._children[Symbol.iterator]()}_insertChild(e,t){this._fireChange("children",this);let n=0;const i=function(e,t){return"string"==typeof t?[new ei(e,t)]:(Vn(t)||(t=[t]),Array.from(t).map(t=>"string"==typeof t?new ei(e,t):t instanceof ti?new ei(e,t.data):t))}(this.document,t);for(const t of i)null!==t.parent&&t._remove(),t.parent=this,this._children.splice(e,0,t),e++,n++;return n}_removeChildren(e,t=1){this._fireChange("children",this);for(let n=e;n{}),i.renderUnsafeAttributes&&o._unsafeAttributesToRender.push(...i.renderUnsafeAttributes),o}setAttribute(e,t,n){n._setAttribute(e,t)}removeAttribute(e,t){t._removeAttribute(e)}addClass(e,t){t._addClass(e)}removeClass(e,t){t._removeClass(e)}setStyle(e,t,n){_t(e)&&void 0===n&&(n=t),n._setStyle(e,t)}removeStyle(e,t){t._removeStyle(e)}setCustomProperty(e,t,n){n._setCustomProperty(e,t)}removeCustomProperty(e,t){return t._removeCustomProperty(e)}breakAttributes(e){return e instanceof Hi?this._breakAttributes(e):this._breakAttributesRange(e)}breakContainer(e){const t=e.parent;if(!t.is("containerElement"))throw new u("view-writer-break-non-container-element",this.document);if(!t.parent)throw new u("view-writer-break-root",this.document);if(e.isAtStart)return Hi._createBefore(t);if(!e.isAtEnd){const n=t._clone(!1);this.insert(Hi._createAfter(t),n);const i=new Ki(e,Hi._createAt(t,"end")),o=new Hi(n,0);this.move(i,o)}return Hi._createAfter(t)}mergeAttributes(e){const t=e.offset,n=e.parent;if(n.is("$text"))return e;if(n.is("attributeElement")&&0===n.childCount){const e=n.parent,t=n.index;return n._remove(),this._removeFromClonedElementsGroup(n),this.mergeAttributes(new Hi(e,t))}const i=n.getChild(t-1),o=n.getChild(t);if(!i||!o)return e;if(i.is("$text")&&o.is("$text"))return zo(i,o);if(i.is("attributeElement")&&o.is("attributeElement")&&i.isSimilar(o)){const e=i.childCount;return i._appendChild(o.getChildren()),o._remove(),this._removeFromClonedElementsGroup(o),this.mergeAttributes(new Hi(i,e))}return e}mergeContainers(e){const t=e.nodeBefore,n=e.nodeAfter;if(!(t&&n&&t.is("containerElement")&&n.is("containerElement")))throw new u("view-writer-merge-containers-invalid-position",this.document);const i=t.getChild(t.childCount-1),o=i instanceof ei?Hi._createAt(i,"end"):Hi._createAt(t,"end");return this.move(Ki._createIn(n),Hi._createAt(t,"end")),this.remove(Ki._createOn(n)),o}insert(e,t){Mo(t=Vn(t)?[...t]:[t],this.document);const n=t.reduce((e,t)=>{const n=e[e.length-1],i=!t.is("uiElement");return n&&n.breakAttributes==i?n.nodes.push(t):e.push({breakAttributes:i,nodes:[t]}),e},[]);let i=null,o=e;for(const{nodes:e,breakAttributes:t}of n){const n=this._insertNodes(o,e,t);i||(i=n.start),o=n.end}return i?new Ki(i,o):new Ki(e)}remove(e){const t=e instanceof Ki?e:Ki._createOn(e);if(Bo(t,this.document),t.isCollapsed)return new To(this.document);const{start:n,end:i}=this._breakAttributesRange(t,!0),o=n.parent,r=i.offset-n.offset,s=o._removeChildren(n.offset,r);for(const e of s)this._removeFromClonedElementsGroup(e);const a=this.mergeAttributes(n);return t.start=a,t.end=a.clone(),new To(this.document,s)}clear(e,t){Bo(e,this.document);const n=e.getWalker({direction:"backward",ignoreElementEnd:!0});for(const i of n){const n=i.item;let o;if(n.is("element")&&t.isSimilar(n))o=Ki._createOn(n);else if(!i.nextPosition.isAfter(e.start)&&n.is("$textProxy")){const e=n.getAncestors().find(e=>e.is("element")&&t.isSimilar(e));e&&(o=Ki._createIn(e))}o&&(o.end.isAfter(e.end)&&(o.end=e.end),o.start.isBefore(e.start)&&(o.start=e.start),this.remove(o))}}move(e,t){let n;if(t.isAfter(e.end)){const i=(t=this._breakAttributes(t,!0)).parent,o=i.childCount;e=this._breakAttributesRange(e,!0),n=this.remove(e),t.offset+=i.childCount-o}else n=this.remove(e);return this.insert(t,n)}wrap(e,t){if(!(t instanceof co))throw new u("view-writer-wrap-invalid-attribute",this.document);if(Bo(e,this.document),e.isCollapsed){let n=e.start;n.parent.is("element")&&!function(e){return Array.from(e.getChildren()).some(e=>!e.is("uiElement"))}(n.parent)&&(n=n.getLastMatchingPosition(e=>e.item.is("uiElement"))),n=this._wrapPosition(n,t);const i=this.document.selection;return i.isCollapsed&&i.getFirstPosition().isEqual(e.start)&&this.setSelection(n),new Ki(n)}return this._wrapRange(e,t)}unwrap(e,t){if(!(t instanceof co))throw new u("view-writer-unwrap-invalid-attribute",this.document);if(Bo(e,this.document),e.isCollapsed)return e;const{start:n,end:i}=this._breakAttributesRange(e,!0),o=n.parent,r=this._unwrapChildren(o,n.offset,i.offset,t),s=this.mergeAttributes(r.start);s.isEqual(r.start)||r.end.offset--;const a=this.mergeAttributes(r.end);return new Ki(s,a)}rename(e,t){const n=new Li(this.document,e,t.getAttributes());return this.insert(Hi._createAfter(t),n),this.move(Ki._createIn(t),Hi._createAt(n,0)),this.remove(Ki._createOn(t)),n}clearClonedElementsGroup(e){this._cloneGroups.delete(e)}createPositionAt(e,t){return Hi._createAt(e,t)}createPositionAfter(e){return Hi._createAfter(e)}createPositionBefore(e){return Hi._createBefore(e)}createRange(e,t){return new Ki(e,t)}createRangeOn(e){return Ki._createOn(e)}createRangeIn(e){return Ki._createIn(e)}createSelection(e,t,n){return new Ji(e,t,n)}createSlot(e){if(!this._slotFactory)throw new u("view-writer-invalid-create-slot-context",this.document);return this._slotFactory(this,e)}_registerSlotFactory(e){this._slotFactory=e}_clearSlotFactory(){this._slotFactory=null}_insertNodes(e,t,n){let i,o;if(i=n?Po(e):e.parent.is("$text")?e.parent.parent:e.parent,!i)throw new u("view-writer-invalid-position-container",this.document);o=n?this._breakAttributes(e,!0):e.parent.is("$text")?Fo(e):e;const r=i._insertChild(o.offset,t);for(const e of t)this._addToClonedElementsGroup(e);const s=o.getShiftedBy(r),a=this.mergeAttributes(o);a.isEqual(o)||s.offset--;const c=this.mergeAttributes(s);return new Ki(a,c)}_wrapChildren(e,t,n,i){let o=t;const r=[];for(;o!1,e.parent._insertChild(e.offset,n);const i=new Ki(e,e.getShiftedBy(1));this.wrap(i,t);const o=new Hi(n.parent,n.index);n._remove();const r=o.nodeBefore,s=o.nodeAfter;return r instanceof ei&&s instanceof ei?zo(r,s):Oo(o)}_wrapAttributeElement(e,t){if(!Lo(e,t))return!1;if(e.name!==t.name||e.priority!==t.priority)return!1;for(const n of e.getAttributeKeys())if("class"!==n&&"style"!==n&&t.hasAttribute(n)&&t.getAttribute(n)!==e.getAttribute(n))return!1;for(const n of e.getStyleNames())if(t.hasStyle(n)&&t.getStyle(n)!==e.getStyle(n))return!1;for(const n of e.getAttributeKeys())"class"!==n&&"style"!==n&&(t.hasAttribute(n)||this.setAttribute(n,e.getAttribute(n),t));for(const n of e.getStyleNames())t.hasStyle(n)||this.setStyle(n,e.getStyle(n),t);for(const n of e.getClassNames())t.hasClass(n)||this.addClass(n,t);return!0}_unwrapAttributeElement(e,t){if(!Lo(e,t))return!1;if(e.name!==t.name||e.priority!==t.priority)return!1;for(const n of e.getAttributeKeys())if("class"!==n&&"style"!==n&&(!t.hasAttribute(n)||t.getAttribute(n)!==e.getAttribute(n)))return!1;if(!t.hasClass(...e.getClassNames()))return!1;for(const n of e.getStyleNames())if(!t.hasStyle(n)||t.getStyle(n)!==e.getStyle(n))return!1;for(const n of e.getAttributeKeys())"class"!==n&&"style"!==n&&this.removeAttribute(n,t);return this.removeClass(Array.from(e.getClassNames()),t),this.removeStyle(Array.from(e.getStyleNames()),t),!0}_breakAttributesRange(e,t=!1){const n=e.start,i=e.end;if(Bo(e,this.document),e.isCollapsed){const n=this._breakAttributes(e.start,t);return new Ki(n,n)}const o=this._breakAttributes(i,t),r=o.parent.childCount,s=this._breakAttributes(n,t);return o.offset+=o.parent.childCount-r,new Ki(s,o)}_breakAttributes(e,t=!1){const n=e.offset,i=e.parent;if(e.parent.is("emptyElement"))throw new u("view-writer-cannot-break-empty-element",this.document);if(e.parent.is("uiElement"))throw new u("view-writer-cannot-break-ui-element",this.document);if(e.parent.is("rawElement"))throw new u("view-writer-cannot-break-raw-element",this.document);if(!t&&i.is("$text")&&No(i.parent))return e.clone();if(No(i))return e.clone();if(i.is("$text"))return this._breakAttributes(Fo(e),t);if(n==i.childCount){const e=new Hi(i.parent,i.index+1);return this._breakAttributes(e,t)}if(0===n){const e=new Hi(i.parent,i.index);return this._breakAttributes(e,t)}{const e=i.index+1,o=i._clone();i.parent._insertChild(e,o),this._addToClonedElementsGroup(o);const r=i.childCount-n,s=i._removeChildren(n,r);o._appendChild(s);const a=new Hi(i.parent,e);return this._breakAttributes(a,t)}}_addToClonedElementsGroup(e){if(!e.root.is("rootElement"))return;if(e.is("element"))for(const t of e.getChildren())this._addToClonedElementsGroup(t);const t=e.id;if(!t)return;let n=this._cloneGroups.get(t);n||(n=new Set,this._cloneGroups.set(t,n)),n.add(e),e._clonesGroup=n}_removeFromClonedElementsGroup(e){if(e.is("element"))for(const t of e.getChildren())this._removeFromClonedElementsGroup(t);const t=e.id;if(!t)return;const n=this._cloneGroups.get(t);n&&n.delete(e)}}function Po(e){let t=e.parent;for(;!No(t);){if(!t)return;t=t.parent}return t}function Ro(e,t){return e.priorityt.priority)&&e.getIdentity()n instanceof e))throw new u("view-writer-insert-invalid-node-type",t);n.is("$text")||Mo(n.getChildren(),t)}}const $o=[ei,co,Li,ho,Eo,xo];function No(e){return e&&(e.is("containerElement")||e.is("documentFragment"))}function Bo(e,t){const n=Po(e.start),i=Po(e.end);if(!n||!i||n!==i)throw new u("view-writer-invalid-range-container",t)}function Lo(e,t){return null===e.id&&null===t.id}function Vo(e){return"[object Text]"==Object.prototype.toString.call(e)}const Uo=e=>e.createTextNode(" "),Go=e=>{const t=e.createElement("span");return t.dataset.ckeFiller=!0,t.innerHTML=" ",t},Wo=e=>{const t=e.createElement("br");return t.dataset.ckeFiller=!0,t},qo="⁠".repeat(7);function Ho(e){return Vo(e)&&e.data.substr(0,7)===qo}function Ko(e){return 7==e.data.length&&Ho(e)}function Yo(e){return Ho(e)?e.data.slice(7):e.data}function Zo(e,t){if(t.keyCode==vo.arrowleft){const e=t.domTarget.ownerDocument.defaultView.getSelection();if(1==e.rangeCount&&e.getRangeAt(0).collapsed){const t=e.getRangeAt(0).startContainer,n=e.getRangeAt(0).startOffset;Ho(t)&&n<=7&&e.collapse(t,0)}}}function Jo(e,t,n,i=!1){n=n||function(e,t){return e===t},Array.isArray(e)||(e=Array.prototype.slice.call(e)),Array.isArray(t)||(t=Array.prototype.slice.call(t));const o=function(e,t,n){const i=Xo(e,t,n);if(-1===i)return{firstIndex:-1,lastIndexOld:-1,lastIndexNew:-1};const o=Xo(Qo(e,i),Qo(t,i),n);return{firstIndex:i,lastIndexOld:e.length-o,lastIndexNew:t.length-o}}(e,t,n);return i?function(e,t){const{firstIndex:n,lastIndexOld:i,lastIndexNew:o}=e;if(-1===n)return Array(t).fill("equal");let r=[];return n>0&&(r=r.concat(Array(n).fill("equal"))),o-n>0&&(r=r.concat(Array(o-n).fill("insert"))),i-n>0&&(r=r.concat(Array(i-n).fill("delete"))),o0&&n.push({index:i,type:"insert",values:e.slice(i,r)}),o-i>0&&n.push({index:i+(r-i),type:"delete",howMany:o-i}),n}(t,o)}function Xo(e,t,n){for(let i=0;i200||o>200||i+o>300)return er.fastDiff(e,t,n,!0);let r,s;if(ol?-1:1;d[i+h]&&(d[i]=d[i+h].slice(0)),d[i]||(d[i]=[]),d[i].push(o>l?r:s);let m=Math.max(o,l),g=m-i;for(;gl;m--)u[m]=h(m);u[l]=h(l),g++}while(u[l]!==c);return d[l].slice(1)}function tr(e,t,n){e.insertBefore(n,e.childNodes[t]||null)}function nr(e){const t=e.parentNode;t&&t.removeChild(e)}function ir(e){return e&&e.nodeType===Node.COMMENT_NODE}function or(e){if(e){if(e.defaultView)return e instanceof e.defaultView.Document;if(e.ownerDocument&&e.ownerDocument.defaultView)return e instanceof e.ownerDocument.defaultView.Node}return!1}er.fastDiff=Jo;var rr=r(379),sr=r.n(rr),ar=r(401);sr()(ar.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),ar.Z.locals;class cr{constructor(e,t){this.domDocuments=new Set,this.domConverter=e,this.markedAttributes=new Set,this.markedChildren=new Set,this.markedTexts=new Set,this.selection=t,this.set("isFocused",!1),this.set("isSelecting",!1),fo.isBlink&&!fo.isAndroid&&this.on("change:isSelecting",()=>{this.isSelecting||this.render()}),this._inlineFiller=null,this._fakeSelectionContainer=null}markToSync(e,t){if("text"===e)this.domConverter.mapViewToDom(t.parent)&&this.markedTexts.add(t);else{if(!this.domConverter.mapViewToDom(t))return;if("attributes"===e)this.markedAttributes.add(t);else{if("children"!==e)throw new u("view-renderer-unknown-type",this);this.markedChildren.add(t)}}}render(){let e;const t=!(fo.isBlink&&!fo.isAndroid&&this.isSelecting);for(const e of this.markedChildren)this._updateChildrenMappings(e);t?(this._inlineFiller&&!this._isSelectionInInlineFiller()&&this._removeInlineFiller(),this._inlineFiller?e=this._getInlineFillerPosition():this._needsInlineFillerAtSelection()&&(e=this.selection.getFirstPosition(),this.markedChildren.add(e.parent))):this._inlineFiller&&this._inlineFiller.parentNode&&(e=this.domConverter.domPositionToView(this._inlineFiller));for(const e of this.markedAttributes)this._updateAttrs(e);for(const t of this.markedChildren)this._updateChildren(t,{inlineFillerPosition:e});for(const t of this.markedTexts)!this.markedChildren.has(t.parent)&&this.domConverter.mapViewToDom(t.parent)&&this._updateText(t,{inlineFillerPosition:e});if(t)if(e){const t=this.domConverter.viewPositionToDom(e),n=t.parent.ownerDocument;Ho(t.parent)?this._inlineFiller=t.parent:this._inlineFiller=lr(n,t.parent,t.offset)}else this._inlineFiller=null;this._updateFocus(),this._updateSelection(),this.markedTexts.clear(),this.markedAttributes.clear(),this.markedChildren.clear()}_updateChildrenMappings(e){const t=this.domConverter.mapViewToDom(e);if(!t)return;const n=Array.from(this.domConverter.mapViewToDom(e).childNodes),i=Array.from(this.domConverter.viewChildrenToDom(e,t.ownerDocument,{withChildren:!1})),o=this._diffNodeLists(n,i),r=this._findReplaceActions(o,n,i);if(-1!==r.indexOf("replace")){const t={equal:0,insert:0,delete:0};for(const o of r)if("replace"===o){const o=t.equal+t.insert,r=t.equal+t.delete,s=e.getChild(o);!s||s.is("uiElement")||s.is("rawElement")||this._updateElementMappings(s,n[r]),nr(i[o]),t.equal++}else t[o]++}}_updateElementMappings(e,t){this.domConverter.unbindDomElement(t),this.domConverter.bindElements(t,e),this.markedChildren.add(e),this.markedAttributes.add(e)}_getInlineFillerPosition(){const e=this.selection.getFirstPosition();return e.parent.is("$text")?Hi._createBefore(this.selection.getFirstPosition().parent):e}_isSelectionInInlineFiller(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const e=this.selection.getFirstPosition(),t=this.domConverter.viewPositionToDom(e);return!!(t&&Vo(t.parent)&&Ho(t.parent))}_removeInlineFiller(){const e=this._inlineFiller;if(!Ho(e))throw new u("view-renderer-filler-was-lost",this);Ko(e)?e.remove():e.data=e.data.substr(7),this._inlineFiller=null}_needsInlineFillerAtSelection(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const e=this.selection.getFirstPosition(),t=e.parent,n=e.offset;if(!this.domConverter.mapViewToDom(t.root))return!1;if(!t.is("element"))return!1;if(!function(e){if("false"==e.getAttribute("contenteditable"))return!1;const t=e.findAncestor(e=>e.hasAttribute("contenteditable"));return!t||"true"==t.getAttribute("contenteditable")}(t))return!1;if(n===t.getFillerOffset())return!1;const i=e.nodeBefore,o=e.nodeAfter;return!(i instanceof ei||o instanceof ei)}_updateText(e,t){const n=this.domConverter.findCorrespondingDomText(e),i=this.domConverter.viewToDom(e,n.ownerDocument),o=n.data;let r=i.data;const s=t.inlineFillerPosition;if(s&&s.parent==e.parent&&s.offset==e.index&&(r=qo+r),o!=r){const e=Jo(o,r);for(const t of e)"insert"===t.type?n.insertData(t.index,t.values.join("")):n.deleteData(t.index,t.howMany)}}_updateAttrs(e){const t=this.domConverter.mapViewToDom(e);if(!t)return;const n=Array.from(t.attributes).map(e=>e.name),i=e.getAttributeKeys();for(const n of i)this.domConverter.setDomElementAttribute(t,n,e.getAttribute(n),e);for(const i of n)e.hasAttribute(i)||this.domConverter.removeDomElementAttribute(t,i)}_updateChildren(e,t){const n=this.domConverter.mapViewToDom(e);if(!n)return;const i=t.inlineFillerPosition,o=this.domConverter.mapViewToDom(e).childNodes,r=Array.from(this.domConverter.viewChildrenToDom(e,n.ownerDocument,{bind:!0}));i&&i.parent===e&&lr(n.ownerDocument,r,i.offset);const s=this._diffNodeLists(o,r);let a=0;const c=new Set;for(const e of s)"delete"===e?(c.add(o[a]),nr(o[a])):"equal"===e&&a++;a=0;for(const e of s)"insert"===e?(tr(n,a,r[a]),a++):"equal"===e&&(this._markDescendantTextToSync(this.domConverter.domToView(r[a])),a++);for(const e of c)e.parentNode||this.domConverter.unbindDomElement(e)}_diffNodeLists(e,t){return e=function(e,t){const n=Array.from(e);if(0==n.length||!t)return n;return n[n.length-1]==t&&n.pop(),n}(e,this._fakeSelectionContainer),er(e,t,ur.bind(null,this.domConverter))}_findReplaceActions(e,t,n){if(-1===e.indexOf("insert")||-1===e.indexOf("delete"))return e;let i=[],o=[],r=[];const s={equal:0,insert:0,delete:0};for(const a of e)"insert"===a?r.push(n[s.equal+s.insert]):"delete"===a?o.push(t[s.equal+s.delete]):(i=i.concat(er(o,r,dr).map(e=>"equal"===e?"replace":e)),i.push("equal"),o=[],r=[]),s[a]++;return i.concat(er(o,r,dr).map(e=>"equal"===e?"replace":e))}_markDescendantTextToSync(e){if(e)if(e.is("$text"))this.markedTexts.add(e);else if(e.is("element"))for(const t of e.getChildren())this._markDescendantTextToSync(t)}_updateSelection(){if(fo.isBlink&&!fo.isAndroid&&this.isSelecting&&!this.markedChildren.size)return;if(0===this.selection.rangeCount)return this._removeDomSelection(),void this._removeFakeSelection();const e=this.domConverter.mapViewToDom(this.selection.editableElement);this.isFocused&&e&&(this.selection.isFake?this._updateFakeSelection(e):(this._removeFakeSelection(),this._updateDomSelection(e)))}_updateFakeSelection(e){const t=e.ownerDocument;this._fakeSelectionContainer||(this._fakeSelectionContainer=function(e){const t=e.createElement("div");return t.className="ck-fake-selection-container",Object.assign(t.style,{position:"fixed",top:0,left:"-9999px",width:"42px"}),t.textContent=" ",t}(t));const n=this._fakeSelectionContainer;if(this.domConverter.bindFakeSelection(n,this.selection),!this._fakeSelectionNeedsUpdate(e))return;n.parentElement&&n.parentElement==e||e.appendChild(n),n.textContent=this.selection.fakeSelectionLabel||" ";const i=t.getSelection(),o=t.createRange();i.removeAllRanges(),o.selectNodeContents(n),i.addRange(o)}_updateDomSelection(e){const t=e.ownerDocument.defaultView.getSelection();if(!this._domSelectionNeedsUpdate(t))return;const n=this.domConverter.viewPositionToDom(this.selection.anchor),i=this.domConverter.viewPositionToDom(this.selection.focus);t.collapse(n.parent,n.offset),t.extend(i.parent,i.offset),fo.isGecko&&function(e,t){const n=e.parent;if(n.nodeType!=Node.ELEMENT_NODE||e.offset!=n.childNodes.length-1)return;const i=n.childNodes[e.offset];i&&"BR"==i.tagName&&t.addRange(t.getRangeAt(0))}(i,t)}_domSelectionNeedsUpdate(e){if(!this.domConverter.isDomSelectionCorrect(e))return!0;const t=e&&this.domConverter.domSelectionToView(e);return!(t&&this.selection.isEqual(t)||!this.selection.isCollapsed&&this.selection.isSimilar(t))}_fakeSelectionNeedsUpdate(e){const t=this._fakeSelectionContainer,n=e.ownerDocument.getSelection();return!t||t.parentElement!==e||n.anchorNode!==t&&!t.contains(n.anchorNode)||t.textContent!==this.selection.fakeSelectionLabel}_removeDomSelection(){for(const e of this.domDocuments)if(e.getSelection().rangeCount){const t=e.activeElement,n=this.domConverter.mapDomToView(t);t&&n&&e.getSelection().removeAllRanges()}}_removeFakeSelection(){const e=this._fakeSelectionContainer;e&&e.remove()}_updateFocus(){if(this.isFocused){const e=this.selection.editableElement;e&&this.domConverter.focus(e)}}}function lr(e,t,n){const i=t instanceof Array?t:t.childNodes,o=i[n];if(Vo(o))return o.data=qo+o.data,o;{const o=e.createTextNode(qo);return Array.isArray(t)?i.splice(n,0,o):tr(t,n,o),o}}function dr(e,t){return or(e)&&or(t)&&!Vo(e)&&!Vo(t)&&!ir(e)&&!ir(t)&&e.tagName.toLowerCase()===t.tagName.toLowerCase()}function ur(e,t,n){return t===n||(Vo(t)&&Vo(n)?t.data===n.data:!(!e.isBlockFiller(t)||!e.isBlockFiller(n)))}rt(cr,Qe);const hr={window,document};function mr(e){let t=0;for(;e.previousSibling;)e=e.previousSibling,t++;return t}function gr(e){const t=[];for(;e&&e.nodeType!=Node.DOCUMENT_NODE;)t.unshift(e),e=e.parentNode;return t}const pr=Wo(document),fr=Uo(document),_r=Go(document),br="data-ck-unsafe-attribute-",kr="data-ck-unsafe-element",vr=["script","style"];class Ar{constructor(e,t={}){this.document=e,this.renderingMode=t.renderingMode||"editing",this.blockFillerMode=t.blockFillerMode||("editing"===this.renderingMode?"br":"nbsp"),this.preElements=["pre"],this.blockElements=["address","article","aside","blockquote","caption","center","dd","details","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","legend","li","main","menu","nav","ol","p","pre","section","summary","table","tbody","td","tfoot","th","thead","tr","ul"],this.inlineObjectElements=["object","iframe","input","button","textarea","select","option","video","embed","audio","img","canvas"],this._domToViewMapping=new WeakMap,this._viewToDomMapping=new WeakMap,this._fakeSelectionMapping=new WeakMap,this._rawContentElementMatcher=new ii,this._encounteredRawContentDomNodes=new WeakSet}bindFakeSelection(e,t){this._fakeSelectionMapping.set(e,new Ji(t))}fakeSelectionToView(e){return this._fakeSelectionMapping.get(e)}bindElements(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}unbindDomElement(e){const t=this._domToViewMapping.get(e);if(t){this._domToViewMapping.delete(e),this._viewToDomMapping.delete(t);for(const t of e.childNodes)this.unbindDomElement(t)}}bindDocumentFragments(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}shouldRenderAttribute(e,t,n){return"data"===this.renderingMode||!(e=e.toLowerCase()).startsWith("on")&&("srcdoc"!==e||!t.match(/\bon\S+\s*=|javascript:|<\s*\/*script/i))&&("img"===n&&("src"===e||"srcset"===e)||"source"===n&&"srcset"===e||!t.match(/^\s*(javascript:|data:(image\/svg|text\/x?html))/i))}setContentOf(e,t){if("data"===this.renderingMode)return void(e.innerHTML=t);const n=(new DOMParser).parseFromString(t,"text/html"),i=n.createDocumentFragment(),o=n.body.childNodes;for(;o.length>0;)i.appendChild(o[0]);const r=n.createTreeWalker(i,NodeFilter.SHOW_ELEMENT),s=[];let a;for(;a=r.nextNode();)s.push(a);for(const e of s){for(const t of e.getAttributeNames())this.setDomElementAttribute(e,t,e.getAttribute(t));const t=e.tagName.toLowerCase();this._shouldRenameElement(t)&&(Cr(t),e.replaceWith(this._createReplacementDomElement(t,e)))}for(;e.firstChild;)e.firstChild.remove();e.append(i)}viewToDom(e,t,n={}){if(e.is("$text")){const n=this._processDataFromViewText(e);return t.createTextNode(n)}{if(this.mapViewToDom(e))return this.mapViewToDom(e);let i;if(e.is("documentFragment"))i=t.createDocumentFragment(),n.bind&&this.bindDocumentFragments(i,e);else{if(e.is("uiElement"))return i="$comment"===e.name?t.createComment(e.getCustomProperty("$rawContent")):e.render(t,this),n.bind&&this.bindElements(i,e),i;this._shouldRenameElement(e.name)?(Cr(e.name),i=this._createReplacementDomElement(e.name)):i=e.hasAttribute("xmlns")?t.createElementNS(e.getAttribute("xmlns"),e.name):t.createElement(e.name),e.is("rawElement")&&e.render(i,this),n.bind&&this.bindElements(i,e);for(const t of e.getAttributeKeys())this.setDomElementAttribute(i,t,e.getAttribute(t),e)}if(!1!==n.withChildren)for(const o of this.viewChildrenToDom(e,t,n))i.appendChild(o);return i}}setDomElementAttribute(e,t,n,i=null){const o=this.shouldRenderAttribute(t,n,e.tagName.toLowerCase())||i&&i.shouldRenderUnsafeAttribute(t);o||h("domconverter-unsafe-attribute-detected",{domElement:e,key:t,value:n}),e.hasAttribute(t)&&!o?e.removeAttribute(t):e.hasAttribute(br+t)&&o&&e.removeAttribute(br+t),e.setAttribute(o?t:br+t,n)}removeDomElementAttribute(e,t){t!=kr&&(e.removeAttribute(t),e.removeAttribute(br+t))}*viewChildrenToDom(e,t,n={}){const i=e.getFillerOffset&&e.getFillerOffset();let o=0;for(const r of e.getChildren()){i===o&&(yield this._getBlockFiller(t));const e=r.is("element")&&r.getCustomProperty("dataPipeline:transparentRendering");e&&"data"==this.renderingMode?yield*this.viewChildrenToDom(r,t,n):(e&&h("domconverter-transparent-rendering-unsupported-in-editing-pipeline",{viewElement:r}),yield this.viewToDom(r,t,n)),o++}i===o&&(yield this._getBlockFiller(t))}viewRangeToDom(e){const t=this.viewPositionToDom(e.start),n=this.viewPositionToDom(e.end),i=document.createRange();return i.setStart(t.parent,t.offset),i.setEnd(n.parent,n.offset),i}viewPositionToDom(e){const t=e.parent;if(t.is("$text")){const n=this.findCorrespondingDomText(t);if(!n)return null;let i=e.offset;return Ho(n)&&(i+=7),{parent:n,offset:i}}{let n,i,o;if(0===e.offset){if(n=this.mapViewToDom(t),!n)return null;o=n.childNodes[0]}else{const t=e.nodeBefore;if(i=t.is("$text")?this.findCorrespondingDomText(t):this.mapViewToDom(e.nodeBefore),!i)return null;n=i.parentNode,o=i.nextSibling}return Vo(o)&&Ho(o)?{parent:o,offset:7}:{parent:n,offset:i?mr(i)+1:0}}}domToView(e,t={}){if(this.isBlockFiller(e))return null;const n=this.getHostViewElement(e);if(n)return n;if(ir(e)&&t.skipComments)return null;if(Vo(e)){if(Ko(e))return null;{const t=this._processDataFromDomText(e);return""===t?null:new ei(this.document,t)}}{if(this.mapDomToView(e))return this.mapDomToView(e);let n;if(this.isDocumentFragment(e))n=new To(this.document),t.bind&&this.bindDocumentFragments(e,n);else{n=this._createViewElement(e,t),t.bind&&this.bindElements(e,n);const i=e.attributes;if(i)for(let e=i.length-1;e>=0;e--)n._setAttribute(i[e].name,i[e].value);if(this._isViewElementWithRawContent(n,t)||ir(e)){const t=ir(e)?e.data:e.innerHTML;return n._setCustomProperty("$rawContent",t),this._encounteredRawContentDomNodes.add(e),n}}if(!1!==t.withChildren)for(const i of this.domChildrenToView(e,t))n._appendChild(i);return n}}*domChildrenToView(e,t={}){for(let n=0;n{const{scrollLeft:t,scrollTop:n}=e;i.push([t,n])}),t.focus(),yr(t,e=>{const[t,n]=i.shift();e.scrollLeft=t,e.scrollTop=n}),hr.window.scrollTo(e,n)}}isElement(e){return e&&e.nodeType==Node.ELEMENT_NODE}isDocumentFragment(e){return e&&e.nodeType==Node.DOCUMENT_FRAGMENT_NODE}isBlockFiller(e){return"br"==this.blockFillerMode?e.isEqualNode(pr):!("BR"!==e.tagName||!wr(e,this.blockElements)||1!==e.parentNode.childNodes.length)||e.isEqualNode(_r)||function(e,t){return e.isEqualNode(fr)&&wr(e,t)&&1===e.parentNode.childNodes.length}(e,this.blockElements)}isDomSelectionBackward(e){if(e.isCollapsed)return!1;const t=document.createRange();t.setStart(e.anchorNode,e.anchorOffset),t.setEnd(e.focusNode,e.focusOffset);const n=t.collapsed;return t.detach(),n}getHostViewElement(e){const t=gr(e);for(t.pop();t.length;){const e=t.pop(),n=this._domToViewMapping.get(e);if(n&&(n.is("uiElement")||n.is("rawElement")))return n}return null}isDomSelectionCorrect(e){return this._isDomSelectionPositionCorrect(e.anchorNode,e.anchorOffset)&&this._isDomSelectionPositionCorrect(e.focusNode,e.focusOffset)}registerRawContentMatcher(e){this._rawContentElementMatcher.add(e)}_getBlockFiller(e){switch(this.blockFillerMode){case"nbsp":return Uo(e);case"markedNbsp":return Go(e);case"br":return Wo(e)}}_isDomSelectionPositionCorrect(e,t){if(Vo(e)&&Ho(e)&&t<7)return!1;if(this.isElement(e)&&Ho(e.childNodes[t]))return!1;const n=this.mapDomToView(e);return!n||!n.is("uiElement")&&!n.is("rawElement")}_processDataFromViewText(e){let t=e.data;if(e.getAncestors().some(e=>this.preElements.includes(e.name)))return t;if(" "==t.charAt(0)){const n=this._getTouchingInlineViewNode(e,!1);!(n&&n.is("$textProxy")&&this._nodeEndsWithSpace(n))&&n||(t=" "+t.substr(1))}if(" "==t.charAt(t.length-1)){const n=this._getTouchingInlineViewNode(e,!0),i=n&&n.is("$textProxy")&&" "==n.data.charAt(0);" "!=t.charAt(t.length-2)&&n&&!i||(t=t.substr(0,t.length-1)+" ")}return t.replace(/ {2}/g,"  ")}_nodeEndsWithSpace(e){if(e.getAncestors().some(e=>this.preElements.includes(e.name)))return!1;const t=this._processDataFromViewText(e);return" "==t.charAt(t.length-1)}_processDataFromDomText(e){let t=e.data;if(function(e,t){return gr(e).some(e=>e.tagName&&t.includes(e.tagName.toLowerCase()))}(e,this.preElements))return Yo(e);t=t.replace(/[ \n\t\r]{1,}/g," ");const n=this._getTouchingInlineDomNode(e,!1),i=this._getTouchingInlineDomNode(e,!0),o=this._checkShouldLeftTrimDomText(e,n),r=this._checkShouldRightTrimDomText(e,i);o&&(t=t.replace(/^ /,"")),r&&(t=t.replace(/ $/,"")),t=Yo(new Text(t)),t=t.replace(/ \u00A0/g," ");const s=i&&this.isElement(i)&&"BR"!=i.tagName,a=i&&Vo(i)&&" "==i.data.charAt(0);return(/( |\u00A0)\u00A0$/.test(t)||!i||s||a)&&(t=t.replace(/\u00A0$/," ")),(o||n&&this.isElement(n)&&"BR"!=n.tagName)&&(t=t.replace(/^\u00A0/," ")),t}_checkShouldLeftTrimDomText(e,t){return!t||(this.isElement(t)?"BR"===t.tagName:!this._encounteredRawContentDomNodes.has(e.previousSibling)&&/[^\S\u00A0]/.test(t.data.charAt(t.data.length-1)))}_checkShouldRightTrimDomText(e,t){return!t&&!Ho(e)}_getTouchingInlineViewNode(e,t){const n=new qi({startPosition:t?Hi._createAfter(e):Hi._createBefore(e),direction:t?"forward":"backward"});for(const e of n){if(e.item.is("element")&&this.inlineObjectElements.includes(e.item.name))return e.item;if(e.item.is("containerElement"))return null;if(e.item.is("element","br"))return null;if(e.item.is("$textProxy"))return e.item}return null}_getTouchingInlineDomNode(e,t){if(!e.parentNode)return null;const n=t?"firstChild":"lastChild",i=t?"nextSibling":"previousSibling";let o=!0;do{if(!o&&e[n]?e=e[n]:e[i]?(e=e[i],o=!1):(e=e.parentNode,o=!0),!e||this._isBlockElement(e))return null}while(!Vo(e)&&"BR"!=e.tagName&&!this._isInlineObjectElement(e));return e}_isBlockElement(e){return this.isElement(e)&&this.blockElements.includes(e.tagName.toLowerCase())}_isInlineObjectElement(e){return this.isElement(e)&&this.inlineObjectElements.includes(e.tagName.toLowerCase())}_createViewElement(e,t){if(ir(e))return new xo(this.document,"$comment");const n=t.keepOriginalCase?e.tagName:e.tagName.toLowerCase();return new Ni(this.document,n)}_isViewElementWithRawContent(e,t){return!1!==t.withChildren&&this._rawContentElementMatcher.match(e)}_shouldRenameElement(e){const t=e.toLowerCase();return"editing"===this.renderingMode&&vr.includes(t)}_createReplacementDomElement(e,t=null){const n=document.createElement("span");if(n.setAttribute(kr,e),t){for(;t.firstChild;)n.appendChild(t.firstChild);for(const e of t.getAttributeNames())n.setAttribute(e,t.getAttribute(e))}return n}}function yr(e,t){for(;e&&e!=hr.document;)t(e),e=e.parentNode}function wr(e,t){const n=e.parentNode;return n&&n.tagName&&t.includes(n.tagName.toLowerCase())}function Cr(e){"script"===e&&h("domconverter-unsafe-script-element-detected"),"style"===e&&h("domconverter-unsafe-style-element-detected")}function Ir(e){const t=Object.prototype.toString.apply(e);return"[object Window]"==t||"[object global]"==t}const xr=qe({},b,{listenTo(e,t,n,i={}){if(or(e)||Ir(e)){const o={capture:!!i.useCapture,passive:!!i.usePassive},r=this._getProxyEmitter(e,o)||new Er(e,o);this.listenTo(r,t,n,i)}else b.listenTo.call(this,e,t,n,i)},stopListening(e,t,n){if(or(e)||Ir(e)){const i=this._getAllProxyEmitters(e);for(const e of i)this.stopListening(e,t,n)}else b.stopListening.call(this,e,t,n)},_getProxyEmitter(e,t){return function(e,t){return e[p]&&e[p][t]?e[p][t].emitter:null}(this,jr(e,t))},_getAllProxyEmitters(e){return[{capture:!1,passive:!1},{capture:!1,passive:!0},{capture:!0,passive:!1},{capture:!0,passive:!0}].map(t=>this._getProxyEmitter(e,t)).filter(e=>!!e)}}),Sr=xr;class Er{constructor(e,t){k(this,jr(e,t)),this._domNode=e,this._options=t}}function jr(e,t){let n=function(e){return e["data-ck-expando"]||(e["data-ck-expando"]=a())}(e);for(const e of Object.keys(t).sort())t[e]&&(n+="-"+e);return n}qe(Er.prototype,b,{attach(e){if(this._domListeners&&this._domListeners[e])return;const t=this._createDomListener(e);this._domNode.addEventListener(e,t,this._options),this._domListeners||(this._domListeners={}),this._domListeners[e]=t},detach(e){let t;!this._domListeners[e]||(t=this._events[e])&&t.callbacks.length||this._domListeners[e].removeListener()},_addEventListener(e,t,n){this.attach(e),b._addEventListener.call(this,e,t,n)},_removeEventListener(e,t){b._removeEventListener.call(this,e,t),this.detach(e)},_createDomListener(e){const t=t=>{this.fire(e,t)};return t.removeListener=()=>{this._domNode.removeEventListener(e,t,this._options),delete this._domListeners[e]},t}});class Tr{constructor(e){this.view=e,this.document=e.document,this.isEnabled=!1}enable(){this.isEnabled=!0}disable(){this.isEnabled=!1}destroy(){this.disable(),this.stopListening()}checkShouldIgnoreEventFromTarget(e){return e&&3===e.nodeType&&(e=e.parentNode),!(!e||1!==e.nodeType)&&e.matches("[data-cke-ignore-events], [data-cke-ignore-events] *")}}rt(Tr,Sr);function Dr(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Tt;++ta))return!1;var l=r.get(e),d=r.get(t);if(l&&d)return l==t&&d==e;var u=-1,h=!0,m=2&n?new Pr:void 0;for(r.set(e,t),r.set(t,e);++u{this.listenTo(e,t,(e,t)=>{this.isEnabled&&!this.checkShouldIgnoreEventFromTarget(t.target)&&this.onDomEvent(t)},{useCapture:this.useCapture})})}fire(e,t,n){this.isEnabled&&this.document.fire(e,new Yr(this.view,t,n))}}class Jr extends Zr{constructor(e){super(e),this.domEventType=["keydown","keyup"]}onDomEvent(e){this.fire(e.type,e,{keyCode:e.keyCode,altKey:e.altKey,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,metaKey:e.metaKey,get keystroke(){return yo(this)}})}}const Xr=function(){return T.Date.now()};var Qr=/\s/;var es=/^\s+/;const ts=function(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&Qr.test(e.charAt(t)););return t}(e)+1).replace(es,""):e};var ns=/^[-+]0x[0-9a-f]+$/i,is=/^0b[01]+$/i,os=/^0o[0-7]+$/i,rs=parseInt;const ss=function(e){if("number"==typeof e)return e;if(si(e))return NaN;if(S(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=S(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=ts(e);var n=is.test(e);return n||os.test(e)?rs(e.slice(2),n?2:8):ns.test(e)?NaN:+e};var as=Math.max,cs=Math.min;const ls=function(e,t,n){var i,o,r,s,a,c,l=0,d=!1,u=!1,h=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function m(t){var n=i,r=o;return i=o=void 0,l=t,s=e.apply(r,n)}function g(e){var n=e-c;return void 0===c||n>=t||n<0||u&&e-l>=r}function p(){var e=Xr();if(g(e))return f(e);a=setTimeout(p,function(e){var n=t-(e-c);return u?cs(n,r-(e-l)):n}(e))}function f(e){return a=void 0,h&&i?m(e):(i=o=void 0,s)}function _(){var e=Xr(),n=g(e);if(i=arguments,o=this,c=e,n){if(void 0===a)return function(e){return l=e,a=setTimeout(p,t),d?m(e):s}(c);if(u)return clearTimeout(a),a=setTimeout(p,t),m(c)}return void 0===a&&(a=setTimeout(p,t)),s}return t=ss(t)||0,S(n)&&(d=!!n.leading,r=(u="maxWait"in n)?as(ss(n.maxWait)||0,t):r,h="trailing"in n?!!n.trailing:h),_.cancel=function(){void 0!==a&&clearTimeout(a),l=0,i=c=o=a=void 0},_.flush=function(){return void 0===a?s:f(Xr())},_};class ds extends Tr{constructor(e){super(e),this._fireSelectionChangeDoneDebounced=ls(e=>this.document.fire("selectionChangeDone",e),200)}observe(){const e=this.document;e.on("arrowKey",(t,n)=>{e.selection.isFake&&this.isEnabled&&n.preventDefault()},{context:"$capture"}),e.on("arrowKey",(t,n)=>{e.selection.isFake&&this.isEnabled&&this._handleSelectionMove(n.keyCode)},{priority:"lowest"})}destroy(){super.destroy(),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionMove(e){const t=this.document.selection,n=new Ji(t.getRanges(),{backward:t.isBackward,fake:!1});e!=vo.arrowleft&&e!=vo.arrowup||n.setTo(n.getFirstPosition()),e!=vo.arrowright&&e!=vo.arrowdown||n.setTo(n.getLastPosition());const i={oldSelection:t,newSelection:n,domSelection:null};this.document.fire("selectionChange",i),this._fireSelectionChangeDoneDebounced(i)}}class us extends Tr{constructor(e){super(e),this.mutationObserver=e.getObserver(Kr),this.selection=this.document.selection,this.domConverter=e.domConverter,this._documents=new WeakSet,this._fireSelectionChangeDoneDebounced=ls(e=>this.document.fire("selectionChangeDone",e),200),this._clearInfiniteLoopInterval=setInterval(()=>this._clearInfiniteLoop(),1e3),this._documentIsSelectingInactivityTimeoutDebounced=ls(()=>this.document.isSelecting=!1,5e3),this._loopbackCounter=0}observe(e){const t=e.ownerDocument,n=()=>{this.document.isSelecting=!1,this._documentIsSelectingInactivityTimeoutDebounced.cancel()};this.listenTo(e,"selectstart",()=>{this.document.isSelecting=!0,this._documentIsSelectingInactivityTimeoutDebounced()},{priority:"highest"}),this.listenTo(e,"keydown",n,{priority:"highest"}),this.listenTo(e,"keyup",n,{priority:"highest"}),this._documents.has(t)||(this.listenTo(t,"mouseup",n,{priority:"highest"}),this.listenTo(t,"selectionchange",(e,n)=>{this._handleSelectionChange(n,t),this._documentIsSelectingInactivityTimeoutDebounced()}),this._documents.add(t))}destroy(){super.destroy(),clearInterval(this._clearInfiniteLoopInterval),this._fireSelectionChangeDoneDebounced.cancel(),this._documentIsSelectingInactivityTimeoutDebounced.cancel()}_handleSelectionChange(e,t){if(!this.isEnabled)return;const n=t.defaultView.getSelection();if(this.checkShouldIgnoreEventFromTarget(n.anchorNode))return;this.mutationObserver.flush();const i=this.domConverter.domSelectionToView(n);if(0!=i.rangeCount){if(this.view.hasDomSelection=!0,!(this.selection.isEqual(i)&&this.domConverter.isDomSelectionCorrect(n)||++this._loopbackCounter>60))if(this.selection.isSimilar(i))this.view.forceRender();else{const e={oldSelection:this.selection,newSelection:i,domSelection:n};this.document.fire("selectionChange",e),this._fireSelectionChangeDoneDebounced(e)}}else this.view.hasDomSelection=!1}_clearInfiniteLoop(){this._loopbackCounter=0}}class hs extends Zr{constructor(e){super(e),this.domEventType=["focus","blur"],this.useCapture=!0;const t=this.document;t.on("focus",()=>{t.isFocused=!0,this._renderTimeoutId=setTimeout(()=>e.change(()=>{}),50)}),t.on("blur",(n,i)=>{const o=t.selection.editableElement;null!==o&&o!==i.target||(t.isFocused=!1,e.change(()=>{}))})}onDomEvent(e){this.fire(e.type,e)}destroy(){this._renderTimeoutId&&clearTimeout(this._renderTimeoutId),super.destroy()}}class ms extends Zr{constructor(e){super(e),this.domEventType=["compositionstart","compositionupdate","compositionend"];const t=this.document;t.on("compositionstart",()=>{t.isComposing=!0}),t.on("compositionend",()=>{t.isComposing=!1})}onDomEvent(e){this.fire(e.type,e)}}class gs extends Zr{constructor(e){super(e),this.domEventType=["beforeinput"]}onDomEvent(e){this.fire(e.type,e)}}class ps{constructor(){this._replacedElements=[]}replace(e,t){this._replacedElements.push({element:e,newElement:t}),e.style.display="none",t&&e.parentNode.insertBefore(t,e.nextSibling)}restore(){this._replacedElements.forEach(({element:e,newElement:t})=>{e.style.display="",t&&t.remove()}),this._replacedElements=[]}}function fs(e){return"[object Range]"==Object.prototype.toString.apply(e)}function _s(e){const t=e.ownerDocument.defaultView.getComputedStyle(e);return{top:parseInt(t.borderTopWidth,10),right:parseInt(t.borderRightWidth,10),bottom:parseInt(t.borderBottomWidth,10),left:parseInt(t.borderLeftWidth,10)}}const bs=["top","right","bottom","left","width","height"];class ks{constructor(e){const t=fs(e);if(Object.defineProperty(this,"_source",{value:e._source||e,writable:!0,enumerable:!1}),$n(e)||t)if(t){const t=ks.getDomRangeRects(e);vs(this,ks.getBoundingRect(t))}else vs(this,e.getBoundingClientRect());else if(Ir(e)){const{innerWidth:t,innerHeight:n}=e;vs(this,{top:0,right:t,bottom:n,left:0,width:t,height:n})}else vs(this,e)}clone(){return new ks(this)}moveTo(e,t){return this.top=t,this.right=e+this.width,this.bottom=t+this.height,this.left=e,this}moveBy(e,t){return this.top+=t,this.right+=e,this.left+=e,this.bottom+=t,this}getIntersection(e){const t={top:Math.max(this.top,e.top),right:Math.min(this.right,e.right),bottom:Math.min(this.bottom,e.bottom),left:Math.max(this.left,e.left)};return t.width=t.right-t.left,t.height=t.bottom-t.top,t.width<0||t.height<0?null:new ks(t)}getIntersectionArea(e){const t=this.getIntersection(e);return t?t.getArea():0}getArea(){return this.width*this.height}getVisible(){const e=this._source;let t=this.clone();if(!As(e)){let n=e.parentNode||e.commonAncestorContainer;for(;n&&!As(n);){const e=new ks(n),i=t.getIntersection(e);if(!i)return null;i.getArea(){for(const t of e){const e=ys._getElementCallbacks(t.target);if(e)for(const n of e)n(t)}})}}ys._observerInstance=null,ys._elementCallbacks=null;class ws{constructor(e){this._callback=e,this._elements=new Set,this._previousRects=new Map,this._periodicCheckTimeout=null}observe(e){this._elements.add(e),this._checkElementRectsAndExecuteCallback(),1===this._elements.size&&this._startPeriodicCheck()}unobserve(e){this._elements.delete(e),this._previousRects.delete(e),this._elements.size||this._stopPeriodicCheck()}_startPeriodicCheck(){const e=()=>{this._checkElementRectsAndExecuteCallback(),this._periodicCheckTimeout=setTimeout(e,100)};this.listenTo(hr.window,"resize",()=>{this._checkElementRectsAndExecuteCallback()}),this._periodicCheckTimeout=setTimeout(e,100)}_stopPeriodicCheck(){clearTimeout(this._periodicCheckTimeout),this.stopListening(),this._previousRects.clear()}_checkElementRectsAndExecuteCallback(){const e=[];for(const t of this._elements)this._hasRectChanged(t)&&e.push({target:t,contentRect:this._previousRects.get(t)});e.length&&this._callback(e)}_hasRectChanged(e){if(!e.ownerDocument.body.contains(e))return!1;const t=new ks(e),n=this._previousRects.get(e),i=!n||!n.isEqual(t);return this._previousRects.set(e,t),i}}function Cs({target:e,viewportOffset:t=0}){const n=Ds(e);let i=n,o=null;for(;i;){let r;r=Ps(i==n?e:o),xs(r,()=>Rs(e,i));const s=Rs(e,i);if(Is(i,s,t),i.parent!=i){if(o=i.frameElement,i=i.parent,!o)return}else i=null}}function Is(e,t,n){const i=t.clone().moveBy(0,n),o=t.clone().moveBy(0,-n),r=new ks(e).excludeScrollbarsAndBorders();if(![o,i].every(e=>r.contains(e))){let{scrollX:s,scrollY:a}=e;Es(o,r)?a-=r.top-t.top+n:Ss(i,r)&&(a+=t.bottom-r.bottom+n),js(t,r)?s-=r.left-t.left+n:Ts(t,r)&&(s+=t.right-r.right+n),e.scrollTo(s,a)}}function xs(e,t){const n=Ds(e);let i,o;for(;e!=n.document.body;)o=t(),i=new ks(e).excludeScrollbarsAndBorders(),i.contains(o)||(Es(o,i)?e.scrollTop-=i.top-o.top:Ss(o,i)&&(e.scrollTop+=o.bottom-i.bottom),js(o,i)?e.scrollLeft-=i.left-o.left:Ts(o,i)&&(e.scrollLeft+=o.right-i.right)),e=e.parentNode}function Ss(e,t){return e.bottom>t.bottom}function Es(e,t){return e.topt.right}function Ds(e){return fs(e)?e.startContainer.ownerDocument.defaultView:e.ownerDocument.defaultView}function Ps(e){if(fs(e)){let t=e.commonAncestorContainer;return Vo(t)&&(t=t.parentNode),t}return e.parentNode}function Rs(e,t){const n=Ds(e),i=new ks(e);if(n===t)return i;{let e=n;for(;e!=t;){const t=e.frameElement,n=new ks(t).excludeScrollbarsAndBorders();i.moveBy(n.left,n.top),e=e.parent}}return i}function Os(e){const t=e.next();return t.done?null:t.value}rt(ws,Sr),Object.assign({},{scrollViewportToShowTarget:Cs,scrollAncestorsToShowTarget:function(e){xs(Ps(e),()=>new ks(e))}});class Fs{constructor(){this.set("isFocused",!1),this.set("focusedElement",null),this._elements=new Set,this._nextEventLoopTimeout=null}add(e){if(this._elements.has(e))throw new u("focustracker-add-element-already-exist",this);this.listenTo(e,"focus",()=>this._focus(e),{useCapture:!0}),this.listenTo(e,"blur",()=>this._blur(),{useCapture:!0}),this._elements.add(e)}remove(e){e===this.focusedElement&&this._blur(e),this._elements.has(e)&&(this.stopListening(e),this._elements.delete(e))}destroy(){this.stopListening()}_focus(e){clearTimeout(this._nextEventLoopTimeout),this.focusedElement=e,this.isFocused=!0}_blur(){clearTimeout(this._nextEventLoopTimeout),this._nextEventLoopTimeout=setTimeout(()=>{this.focusedElement=null,this.isFocused=!1},0)}}rt(Fs,Sr),rt(Fs,Qe);class zs{constructor(){this._listener=Object.create(Sr)}listenTo(e){this._listener.listenTo(e,"keydown",(e,t)=>{this._listener.fire("_keydown:"+yo(t),t)})}set(e,t,n={}){const i=wo(e),o=n.priority;this._listener.listenTo(this._listener,"_keydown:"+i,(e,n)=>{t(n,()=>{n.preventDefault(),n.stopPropagation(),e.stop()}),e.return=!0},{priority:o})}press(e){return!!this._listener.fire("_keydown:"+yo(e),e)}destroy(){this._listener.stopListening()}}class Ms extends Tr{constructor(e){super(e),this.document.on("keydown",(e,t)=>{if(this.isEnabled&&function(e){return e==vo.arrowright||e==vo.arrowleft||e==vo.arrowup||e==vo.arrowdown}(t.keyCode)){const n=new Qi(this.document,"arrowKey",this.document.selection.getFirstRange());this.document.fire(n,t),n.stop.called&&e.stop()}})}observe(){}}class $s extends Tr{constructor(e){super(e);const t=this.document;t.on("keydown",(e,n)=>{if(!this.isEnabled||n.keyCode!=vo.tab||n.ctrlKey)return;const i=new Qi(t,"tab",t.selection.getFirstRange());t.fire(i,n),i.stop.called&&e.stop()})}observe(){}}class Ns{constructor(e){this.document=new ao(e),this.domConverter=new Ar(this.document),this.domRoots=new Map,this.set("isRenderingInProgress",!1),this.set("hasDomSelection",!1),this._renderer=new cr(this.domConverter,this.document.selection),this._renderer.bind("isFocused","isSelecting").to(this.document),this._initialDomRootAttributes=new WeakMap,this._observers=new Map,this._ongoingChange=!1,this._postFixersInProgress=!1,this._renderingDisabled=!1,this._hasChangedSinceTheLastRendering=!1,this._writer=new Do(this.document),this.addObserver(Kr),this.addObserver(us),this.addObserver(hs),this.addObserver(Jr),this.addObserver(ds),this.addObserver(ms),this.addObserver(Ms),this.addObserver($s),fo.isAndroid&&this.addObserver(gs),function(e){e.document.on("arrowKey",Zo,{priority:"low"})}(this),function(e){e.document.on("arrowKey",(t,n)=>function(e,t,n){if(t.keyCode==vo.arrowright){const e=t.domTarget.ownerDocument.defaultView.getSelection(),i=1==e.rangeCount&&e.getRangeAt(0).collapsed;if(i||t.shiftKey){const t=e.focusNode,o=e.focusOffset,r=n.domPositionToView(t,o);if(null===r)return;let s=!1;const a=r.getLastMatchingPosition(e=>(e.item.is("uiElement")&&(s=!0),!(!e.item.is("uiElement")&&!e.item.is("attributeElement"))));if(s){const t=n.viewPositionToDom(a);i?e.collapse(t.parent,t.offset):e.extend(t.parent,t.offset)}}}}(0,n,e.domConverter),{priority:"low"})}(this),this.on("render",()=>{this._render(),this.document.fire("layoutChanged"),this._hasChangedSinceTheLastRendering=!1}),this.listenTo(this.document.selection,"change",()=>{this._hasChangedSinceTheLastRendering=!0}),this.listenTo(this.document,"change:isFocused",()=>{this._hasChangedSinceTheLastRendering=!0})}attachDomRoot(e,t="main"){const n=this.document.getRoot(t);n._name=e.tagName.toLowerCase();const i={};for(const{name:t,value:o}of Array.from(e.attributes))i[t]=o,"class"===t?this._writer.addClass(o.split(" "),n):this._writer.setAttribute(t,o,n);this._initialDomRootAttributes.set(e,i);const o=()=>{this._writer.setAttribute("contenteditable",!n.isReadOnly,n),n.isReadOnly?this._writer.addClass("ck-read-only",n):this._writer.removeClass("ck-read-only",n)};o(),this.domRoots.set(t,e),this.domConverter.bindElements(e,n),this._renderer.markToSync("children",n),this._renderer.markToSync("attributes",n),this._renderer.domDocuments.add(e.ownerDocument),n.on("change:children",(e,t)=>this._renderer.markToSync("children",t)),n.on("change:attributes",(e,t)=>this._renderer.markToSync("attributes",t)),n.on("change:text",(e,t)=>this._renderer.markToSync("text",t)),n.on("change:isReadOnly",()=>this.change(o)),n.on("change",()=>{this._hasChangedSinceTheLastRendering=!0});for(const n of this._observers.values())n.observe(e,t)}detachDomRoot(e){const t=this.domRoots.get(e);Array.from(t.attributes).forEach(({name:e})=>t.removeAttribute(e));const n=this._initialDomRootAttributes.get(t);for(const e in n)t.setAttribute(e,n[e]);this.domRoots.delete(e),this.domConverter.unbindDomElement(t)}getDomRoot(e="main"){return this.domRoots.get(e)}addObserver(e){let t=this._observers.get(e);if(t)return t;t=new e(this),this._observers.set(e,t);for(const[e,n]of this.domRoots)t.observe(n,e);return t.enable(),t}getObserver(e){return this._observers.get(e)}disableObservers(){for(const e of this._observers.values())e.disable()}enableObservers(){for(const e of this._observers.values())e.enable()}scrollToTheSelection(){const e=this.document.selection.getFirstRange();e&&Cs({target:this.domConverter.viewRangeToDom(e),viewportOffset:20})}focus(){if(!this.document.isFocused){const e=this.document.selection.editableElement;e&&(this.domConverter.focus(e),this.forceRender())}}change(e){if(this.isRenderingInProgress||this._postFixersInProgress)throw new u("cannot-change-view-tree",this);try{if(this._ongoingChange)return e(this._writer);this._ongoingChange=!0;const t=e(this._writer);return this._ongoingChange=!1,!this._renderingDisabled&&this._hasChangedSinceTheLastRendering&&(this._postFixersInProgress=!0,this.document._callPostFixers(this._writer),this._postFixersInProgress=!1,this.fire("render")),t}catch(e){u.rethrowUnexpectedError(e,this)}}forceRender(){this._hasChangedSinceTheLastRendering=!0,this.change(()=>{})}destroy(){for(const e of this._observers.values())e.destroy();this.document.destroy(),this.stopListening()}createPositionAt(e,t){return Hi._createAt(e,t)}createPositionAfter(e){return Hi._createAfter(e)}createPositionBefore(e){return Hi._createBefore(e)}createRange(e,t){return new Ki(e,t)}createRangeOn(e){return Ki._createOn(e)}createRangeIn(e){return Ki._createIn(e)}createSelection(e,t,n){return new Ji(e,t,n)}_disableRendering(e){this._renderingDisabled=e,0==e&&this.change(()=>{})}_render(){this.isRenderingInProgress=!0,this.disableObservers(),this._renderer.render(),this.enableObservers(),this.isRenderingInProgress=!1}}rt(Ns,Qe);class Bs{constructor(e){this.parent=null,this._attrs=ni(e)}get index(){let e;if(!this.parent)return null;if(null===(e=this.parent.getChildIndex(this)))throw new u("model-node-not-found-in-parent",this);return e}get startOffset(){let e;if(!this.parent)return null;if(null===(e=this.parent.getChildStartOffset(this)))throw new u("model-node-not-found-in-parent",this);return e}get offsetSize(){return 1}get endOffset(){return this.parent?this.startOffset+this.offsetSize:null}get nextSibling(){const e=this.index;return null!==e&&this.parent.getChild(e+1)||null}get previousSibling(){const e=this.index;return null!==e&&this.parent.getChild(e-1)||null}get root(){let e=this;for(;e.parent;)e=e.parent;return e}isAttached(){return this.root.is("rootElement")}getPath(){const e=[];let t=this;for(;t.parent;)e.unshift(t.startOffset),t=t.parent;return e}getAncestors(e={includeSelf:!1,parentFirst:!1}){const t=[];let n=e.includeSelf?this:this.parent;for(;n;)t[e.parentFirst?"push":"unshift"](n),n=n.parent;return t}getCommonAncestor(e,t={}){const n=this.getAncestors(t),i=e.getAncestors(t);let o=0;for(;n[o]==i[o]&&n[o];)o++;return 0===o?null:n[o-1]}isBefore(e){if(this==e)return!1;if(this.root!==e.root)return!1;const t=this.getPath(),n=e.getPath(),i=Jn(t,n);switch(i){case"prefix":return!0;case"extension":return!1;default:return t[i](e[t[0]]=t[1],e),{})),e}is(e){return"node"===e||"model:node"===e}_clone(){return new Bs(this._attrs)}_remove(){this.parent._removeChildren(this.index)}_setAttribute(e,t){this._attrs.set(e,t)}_setAttributesTo(e){this._attrs=ni(e)}_removeAttribute(e){return this._attrs.delete(e)}_clearAttributes(){this._attrs.clear()}}class Ls extends Bs{constructor(e,t){super(t),this._data=e||""}get offsetSize(){return this.data.length}get data(){return this._data}is(e){return"$text"===e||"model:$text"===e||"text"===e||"model:text"===e||"node"===e||"model:node"===e}toJSON(){const e=super.toJSON();return e.data=this.data,e}_clone(){return new Ls(this.data,this.getAttributes())}static fromJSON(e){return new Ls(e.data,e.attributes)}}class Vs{constructor(e,t,n){if(this.textNode=e,t<0||t>e.offsetSize)throw new u("model-textproxy-wrong-offsetintext",this);if(n<0||t+n>e.offsetSize)throw new u("model-textproxy-wrong-length",this);this.data=e.data.substring(t,t+n),this.offsetInText=t}get startOffset(){return null!==this.textNode.startOffset?this.textNode.startOffset+this.offsetInText:null}get offsetSize(){return this.data.length}get endOffset(){return null!==this.startOffset?this.startOffset+this.offsetSize:null}get isPartial(){return this.offsetSize!==this.textNode.offsetSize}get parent(){return this.textNode.parent}get root(){return this.textNode.root}is(e){return"$textProxy"===e||"model:$textProxy"===e||"textProxy"===e||"model:textProxy"===e}getPath(){const e=this.textNode.getPath();return e.length>0&&(e[e.length-1]+=this.offsetInText),e}getAncestors(e={includeSelf:!1,parentFirst:!1}){const t=[];let n=e.includeSelf?this:this.parent;for(;n;)t[e.parentFirst?"push":"unshift"](n),n=n.parent;return t}hasAttribute(e){return this.textNode.hasAttribute(e)}getAttribute(e){return this.textNode.getAttribute(e)}getAttributes(){return this.textNode.getAttributes()}getAttributeKeys(){return this.textNode.getAttributeKeys()}}class Us{constructor(e){this._nodes=[],e&&this._insertNodes(0,e)}[Symbol.iterator](){return this._nodes[Symbol.iterator]()}get length(){return this._nodes.length}get maxOffset(){return this._nodes.reduce((e,t)=>e+t.offsetSize,0)}getNode(e){return this._nodes[e]||null}getNodeIndex(e){const t=this._nodes.indexOf(e);return-1==t?null:t}getNodeStartOffset(e){const t=this.getNodeIndex(e);return null===t?null:this._nodes.slice(0,t).reduce((e,t)=>e+t.offsetSize,0)}indexToOffset(e){if(e==this._nodes.length)return this.maxOffset;const t=this._nodes[e];if(!t)throw new u("model-nodelist-index-out-of-bounds",this);return this.getNodeStartOffset(t)}offsetToIndex(e){let t=0;for(const n of this._nodes){if(e>=t&&ee.toJSON())}}class Gs extends Bs{constructor(e,t,n){super(t),this.name=e,this._children=new Us,n&&this._insertChild(0,n)}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}is(e,t=null){return t?t===this.name&&("element"===e||"model:element"===e):"element"===e||"model:element"===e||"node"===e||"model:node"===e}getChild(e){return this._children.getNode(e)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(e){return this._children.getNodeIndex(e)}getChildStartOffset(e){return this._children.getNodeStartOffset(e)}offsetToIndex(e){return this._children.offsetToIndex(e)}getNodeByPath(e){let t=this;for(const n of e)t=t.getChild(t.offsetToIndex(n));return t}findAncestor(e,t={includeSelf:!1}){let n=t.includeSelf?this:this.parent;for(;n;){if(n.name===e)return n;n=n.parent}return null}toJSON(){const e=super.toJSON();if(e.name=this.name,this._children.length>0){e.children=[];for(const t of this._children)e.children.push(t.toJSON())}return e}_clone(e=!1){const t=e?Array.from(this._children).map(e=>e._clone(!0)):null;return new Gs(this.name,this.getAttributes(),t)}_appendChild(e){this._insertChild(this.childCount,e)}_insertChild(e,t){const n=function(e){return"string"==typeof e?[new Ls(e)]:(Vn(e)||(e=[e]),Array.from(e).map(e=>"string"==typeof e?new Ls(e):e instanceof Vs?new Ls(e.data,e.getAttributes()):e))}(t);for(const e of n)null!==e.parent&&e._remove(),e.parent=this;this._children._insertNodes(e,n)}_removeChildren(e,t=1){const n=this._children._removeNodes(e,t);for(const e of n)e.parent=null;return n}static fromJSON(e){let t=null;if(e.children){t=[];for(const n of e.children)n.name?t.push(Gs.fromJSON(n)):t.push(Ls.fromJSON(n))}return new Gs(e.name,e.attributes,t)}}class Ws{constructor(e={}){if(!e.boundaries&&!e.startPosition)throw new u("model-tree-walker-no-start-position",null);const t=e.direction||"forward";if("forward"!=t&&"backward"!=t)throw new u("model-tree-walker-unknown-direction",e,{direction:t});this.direction=t,this.boundaries=e.boundaries||null,e.startPosition?this.position=e.startPosition.clone():this.position=Hs._createAt(this.boundaries["backward"==this.direction?"end":"start"]),this.position.stickiness="toNone",this.singleCharacters=!!e.singleCharacters,this.shallow=!!e.shallow,this.ignoreElementEnd=!!e.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null,this._visitedParent=this.position.parent}[Symbol.iterator](){return this}skip(e){let t,n,i,o;do{i=this.position,o=this._visitedParent,({done:t,value:n}=this.next())}while(!t&&e(n));t||(this.position=i,this._visitedParent=o)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){const e=this.position,t=this.position.clone(),n=this._visitedParent;if(null===n.parent&&t.offset===n.maxOffset)return{done:!0};if(n===this._boundaryEndParent&&t.offset==this.boundaries.end.offset)return{done:!0};const i=Ks(t,n),o=i||Ys(t,n,i);if(o instanceof Gs)return this.shallow?t.offset++:(t.path.push(0),this._visitedParent=o),this.position=t,qs("elementStart",o,e,t,1);if(o instanceof Ls){let i;if(this.singleCharacters)i=1;else{let e=o.endOffset;this._boundaryEndParent==n&&this.boundaries.end.offsete&&(e=this.boundaries.start.offset),i=t.offset-e}const o=t.offset-r.startOffset,s=new Vs(r,o-i,i);return t.offset-=i,this.position=t,qs("text",s,e,t,i)}return t.path.pop(),this.position=t,this._visitedParent=n.parent,qs("elementStart",n,e,t,1)}}function qs(e,t,n,i,o){return{done:!1,value:{type:e,item:t,previousPosition:n,nextPosition:i,length:o}}}class Hs{constructor(e,t,n="toNone"){if(!e.is("element")&&!e.is("documentFragment"))throw new u("model-position-root-invalid",e);if(!(t instanceof Array)||0===t.length)throw new u("model-position-path-incorrect-format",e,{path:t});e.is("rootElement")?t=t.slice():(t=[...e.getPath(),...t],e=e.root),this.root=e,this.path=t,this.stickiness=n}get offset(){return this.path[this.path.length-1]}set offset(e){this.path[this.path.length-1]=e}get parent(){let e=this.root;for(let t=0;tn.path.length){if(t.offset!==i.maxOffset)return!1;t.path=t.path.slice(0,-1),i=i.parent,t.offset++}else{if(0!==n.offset)return!1;n.path=n.path.slice(0,-1)}}}is(e){return"position"===e||"model:position"===e}hasSameParentAs(e){return this.root===e.root&&"same"==Jn(this.getParentPath(),e.getParentPath())}getTransformedByOperation(e){let t;switch(e.type){case"insert":t=this._getTransformedByInsertOperation(e);break;case"move":case"remove":case"reinsert":t=this._getTransformedByMoveOperation(e);break;case"split":t=this._getTransformedBySplitOperation(e);break;case"merge":t=this._getTransformedByMergeOperation(e);break;default:t=Hs._createAt(this)}return t}_getTransformedByInsertOperation(e){return this._getTransformedByInsertion(e.position,e.howMany)}_getTransformedByMoveOperation(e){return this._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany)}_getTransformedBySplitOperation(e){const t=e.movedRange;return t.containsPosition(this)||t.start.isEqual(this)&&"toNext"==this.stickiness?this._getCombined(e.splitPosition,e.moveTargetPosition):e.graveyardPosition?this._getTransformedByMove(e.graveyardPosition,e.insertionPosition,1):this._getTransformedByInsertion(e.insertionPosition,1)}_getTransformedByMergeOperation(e){const t=e.movedRange;let n;return t.containsPosition(this)||t.start.isEqual(this)?(n=this._getCombined(e.sourcePosition,e.targetPosition),e.sourcePosition.isBefore(e.targetPosition)&&(n=n._getTransformedByDeletion(e.deletionPosition,1))):n=this.isEqual(e.deletionPosition)?Hs._createAt(e.deletionPosition):this._getTransformedByMove(e.deletionPosition,e.graveyardPosition,1),n}_getTransformedByDeletion(e,t){const n=Hs._createAt(this);if(this.root!=e.root)return n;if("same"==Jn(e.getParentPath(),this.getParentPath())){if(e.offsetthis.offset)return null;n.offset-=t}}else if("prefix"==Jn(e.getParentPath(),this.getParentPath())){const i=e.path.length-1;if(e.offset<=this.path[i]){if(e.offset+t>this.path[i])return null;n.path[i]-=t}}return n}_getTransformedByInsertion(e,t){const n=Hs._createAt(this);if(this.root!=e.root)return n;if("same"==Jn(e.getParentPath(),this.getParentPath()))(e.offsett+1;){const t=i.maxOffset-n.offset;0!==t&&e.push(new Js(n,n.getShiftedBy(t))),n.path=n.path.slice(0,-1),n.offset++,i=i.parent}for(;n.path.length<=this.end.path.length;){const t=this.end.path[n.path.length-1],i=t-n.offset;0!==i&&e.push(new Js(n,n.getShiftedBy(i))),n.offset=t,n.path.push(0)}return e}getWalker(e={}){return e.boundaries=this,new Ws(e)}*getItems(e={}){e.boundaries=this,e.ignoreElementEnd=!0;const t=new Ws(e);for(const e of t)yield e.item}*getPositions(e={}){e.boundaries=this;const t=new Ws(e);yield t.position;for(const e of t)yield e.nextPosition}getTransformedByOperation(e){switch(e.type){case"insert":return this._getTransformedByInsertOperation(e);case"move":case"remove":case"reinsert":return this._getTransformedByMoveOperation(e);case"split":return[this._getTransformedBySplitOperation(e)];case"merge":return[this._getTransformedByMergeOperation(e)]}return[new Js(this.start,this.end)]}getTransformedByOperations(e){const t=[new Js(this.start,this.end)];for(const n of e)for(let e=0;e0?new this(n,i):new this(i,n)}static _createIn(e){return new this(Hs._createAt(e,0),Hs._createAt(e,e.maxOffset))}static _createOn(e){return this._createFromPositionAndShift(Hs._createBefore(e),e.offsetSize)}static _createFromRanges(e){if(0===e.length)throw new u("range-create-from-ranges-empty-array",null);if(1==e.length)return e[0].clone();const t=e[0];e.sort((e,t)=>e.start.isAfter(t.start)?1:-1);const n=e.indexOf(t),i=new this(t.start,t.end);if(n>0)for(let t=n-1;e[t].end.isEqual(i.start);t++)i.start=Hs._createAt(e[t].start);for(let t=n+1;t{if(t.viewPosition)return;const n=this._modelToViewMapping.get(t.modelPosition.parent);if(!n)throw new u("mapping-model-position-view-parent-not-found",this,{modelPosition:t.modelPosition});t.viewPosition=this.findPositionIn(n,t.modelPosition.offset)},{priority:"low"}),this.on("viewToModelPosition",(e,t)=>{if(t.modelPosition)return;const n=this.findMappedViewAncestor(t.viewPosition),i=this._viewToModelMapping.get(n),o=this._toModelOffset(t.viewPosition.parent,t.viewPosition.offset,n);t.modelPosition=Hs._createAt(i,o)},{priority:"low"})}bindElements(e,t){this._modelToViewMapping.set(e,t),this._viewToModelMapping.set(t,e)}unbindViewElement(e,t={}){const n=this.toModelElement(e);if(this._elementToMarkerNames.has(e))for(const t of this._elementToMarkerNames.get(e))this._unboundMarkerNames.add(t);t.defer?this._deferredBindingRemovals.set(e,e.root):(this._viewToModelMapping.delete(e),this._modelToViewMapping.get(n)==e&&this._modelToViewMapping.delete(n))}unbindModelElement(e){const t=this.toViewElement(e);this._modelToViewMapping.delete(e),this._viewToModelMapping.get(t)==e&&this._viewToModelMapping.delete(t)}bindElementToMarker(e,t){const n=this._markerNameToElements.get(t)||new Set;n.add(e);const i=this._elementToMarkerNames.get(e)||new Set;i.add(t),this._markerNameToElements.set(t,n),this._elementToMarkerNames.set(e,i)}unbindElementFromMarkerName(e,t){const n=this._markerNameToElements.get(t);n&&(n.delete(e),0==n.size&&this._markerNameToElements.delete(t));const i=this._elementToMarkerNames.get(e);i&&(i.delete(t),0==i.size&&this._elementToMarkerNames.delete(e))}flushUnboundMarkerNames(){const e=Array.from(this._unboundMarkerNames);return this._unboundMarkerNames.clear(),e}flushDeferredBindings(){for(const[e,t]of this._deferredBindingRemovals)e.root==t&&this.unbindViewElement(e);this._deferredBindingRemovals=new Map}clearBindings(){this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap,this._markerNameToElements=new Map,this._elementToMarkerNames=new Map,this._unboundMarkerNames=new Set,this._deferredBindingRemovals=new Map}toModelElement(e){return this._viewToModelMapping.get(e)}toViewElement(e){return this._modelToViewMapping.get(e)}toModelRange(e){return new Js(this.toModelPosition(e.start),this.toModelPosition(e.end))}toViewRange(e){return new Ki(this.toViewPosition(e.start),this.toViewPosition(e.end))}toModelPosition(e){const t={viewPosition:e,mapper:this};return this.fire("viewToModelPosition",t),t.modelPosition}toViewPosition(e,t={isPhantom:!1}){const n={modelPosition:e,mapper:this,isPhantom:t.isPhantom};return this.fire("modelToViewPosition",n),n.viewPosition}markerNameToElements(e){const t=this._markerNameToElements.get(e);if(!t)return null;const n=new Set;for(const e of t)if(e.is("attributeElement"))for(const t of e.getElementsWithSameId())n.add(t);else n.add(e);return n}registerViewToModelLength(e,t){this._viewToModelLengthCallbacks.set(e,t)}findMappedViewAncestor(e){let t=e.parent;for(;!this._viewToModelMapping.has(t);)t=t.parent;return t}_toModelOffset(e,t,n){if(n!=e)return this._toModelOffset(e.parent,e.index,n)+this._toModelOffset(e,t,e);if(e.is("$text"))return t;let i=0;for(let n=0;n1?t[0]+":"+t[1]:t[0]}class ta{constructor(e){this._conversionApi={dispatcher:this,...e},this._firedEventsMap=new WeakMap}convertChanges(e,t,n){const i=this._createConversionApi(n,e.getRefreshedItems());for(const t of e.getMarkersToRemove())this._convertMarkerRemove(t.name,t.range,i);const o=this._reduceChanges(e.getChanges());for(const e of o)"insert"===e.type?this._convertInsert(Js._createFromPositionAndShift(e.position,e.length),i):"reinsert"===e.type?this._convertReinsert(Js._createFromPositionAndShift(e.position,e.length),i):"remove"===e.type?this._convertRemove(e.position,e.length,e.name,i):this._convertAttribute(e.range,e.attributeKey,e.attributeOldValue,e.attributeNewValue,i);for(const e of i.mapper.flushUnboundMarkerNames()){const n=t.get(e).getRange();this._convertMarkerRemove(e,n,i),this._convertMarkerAdd(e,n,i)}for(const t of e.getMarkersToAdd())this._convertMarkerAdd(t.name,t.range,i);i.mapper.flushDeferredBindings(),i.consumable.verifyAllConsumed("insert")}convert(e,t,n,i={}){const o=this._createConversionApi(n,void 0,i);this._convertInsert(e,o);for(const[e,n]of t)this._convertMarkerAdd(e,n,o);o.consumable.verifyAllConsumed("insert")}convertSelection(e,t,n){const i=Array.from(t.getMarkersAtPosition(e.getFirstPosition())),o=this._createConversionApi(n);if(this._addConsumablesForSelection(o.consumable,e,i),this.fire("selection",{selection:e},o),e.isCollapsed){for(const t of i){const n=t.getRange();if(!na(e.getFirstPosition(),t,o.mapper))continue;const i={item:e,markerName:t.name,markerRange:n};o.consumable.test(e,"addMarker:"+t.name)&&this.fire("addMarker:"+t.name,i,o)}for(const t of e.getAttributeKeys()){const n={item:e,range:e.getFirstRange(),attributeKey:t,attributeOldValue:null,attributeNewValue:e.getAttribute(t)};o.consumable.test(e,"attribute:"+n.attributeKey)&&this.fire("attribute:"+n.attributeKey+":$text",n,o)}}}_convertInsert(e,t,n={}){n.doNotAddConsumables||this._addConsumablesForInsert(t.consumable,Array.from(e));for(const n of Array.from(e.getWalker({shallow:!0})).map(ia))this._testAndFire("insert",n,t)}_convertRemove(e,t,n,i){this.fire("remove:"+n,{position:e,length:t},i)}_convertAttribute(e,t,n,i,o){this._addConsumablesForRange(o.consumable,e,`attribute:${t}`);for(const r of e){const e={item:r.item,range:Js._createFromPositionAndShift(r.previousPosition,r.length),attributeKey:t,attributeOldValue:n,attributeNewValue:i};this._testAndFire(`attribute:${t}`,e,o)}}_convertReinsert(e,t){const n=Array.from(e.getWalker({shallow:!0}));this._addConsumablesForInsert(t.consumable,n);for(const e of n.map(ia))this._testAndFire("insert",{...e,reconversion:!0},t)}_convertMarkerAdd(e,t,n){if("$graveyard"==t.root.rootName)return;const i="addMarker:"+e;if(n.consumable.add(t,i),this.fire(i,{markerName:e,markerRange:t},n),n.consumable.consume(t,i)){this._addConsumablesForRange(n.consumable,t,i);for(const o of t.getItems()){if(!n.consumable.test(o,i))continue;const r={item:o,range:Js._createOn(o),markerName:e,markerRange:t};this.fire(i,r,n)}}}_convertMarkerRemove(e,t,n){"$graveyard"!=t.root.rootName&&this.fire("removeMarker:"+e,{markerName:e,markerRange:t},n)}_reduceChanges(e){const t={changes:e};return this.fire("reduceChanges",t),t.changes}_addConsumablesForInsert(e,t){for(const n of t){const t=n.item;if(null===e.test(t,"insert")){e.add(t,"insert");for(const n of t.getAttributeKeys())e.add(t,"attribute:"+n)}}return e}_addConsumablesForRange(e,t,n){for(const i of t.getItems())e.add(i,n);return e}_addConsumablesForSelection(e,t,n){e.add(t,"selection");for(const i of n)e.add(t,"addMarker:"+i.name);for(const n of t.getAttributeKeys())e.add(t,"attribute:"+n);return e}_testAndFire(e,t,n){const i=function(e,t){return`${e}:${t.item.name||"$text"}`}(e,t),o=t.item.is("$textProxy")?n.consumable._getSymbolForTextProxy(t.item):t.item,r=this._firedEventsMap.get(n),s=r.get(o);if(s){if(s.has(i))return;s.add(i)}else r.set(o,new Set([i]));this.fire(i,t,n)}_testAndFireAddAttributes(e,t){const n={item:e,range:Js._createOn(e)};for(const e of n.item.getAttributeKeys())n.attributeKey=e,n.attributeOldValue=null,n.attributeNewValue=n.item.getAttribute(e),this._testAndFire(`attribute:${e}`,n,t)}_createConversionApi(e,t=new Set,n={}){const i={...this._conversionApi,consumable:new Qs,writer:e,options:n,convertItem:e=>this._convertInsert(Js._createOn(e),i),convertChildren:e=>this._convertInsert(Js._createIn(e),i,{doNotAddConsumables:!0}),convertAttributes:e=>this._testAndFireAddAttributes(e,i),canReuseView:e=>!t.has(i.mapper.toModelElement(e))};return this._firedEventsMap.set(i,new Map),i}}function na(e,t,n){const i=t.getRange(),o=Array.from(e.getAncestors());o.shift(),o.reverse();const r=o.some(e=>{if(i.containsItem(e))return!!n.toViewElement(e).getCustomProperty("addHighlight")});return!r}function ia(e){return{item:e.item,range:Js._createFromPositionAndShift(e.previousPosition,e.length)}}rt(ta,b);class oa{constructor(e,t,n){this._lastRangeBackward=!1,this._ranges=[],this._attrs=new Map,e&&this.setTo(e,t,n)}get anchor(){if(this._ranges.length>0){const e=this._ranges[this._ranges.length-1];return this._lastRangeBackward?e.end:e.start}return null}get focus(){if(this._ranges.length>0){const e=this._ranges[this._ranges.length-1];return this._lastRangeBackward?e.start:e.end}return null}get isCollapsed(){return 1===this._ranges.length&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}isEqual(e){if(this.rangeCount!=e.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(e.anchor)||!this.focus.isEqual(e.focus))return!1;for(const t of this._ranges){let n=!1;for(const i of e._ranges)if(t.isEqual(i)){n=!0;break}if(!n)return!1}return!0}*getRanges(){for(const e of this._ranges)yield new Js(e.start,e.end)}getFirstRange(){let e=null;for(const t of this._ranges)e&&!t.start.isBefore(e.start)||(e=t);return e?new Js(e.start,e.end):null}getLastRange(){let e=null;for(const t of this._ranges)e&&!t.end.isAfter(e.end)||(e=t);return e?new Js(e.start,e.end):null}getFirstPosition(){const e=this.getFirstRange();return e?e.start.clone():null}getLastPosition(){const e=this.getLastRange();return e?e.end.clone():null}setTo(e,t,n){if(null===e)this._setRanges([]);else if(e instanceof oa)this._setRanges(e.getRanges(),e.isBackward);else if(e&&"function"==typeof e.getRanges)this._setRanges(e.getRanges(),e.isBackward);else if(e instanceof Js)this._setRanges([e],!!t&&!!t.backward);else if(e instanceof Hs)this._setRanges([new Js(e)]);else if(e instanceof Bs){const i=!!n&&!!n.backward;let o;if("in"==t)o=Js._createIn(e);else if("on"==t)o=Js._createOn(e);else{if(void 0===t)throw new u("model-selection-setto-required-second-parameter",[this,e]);o=new Js(Hs._createAt(e,t))}this._setRanges([o],i)}else{if(!Vn(e))throw new u("model-selection-setto-not-selectable",[this,e]);this._setRanges(e,t&&!!t.backward)}}_setRanges(e,t=!1){const n=(e=Array.from(e)).some(t=>{if(!(t instanceof Js))throw new u("model-selection-set-ranges-not-range",[this,e]);return this._ranges.every(e=>!e.isEqual(t))});if(e.length!==this._ranges.length||n){this._removeAllRanges();for(const t of e)this._pushRange(t);this._lastRangeBackward=!!t,this.fire("change:range",{directChange:!0})}}setFocus(e,t){if(null===this.anchor)throw new u("model-selection-setfocus-no-ranges",[this,e]);const n=Hs._createAt(e,t);if("same"==n.compareWith(this.focus))return;const i=this.anchor;this._ranges.length&&this._popRange(),"before"==n.compareWith(i)?(this._pushRange(new Js(n,i)),this._lastRangeBackward=!0):(this._pushRange(new Js(i,n)),this._lastRangeBackward=!1),this.fire("change:range",{directChange:!0})}getAttribute(e){return this._attrs.get(e)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}hasAttribute(e){return this._attrs.has(e)}removeAttribute(e){this.hasAttribute(e)&&(this._attrs.delete(e),this.fire("change:attribute",{attributeKeys:[e],directChange:!0}))}setAttribute(e,t){this.getAttribute(e)!==t&&(this._attrs.set(e,t),this.fire("change:attribute",{attributeKeys:[e],directChange:!0}))}getSelectedElement(){return 1!==this.rangeCount?null:this.getFirstRange().getContainedElement()}is(e){return"selection"===e||"model:selection"===e}*getSelectedBlocks(){const e=new WeakSet;for(const t of this.getRanges()){const n=aa(t.start,e);n&&ca(n,t)&&(yield n);for(const n of t.getWalker()){const i=n.item;"elementEnd"==n.type&&sa(i,e,t)&&(yield i)}const i=aa(t.end,e);i&&!t.end.isTouching(Hs._createAt(i,0))&&ca(i,t)&&(yield i)}}containsEntireContent(e=this.anchor.root){const t=Hs._createAt(e,0),n=Hs._createAt(e,"end");return t.isTouching(this.getFirstPosition())&&n.isTouching(this.getLastPosition())}_pushRange(e){this._checkRange(e),this._ranges.push(new Js(e.start,e.end))}_checkRange(e){for(let t=0;t0;)this._popRange()}_popRange(){this._ranges.pop()}}function ra(e,t){return!t.has(e)&&(t.add(e),e.root.document.model.schema.isBlock(e)&&e.parent)}function sa(e,t,n){return ra(e,t)&&ca(e,n)}function aa(e,t){const n=e.parent.root.document.model.schema,i=e.parent.getAncestors({parentFirst:!0,includeSelf:!0});let o=!1;const r=i.find(e=>!o&&(o=n.isLimit(e),!o&&ra(e,t)));return i.forEach(e=>t.add(e)),r}function ca(e,t){const n=function(e){const t=e.root.document.model.schema;let n=e.parent;for(;n;){if(t.isBlock(n))return n;n=n.parent}}(e);return!n||!t.containsRange(Js._createOn(n),!0)}rt(oa,b);class la extends Js{constructor(e,t){super(e,t),da.call(this)}detach(){this.stopListening()}is(e){return"liveRange"===e||"model:liveRange"===e||"range"==e||"model:range"===e}toRange(){return new Js(this.start,this.end)}static fromRange(e){return new la(e.start,e.end)}}function da(){this.listenTo(this.root.document.model,"applyOperation",(e,t)=>{const n=t[0];n.isDocumentOperation&&ua.call(this,n)},{priority:"low"})}function ua(e){const t=this.getTransformedByOperation(e),n=Js._createFromRanges(t),i=!n.isEqual(this),o=function(e,t){switch(t.type){case"insert":return e.containsPosition(t.position);case"move":case"remove":case"reinsert":case"merge":return e.containsPosition(t.sourcePosition)||e.start.isEqual(t.sourcePosition)||e.containsPosition(t.targetPosition);case"split":return e.containsPosition(t.splitPosition)||e.containsPosition(t.insertionPosition)}return!1}(this,e);let r=null;if(i){"$graveyard"==n.root.rootName&&(r="remove"==e.type?e.sourcePosition:e.deletionPosition);const t=this.toRange();this.start=n.start,this.end=n.end,this.fire("change:range",t,{deletionPosition:r})}else o&&this.fire("change:content",this.toRange(),{deletionPosition:r})}rt(la,b);const ha="selection:";class ma{constructor(e){this._selection=new ga(e),this._selection.delegate("change:range").to(this),this._selection.delegate("change:attribute").to(this),this._selection.delegate("change:marker").to(this)}get isCollapsed(){return this._selection.isCollapsed}get anchor(){return this._selection.anchor}get focus(){return this._selection.focus}get rangeCount(){return this._selection.rangeCount}get hasOwnRange(){return this._selection.hasOwnRange}get isBackward(){return this._selection.isBackward}get isGravityOverridden(){return this._selection.isGravityOverridden}get markers(){return this._selection.markers}get _ranges(){return this._selection._ranges}getRanges(){return this._selection.getRanges()}getFirstPosition(){return this._selection.getFirstPosition()}getLastPosition(){return this._selection.getLastPosition()}getFirstRange(){return this._selection.getFirstRange()}getLastRange(){return this._selection.getLastRange()}getSelectedBlocks(){return this._selection.getSelectedBlocks()}getSelectedElement(){return this._selection.getSelectedElement()}containsEntireContent(e){return this._selection.containsEntireContent(e)}destroy(){this._selection.destroy()}getAttributeKeys(){return this._selection.getAttributeKeys()}getAttributes(){return this._selection.getAttributes()}getAttribute(e){return this._selection.getAttribute(e)}hasAttribute(e){return this._selection.hasAttribute(e)}refresh(){this._selection._updateMarkers(),this._selection._updateAttributes(!1)}observeMarkers(e){this._selection.observeMarkers(e)}is(e){return"selection"===e||"model:selection"==e||"documentSelection"==e||"model:documentSelection"==e}_setFocus(e,t){this._selection.setFocus(e,t)}_setTo(e,t,n){this._selection.setTo(e,t,n)}_setAttribute(e,t){this._selection.setAttribute(e,t)}_removeAttribute(e){this._selection.removeAttribute(e)}_getStoredAttributes(){return this._selection._getStoredAttributes()}_overrideGravity(){return this._selection.overrideGravity()}_restoreGravity(e){this._selection.restoreGravity(e)}static _getStoreAttributeKey(e){return ha+e}static _isStoreAttributeKey(e){return e.startsWith(ha)}}rt(ma,b);class ga extends oa{constructor(e){super(),this.markers=new Un({idProperty:"name"}),this._model=e.model,this._document=e,this._attributePriority=new Map,this._selectionRestorePosition=null,this._hasChangedRange=!1,this._overriddenGravityRegister=new Set,this._observedMarkers=new Set,this.listenTo(this._model,"applyOperation",(e,t)=>{const n=t[0];n.isDocumentOperation&&"marker"!=n.type&&"rename"!=n.type&&"noop"!=n.type&&(0==this._ranges.length&&this._selectionRestorePosition&&this._fixGraveyardSelection(this._selectionRestorePosition),this._selectionRestorePosition=null,this._hasChangedRange&&(this._hasChangedRange=!1,this.fire("change:range",{directChange:!1})))},{priority:"lowest"}),this.on("change:range",()=>{for(const e of this.getRanges())if(!this._document._validateSelectionRange(e))throw new u("document-selection-wrong-position",this,{range:e})}),this.listenTo(this._model.markers,"update",(e,t,n,i)=>{this._updateMarker(t,i)}),this.listenTo(this._document,"change",(e,t)=>{!function(e,t){const n=e.document.differ;for(const i of n.getChanges()){if("insert"!=i.type)continue;const n=i.position.parent;i.length===n.maxOffset&&e.enqueueChange(t,e=>{const t=Array.from(n.getAttributeKeys()).filter(e=>e.startsWith(ha));for(const i of t)e.removeAttribute(i,n)})}}(this._model,t)})}get isCollapsed(){return 0===this._ranges.length?this._document._getDefaultRange().isCollapsed:super.isCollapsed}get anchor(){return super.anchor||this._document._getDefaultRange().start}get focus(){return super.focus||this._document._getDefaultRange().end}get rangeCount(){return this._ranges.length?this._ranges.length:1}get hasOwnRange(){return this._ranges.length>0}get isGravityOverridden(){return!!this._overriddenGravityRegister.size}destroy(){for(let e=0;e{if(this._hasChangedRange=!0,t.root==this._document.graveyard){this._selectionRestorePosition=i.deletionPosition;const e=this._ranges.indexOf(t);this._ranges.splice(e,1),t.detach()}}),t}_updateMarkers(){if(!this._observedMarkers.size)return;const e=[];let t=!1;for(const t of this._model.markers){const n=t.name.split(":",1)[0];if(!this._observedMarkers.has(n))continue;const i=t.getRange();for(const n of this.getRanges())i.containsRange(n,!n.isCollapsed)&&e.push(t)}const n=Array.from(this.markers);for(const n of e)this.markers.has(n)||(this.markers.add(n),t=!0);for(const n of Array.from(this.markers))e.includes(n)||(this.markers.remove(n),t=!0);t&&this.fire("change:marker",{oldMarkers:n,directChange:!1})}_updateMarker(e,t){const n=e.name.split(":",1)[0];if(!this._observedMarkers.has(n))return;let i=!1;const o=Array.from(this.markers),r=this.markers.has(e);if(t){let n=!1;for(const e of this.getRanges())if(t.containsRange(e,!e.isCollapsed)){n=!0;break}n&&!r?(this.markers.add(e),i=!0):!n&&r&&(this.markers.remove(e),i=!0)}else r&&(this.markers.remove(e),i=!0);i&&this.fire("change:marker",{oldMarkers:o,directChange:!1})}_updateAttributes(e){const t=ni(this._getSurroundingAttributes()),n=ni(this.getAttributes());if(e)this._attributePriority=new Map,this._attrs=new Map;else for(const[e,t]of this._attributePriority)"low"==t&&(this._attrs.delete(e),this._attributePriority.delete(e));this._setAttributesTo(t);const i=[];for(const[e,t]of this.getAttributes())n.has(e)&&n.get(e)===t||i.push(e);for(const[e]of n)this.hasAttribute(e)||i.push(e);i.length>0&&this.fire("change:attribute",{attributeKeys:i,directChange:!1})}_setAttribute(e,t,n=!0){const i=n?"normal":"low";return("low"!=i||"normal"!=this._attributePriority.get(e))&&super.getAttribute(e)!==t&&(this._attrs.set(e,t),this._attributePriority.set(e,i),!0)}_removeAttribute(e,t=!0){const n=t?"normal":"low";return!("low"==n&&"normal"==this._attributePriority.get(e)||(this._attributePriority.set(e,n),!super.hasAttribute(e)||(this._attrs.delete(e),0)))}_setAttributesTo(e){const t=new Set;for(const[t,n]of this.getAttributes())e.get(t)!==n&&this._removeAttribute(t,!1);for(const[n,i]of e)this._setAttribute(n,i,!1)&&t.add(n);return t}*_getStoredAttributes(){const e=this.getFirstPosition().parent;if(this.isCollapsed&&e.isEmpty)for(const t of e.getAttributeKeys())if(t.startsWith(ha)){const n=t.substr(10);yield[n,e.getAttribute(t)]}}_getSurroundingAttributes(){const e=this.getFirstPosition(),t=this._model.schema;let n=null;if(this.isCollapsed){const i=e.textNode?e.textNode:e.nodeBefore,o=e.textNode?e.textNode:e.nodeAfter;if(this.isGravityOverridden||(n=pa(i)),n||(n=pa(o)),!this.isGravityOverridden&&!n){let e=i;for(;e&&!t.isInline(e)&&!n;)e=e.previousSibling,n=pa(e)}if(!n){let e=o;for(;e&&!t.isInline(e)&&!n;)e=e.nextSibling,n=pa(e)}n||(n=this._getStoredAttributes())}else{const e=this.getFirstRange();for(const i of e){if(i.item.is("element")&&t.isObject(i.item))break;if("text"==i.type){n=i.item.getAttributes();break}}}return n}_fixGraveyardSelection(e){const t=this._model.schema.getNearestSelectionRange(e);t&&this._pushRange(t)}}function pa(e){return e instanceof Vs||e instanceof Ls?e.getAttributes():null}class fa{constructor(e){this._dispatchers=e}add(e){for(const t of this._dispatchers)e(t);return this}}const _a=function(e){return zn(e,5)};class ba extends fa{elementToElement(e){return this.add(function(e){return(e=_a(e)).model=Aa(e.model),e.view=ya(e.view,"container"),e.model.attributes.length&&(e.model.children=!0),t=>{t.on("insert:"+e.model.name,function(e,t=Ta){return(n,i,o)=>{if(!t(i.item,o.consumable,{preflight:!0}))return;const r=e(i.item,o,i);if(!r)return;t(i.item,o.consumable);const s=o.mapper.toViewPosition(i.range.start);o.mapper.bindElements(i.item,r),o.writer.insert(s,r),o.convertAttributes(i.item),Ea(r,i.item.getChildren(),o,{reconversion:i.reconversion})}}(e.view,Sa(e.model)),{priority:e.converterPriority||"normal"}),(e.model.children||e.model.attributes.length)&&t.on("reduceChanges",xa(e.model),{priority:"low"})}}(e))}elementToStructure(e){return this.add(function(e){return(e=_a(e)).model=Aa(e.model),e.view=ya(e.view,"container"),e.model.children=!0,t=>{if(t._conversionApi.schema.checkChild(e.model.name,"$text"))throw new u("conversion-element-to-structure-disallowed-text",t,{elementName:e.model.name});t.on("insert:"+e.model.name,function(e,t){return(n,i,o)=>{if(!t(i.item,o.consumable,{preflight:!0}))return;const r=new Map;o.writer._registerSlotFactory(function(e,t,n){return(i,o="children")=>{const r=i.createContainerElement("$slot");let s=null;if("children"===o)s=Array.from(e.getChildren());else{if("function"!=typeof o)throw new u("conversion-slot-mode-unknown",n.dispatcher,{modeOrFilter:o});s=Array.from(e.getChildren()).filter(e=>o(e))}return t.set(r,s),r}}(i.item,r,o));const s=e(i.item,o,i);if(o.writer._clearSlotFactory(),!s)return;!function(e,t,n){const i=Array.from(t.values()).flat(),o=new Set(i);if(o.size!=i.length)throw new u("conversion-slot-filter-overlap",n.dispatcher,{element:e});if(o.size!=e.childCount)throw new u("conversion-slot-filter-incomplete",n.dispatcher,{element:e})}(i.item,r,o),t(i.item,o.consumable);const a=o.mapper.toViewPosition(i.range.start);o.mapper.bindElements(i.item,s),o.writer.insert(a,s),o.convertAttributes(i.item),function(e,t,n,i){n.mapper.on("modelToViewPosition",s,{priority:"highest"});let o=null,r=null;for([o,r]of t)Ea(e,r,n,i),n.writer.move(n.writer.createRangeIn(o),n.writer.createPositionBefore(o)),n.writer.remove(o);function s(e,t){const n=t.modelPosition.nodeAfter,i=r.indexOf(n);i<0||(t.viewPosition=t.mapper.findPositionIn(o,i))}n.mapper.off("modelToViewPosition",s)}(s,r,o,{reconversion:i.reconversion})}}(e.view,Sa(e.model)),{priority:e.converterPriority||"normal"}),t.on("reduceChanges",xa(e.model),{priority:"low"})}}(e))}attributeToElement(e){return this.add(function(e){let t="attribute:"+((e=_a(e)).model.key?e.model.key:e.model);if(e.model.name&&(t+=":"+e.model.name),e.model.values)for(const t of e.model.values)e.view[t]=ya(e.view[t],"attribute");else e.view=ya(e.view,"attribute");const n=wa(e);return i=>{i.on(t,function(e){return(t,n,i)=>{if(!i.consumable.test(n.item,t.name))return;const o=e(n.attributeOldValue,i,n),r=e(n.attributeNewValue,i,n);if(!o&&!r)return;i.consumable.consume(n.item,t.name);const s=i.writer,a=s.document.selection;if(n.item instanceof oa||n.item instanceof ma)s.wrap(a.getFirstRange(),r);else{let e=i.mapper.toViewRange(n.range);null!==n.attributeOldValue&&o&&(e=s.unwrap(e,o)),null!==n.attributeNewValue&&r&&s.wrap(e,r)}}}(n),{priority:e.converterPriority||"normal"})}}(e))}attributeToAttribute(e){return this.add(function(e){let t="attribute:"+((e=_a(e)).model.key?e.model.key:e.model);if(e.model.name&&(t+=":"+e.model.name),e.model.values)for(const t of e.model.values)e.view[t]=Ca(e.view[t]);else e.view=Ca(e.view);const n=wa(e);return i=>{i.on(t,function(e){return(t,n,i)=>{if(!i.consumable.test(n.item,t.name))return;const o=e(n.attributeOldValue,i,n),r=e(n.attributeNewValue,i,n);if(!o&&!r)return;i.consumable.consume(n.item,t.name);const s=i.mapper.toViewElement(n.item),a=i.writer;if(!s)throw new u("conversion-attribute-to-attribute-on-text",i.dispatcher,n);if(null!==n.attributeOldValue&&o)if("class"==o.key){const e=Wn(o.value);for(const t of e)a.removeClass(t,s)}else if("style"==o.key){const e=Object.keys(o.value);for(const t of e)a.removeStyle(t,s)}else a.removeAttribute(o.key,s);if(null!==n.attributeNewValue&&r)if("class"==r.key){const e=Wn(r.value);for(const t of e)a.addClass(t,s)}else if("style"==r.key){const e=Object.keys(r.value);for(const t of e)a.setStyle(t,r.value[t],s)}else a.setAttribute(r.key,r.value,s)}}(n),{priority:e.converterPriority||"normal"})}}(e))}markerToElement(e){return this.add(function(e){return(e=_a(e)).view=ya(e.view,"ui"),t=>{t.on("addMarker:"+e.model,function(e){return(t,n,i)=>{n.isOpening=!0;const o=e(n,i);n.isOpening=!1;const r=e(n,i);if(!o||!r)return;const s=n.markerRange;if(s.isCollapsed&&!i.consumable.consume(s,t.name))return;for(const e of s)if(!i.consumable.consume(e.item,t.name))return;const a=i.mapper,c=i.writer;c.insert(a.toViewPosition(s.start),o),i.mapper.bindElementToMarker(o,n.markerName),s.isCollapsed||(c.insert(a.toViewPosition(s.end),r),i.mapper.bindElementToMarker(r,n.markerName)),t.stop()}}(e.view),{priority:e.converterPriority||"normal"}),t.on("removeMarker:"+e.model,(e.view,(e,t,n)=>{const i=n.mapper.markerNameToElements(t.markerName);if(i){for(const e of i)n.mapper.unbindElementFromMarkerName(e,t.markerName),n.writer.clear(n.writer.createRangeOn(e),e);n.writer.clearClonedElementsGroup(t.markerName),e.stop()}}),{priority:e.converterPriority||"normal"})}}(e))}markerToHighlight(e){return this.add(function(e){return t=>{t.on("addMarker:"+e.model,function(e){return(t,n,i)=>{if(!n.item)return;if(!(n.item instanceof oa||n.item instanceof ma||n.item.is("$textProxy")))return;const o=Ia(e,n,i);if(!o)return;if(!i.consumable.consume(n.item,t.name))return;const r=i.writer,s=ka(r,o),a=r.document.selection;if(n.item instanceof oa||n.item instanceof ma)r.wrap(a.getFirstRange(),s,a);else{const e=i.mapper.toViewRange(n.range),t=r.wrap(e,s);for(const e of t.getItems())if(e.is("attributeElement")&&e.isSimilar(s)){i.mapper.bindElementToMarker(e,n.markerName);break}}}}(e.view),{priority:e.converterPriority||"normal"}),t.on("addMarker:"+e.model,function(e){return(t,n,i)=>{if(!n.item)return;if(!(n.item instanceof Gs))return;const o=Ia(e,n,i);if(!o)return;if(!i.consumable.test(n.item,t.name))return;const r=i.mapper.toViewElement(n.item);if(r&&r.getCustomProperty("addHighlight")){i.consumable.consume(n.item,t.name);for(const e of Js._createIn(n.item))i.consumable.consume(e.item,t.name);r.getCustomProperty("addHighlight")(r,o,i.writer),i.mapper.bindElementToMarker(r,n.markerName)}}}(e.view),{priority:e.converterPriority||"normal"}),t.on("removeMarker:"+e.model,function(e){return(t,n,i)=>{if(n.markerRange.isCollapsed)return;const o=Ia(e,n,i);if(!o)return;const r=ka(i.writer,o),s=i.mapper.markerNameToElements(n.markerName);if(s){for(const e of s)i.mapper.unbindElementFromMarkerName(e,n.markerName),e.is("attributeElement")?i.writer.unwrap(i.writer.createRangeOn(e),r):e.getCustomProperty("removeHighlight")(e,o.id,i.writer);i.writer.clearClonedElementsGroup(n.markerName),t.stop()}}}(e.view),{priority:e.converterPriority||"normal"})}}(e))}markerToData(e){return this.add(function(e){const t=(e=_a(e)).model;return e.view||(e.view=n=>({group:t,name:n.substr(e.model.length+1)})),n=>{n.on("addMarker:"+t,function(e){return(t,n,i)=>{const o=e(n.markerName,i);if(!o)return;const r=n.markerRange;i.consumable.consume(r,t.name)&&(va(r,!1,i,n,o),va(r,!0,i,n,o),t.stop())}}(e.view),{priority:e.converterPriority||"normal"}),n.on("removeMarker:"+t,function(e){return(t,n,i)=>{const o=e(n.markerName,i);if(!o)return;const r=i.mapper.markerNameToElements(n.markerName);if(r){for(const e of r)i.mapper.unbindElementFromMarkerName(e,n.markerName),e.is("containerElement")?(s(`data-${o.group}-start-before`,e),s(`data-${o.group}-start-after`,e),s(`data-${o.group}-end-before`,e),s(`data-${o.group}-end-after`,e)):i.writer.clear(i.writer.createRangeOn(e),e);i.writer.clearClonedElementsGroup(n.markerName),t.stop()}function s(e,t){if(t.hasAttribute(e)){const n=new Set(t.getAttribute(e).split(","));n.delete(o.name),0==n.size?i.writer.removeAttribute(e,t):i.writer.setAttribute(e,Array.from(n).join(","),t)}}}}(e.view),{priority:e.converterPriority||"normal"})}}(e))}}function ka(e,t){const n=e.createAttributeElement("span",t.attributes);return t.classes&&n._addClass(t.classes),"number"==typeof t.priority&&(n._priority=t.priority),n._id=t.id,n}function va(e,t,n,i,o){const r=t?e.start:e.end,s=r.nodeAfter&&r.nodeAfter.is("element")?r.nodeAfter:null,a=r.nodeBefore&&r.nodeBefore.is("element")?r.nodeBefore:null;if(s||a){let e,r;t&&s||!t&&!a?(e=s,r=!0):(e=a,r=!1);const c=n.mapper.toViewElement(e);if(c)return void function(e,t,n,i,o,r){const s=`data-${r.group}-${t?"start":"end"}-${n?"before":"after"}`,a=e.hasAttribute(s)?e.getAttribute(s).split(","):[];a.unshift(r.name),i.writer.setAttribute(s,a.join(","),e),i.mapper.bindElementToMarker(e,o.markerName)}(c,t,r,n,i,o)}!function(e,t,n,i,o){const r=`${o.group}-${t?"start":"end"}`,s=o.name?{name:o.name}:null,a=n.writer.createUIElement(r,s);n.writer.insert(e,a),n.mapper.bindElementToMarker(a,i.markerName)}(n.mapper.toViewPosition(r),t,n,i,o)}function Aa(e){return"string"==typeof e&&(e={name:e}),e.attributes?Array.isArray(e.attributes)||(e.attributes=[e.attributes]):e.attributes=[],e.children=!!e.children,e}function ya(e,t){return"function"==typeof e?e:(n,i)=>function(e,t,n){let i;"string"==typeof e&&(e={name:e});const o=t.writer,r=Object.assign({},e.attributes);if("container"==n)i=o.createContainerElement(e.name,r);else if("attribute"==n){const t={priority:e.priority||co.DEFAULT_PRIORITY};i=o.createAttributeElement(e.name,r,t)}else i=o.createUIElement(e.name,r);if(e.styles){const t=Object.keys(e.styles);for(const n of t)o.setStyle(n,e.styles[n],i)}if(e.classes){const t=e.classes;if("string"==typeof t)o.addClass(t,i);else for(const e of t)o.addClass(e,i)}return i}(e,i,t)}function wa(e){return e.model.values?(t,n)=>{const i=e.view[t];return i?i(t,n):null}:e.view}function Ca(e){return"string"==typeof e?t=>({key:e,value:t}):"object"==typeof e?e.value?()=>e:t=>({key:e.key,value:t}):e}function Ia(e,t,n){const i="function"==typeof e?e(t,n):e;return i?(i.priority||(i.priority=10),i.id||(i.id=t.markerName),i):null}function xa(e){const t=function(e){return(t,n)=>{if(!t.is("element",e.name))return!1;if("attribute"==n.type){if(e.attributes.includes(n.attributeKey))return!0}else if(e.children)return!0;return!1}}(e);return(e,n)=>{const i=[];n.reconvertedElements||(n.reconvertedElements=new Set);for(const e of n.changes){const o=e.position?e.position.parent:e.range.start.nodeAfter;if(o&&t(o,e)){if(!n.reconvertedElements.has(o)){n.reconvertedElements.add(o);const e=Hs._createBefore(o);i.push({type:"remove",name:o.name,position:e,length:1},{type:"reinsert",name:o.name,position:e,length:1})}}else i.push(e)}n.changes=i}}function Sa(e){return(t,n,i={})=>{const o=["insert"];for(const n of e.attributes)t.hasAttribute(n)&&o.push(`attribute:${n}`);return!!o.every(e=>n.test(t,e))&&(i.preflight||o.forEach(e=>n.consume(t,e)),!0)}}function Ea(e,t,n,i){for(const o of t)ja(e.root,o,n,i)||n.convertItem(o)}function ja(e,t,n,i){const{writer:o,mapper:r}=n;if(!i.reconversion)return!1;const s=r.toViewElement(t);return!(!s||s.root==e||!n.canReuseView(s)||(o.move(o.createRangeOn(s),r.toViewPosition(Hs._createBefore(t))),0))}function Ta(e,t,{preflight:n}={}){return n?t.test(e,"insert"):t.consume(e,"insert")}function Da(e){const{schema:t,document:n}=e.model;for(const i of n.getRootNames()){const o=n.getRoot(i);if(o.isEmpty&&!t.checkChild(o,"$text")&&t.checkChild(o,"paragraph"))return e.insertElement("paragraph",o),!0}return!1}function Pa(e,t,n){const i=n.createContext(e);return!!n.checkChild(i,"paragraph")&&!!n.checkChild(i.push("paragraph"),t)}function Ra(e,t){const n=t.createElement("paragraph");return t.insert(n,e),t.createPositionAt(n,0)}class Oa extends fa{elementToElement(e){return this.add(Fa(e))}elementToAttribute(e){return this.add(function(e){$a(e=_a(e));const t=Na(e,!1),n=za(e.view),i=n?"element:"+n:"element";return n=>{n.on(i,t,{priority:e.converterPriority||"low"})}}(e))}attributeToAttribute(e){return this.add(function(e){let t=null;("string"==typeof(e=_a(e)).view||e.view.key)&&(t=function(e){"string"==typeof e.view&&(e.view={key:e.view});const t=e.view.key;let n;if("class"==t||"style"==t){const i="class"==t?"classes":"styles";n={[i]:e.view.value}}else{const i=void 0===e.view.value?/[\s\S]*/:e.view.value;n={attributes:{[t]:i}}}return e.view.name&&(n.name=e.view.name),e.view=n,t}(e)),$a(e,t);const n=Na(e,!0);return t=>{t.on("element",n,{priority:e.converterPriority||"low"})}}(e))}elementToMarker(e){return this.add(function(e){return function(e){const t=e.model;e.model=(e,n)=>{const i="string"==typeof t?t:t(e,n);return n.writer.createElement("$marker",{"data-name":i})}}(e=_a(e)),Fa(e)}(e))}dataToMarker(e){return this.add(function(e){(e=_a(e)).model||(e.model=t=>t?e.view+":"+t:e.view);const t=Ma(Ba(e,"start")),n=Ma(Ba(e,"end"));return i=>{i.on("element:"+e.view+"-start",t,{priority:e.converterPriority||"normal"}),i.on("element:"+e.view+"-end",n,{priority:e.converterPriority||"normal"});const o=l.get("low"),r=l.get("highest"),s=l.get(e.converterPriority)/r;i.on("element",function(e){return(t,n,i)=>{const o=`data-${e.view}`;function r(t,o){for(const r of o){const o=e.model(r,i),s=i.writer.createElement("$marker",{"data-name":o});i.writer.insert(s,t),n.modelCursor.isEqual(t)?n.modelCursor=n.modelCursor.getShiftedBy(1):n.modelCursor=n.modelCursor._getTransformedByInsertion(t,1),n.modelRange=n.modelRange._getTransformedByInsertion(t,1)[0]}}(i.consumable.test(n.viewItem,{attributes:o+"-end-after"})||i.consumable.test(n.viewItem,{attributes:o+"-start-after"})||i.consumable.test(n.viewItem,{attributes:o+"-end-before"})||i.consumable.test(n.viewItem,{attributes:o+"-start-before"}))&&(n.modelRange||Object.assign(n,i.convertChildren(n.viewItem,n.modelCursor)),i.consumable.consume(n.viewItem,{attributes:o+"-end-after"})&&r(n.modelRange.end,n.viewItem.getAttribute(o+"-end-after").split(",")),i.consumable.consume(n.viewItem,{attributes:o+"-start-after"})&&r(n.modelRange.end,n.viewItem.getAttribute(o+"-start-after").split(",")),i.consumable.consume(n.viewItem,{attributes:o+"-end-before"})&&r(n.modelRange.start,n.viewItem.getAttribute(o+"-end-before").split(",")),i.consumable.consume(n.viewItem,{attributes:o+"-start-before"})&&r(n.modelRange.start,n.viewItem.getAttribute(o+"-start-before").split(",")))}}(e),{priority:o+s})}}(e))}}function Fa(e){const t=Ma(e=_a(e)),n=za(e.view),i=n?"element:"+n:"element";return n=>{n.on(i,t,{priority:e.converterPriority||"normal"})}}function za(e){return"string"==typeof e?e:"object"==typeof e&&"string"==typeof e.name?e.name:null}function Ma(e){const t=new ii(e.view);return(n,i,o)=>{const r=t.match(i.viewItem);if(!r)return;const s=r.match;if(s.name=!0,!o.consumable.test(i.viewItem,s))return;const a=function(e,t,n){return e instanceof Function?e(t,n):n.writer.createElement(e)}(e.model,i.viewItem,o);a&&o.safeInsert(a,i.modelCursor)&&(o.consumable.consume(i.viewItem,s),o.convertChildren(i.viewItem,a),o.updateConversionResult(a,i))}}function $a(e,t=null){const n=null===t||(e=>e.getAttribute(t)),i="object"!=typeof e.model?e.model:e.model.key,o="object"!=typeof e.model||void 0===e.model.value?n:e.model.value;e.model={key:i,value:o}}function Na(e,t){const n=new ii(e.view);return(i,o,r)=>{const s=n.match(o.viewItem);if(!s)return;if(function(e,t){const n="function"==typeof e?e(t):e;return!("object"==typeof n&&!za(n)||n.classes||n.attributes||n.styles)}(e.view,o.viewItem)?s.match.name=!0:delete s.match.name,!r.consumable.test(o.viewItem,s.match))return;const a=e.model.key,c="function"==typeof e.model.value?e.model.value(o.viewItem,r):e.model.value;if(null===c)return;o.modelRange||Object.assign(o,r.convertChildren(o.viewItem,o.modelCursor));const l=function(e,t,n,i){let o=!1;for(const r of Array.from(e.getItems({shallow:n})))i.schema.checkAttribute(r,t.key)&&(o=!0,r.hasAttribute(t.key)||i.writer.setAttribute(t.key,t.value,r));return o}(o.modelRange,{key:a,value:c},t,r);l&&r.consumable.consume(o.viewItem,s.match)}}function Ba(e,t){const n={};return n.view=e.view+"-"+t,n.model=(t,n)=>{const i=t.getAttribute("name"),o=e.model(i,n);return n.writer.createElement("$marker",{"data-name":o})},n}class La{constructor(e,t){this.model=e,this.view=new Ns(t),this.mapper=new Xs,this.downcastDispatcher=new ta({mapper:this.mapper,schema:e.schema});const n=this.model.document,i=n.selection,o=this.model.markers;this.listenTo(this.model,"_beforeChanges",()=>{this.view._disableRendering(!0)},{priority:"highest"}),this.listenTo(this.model,"_afterChanges",()=>{this.view._disableRendering(!1)},{priority:"lowest"}),this.listenTo(n,"change",()=>{this.view.change(e=>{this.downcastDispatcher.convertChanges(n.differ,o,e),this.downcastDispatcher.convertSelection(i,o,e)})},{priority:"low"}),this.listenTo(this.view.document,"selectionChange",function(e,t){return(n,i)=>{const o=i.newSelection,r=[];for(const e of o.getRanges())r.push(t.toModelRange(e));const s=e.createSelection(r,{backward:o.isBackward});s.isEqual(e.document.selection)||e.change(e=>{e.setSelection(s)})}}(this.model,this.mapper)),this.downcastDispatcher.on("insert:$text",(e,t,n)=>{if(!n.consumable.consume(t.item,e.name))return;const i=n.writer,o=n.mapper.toViewPosition(t.range.start),r=i.createText(t.item.data);i.insert(o,r)},{priority:"lowest"}),this.downcastDispatcher.on("insert",(e,t,n)=>{n.convertAttributes(t.item),t.reconversion||!t.item.is("element")||t.item.isEmpty||n.convertChildren(t.item)},{priority:"lowest"}),this.downcastDispatcher.on("remove",(e,t,n)=>{const i=n.mapper.toViewPosition(t.position),o=t.position.getShiftedBy(t.length),r=n.mapper.toViewPosition(o,{isPhantom:!0}),s=n.writer.createRange(i,r),a=n.writer.remove(s.getTrimmed());for(const e of n.writer.createRangeIn(a).getItems())n.mapper.unbindViewElement(e,{defer:!0})},{priority:"low"}),this.downcastDispatcher.on("selection",(e,t,n)=>{const i=n.writer,o=i.document.selection;for(const e of o.getRanges())e.isCollapsed&&e.end.parent.isAttached()&&n.writer.mergeAttributes(e.start);i.setSelection(null)},{priority:"high"}),this.downcastDispatcher.on("selection",(e,t,n)=>{const i=t.selection;if(i.isCollapsed)return;if(!n.consumable.consume(i,"selection"))return;const o=[];for(const e of i.getRanges()){const t=n.mapper.toViewRange(e);o.push(t)}n.writer.setSelection(o,{backward:i.isBackward})},{priority:"low"}),this.downcastDispatcher.on("selection",(e,t,n)=>{const i=t.selection;if(!i.isCollapsed)return;if(!n.consumable.consume(i,"selection"))return;const o=n.writer,r=i.getFirstPosition(),s=n.mapper.toViewPosition(r),a=o.breakAttributes(s);o.setSelection(a)},{priority:"low"}),this.view.document.roots.bindTo(this.model.document.roots).using(e=>{if("$graveyard"==e.rootName)return null;const t=new Wi(this.view.document,e.name);return t.rootName=e.rootName,this.mapper.bindElements(e,t),t})}destroy(){this.view.destroy(),this.stopListening()}reconvertMarker(e){const t="string"==typeof e?e:e.name,n=this.model.markers.get(t);if(!n)throw new u("editingcontroller-reconvertmarker-marker-not-exist",this,{markerName:t});this.model.change(()=>{this.model.markers._refresh(n)})}reconvertItem(e){this.model.change(()=>{this.model.document.differ._refreshItem(e)})}}rt(La,Qe);class Va{constructor(){this._commands=new Map}add(e,t){this._commands.set(e,t)}get(e){return this._commands.get(e)}execute(e,...t){const n=this.get(e);if(!n)throw new u("commandcollection-command-not-found",this,{commandName:e});return n.execute(...t)}*names(){yield*this._commands.keys()}*commands(){yield*this._commands.values()}[Symbol.iterator](){return this._commands[Symbol.iterator]()}destroy(){for(const e of this.commands())e.destroy()}}class Ua{constructor(){this._consumables=new Map}add(e,t){let n;e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!0):(this._consumables.has(e)?n=this._consumables.get(e):(n=new Ga(e),this._consumables.set(e,n)),n.add(t))}test(e,t){const n=this._consumables.get(e);return void 0===n?null:e.is("$text")||e.is("documentFragment")?n:n.test(t)}consume(e,t){return!!this.test(e,t)&&(e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!1):this._consumables.get(e).consume(t),!0)}revert(e,t){const n=this._consumables.get(e);void 0!==n&&(e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!0):n.revert(t))}static consumablesFromElement(e){const t={element:e,name:!0,attributes:[],classes:[],styles:[]},n=e.getAttributeKeys();for(const e of n)"style"!=e&&"class"!=e&&t.attributes.push(e);const i=e.getClassNames();for(const e of i)t.classes.push(e);const o=e.getStyleNames();for(const e of o)t.styles.push(e);return t}static createFrom(e,t){if(t||(t=new Ua(e)),e.is("$text"))return t.add(e),t;e.is("element")&&t.add(e,Ua.consumablesFromElement(e)),e.is("documentFragment")&&t.add(e);for(const n of e.getChildren())t=Ua.createFrom(n,t);return t}}class Ga{constructor(e){this.element=e,this._canConsumeName=null,this._consumables={attributes:new Map,styles:new Map,classes:new Map}}add(e){e.name&&(this._canConsumeName=!0);for(const t in this._consumables)t in e&&this._add(t,e[t])}test(e){if(e.name&&!this._canConsumeName)return this._canConsumeName;for(const t in this._consumables)if(t in e){const n=this._test(t,e[t]);if(!0!==n)return n}return!0}consume(e){e.name&&(this._canConsumeName=!1);for(const t in this._consumables)t in e&&this._consume(t,e[t])}revert(e){e.name&&(this._canConsumeName=!0);for(const t in this._consumables)t in e&&this._revert(t,e[t])}_add(e,t){const n=Ie(t)?t:[t],i=this._consumables[e];for(const t of n){if("attributes"===e&&("class"===t||"style"===t))throw new u("viewconsumable-invalid-attribute",this);if(i.set(t,!0),"styles"===e)for(const e of this.element.document.stylesProcessor.getRelatedStyles(t))i.set(e,!0)}}_test(e,t){const n=Ie(t)?t:[t],i=this._consumables[e];for(const t of n)if("attributes"!==e||"class"!==t&&"style"!==t){const e=i.get(t);if(void 0===e)return null;if(!e)return!1}else{const e="class"==t?"classes":"styles",n=this._test(e,[...this._consumables[e].keys()]);if(!0!==n)return n}return!0}_consume(e,t){const n=Ie(t)?t:[t],i=this._consumables[e];for(const t of n)if("attributes"!==e||"class"!==t&&"style"!==t){if(i.set(t,!1),"styles"==e)for(const e of this.element.document.stylesProcessor.getRelatedStyles(t))i.set(e,!1)}else{const e="class"==t?"classes":"styles";this._consume(e,[...this._consumables[e].keys()])}}_revert(e,t){const n=Ie(t)?t:[t],i=this._consumables[e];for(const t of n)if("attributes"!==e||"class"!==t&&"style"!==t)!1===i.get(t)&&i.set(t,!0);else{const e="class"==t?"classes":"styles";this._revert(e,[...this._consumables[e].keys()])}}}class Wa{constructor(){this._sourceDefinitions={},this._attributeProperties={},this.decorate("checkChild"),this.decorate("checkAttribute"),this.on("checkAttribute",(e,t)=>{t[0]=new qa(t[0])},{priority:"highest"}),this.on("checkChild",(e,t)=>{t[0]=new qa(t[0]),t[1]=this.getDefinition(t[1])},{priority:"highest"})}register(e,t){if(this._sourceDefinitions[e])throw new u("schema-cannot-register-item-twice",this,{itemName:e});this._sourceDefinitions[e]=[Object.assign({},t)],this._clearCache()}extend(e,t){if(!this._sourceDefinitions[e])throw new u("schema-cannot-extend-missing-item",this,{itemName:e});this._sourceDefinitions[e].push(Object.assign({},t)),this._clearCache()}getDefinitions(){return this._compiledDefinitions||this._compile(),this._compiledDefinitions}getDefinition(e){let t;return t="string"==typeof e?e:e.is&&(e.is("$text")||e.is("$textProxy"))?"$text":e.name,this.getDefinitions()[t]}isRegistered(e){return!!this.getDefinition(e)}isBlock(e){const t=this.getDefinition(e);return!(!t||!t.isBlock)}isLimit(e){const t=this.getDefinition(e);return!(!t||!t.isLimit&&!t.isObject)}isObject(e){const t=this.getDefinition(e);return!!t&&!!(t.isObject||t.isLimit&&t.isSelectable&&t.isContent)}isInline(e){const t=this.getDefinition(e);return!(!t||!t.isInline)}isSelectable(e){const t=this.getDefinition(e);return!(!t||!t.isSelectable&&!t.isObject)}isContent(e){const t=this.getDefinition(e);return!(!t||!t.isContent&&!t.isObject)}checkChild(e,t){return!!t&&this._checkContextMatch(t,e)}checkAttribute(e,t){const n=this.getDefinition(e.last);return!!n&&n.allowAttributes.includes(t)}checkMerge(e,t=null){if(e instanceof Hs){const t=e.nodeBefore,n=e.nodeAfter;if(!(t instanceof Gs))throw new u("schema-check-merge-no-element-before",this);if(!(n instanceof Gs))throw new u("schema-check-merge-no-element-after",this);return this.checkMerge(t,n)}for(const n of t.getChildren())if(!this.checkChild(e,n))return!1;return!0}addChildCheck(e){this.on("checkChild",(t,[n,i])=>{if(!i)return;const o=e(n,i);"boolean"==typeof o&&(t.stop(),t.return=o)},{priority:"high"})}addAttributeCheck(e){this.on("checkAttribute",(t,[n,i])=>{const o=e(n,i);"boolean"==typeof o&&(t.stop(),t.return=o)},{priority:"high"})}setAttributeProperties(e,t){this._attributeProperties[e]=Object.assign(this.getAttributeProperties(e),t)}getAttributeProperties(e){return this._attributeProperties[e]||{}}getLimitElement(e){let t;for(t=e instanceof Hs?e.parent:(e instanceof Js?[e]:Array.from(e.getRanges())).reduce((e,t)=>{const n=t.getCommonAncestor();return e?e.getCommonAncestor(n,{includeSelf:!0}):n},null);!this.isLimit(t)&&t.parent;)t=t.parent;return t}checkAttributeInSelection(e,t){if(e.isCollapsed){const n=[...e.getFirstPosition().getAncestors(),new Ls("",e.getAttributes())];return this.checkAttribute(n,t)}{const n=e.getRanges();for(const e of n)for(const n of e)if(this.checkAttribute(n.item,t))return!0}return!1}*getValidRanges(e,t){e=function*(e){for(const t of e)yield*t.getMinimalFlatRanges()}(e);for(const n of e)yield*this._getValidRangesForRange(n,t)}getNearestSelectionRange(e,t="both"){if(this.checkChild(e,"$text"))return new Js(e);let n,i;const o=e.getAncestors().reverse().find(e=>this.isLimit(e))||e.root;"both"!=t&&"backward"!=t||(n=new Ws({boundaries:Js._createIn(o),startPosition:e,direction:"backward"})),"both"!=t&&"forward"!=t||(i=new Ws({boundaries:Js._createIn(o),startPosition:e}));for(const e of function*(e,t){let n=!1;for(;!n;){if(n=!0,e){const t=e.next();t.done||(n=!1,yield{walker:e,value:t.value})}if(t){const e=t.next();e.done||(n=!1,yield{walker:t,value:e.value})}}}(n,i)){const t=e.walker==n?"elementEnd":"elementStart",i=e.value;if(i.type==t&&this.isObject(i.item))return Js._createOn(i.item);if(this.checkChild(i.nextPosition,"$text"))return new Js(i.nextPosition)}return null}findAllowedParent(e,t){let n=e.parent;for(;n;){if(this.checkChild(n,t))return n;if(this.isLimit(n))return null;n=n.parent}return null}setAllowedAttributes(e,t,n){const i=n.model;for(const[o,r]of Object.entries(t))i.schema.checkAttribute(e,o)&&n.setAttribute(o,r,e)}removeDisallowedAttributes(e,t){for(const n of e)if(n.is("$text"))rc(this,n,t);else{const e=Js._createIn(n).getPositions();for(const n of e)rc(this,n.nodeBefore||n.parent,t)}}getAttributesWithProperty(e,t,n){const i={};for(const[o,r]of e.getAttributes()){const e=this.getAttributeProperties(o);void 0!==e[t]&&(void 0!==n&&n!==e[t]||(i[o]=r))}return i}createContext(e){return new qa(e)}_clearCache(){this._compiledDefinitions=null}_compile(){const e={},t=this._sourceDefinitions,n=Object.keys(t);for(const i of n)e[i]=Ha(t[i],i);for(const t of n)Ka(e,t);for(const t of n)Ya(e,t);for(const t of n)Za(e,t);for(const t of n)Ja(e,t),Xa(e,t);for(const t of n)Qa(e,t),ec(e,t),tc(e,t);this._compiledDefinitions=e}_checkContextMatch(e,t,n=t.length-1){const i=t.getItem(n);if(e.allowIn.includes(i.name)){if(0==n)return!0;{const e=this.getDefinition(i);return this._checkContextMatch(e,t,n-1)}}return!1}*_getValidRangesForRange(e,t){let n=e.start,i=e.start;for(const o of e.getItems({shallow:!0}))o.is("element")&&(yield*this._getValidRangesForRange(Js._createIn(o),t)),this.checkAttribute(o,t)||(n.isEqual(i)||(yield new Js(n,i)),n=Hs._createAfter(o)),i=Hs._createAfter(o);n.isEqual(i)||(yield new Js(n,i))}}rt(Wa,Qe);class qa{constructor(e){if(e instanceof qa)return e;"string"==typeof e?e=[e]:Array.isArray(e)||(e=e.getAncestors({includeSelf:!0})),this._items=e.map(oc)}get length(){return this._items.length}get last(){return this._items[this._items.length-1]}[Symbol.iterator](){return this._items[Symbol.iterator]()}push(e){const t=new qa([e]);return t._items=[...this._items,...t._items],t}getItem(e){return this._items[e]}*getNames(){yield*this._items.map(e=>e.name)}endsWith(e){return Array.from(this.getNames()).join(" ").endsWith(e)}startsWith(e){return Array.from(this.getNames()).join(" ").startsWith(e)}}function Ha(e,t){const n={name:t,allowIn:[],allowContentOf:[],allowWhere:[],allowAttributes:[],allowAttributesOf:[],allowChildren:[],inheritTypesFrom:[]};return function(e,t){for(const n of e){const e=Object.keys(n).filter(e=>e.startsWith("is"));for(const i of e)t[i]=n[i]}}(e,n),nc(e,n,"allowIn"),nc(e,n,"allowContentOf"),nc(e,n,"allowWhere"),nc(e,n,"allowAttributes"),nc(e,n,"allowAttributesOf"),nc(e,n,"allowChildren"),nc(e,n,"inheritTypesFrom"),function(e,t){for(const n of e){const e=n.inheritAllFrom;e&&(t.allowContentOf.push(e),t.allowWhere.push(e),t.allowAttributesOf.push(e),t.inheritTypesFrom.push(e))}}(e,n),n}function Ka(e,t){const n=e[t];for(const i of n.allowChildren){const n=e[i];n&&n.allowIn.push(t)}n.allowChildren.length=0}function Ya(e,t){for(const n of e[t].allowContentOf)e[n]&&ic(e,n).forEach(e=>{e.allowIn.push(t)});delete e[t].allowContentOf}function Za(e,t){for(const n of e[t].allowWhere){const i=e[n];if(i){const n=i.allowIn;e[t].allowIn.push(...n)}}delete e[t].allowWhere}function Ja(e,t){for(const n of e[t].allowAttributesOf){const i=e[n];if(i){const n=i.allowAttributes;e[t].allowAttributes.push(...n)}}delete e[t].allowAttributesOf}function Xa(e,t){const n=e[t];for(const t of n.inheritTypesFrom){const i=e[t];if(i){const e=Object.keys(i).filter(e=>e.startsWith("is"));for(const t of e)t in n||(n[t]=i[t])}}delete n.inheritTypesFrom}function Qa(e,t){const n=e[t],i=n.allowIn.filter(t=>e[t]);n.allowIn=Array.from(new Set(i))}function ec(e,t){const n=e[t];for(const i of n.allowIn)e[i].allowChildren.push(t)}function tc(e,t){const n=e[t];n.allowAttributes=Array.from(new Set(n.allowAttributes))}function nc(e,t,n){for(const i of e)"string"==typeof i[n]?t[n].push(i[n]):Array.isArray(i[n])&&t[n].push(...i[n])}function ic(e,t){const n=e[t];return function(e){return Object.keys(e).map(t=>e[t])}(e).filter(e=>e.allowIn.includes(n.name))}function oc(e){return"string"==typeof e||e.is("documentFragment")?{name:"string"==typeof e?e:"$documentFragment",*getAttributeKeys(){},getAttribute(){}}:{name:e.is("element")?e.name:"$text",*getAttributeKeys(){yield*e.getAttributeKeys()},getAttribute:t=>e.getAttribute(t)}}function rc(e,t,n){for(const i of t.getAttributeKeys())e.checkAttribute(t,i)||n.removeAttribute(i,t)}class sc{constructor(e={}){this._splitParts=new Map,this._cursorParents=new Map,this._modelCursor=null,this._emptyElementsToKeep=new Set,this.conversionApi=Object.assign({},e),this.conversionApi.convertItem=this._convertItem.bind(this),this.conversionApi.convertChildren=this._convertChildren.bind(this),this.conversionApi.safeInsert=this._safeInsert.bind(this),this.conversionApi.updateConversionResult=this._updateConversionResult.bind(this),this.conversionApi.splitToAllowedParent=this._splitToAllowedParent.bind(this),this.conversionApi.getSplitParts=this._getSplitParts.bind(this),this.conversionApi.keepEmptyElement=this._keepEmptyElement.bind(this)}convert(e,t,n=["$root"]){this.fire("viewCleanup",e),this._modelCursor=function(e,t){let n;for(const i of new qa(e)){const e={};for(const t of i.getAttributeKeys())e[t]=i.getAttribute(t);const o=t.createElement(i.name,e);n&&t.append(o,n),n=Hs._createAt(o,0)}return n}(n,t),this.conversionApi.writer=t,this.conversionApi.consumable=Ua.createFrom(e),this.conversionApi.store={};const{modelRange:i}=this._convertItem(e,this._modelCursor),o=t.createDocumentFragment();if(i){this._removeEmptyElements();for(const e of Array.from(this._modelCursor.parent.getChildren()))t.append(e,o);o.markers=function(e,t){const n=new Set,i=new Map,o=Js._createIn(e).getItems();for(const e of o)"$marker"==e.name&&n.add(e);for(const e of n){const n=e.getAttribute("data-name"),o=t.createPositionBefore(e);i.has(n)?i.get(n).end=o.clone():i.set(n,new Js(o.clone())),t.remove(e)}return i}(o,t)}return this._modelCursor=null,this._splitParts.clear(),this._cursorParents.clear(),this._emptyElementsToKeep.clear(),this.conversionApi.writer=null,this.conversionApi.store=null,o}_convertItem(e,t){const n=Object.assign({viewItem:e,modelCursor:t,modelRange:null});if(e.is("element")?this.fire("element:"+e.name,n,this.conversionApi):e.is("$text")?this.fire("text",n,this.conversionApi):this.fire("documentFragment",n,this.conversionApi),n.modelRange&&!(n.modelRange instanceof Js))throw new u("view-conversion-dispatcher-incorrect-result",this);return{modelRange:n.modelRange,modelCursor:n.modelCursor}}_convertChildren(e,t){let n=t.is("position")?t:Hs._createAt(t,0);const i=new Js(n);for(const t of Array.from(e.getChildren())){const e=this._convertItem(t,n);e.modelRange instanceof Js&&(i.end=e.modelRange.end,n=e.modelCursor)}return{modelRange:i,modelCursor:n}}_safeInsert(e,t){const n=this._splitToAllowedParent(e,t);return!!n&&(this.conversionApi.writer.insert(e,n.position),!0)}_updateConversionResult(e,t){const n=this._getSplitParts(e),i=this.conversionApi.writer;t.modelRange||(t.modelRange=i.createRange(i.createPositionBefore(e),i.createPositionAfter(n[n.length-1])));const o=this._cursorParents.get(e);t.modelCursor=o?i.createPositionAt(o,0):t.modelRange.end}_splitToAllowedParent(e,t){const{schema:n,writer:i}=this.conversionApi;let o=n.findAllowedParent(t,e);if(o){if(o===t.parent)return{position:t};this._modelCursor.parent.getAncestors().includes(o)&&(o=null)}if(!o)return Pa(t,e,n)?{position:Ra(t,i)}:null;const r=this.conversionApi.writer.split(t,o),s=[];for(const e of r.range.getWalker())if("elementEnd"==e.type)s.push(e.item);else{const t=s.pop(),n=e.item;this._registerSplitPair(t,n)}const a=r.range.end.parent;return this._cursorParents.set(e,a),{position:r.position,cursorParent:a}}_registerSplitPair(e,t){this._splitParts.has(e)||this._splitParts.set(e,[e]);const n=this._splitParts.get(e);this._splitParts.set(t,n),n.push(t)}_getSplitParts(e){let t;return t=this._splitParts.has(e)?this._splitParts.get(e):[e],t}_keepEmptyElement(e){this._emptyElementsToKeep.add(e)}_removeEmptyElements(){let e=!1;for(const t of this._splitParts.keys())t.isEmpty&&!this._emptyElementsToKeep.has(t)&&(this.conversionApi.writer.remove(t),this._splitParts.delete(t),e=!0);e&&this._removeEmptyElements()}}rt(sc,b);class ac{getHtml(e){const t=document.implementation.createHTMLDocument("").createElement("div");return t.appendChild(e),t.innerHTML}}class cc{constructor(e){this.domParser=new DOMParser,this.domConverter=new Ar(e,{renderingMode:"data"}),this.htmlWriter=new ac}toData(e){const t=this.domConverter.viewToDom(e,document);return this.htmlWriter.getHtml(t)}toView(e){const t=this._toDom(e);return this.domConverter.domToView(t)}registerRawContentMatcher(e){this.domConverter.registerRawContentMatcher(e)}useFillerType(e){this.domConverter.blockFillerMode="marked"==e?"markedNbsp":"nbsp"}_toDom(e){e.match(/<(?:html|body|head|meta)(?:\s[^>]*)?>/i)||(e=`${e}`);const t=this.domParser.parseFromString(e,"text/html"),n=t.createDocumentFragment(),i=t.body.childNodes;for(;i.length>0;)n.appendChild(i[0]);return n}}class lc{constructor(e,t){this.model=e,this.mapper=new Xs,this.downcastDispatcher=new ta({mapper:this.mapper,schema:e.schema}),this.downcastDispatcher.on("insert:$text",(e,t,n)=>{if(!n.consumable.consume(t.item,e.name))return;const i=n.writer,o=n.mapper.toViewPosition(t.range.start),r=i.createText(t.item.data);i.insert(o,r)},{priority:"lowest"}),this.downcastDispatcher.on("insert",(e,t,n)=>{n.convertAttributes(t.item),t.reconversion||!t.item.is("element")||t.item.isEmpty||n.convertChildren(t.item)},{priority:"lowest"}),this.upcastDispatcher=new sc({schema:e.schema}),this.viewDocument=new ao(t),this.stylesProcessor=t,this.htmlProcessor=new cc(this.viewDocument),this.processor=this.htmlProcessor,this._viewWriter=new Do(this.viewDocument),this.upcastDispatcher.on("text",(e,t,{schema:n,consumable:i,writer:o})=>{let r=t.modelCursor;if(!i.test(t.viewItem))return;if(!n.checkChild(r,"$text")){if(!Pa(r,"$text",n))return;r=Ra(r,o)}i.consume(t.viewItem);const s=o.createText(t.viewItem.data);o.insert(s,r),t.modelRange=o.createRange(r,r.getShiftedBy(s.offsetSize)),t.modelCursor=t.modelRange.end},{priority:"lowest"}),this.upcastDispatcher.on("element",(e,t,n)=>{if(!t.modelRange&&n.consumable.consume(t.viewItem,{name:!0})){const{modelRange:e,modelCursor:i}=n.convertChildren(t.viewItem,t.modelCursor);t.modelRange=e,t.modelCursor=i}},{priority:"lowest"}),this.upcastDispatcher.on("documentFragment",(e,t,n)=>{if(!t.modelRange&&n.consumable.consume(t.viewItem,{name:!0})){const{modelRange:e,modelCursor:i}=n.convertChildren(t.viewItem,t.modelCursor);t.modelRange=e,t.modelCursor=i}},{priority:"lowest"}),this.decorate("init"),this.decorate("set"),this.decorate("get"),this.on("init",()=>{this.fire("ready")},{priority:"lowest"}),this.on("ready",()=>{this.model.enqueueChange({isUndoable:!1},Da)},{priority:"lowest"})}get(e={}){const{rootName:t="main",trim:n="empty"}=e;if(!this._checkIfRootsExists([t]))throw new u("datacontroller-get-non-existent-root",this);const i=this.model.document.getRoot(t);return"empty"!==n||this.model.hasContent(i,{ignoreWhitespaces:!0})?this.stringify(i,e):""}stringify(e,t={}){const n=this.toView(e,t);return this.processor.toData(n)}toView(e,t={}){const n=this.viewDocument,i=this._viewWriter;this.mapper.clearBindings();const o=Js._createIn(e),r=new To(n);this.mapper.bindElements(e,r);const s=e.is("documentFragment")?e.markers:function(e){const t=[],n=e.root.document;if(!n)return new Map;const i=Js._createIn(e);for(const e of n.model.markers){const n=e.getRange(),o=n.isCollapsed,r=n.start.isEqual(i.start)||n.end.isEqual(i.end);if(o&&r)t.push([e.name,n]);else{const o=i.getIntersection(n);o&&t.push([e.name,o])}}return t.sort(([e,t],[n,i])=>{if("after"!==t.end.compareWith(i.start))return 1;if("before"!==t.start.compareWith(i.end))return-1;switch(t.start.compareWith(i.start)){case"before":return 1;case"after":return-1;default:switch(t.end.compareWith(i.end)){case"before":return 1;case"after":return-1;default:return n.localeCompare(e)}}}),new Map(t)}(e);return this.downcastDispatcher.convert(o,s,i,t),r}init(e){if(this.model.document.version)throw new u("datacontroller-init-document-not-empty",this);let t={};if("string"==typeof e?t.main=e:t=e,!this._checkIfRootsExists(Object.keys(t)))throw new u("datacontroller-init-non-existent-root",this);return this.model.enqueueChange({isUndoable:!1},e=>{for(const n of Object.keys(t)){const i=this.model.document.getRoot(n);e.insert(this.parse(t[n],i),i,0)}}),Promise.resolve()}set(e,t={}){let n={};if("string"==typeof e?n.main=e:n=e,!this._checkIfRootsExists(Object.keys(n)))throw new u("datacontroller-set-non-existent-root",this);this.model.enqueueChange(t.batchType||{},e=>{e.setSelection(null),e.removeSelectionAttribute(this.model.document.selection.getAttributeKeys());for(const t of Object.keys(n)){const i=this.model.document.getRoot(t);e.remove(e.createRangeIn(i)),e.insert(this.parse(n[t],i),i,0)}})}parse(e,t="$root"){const n=this.processor.toView(e);return this.toModel(n,t)}toModel(e,t="$root"){return this.model.change(n=>this.upcastDispatcher.convert(e,n,t))}addStyleProcessorRules(e){e(this.stylesProcessor)}registerRawContentMatcher(e){this.processor&&this.processor!==this.htmlProcessor&&this.processor.registerRawContentMatcher(e),this.htmlProcessor.registerRawContentMatcher(e)}destroy(){this.stopListening()}_checkIfRootsExists(e){for(const t of e)if(!this.model.document.getRootNames().includes(t))return!1;return!0}}rt(lc,Qe);class dc{constructor(e,t){this._helpers=new Map,this._downcast=Wn(e),this._createConversionHelpers({name:"downcast",dispatchers:this._downcast,isDowncast:!0}),this._upcast=Wn(t),this._createConversionHelpers({name:"upcast",dispatchers:this._upcast,isDowncast:!1})}addAlias(e,t){const n=this._downcast.includes(t);if(!this._upcast.includes(t)&&!n)throw new u("conversion-add-alias-dispatcher-not-registered",this);this._createConversionHelpers({name:e,dispatchers:[t],isDowncast:n})}for(e){if(!this._helpers.has(e))throw new u("conversion-for-unknown-group",this);return this._helpers.get(e)}elementToElement(e){this.for("downcast").elementToElement(e);for(const{model:t,view:n}of uc(e))this.for("upcast").elementToElement({model:t,view:n,converterPriority:e.converterPriority})}attributeToElement(e){this.for("downcast").attributeToElement(e);for(const{model:t,view:n}of uc(e))this.for("upcast").elementToAttribute({view:n,model:t,converterPriority:e.converterPriority})}attributeToAttribute(e){this.for("downcast").attributeToAttribute(e);for(const{model:t,view:n}of uc(e))this.for("upcast").attributeToAttribute({view:n,model:t})}_createConversionHelpers({name:e,dispatchers:t,isDowncast:n}){if(this._helpers.has(e))throw new u("conversion-group-exists",this);const i=n?new ba(t):new Oa(t);this._helpers.set(e,i)}}function*uc(e){if(e.model.values)for(const t of e.model.values){const n={key:e.model.key,value:t},i=e.view[t],o=e.upcastAlso?e.upcastAlso[t]:void 0;yield*hc(n,i,o)}else yield*hc(e.model,e.view,e.upcastAlso)}function*hc(e,t,n){if(yield{model:e,view:t},n)for(const t of Wn(n))yield{model:e,view:t}}class mc{constructor(e={}){"string"==typeof e&&(e="transparent"===e?{isUndoable:!1}:{},h("batch-constructor-deprecated-string-type"));const{isUndoable:t=!0,isLocal:n=!0,isUndo:i=!1,isTyping:o=!1}=e;this.operations=[],this.isUndoable=t,this.isLocal=n,this.isUndo=i,this.isTyping=o}get type(){return h("batch-type-deprecated"),"default"}get baseVersion(){for(const e of this.operations)if(null!==e.baseVersion)return e.baseVersion;return null}addOperation(e){return e.batch=this,this.operations.push(e),e}}class gc{constructor(e){this.baseVersion=e,this.isDocumentOperation=null!==this.baseVersion,this.batch=null}_validate(){}toJSON(){const e=Object.assign({},this);return e.__className=this.constructor.className,delete e.batch,delete e.isDocumentOperation,e}static get className(){return"Operation"}static fromJSON(e){return new this(e.baseVersion)}}class pc{constructor(e){this.markers=new Map,this._children=new Us,e&&this._insertChild(0,e)}[Symbol.iterator](){return this.getChildren()}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}get root(){return this}get parent(){return null}is(e){return"documentFragment"===e||"model:documentFragment"===e}getChild(e){return this._children.getNode(e)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(e){return this._children.getNodeIndex(e)}getChildStartOffset(e){return this._children.getNodeStartOffset(e)}getPath(){return[]}getNodeByPath(e){let t=this;for(const n of e)t=t.getChild(t.offsetToIndex(n));return t}offsetToIndex(e){return this._children.offsetToIndex(e)}toJSON(){const e=[];for(const t of this._children)e.push(t.toJSON());return e}static fromJSON(e){const t=[];for(const n of e)n.name?t.push(Gs.fromJSON(n)):t.push(Ls.fromJSON(n));return new pc(t)}_appendChild(e){this._insertChild(this.childCount,e)}_insertChild(e,t){const n=function(e){return"string"==typeof e?[new Ls(e)]:(Vn(e)||(e=[e]),Array.from(e).map(e=>"string"==typeof e?new Ls(e):e instanceof Vs?new Ls(e.data,e.getAttributes()):e))}(t);for(const e of n)null!==e.parent&&e._remove(),e.parent=this;this._children._insertNodes(e,n)}_removeChildren(e,t=1){const n=this._children._removeNodes(e,t);for(const e of n)e.parent=null;return n}}function fc(e,t){const n=(t=kc(t)).reduce((e,t)=>e+t.offsetSize,0),i=e.parent;Ac(e);const o=e.index;return i._insertChild(o,t),vc(i,o+t.length),vc(i,o),new Js(e,e.getShiftedBy(n))}function _c(e){if(!e.isFlat)throw new u("operation-utils-remove-range-not-flat",this);const t=e.start.parent;Ac(e.start),Ac(e.end);const n=t._removeChildren(e.start.index,e.end.index-e.start.index);return vc(t,e.start.index),n}function bc(e,t){if(!e.isFlat)throw new u("operation-utils-move-range-not-flat",this);const n=_c(e);return fc(t=t._getTransformedByDeletion(e.start,e.end.offset-e.start.offset),n)}function kc(e){const t=[];e instanceof Array||(e=[e]);for(let n=0;ne.maxOffset)throw new u("move-operation-nodes-do-not-exist",this);if(e===t&&n=n&&this.targetPosition.path[e]e._clone(!0))),t=new Sc(this.position,e,this.baseVersion);return t.shouldReceiveAttributes=this.shouldReceiveAttributes,t}getReversed(){const e=this.position.root.document.graveyard,t=new Hs(e,[0]);return new xc(this.position,this.nodes.maxOffset,t,this.baseVersion+1)}_validate(){const e=this.position.parent;if(!e||e.maxOffsete._clone(!0))),fc(this.position,e)}toJSON(){const e=super.toJSON();return e.position=this.position.toJSON(),e.nodes=this.nodes.toJSON(),e}static get className(){return"InsertOperation"}static fromJSON(e,t){const n=[];for(const t of e.nodes)t.name?n.push(Gs.fromJSON(t)):n.push(Ls.fromJSON(t));const i=new Sc(Hs.fromJSON(e.position,t),n,e.baseVersion);return i.shouldReceiveAttributes=e.shouldReceiveAttributes,i}}class Ec extends gc{constructor(e,t,n,i,o,r){super(r),this.name=e,this.oldRange=t?t.clone():null,this.newRange=n?n.clone():null,this.affectsData=o,this._markers=i}get type(){return"marker"}clone(){return new Ec(this.name,this.oldRange,this.newRange,this._markers,this.affectsData,this.baseVersion)}getReversed(){return new Ec(this.name,this.newRange,this.oldRange,this._markers,this.affectsData,this.baseVersion+1)}_execute(){const e=this.newRange?"_set":"_remove";this._markers[e](this.name,this.newRange,!0,this.affectsData)}toJSON(){const e=super.toJSON();return this.oldRange&&(e.oldRange=this.oldRange.toJSON()),this.newRange&&(e.newRange=this.newRange.toJSON()),delete e._markers,e}static get className(){return"MarkerOperation"}static fromJSON(e,t){return new Ec(e.name,e.oldRange?Js.fromJSON(e.oldRange,t):null,e.newRange?Js.fromJSON(e.newRange,t):null,t.model.markers,e.affectsData,e.baseVersion)}}class jc extends gc{constructor(e,t,n,i){super(i),this.position=e,this.position.stickiness="toNext",this.oldName=t,this.newName=n}get type(){return"rename"}clone(){return new jc(this.position.clone(),this.oldName,this.newName,this.baseVersion)}getReversed(){return new jc(this.position.clone(),this.newName,this.oldName,this.baseVersion+1)}_validate(){const e=this.position.nodeAfter;if(!(e instanceof Gs))throw new u("rename-operation-wrong-position",this);if(e.name!==this.oldName)throw new u("rename-operation-wrong-name",this)}_execute(){this.position.nodeAfter.name=this.newName}toJSON(){const e=super.toJSON();return e.position=this.position.toJSON(),e}static get className(){return"RenameOperation"}static fromJSON(e,t){return new jc(Hs.fromJSON(e.position,t),e.oldName,e.newName,e.baseVersion)}}class Tc extends gc{constructor(e,t,n,i,o){super(o),this.root=e,this.key=t,this.oldValue=n,this.newValue=i}get type(){return null===this.oldValue?"addRootAttribute":null===this.newValue?"removeRootAttribute":"changeRootAttribute"}clone(){return new Tc(this.root,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new Tc(this.root,this.key,this.newValue,this.oldValue,this.baseVersion+1)}_validate(){if(this.root!=this.root.root||this.root.is("documentFragment"))throw new u("rootattribute-operation-not-a-root",this,{root:this.root,key:this.key});if(null!==this.oldValue&&this.root.getAttribute(this.key)!==this.oldValue)throw new u("rootattribute-operation-wrong-old-value",this,{root:this.root,key:this.key});if(null===this.oldValue&&null!==this.newValue&&this.root.hasAttribute(this.key))throw new u("rootattribute-operation-attribute-exists",this,{root:this.root,key:this.key})}_execute(){null!==this.newValue?this.root._setAttribute(this.key,this.newValue):this.root._removeAttribute(this.key)}toJSON(){const e=super.toJSON();return e.root=this.root.toJSON(),e}static get className(){return"RootAttributeOperation"}static fromJSON(e,t){if(!t.getRoot(e.root))throw new u("rootattribute-operation-fromjson-no-root",this,{rootName:e.root});return new Tc(t.getRoot(e.root),e.key,e.oldValue,e.newValue,e.baseVersion)}}class Dc extends gc{constructor(e,t,n,i,o){super(o),this.sourcePosition=e.clone(),this.sourcePosition.stickiness="toPrevious",this.howMany=t,this.targetPosition=n.clone(),this.targetPosition.stickiness="toNext",this.graveyardPosition=i.clone()}get type(){return"merge"}get deletionPosition(){return new Hs(this.sourcePosition.root,this.sourcePosition.path.slice(0,-1))}get movedRange(){const e=this.sourcePosition.getShiftedBy(Number.POSITIVE_INFINITY);return new Js(this.sourcePosition,e)}clone(){return new this.constructor(this.sourcePosition,this.howMany,this.targetPosition,this.graveyardPosition,this.baseVersion)}getReversed(){const e=this.targetPosition._getTransformedByMergeOperation(this),t=this.sourcePosition.path.slice(0,-1),n=new Hs(this.sourcePosition.root,t)._getTransformedByMergeOperation(this);return new Pc(e,this.howMany,n,this.graveyardPosition,this.baseVersion+1)}_validate(){const e=this.sourcePosition.parent,t=this.targetPosition.parent;if(!e.parent)throw new u("merge-operation-source-position-invalid",this);if(!t.parent)throw new u("merge-operation-target-position-invalid",this);if(this.howMany!=e.maxOffset)throw new u("merge-operation-how-many-invalid",this)}_execute(){const e=this.sourcePosition.parent;bc(Js._createIn(e),this.targetPosition),bc(Js._createOn(e),this.graveyardPosition)}toJSON(){const e=super.toJSON();return e.sourcePosition=e.sourcePosition.toJSON(),e.targetPosition=e.targetPosition.toJSON(),e.graveyardPosition=e.graveyardPosition.toJSON(),e}static get className(){return"MergeOperation"}static fromJSON(e,t){const n=Hs.fromJSON(e.sourcePosition,t),i=Hs.fromJSON(e.targetPosition,t),o=Hs.fromJSON(e.graveyardPosition,t);return new this(n,e.howMany,i,o,e.baseVersion)}}class Pc extends gc{constructor(e,t,n,i,o){super(o),this.splitPosition=e.clone(),this.splitPosition.stickiness="toNext",this.howMany=t,this.insertionPosition=n,this.graveyardPosition=i?i.clone():null,this.graveyardPosition&&(this.graveyardPosition.stickiness="toNext")}get type(){return"split"}get moveTargetPosition(){const e=this.insertionPosition.path.slice();return e.push(0),new Hs(this.insertionPosition.root,e)}get movedRange(){const e=this.splitPosition.getShiftedBy(Number.POSITIVE_INFINITY);return new Js(this.splitPosition,e)}clone(){return new this.constructor(this.splitPosition,this.howMany,this.insertionPosition,this.graveyardPosition,this.baseVersion)}getReversed(){const e=this.splitPosition.root.document.graveyard,t=new Hs(e,[0]);return new Dc(this.moveTargetPosition,this.howMany,this.splitPosition,t,this.baseVersion+1)}_validate(){const e=this.splitPosition.parent,t=this.splitPosition.offset;if(!e||e.maxOffset{for(const t of e.getAttributeKeys())this.removeAttribute(t,e)};if(e instanceof Js)for(const n of e.getItems())t(n);else t(e)}move(e,t,n){if(this._assertWriterUsedCorrectly(),!(e instanceof Js))throw new u("writer-move-invalid-range",this);if(!e.isFlat)throw new u("writer-move-range-not-flat",this);const i=Hs._createAt(t,n);if(i.isEqual(e.start))return;if(this._addOperationForAffectedMarkers("move",e),!Nc(e.root,i.root))throw new u("writer-move-different-document",this);const o=e.root.document?e.root.document.version:null,r=new xc(e.start,e.end.offset-e.start.offset,i,o);this.batch.addOperation(r),this.model.applyOperation(r)}remove(e){this._assertWriterUsedCorrectly();const t=(e instanceof Js?e:Js._createOn(e)).getMinimalFlatRanges().reverse();for(const e of t)this._addOperationForAffectedMarkers("move",e),$c(e.start,e.end.offset-e.start.offset,this.batch,this.model)}merge(e){this._assertWriterUsedCorrectly();const t=e.nodeBefore,n=e.nodeAfter;if(this._addOperationForAffectedMarkers("merge",e),!(t instanceof Gs))throw new u("writer-merge-no-element-before",this);if(!(n instanceof Gs))throw new u("writer-merge-no-element-after",this);e.root.document?this._merge(e):this._mergeDetached(e)}createPositionFromPath(e,t,n){return this.model.createPositionFromPath(e,t,n)}createPositionAt(e,t){return this.model.createPositionAt(e,t)}createPositionAfter(e){return this.model.createPositionAfter(e)}createPositionBefore(e){return this.model.createPositionBefore(e)}createRange(e,t){return this.model.createRange(e,t)}createRangeIn(e){return this.model.createRangeIn(e)}createRangeOn(e){return this.model.createRangeOn(e)}createSelection(e,t,n){return this.model.createSelection(e,t,n)}_mergeDetached(e){const t=e.nodeBefore,n=e.nodeAfter;this.move(Js._createIn(n),Hs._createAt(t,"end")),this.remove(n)}_merge(e){const t=Hs._createAt(e.nodeBefore,"end"),n=Hs._createAt(e.nodeAfter,0),i=e.root.document.graveyard,o=new Hs(i,[0]),r=e.root.document.version,s=new Dc(n,e.nodeAfter.maxOffset,t,o,r);this.batch.addOperation(s),this.model.applyOperation(s)}rename(e,t){if(this._assertWriterUsedCorrectly(),!(e instanceof Gs))throw new u("writer-rename-not-element-instance",this);const n=e.root.document?e.root.document.version:null,i=new jc(Hs._createBefore(e),e.name,t,n);this.batch.addOperation(i),this.model.applyOperation(i)}split(e,t){this._assertWriterUsedCorrectly();let n,i,o=e.parent;if(!o.parent)throw new u("writer-split-element-no-parent",this);if(t||(t=o.parent),!e.parent.getAncestors({includeSelf:!0}).includes(t))throw new u("writer-split-invalid-limit-element",this);do{const t=o.root.document?o.root.document.version:null,r=o.maxOffset-e.offset,s=Pc.getInsertionPosition(e),a=new Pc(e,r,s,null,t);this.batch.addOperation(a),this.model.applyOperation(a),n||i||(n=o,i=e.parent.nextSibling),o=(e=this.createPositionAfter(e.parent)).parent}while(o!==t);return{position:e,range:new Js(Hs._createAt(n,"end"),Hs._createAt(i,0))}}wrap(e,t){if(this._assertWriterUsedCorrectly(),!e.isFlat)throw new u("writer-wrap-range-not-flat",this);const n=t instanceof Gs?t:new Gs(t);if(n.childCount>0)throw new u("writer-wrap-element-not-empty",this);if(null!==n.parent)throw new u("writer-wrap-element-attached",this);this.insert(n,e.start);const i=new Js(e.start.getShiftedBy(1),e.end.getShiftedBy(1));this.move(i,Hs._createAt(n,0))}unwrap(e){if(this._assertWriterUsedCorrectly(),null===e.parent)throw new u("writer-unwrap-element-no-parent",this);this.move(Js._createIn(e),this.createPositionAfter(e)),this.remove(e)}addMarker(e,t){if(this._assertWriterUsedCorrectly(),!t||"boolean"!=typeof t.usingOperation)throw new u("writer-addmarker-no-usingoperation",this);const n=t.usingOperation,i=t.range,o=void 0!==t.affectsData&&t.affectsData;if(this.model.markers.has(e))throw new u("writer-addmarker-marker-exists",this);if(!i)throw new u("writer-addmarker-no-range",this);return n?(Mc(this,e,null,i,o),this.model.markers.get(e)):this.model.markers._set(e,i,n,o)}updateMarker(e,t){this._assertWriterUsedCorrectly();const n="string"==typeof e?e:e.name,i=this.model.markers.get(n);if(!i)throw new u("writer-updatemarker-marker-not-exists",this);if(!t)return h("writer-updatemarker-reconvert-using-editingcontroller",{markerName:n}),void this.model.markers._refresh(i);const o="boolean"==typeof t.usingOperation,r="boolean"==typeof t.affectsData,s=r?t.affectsData:i.affectsData;if(!o&&!t.range&&!r)throw new u("writer-updatemarker-wrong-options",this);const a=i.getRange(),c=t.range?t.range:a;o&&t.usingOperation!==i.managedUsingOperations?t.usingOperation?Mc(this,n,null,c,s):(Mc(this,n,a,null,s),this.model.markers._set(n,c,void 0,s)):i.managedUsingOperations?Mc(this,n,a,c,s):this.model.markers._set(n,c,void 0,s)}removeMarker(e){this._assertWriterUsedCorrectly();const t="string"==typeof e?e:e.name;if(!this.model.markers.has(t))throw new u("writer-removemarker-no-marker",this);const n=this.model.markers.get(t);n.managedUsingOperations?Mc(this,t,n.getRange(),null,n.affectsData):this.model.markers._remove(t)}setSelection(e,t,n){this._assertWriterUsedCorrectly(),this.model.document.selection._setTo(e,t,n)}setSelectionFocus(e,t){this._assertWriterUsedCorrectly(),this.model.document.selection._setFocus(e,t)}setSelectionAttribute(e,t){if(this._assertWriterUsedCorrectly(),"string"==typeof e)this._setSelectionAttribute(e,t);else for(const[t,n]of ni(e))this._setSelectionAttribute(t,n)}removeSelectionAttribute(e){if(this._assertWriterUsedCorrectly(),"string"==typeof e)this._removeSelectionAttribute(e);else for(const t of e)this._removeSelectionAttribute(t)}overrideSelectionGravity(){return this.model.document.selection._overrideGravity()}restoreSelectionGravity(e){this.model.document.selection._restoreGravity(e)}_setSelectionAttribute(e,t){const n=this.model.document.selection;if(n.isCollapsed&&n.anchor.parent.isEmpty){const i=ma._getStoreAttributeKey(e);this.setAttribute(i,t,n.anchor.parent)}n._setAttribute(e,t)}_removeSelectionAttribute(e){const t=this.model.document.selection;if(t.isCollapsed&&t.anchor.parent.isEmpty){const n=ma._getStoreAttributeKey(e);this.removeAttribute(n,t.anchor.parent)}t._removeAttribute(e)}_assertWriterUsedCorrectly(){if(this.model._currentWriter!==this)throw new u("writer-incorrect-use",this)}_addOperationForAffectedMarkers(e,t){for(const n of this.model.markers){if(!n.managedUsingOperations)continue;const i=n.getRange();let o=!1;if("move"===e)o=t.containsPosition(i.start)||t.start.isEqual(i.start)||t.containsPosition(i.end)||t.end.isEqual(i.end);else{const e=t.nodeBefore,n=t.nodeAfter,r=i.start.parent==e&&i.start.isAtEnd,s=i.end.parent==n&&0==i.end.offset,a=i.end.nodeAfter==n,c=i.start.nodeAfter==n;o=r||s||a||c}o&&this.updateMarker(n.name,{range:i})}}}function Fc(e,t,n,i){const o=e.model,r=o.document;let s,a,c,l=i.start;for(const e of i.getWalker({shallow:!0}))c=e.item.getAttribute(t),s&&a!=c&&(a!=n&&d(),l=s),s=e.nextPosition,a=c;function d(){const i=new Js(l,s),c=i.root.document?r.version:null,d=new Cc(i,t,a,n,c);e.batch.addOperation(d),o.applyOperation(d)}s instanceof Hs&&s!=l&&a!=n&&d()}function zc(e,t,n,i){const o=e.model,r=o.document,s=i.getAttribute(t);let a,c;if(s!=n){if(i.root===i){const e=i.document?r.version:null;c=new Tc(i,t,s,n,e)}else{a=new Js(Hs._createBefore(i),e.createPositionAfter(i));const o=a.root.document?r.version:null;c=new Cc(a,t,s,n,o)}e.batch.addOperation(c),o.applyOperation(c)}}function Mc(e,t,n,i,o){const r=e.model,s=r.document,a=new Ec(t,n,i,r.markers,o,s.version);e.batch.addOperation(a),r.applyOperation(a)}function $c(e,t,n,i){let o;if(e.root.document){const n=i.document,r=new Hs(n.graveyard,[0]);o=new xc(e,t,r,n.version)}else o=new Ic(e,t);n.addOperation(o),i.applyOperation(o)}function Nc(e,t){return e===t||e instanceof Rc&&t instanceof Rc}class Bc{constructor(e){this._markerCollection=e,this._changesInElement=new Map,this._elementSnapshots=new Map,this._changedMarkers=new Map,this._changeCount=0,this._cachedChanges=null,this._cachedChangesWithGraveyard=null,this._refreshedItems=new Set}get isEmpty(){return 0==this._changesInElement.size&&0==this._changedMarkers.size}bufferOperation(e){switch(e.type){case"insert":if(this._isInInsertedElement(e.position.parent))return;this._markInsert(e.position.parent,e.position.offset,e.nodes.maxOffset);break;case"addAttribute":case"removeAttribute":case"changeAttribute":for(const t of e.range.getItems({shallow:!0}))this._isInInsertedElement(t.parent)||this._markAttribute(t);break;case"remove":case"move":case"reinsert":{if(e.sourcePosition.isEqual(e.targetPosition)||e.sourcePosition.getShiftedBy(e.howMany).isEqual(e.targetPosition))return;const t=this._isInInsertedElement(e.sourcePosition.parent),n=this._isInInsertedElement(e.targetPosition.parent);t||this._markRemove(e.sourcePosition.parent,e.sourcePosition.offset,e.howMany),n||this._markInsert(e.targetPosition.parent,e.getMovedRangeStart().offset,e.howMany);break}case"rename":{if(this._isInInsertedElement(e.position.parent))return;this._markRemove(e.position.parent,e.position.offset,1),this._markInsert(e.position.parent,e.position.offset,1);const t=Js._createFromPositionAndShift(e.position,1);for(const e of this._markerCollection.getMarkersIntersectingRange(t)){const t=e.getData();this.bufferMarkerChange(e.name,t,t)}break}case"split":{const t=e.splitPosition.parent;this._isInInsertedElement(t)||this._markRemove(t,e.splitPosition.offset,e.howMany),this._isInInsertedElement(e.insertionPosition.parent)||this._markInsert(e.insertionPosition.parent,e.insertionPosition.offset,1),e.graveyardPosition&&this._markRemove(e.graveyardPosition.parent,e.graveyardPosition.offset,1);break}case"merge":{const t=e.sourcePosition.parent;this._isInInsertedElement(t.parent)||this._markRemove(t.parent,t.startOffset,1);const n=e.graveyardPosition.parent;this._markInsert(n,e.graveyardPosition.offset,1);const i=e.targetPosition.parent;this._isInInsertedElement(i)||this._markInsert(i,e.targetPosition.offset,t.maxOffset);break}}this._cachedChanges=null}bufferMarkerChange(e,t,n){const i=this._changedMarkers.get(e);i?(i.newMarkerData=n,null==i.oldMarkerData.range&&null==n.range&&this._changedMarkers.delete(e)):this._changedMarkers.set(e,{newMarkerData:n,oldMarkerData:t})}getMarkersToRemove(){const e=[];for(const[t,n]of this._changedMarkers)null!=n.oldMarkerData.range&&e.push({name:t,range:n.oldMarkerData.range});return e}getMarkersToAdd(){const e=[];for(const[t,n]of this._changedMarkers)null!=n.newMarkerData.range&&e.push({name:t,range:n.newMarkerData.range});return e}getChangedMarkers(){return Array.from(this._changedMarkers).map(([e,t])=>({name:e,data:{oldRange:t.oldMarkerData.range,newRange:t.newMarkerData.range}}))}hasDataChanges(){if(this._changesInElement.size>0)return!0;for(const{newMarkerData:e,oldMarkerData:t}of this._changedMarkers.values()){if(e.affectsData!==t.affectsData)return!0;if(e.affectsData){const n=e.range&&!t.range,i=!e.range&&t.range,o=e.range&&t.range&&!e.range.isEqual(t.range);if(n||i||o)return!0}}return!1}getChanges(e={includeChangesInGraveyard:!1}){if(this._cachedChanges)return e.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice();let t=[];for(const e of this._changesInElement.keys()){const n=this._changesInElement.get(e).sort((e,t)=>e.offset===t.offset?e.type!=t.type?"remove"==e.type?-1:1:0:e.offsete.position.root!=t.position.root?e.position.root.rootNamee);for(const e of t)delete e.changeCount,"attribute"==e.type&&(delete e.position,delete e.length);return this._changeCount=0,this._cachedChangesWithGraveyard=t,this._cachedChanges=t.filter(Uc),e.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice()}getRefreshedItems(){return new Set(this._refreshedItems)}reset(){this._changesInElement.clear(),this._elementSnapshots.clear(),this._changedMarkers.clear(),this._refreshedItems=new Set,this._cachedChanges=null}_refreshItem(e){if(this._isInInsertedElement(e.parent))return;this._markRemove(e.parent,e.startOffset,e.offsetSize),this._markInsert(e.parent,e.startOffset,e.offsetSize),this._refreshedItems.add(e);const t=Js._createOn(e);for(const e of this._markerCollection.getMarkersIntersectingRange(t)){const t=e.getData();this.bufferMarkerChange(e.name,t,t)}this._cachedChanges=null}_markInsert(e,t,n){const i={type:"insert",offset:t,howMany:n,count:this._changeCount++};this._markChange(e,i)}_markRemove(e,t,n){const i={type:"remove",offset:t,howMany:n,count:this._changeCount++};this._markChange(e,i),this._removeAllNestedChanges(e,t,n)}_markAttribute(e){const t={type:"attribute",offset:e.startOffset,howMany:e.offsetSize,count:this._changeCount++};this._markChange(e.parent,t)}_markChange(e,t){this._makeSnapshot(e);const n=this._getChangesForElement(e);this._handleChange(t,n),n.push(t);for(let e=0;en.offset){if(i>o){const e={type:"attribute",offset:o,howMany:i-o,count:this._changeCount++};this._handleChange(e,t),t.push(e)}e.nodesToHandle=n.offset-e.offset,e.howMany=e.nodesToHandle}else e.offset>=n.offset&&e.offseto?(e.nodesToHandle=i-o,e.offset=o):e.nodesToHandle=0);if("remove"==n.type&&e.offsetn.offset){const o={type:"attribute",offset:n.offset,howMany:i-n.offset,count:this._changeCount++};this._handleChange(o,t),t.push(o),e.nodesToHandle=n.offset-e.offset,e.howMany=e.nodesToHandle}"attribute"==n.type&&(e.offset>=n.offset&&i<=o?(e.nodesToHandle=0,e.howMany=0,e.offset=0):e.offset<=n.offset&&i>=o&&(n.howMany=0))}}e.howMany=e.nodesToHandle,delete e.nodesToHandle}_getInsertDiff(e,t,n){return{type:"insert",position:Hs._createAt(e,t),name:n.name,attributes:new Map(n.attributes),length:1,changeCount:this._changeCount++}}_getRemoveDiff(e,t,n){return{type:"remove",position:Hs._createAt(e,t),name:n.name,attributes:new Map(n.attributes),length:1,changeCount:this._changeCount++}}_getAttributesDiff(e,t,n){const i=[];n=new Map(n);for(const[o,r]of t){const t=n.has(o)?n.get(o):null;t!==r&&i.push({type:"attribute",position:e.start,range:e.clone(),length:1,attributeKey:o,attributeOldValue:r,attributeNewValue:t,changeCount:this._changeCount++}),n.delete(o)}for(const[t,o]of n)i.push({type:"attribute",position:e.start,range:e.clone(),length:1,attributeKey:t,attributeOldValue:null,attributeNewValue:o,changeCount:this._changeCount++});return i}_isInInsertedElement(e){const t=e.parent;if(!t)return!1;const n=this._changesInElement.get(t),i=e.startOffset;if(n)for(const e of n)if("insert"==e.type&&i>=e.offset&&ii){for(let t=0;t=e&&i.baseVersione.source).join("|")+")";return new RegExp(`${e}|${t}(?:‍${t})*`,"ug")}();function Kc(e,t){const n=String(e).matchAll(Hc);return Array.from(n).some(e=>e.index{const n=t[0];if(n.isDocumentOperation&&n.baseVersion!==this.version)throw new u("model-document-applyoperation-wrong-version",this,{operation:n})},{priority:"highest"}),this.listenTo(e,"applyOperation",(e,t)=>{const n=t[0];n.isDocumentOperation&&this.differ.bufferOperation(n)},{priority:"high"}),this.listenTo(e,"applyOperation",(e,t)=>{const n=t[0];n.isDocumentOperation&&(this.version++,this.history.addOperation(n))},{priority:"low"}),this.listenTo(this.selection,"change",()=>{this._hasSelectionChangedFromTheLastChangeBlock=!0}),this.listenTo(e.markers,"update",(e,t,n,i,o)=>{const r={...t.getData(),range:i};this.differ.bufferMarkerChange(t.name,o,r),null===n&&t.on("change",(e,n)=>{const i=t.getData();this.differ.bufferMarkerChange(t.name,{...i,range:n},i)})})}get graveyard(){return this.getRoot(Yc)}createRoot(e="$root",t="main"){if(this.roots.get(t))throw new u("model-document-createroot-name-exists",this,{name:t});const n=new Rc(this,e,t);return this.roots.add(n),n}destroy(){this.selection.destroy(),this.stopListening()}getRoot(e="main"){return this.roots.get(e)}getRootNames(){return Array.from(this.roots,e=>e.rootName).filter(e=>e!=Yc)}registerPostFixer(e){this._postFixers.add(e)}toJSON(){const e=Xn(this);return e.selection="[engine.model.DocumentSelection]",e.model="[engine.model.Model]",e}_handleChangeBlock(e){this._hasDocumentChangedFromTheLastChangeBlock()&&(this._callPostFixers(e),this.selection.refresh(),this.differ.hasDataChanges()?this.fire("change:data",e.batch):this.fire("change",e.batch),this.selection.refresh(),this.differ.reset()),this._hasSelectionChangedFromTheLastChangeBlock=!1}_hasDocumentChangedFromTheLastChangeBlock(){return!this.differ.isEmpty||this._hasSelectionChangedFromTheLastChangeBlock}_getDefaultRoot(){for(const e of this.roots)if(e!==this.graveyard)return e;return this.graveyard}_getDefaultRange(){const e=this._getDefaultRoot(),t=this.model,n=t.schema,i=t.createPositionFromPath(e,[0]);return n.getNearestSelectionRange(i)||t.createRange(i)}_validateSelectionRange(e){return Jc(e.start)&&Jc(e.end)}_callPostFixers(e){let t=!1;do{for(const n of this._postFixers)if(this.selection.refresh(),t=n(e),t)break}while(t)}}function Jc(e){const t=e.textNode;if(t){const n=t.data,i=e.offset-t.startOffset;return!Wc(n,i)&&!qc(n,i)}return!0}rt(Zc,b);class Xc{constructor(){this._markers=new Map}[Symbol.iterator](){return this._markers.values()}has(e){const t=e instanceof Qc?e.name:e;return this._markers.has(t)}get(e){return this._markers.get(e)||null}_set(e,t,n=!1,i=!1){const o=e instanceof Qc?e.name:e;if(o.includes(","))throw new u("markercollection-incorrect-marker-name",this);const r=this._markers.get(o);if(r){const e=r.getData(),s=r.getRange();let a=!1;return s.isEqual(t)||(r._attachLiveRange(la.fromRange(t)),a=!0),n!=r.managedUsingOperations&&(r._managedUsingOperations=n,a=!0),"boolean"==typeof i&&i!=r.affectsData&&(r._affectsData=i,a=!0),a&&this.fire("update:"+o,r,s,t,e),r}const s=la.fromRange(t),a=new Qc(o,s,n,i);return this._markers.set(o,a),this.fire("update:"+o,a,null,t,{...a.getData(),range:null}),a}_remove(e){const t=e instanceof Qc?e.name:e,n=this._markers.get(t);return!!n&&(this._markers.delete(t),this.fire("update:"+t,n,n.getRange(),null,n.getData()),this._destroyMarker(n),!0)}_refresh(e){const t=e instanceof Qc?e.name:e,n=this._markers.get(t);if(!n)throw new u("markercollection-refresh-marker-not-exists",this);const i=n.getRange();this.fire("update:"+t,n,i,i,n.getData())}*getMarkersAtPosition(e){for(const t of this)t.getRange().containsPosition(e)&&(yield t)}*getMarkersIntersectingRange(e){for(const t of this)null!==t.getRange().getIntersection(e)&&(yield t)}destroy(){for(const e of this._markers.values())this._destroyMarker(e);this._markers=null,this.stopListening()}*getMarkersGroup(e){for(const t of this._markers.values())t.name.startsWith(e+":")&&(yield t)}_destroyMarker(e){e.stopListening(),e._detachLiveRange()}}rt(Xc,b);class Qc{constructor(e,t,n,i){this.name=e,this._liveRange=this._attachLiveRange(t),this._managedUsingOperations=n,this._affectsData=i}get managedUsingOperations(){if(!this._liveRange)throw new u("marker-destroyed",this);return this._managedUsingOperations}get affectsData(){if(!this._liveRange)throw new u("marker-destroyed",this);return this._affectsData}getData(){return{range:this.getRange(),affectsData:this.affectsData,managedUsingOperations:this.managedUsingOperations}}getStart(){if(!this._liveRange)throw new u("marker-destroyed",this);return this._liveRange.start.clone()}getEnd(){if(!this._liveRange)throw new u("marker-destroyed",this);return this._liveRange.end.clone()}getRange(){if(!this._liveRange)throw new u("marker-destroyed",this);return this._liveRange.toRange()}is(e){return"marker"===e||"model:marker"===e}_attachLiveRange(e){return this._liveRange&&this._detachLiveRange(),e.delegate("change:range").to(this),e.delegate("change:content").to(this),this._liveRange=e,e}_detachLiveRange(){this._liveRange.stopDelegating("change:range",this),this._liveRange.stopDelegating("change:content",this),this._liveRange.detach(),this._liveRange=null}}rt(Qc,b);class el extends gc{get type(){return"noop"}clone(){return new el(this.baseVersion)}getReversed(){return new el(this.baseVersion+1)}_execute(){}static get className(){return"NoOperation"}}const tl={};tl[Cc.className]=Cc,tl[Sc.className]=Sc,tl[Ec.className]=Ec,tl[xc.className]=xc,tl[el.className]=el,tl[gc.className]=gc,tl[jc.className]=jc,tl[Tc.className]=Tc,tl[Pc.className]=Pc,tl[Dc.className]=Dc;class nl{static fromJSON(e,t){return tl[e.__className].fromJSON(e,t)}}class il extends Hs{constructor(e,t,n="toNone"){if(super(e,t,n),!this.root.is("rootElement"))throw new u("model-liveposition-root-not-rootelement",e);ol.call(this)}detach(){this.stopListening()}is(e){return"livePosition"===e||"model:livePosition"===e||"position"==e||"model:position"===e}toPosition(){return new Hs(this.root,this.path.slice(),this.stickiness)}static fromPosition(e,t){return new this(e.root,e.path.slice(),t||e.stickiness)}}function ol(){this.listenTo(this.root.document.model,"applyOperation",(e,t)=>{const n=t[0];n.isDocumentOperation&&rl.call(this,n)},{priority:"low"})}function rl(e){const t=this.getTransformedByOperation(e);if(!this.isEqual(t)){const e=this.toPosition();this.path=t.path,this.root=t.root,this.fire("change",e)}}rt(il,b);class sl{constructor(e,t,n){this.model=e,this.writer=t,this.position=n,this.canMergeWith=new Set([this.position.parent]),this.schema=e.schema,this._documentFragment=t.createDocumentFragment(),this._documentFragmentPosition=t.createPositionAt(this._documentFragment,0),this._firstNode=null,this._lastNode=null,this._lastAutoParagraph=null,this._filterAttributesOf=[],this._affectedStart=null,this._affectedEnd=null}handleNodes(e){for(const t of Array.from(e))this._handleNode(t);this._insertPartialFragment(),this._lastAutoParagraph&&this._updateLastNodeFromAutoParagraph(this._lastAutoParagraph),this._mergeOnRight(),this.schema.removeDisallowedAttributes(this._filterAttributesOf,this.writer),this._filterAttributesOf=[]}_updateLastNodeFromAutoParagraph(e){const t=this.writer.createPositionAfter(this._lastNode),n=this.writer.createPositionAfter(e);if(n.isAfter(t)){if(this._lastNode=e,this.position.parent!=e||!this.position.isAtEnd)throw new u("insertcontent-invalid-insertion-position",this);this.position=n,this._setAffectedBoundaries(this.position)}}getSelectionRange(){return this.nodeToSelect?Js._createOn(this.nodeToSelect):this.model.schema.getNearestSelectionRange(this.position)}getAffectedRange(){return this._affectedStart?new Js(this._affectedStart,this._affectedEnd):null}destroy(){this._affectedStart&&this._affectedStart.detach(),this._affectedEnd&&this._affectedEnd.detach()}_handleNode(e){if(this.schema.isObject(e))return void this._handleObject(e);let t=this._checkAndAutoParagraphToAllowedPosition(e);t||(t=this._checkAndSplitToAllowedPosition(e),t)?(this._appendToFragment(e),this._firstNode||(this._firstNode=e),this._lastNode=e):this._handleDisallowedNode(e)}_insertPartialFragment(){if(this._documentFragment.isEmpty)return;const e=il.fromPosition(this.position,"toNext");this._setAffectedBoundaries(this.position),this._documentFragment.getChild(0)==this._firstNode&&(this.writer.insert(this._firstNode,this.position),this._mergeOnLeft(),this.position=e.toPosition()),this._documentFragment.isEmpty||this.writer.insert(this._documentFragment,this.position),this._documentFragmentPosition=this.writer.createPositionAt(this._documentFragment,0),this.position=e.toPosition(),e.detach()}_handleObject(e){this._checkAndSplitToAllowedPosition(e)?this._appendToFragment(e):this._tryAutoparagraphing(e)}_handleDisallowedNode(e){e.is("element")?this.handleNodes(e.getChildren()):this._tryAutoparagraphing(e)}_appendToFragment(e){if(!this.schema.checkChild(this.position,e))throw new u("insertcontent-wrong-position",this,{node:e,position:this.position});this.writer.insert(e,this._documentFragmentPosition),this._documentFragmentPosition=this._documentFragmentPosition.getShiftedBy(e.offsetSize),this.schema.isObject(e)&&!this.schema.checkChild(this.position,"$text")?this.nodeToSelect=e:this.nodeToSelect=null,this._filterAttributesOf.push(e)}_setAffectedBoundaries(e){this._affectedStart||(this._affectedStart=il.fromPosition(e,"toPrevious")),this._affectedEnd&&!this._affectedEnd.isBefore(e)||(this._affectedEnd&&this._affectedEnd.detach(),this._affectedEnd=il.fromPosition(e,"toNext"))}_mergeOnLeft(){const e=this._firstNode;if(!(e instanceof Gs))return;if(!this._canMergeLeft(e))return;const t=il._createBefore(e);t.stickiness="toNext";const n=il.fromPosition(this.position,"toNext");this._affectedStart.isEqual(t)&&(this._affectedStart.detach(),this._affectedStart=il._createAt(t.nodeBefore,"end","toPrevious")),this._firstNode===this._lastNode&&(this._firstNode=t.nodeBefore,this._lastNode=t.nodeBefore),this.writer.merge(t),t.isEqual(this._affectedEnd)&&this._firstNode===this._lastNode&&(this._affectedEnd.detach(),this._affectedEnd=il._createAt(t.nodeBefore,"end","toNext")),this.position=n.toPosition(),n.detach(),this._filterAttributesOf.push(this.position.parent),t.detach()}_mergeOnRight(){const e=this._lastNode;if(!(e instanceof Gs))return;if(!this._canMergeRight(e))return;const t=il._createAfter(e);if(t.stickiness="toNext",!this.position.isEqual(t))throw new u("insertcontent-invalid-insertion-position",this);this.position=Hs._createAt(t.nodeBefore,"end");const n=il.fromPosition(this.position,"toPrevious");this._affectedEnd.isEqual(t)&&(this._affectedEnd.detach(),this._affectedEnd=il._createAt(t.nodeBefore,"end","toNext")),this._firstNode===this._lastNode&&(this._firstNode=t.nodeBefore,this._lastNode=t.nodeBefore),this.writer.merge(t),t.getShiftedBy(-1).isEqual(this._affectedStart)&&this._firstNode===this._lastNode&&(this._affectedStart.detach(),this._affectedStart=il._createAt(t.nodeBefore,0,"toPrevious")),this.position=n.toPosition(),n.detach(),this._filterAttributesOf.push(this.position.parent),t.detach()}_canMergeLeft(e){const t=e.previousSibling;return t instanceof Gs&&this.canMergeWith.has(t)&&this.model.schema.checkMerge(t,e)}_canMergeRight(e){const t=e.nextSibling;return t instanceof Gs&&this.canMergeWith.has(t)&&this.model.schema.checkMerge(e,t)}_tryAutoparagraphing(e){const t=this.writer.createElement("paragraph");this._getAllowedIn(this.position.parent,t)&&this.schema.checkChild(t,e)&&(t._appendChild(e),this._handleNode(t))}_checkAndAutoParagraphToAllowedPosition(e){if(this.schema.checkChild(this.position.parent,e))return!0;if(!this.schema.checkChild(this.position.parent,"paragraph")||!this.schema.checkChild("paragraph",e))return!1;this._insertPartialFragment();const t=this.writer.createElement("paragraph");return this.writer.insert(t,this.position),this._setAffectedBoundaries(this.position),this._lastAutoParagraph=t,this.position=this.writer.createPositionAt(t,0),!0}_checkAndSplitToAllowedPosition(e){const t=this._getAllowedIn(this.position.parent,e);if(!t)return!1;for(t!=this.position.parent&&this._insertPartialFragment();t!=this.position.parent;)if(this.position.isAtStart){const e=this.position.parent;this.position=this.writer.createPositionBefore(e),e.isEmpty&&e.parent===t&&this.writer.remove(e)}else if(this.position.isAtEnd)this.position=this.writer.createPositionAfter(this.position.parent);else{const e=this.writer.createPositionAfter(this.position.parent);this._setAffectedBoundaries(this.position),this.writer.split(this.position),this.position=e,this.canMergeWith.add(this.position.nodeAfter)}return!0}_getAllowedIn(e,t){return this.schema.checkChild(e,t)?e:this.schema.isLimit(e)?null:this._getAllowedIn(e.parent,t)}}function al(e,t,n="auto"){const i=e.getSelectedElement();if(i&&t.schema.isObject(i)&&!t.schema.isInline(i))return["before","after"].includes(n)?t.createRange(t.createPositionAt(i,n)):t.createRangeOn(i);const o=Os(e.getSelectedBlocks());if(!o)return t.createRange(e.focus);if(o.isEmpty)return t.createRange(t.createPositionAt(o,0));const r=t.createPositionAfter(o);return e.focus.isTouching(r)?t.createRange(r):t.createRange(t.createPositionBefore(o))}function cl(e,t,n={}){if(t.isCollapsed)return;const i=t.getFirstRange();if("$graveyard"==i.root.rootName)return;const o=e.schema;e.change(e=>{if(!n.doNotResetEntireContent&&function(e,t){const n=e.getLimitElement(t);if(!t.containsEntireContent(n))return!1;const i=t.getFirstRange();return i.start.parent!=i.end.parent&&e.checkChild(n,"paragraph")}(o,t))return void function(e,t){const n=e.model.schema.getLimitElement(t);e.remove(e.createRangeIn(n)),hl(e,e.createPositionAt(n,0),t)}(e,t);const r={};if(!n.doNotAutoparagraph){const e=t.getSelectedElement();e&&Object.assign(r,o.getAttributesWithProperty(e,"copyOnReplace",!0))}const[s,a]=function(e){const t=e.root.document.model,n=e.start;let i=e.end;if(t.hasContent(e,{ignoreMarkers:!0})){const n=function(e){const t=e.parent,n=t.root.document.model.schema,i=t.getAncestors({parentFirst:!0,includeSelf:!0});for(const e of i){if(n.isLimit(e))return null;if(n.isBlock(e))return e}}(i);if(n&&i.isTouching(t.createPositionAt(n,0))){const n=t.createSelection(e);t.modifySelection(n,{direction:"backward"});const o=n.getLastPosition(),r=t.createRange(o,i);t.hasContent(r,{ignoreMarkers:!0})||(i=o)}}return[il.fromPosition(n,"toPrevious"),il.fromPosition(i,"toNext")]}(i);s.isTouching(a)||e.remove(e.createRange(s,a)),n.leaveUnmerged||(function(e,t,n){const i=e.model;if(!ul(e.model.schema,t,n))return;const[o,r]=function(e,t){const n=e.getAncestors(),i=t.getAncestors();let o=0;for(;n[o]&&n[o]==i[o];)o++;return[n[o],i[o]]}(t,n);o&&r&&(!i.hasContent(o,{ignoreMarkers:!0})&&i.hasContent(r,{ignoreMarkers:!0})?dl(e,t,n,o.parent):ll(e,t,n,o.parent))}(e,s,a),o.removeDisallowedAttributes(s.parent.getChildren(),e)),ml(e,t,s),!n.doNotAutoparagraph&&function(e,t){const n=e.checkChild(t,"$text"),i=e.checkChild(t,"paragraph");return!n&&i}(o,s)&&hl(e,s,t,r),s.detach(),a.detach()})}function ll(e,t,n,i){const o=t.parent,r=n.parent;if(o!=i&&r!=i){for(t=e.createPositionAfter(o),(n=e.createPositionBefore(r)).isEqual(t)||e.insert(r,t),e.merge(t);n.parent.isEmpty;){const t=n.parent;n=e.createPositionBefore(t),e.remove(t)}ul(e.model.schema,t,n)&&ll(e,t,n,i)}}function dl(e,t,n,i){const o=t.parent,r=n.parent;if(o!=i&&r!=i){for(t=e.createPositionAfter(o),(n=e.createPositionBefore(r)).isEqual(t)||e.insert(o,n);t.parent.isEmpty;){const n=t.parent;t=e.createPositionBefore(n),e.remove(n)}n=e.createPositionBefore(r),function(e,t){const n=t.nodeBefore,i=t.nodeAfter;n.name!=i.name&&e.rename(n,i.name),e.clearAttributes(n),e.setAttributes(Object.fromEntries(i.getAttributes()),n),e.merge(t)}(e,n),ul(e.model.schema,t,n)&&dl(e,t,n,i)}}function ul(e,t,n){const i=t.parent,o=n.parent;return i!=o&&!e.isLimit(i)&&!e.isLimit(o)&&function(e,t,n){const i=new Js(e,t);for(const e of i.getWalker())if(n.isLimit(e.item))return!1;return!0}(t,n,e)}function hl(e,t,n,i={}){const o=e.createElement("paragraph");e.model.schema.setAllowedAttributes(o,i,e),e.insert(o,t),ml(e,n,e.createPositionAt(o,0))}function ml(e,t,n){t instanceof ma?e.setSelection(n):t.setTo(n)}const gl=' ,.?!:;"-()';function pl(e,t){const{isForward:n,walker:i,unit:o,schema:r,treatEmojiAsSingleUnit:s}=e,{type:a,item:c,nextPosition:l}=t;if("text"==a)return"word"===e.unit?function(e,t){let n=e.position.textNode;if(n){let i=e.position.offset-n.startOffset;for(;!_l(n.data,i,t)&&!bl(n,i,t);){e.next();const o=t?e.position.nodeAfter:e.position.nodeBefore;if(o&&o.is("$text")){const i=o.data.charAt(t?0:o.data.length-1);gl.includes(i)||(e.next(),n=e.position.textNode)}i=e.position.offset-n.startOffset}}return e.position}(i,n):function(e,t,n){const i=e.position.textNode;if(i){const o=i.data;let r=e.position.offset-i.startOffset;for(;Wc(o,r)||"character"==t&&qc(o,r)||n&&Kc(o,r);)e.next(),r=e.position.offset-i.startOffset}return e.position}(i,o,s);if(a==(n?"elementStart":"elementEnd")){if(r.isSelectable(c))return Hs._createAt(c,n?"after":"before");if(r.checkChild(l,"$text"))return l}else{if(r.isLimit(c))return void i.skip(()=>!0);if(r.checkChild(l,"$text"))return l}}function fl(e,t){const n=e.root,i=Hs._createAt(n,t?"end":0);return t?new Js(e,i):new Js(i,e)}function _l(e,t,n){const i=t+(n?0:-1);return gl.includes(e.charAt(i))}function bl(e,t,n){return t===(n?e.endOffset:0)}function kl(e,t){const n=[];Array.from(e.getItems({direction:"backward"})).map(e=>t.createRangeOn(e)).filter(t=>(t.start.isAfter(e.start)||t.start.isEqual(e.start))&&(t.end.isBefore(e.end)||t.end.isEqual(e.end))).forEach(e=>{n.push(e.start.parent),t.remove(e)}),n.forEach(e=>{let n=e;for(;n.parent&&n.isEmpty;){const e=t.createRangeOn(n);n=n.parent,t.remove(e)}})}function vl(e,t){return e.isCollapsed?function(e,t){const n=e.start,i=t.getNearestSelectionRange(n);if(!i){const e=n.getAncestors().reverse().find(e=>t.isObject(e));return e?Js._createOn(e):null}if(!i.isCollapsed)return i;const o=i.start;return n.isEqual(o)?null:new Js(o)}(e,t):function(e,t){const{start:n,end:i}=e,o=t.checkChild(n,"$text"),r=t.checkChild(i,"$text"),s=t.getLimitElement(n),a=t.getLimitElement(i);if(s===a){if(o&&r)return null;if(function(e,t,n){const i=e.nodeAfter&&!n.isLimit(e.nodeAfter)||n.checkChild(e,"$text"),o=t.nodeBefore&&!n.isLimit(t.nodeBefore)||n.checkChild(t,"$text");return i||o}(n,i,t)){const e=n.nodeAfter&&t.isSelectable(n.nodeAfter)?null:t.getNearestSelectionRange(n,"forward"),o=i.nodeBefore&&t.isSelectable(i.nodeBefore)?null:t.getNearestSelectionRange(i,"backward"),r=e?e.start:n,s=o?o.end:i;return new Js(r,s)}}const c=s&&!s.is("rootElement"),l=a&&!a.is("rootElement");if(c||l){const e=n.nodeAfter&&i.nodeBefore&&n.nodeAfter.parent===i.nodeBefore.parent,o=c&&(!e||!yl(n.nodeAfter,t)),r=l&&(!e||!yl(i.nodeBefore,t));let d=n,u=i;return o&&(d=Hs._createBefore(Al(s,t))),r&&(u=Hs._createAfter(Al(a,t))),new Js(d,u)}return null}(e,t)}function Al(e,t){let n=e,i=n;for(;t.isLimit(i)&&i.parent;)n=i,i=i.parent;return n}function yl(e,t){return e&&t.isSelectable(e)}class wl{constructor(){this.markers=new Xc,this.document=new Zc(this),this.schema=new Wa,this._pendingChanges=[],this._currentWriter=null,["insertContent","insertObject","deleteContent","modifySelection","getSelectedContent","applyOperation"].forEach(e=>this.decorate(e)),this.on("applyOperation",(e,t)=>{t[0]._validate()},{priority:"highest"}),this.schema.register("$root",{isLimit:!0}),this.schema.register("$container",{allowIn:["$root","$container"]}),this.schema.register("$block",{allowIn:["$root","$container"],isBlock:!0}),this.schema.register("$blockObject",{allowWhere:"$block",isBlock:!0,isObject:!0}),this.schema.register("$inlineObject",{allowWhere:"$text",allowAttributesOf:"$text",isInline:!0,isObject:!0}),this.schema.register("$text",{allowIn:"$block",isInline:!0,isContent:!0}),this.schema.register("$clipboardHolder",{allowContentOf:"$root",allowChildren:"$text",isLimit:!0}),this.schema.register("$documentFragment",{allowContentOf:"$root",allowChildren:"$text",isLimit:!0}),this.schema.register("$marker"),this.schema.addChildCheck((e,t)=>{if("$marker"===t.name)return!0}),function(e){e.document.registerPostFixer(t=>function(e,t){const n=t.document.selection,i=t.schema,o=[];let r=!1;for(const e of n.getRanges()){const t=vl(e,i);t&&!t.isEqual(e)?(o.push(t),r=!0):o.push(e)}r&&e.setSelection(function(e){const t=[...e],n=new Set;let i=1;for(;i!n.has(t))}(o),{backward:n.isBackward})}(t,e))}(this),this.document.registerPostFixer(Da)}change(e){try{return 0===this._pendingChanges.length?(this._pendingChanges.push({batch:new mc,callback:e}),this._runPendingChanges()[0]):e(this._currentWriter)}catch(e){u.rethrowUnexpectedError(e,this)}}enqueueChange(e,t){try{e?"function"==typeof e?(t=e,e=new mc):e instanceof mc||(e=new mc(e)):e=new mc,this._pendingChanges.push({batch:e,callback:t}),1==this._pendingChanges.length&&this._runPendingChanges()}catch(e){u.rethrowUnexpectedError(e,this)}}applyOperation(e){e._execute()}insertContent(e,t,n){return function(e,t,n,i){return e.change(o=>{let r;r=n?n instanceof oa||n instanceof ma?n:o.createSelection(n,i):e.document.selection,r.isCollapsed||e.deleteContent(r,{doNotAutoparagraph:!0});const s=new sl(e,o,r.anchor);let a;a=t.is("documentFragment")?t.getChildren():[t],s.handleNodes(a);const c=s.getSelectionRange();c&&(r instanceof ma?o.setSelection(c):r.setTo(c));const l=s.getAffectedRange()||e.createRange(r.anchor);return s.destroy(),l})}(this,e,t,n)}insertObject(e,t,n,i){return function(e,t,n,i,o={}){if(!e.schema.isObject(t))throw new u("insertobject-element-not-an-object",e,{object:t});let r;r=n?n.is("selection")?n:e.createSelection(n,i):e.document.selection;let s=r;o.findOptimalPosition&&e.schema.isBlock(t)&&(s=e.createSelection(al(r,e,o.findOptimalPosition)));const a=Os(r.getSelectedBlocks()),c={};return a&&Object.assign(c,e.schema.getAttributesWithProperty(a,"copyOnReplace",!0)),e.change(n=>{s.isCollapsed||e.deleteContent(s,{doNotAutoparagraph:!0});let i=t;const r=s.anchor.parent;!e.schema.checkChild(r,t)&&e.schema.checkChild(r,"paragraph")&&e.schema.checkChild("paragraph",t)&&(i=n.createElement("paragraph"),n.insert(t,i)),e.schema.setAllowedAttributes(i,c,n);const a=e.insertContent(i,s);return a.isCollapsed||o.setSelection&&function(e,t,n,i){const o=e.model;if("after"==n){let n=t.nextSibling;!(n&&o.schema.checkChild(n,"$text"))&&o.schema.checkChild(t.parent,"paragraph")&&(n=e.createElement("paragraph"),o.schema.setAllowedAttributes(n,i,e),o.insertContent(n,e.createPositionAfter(t))),n&&e.setSelection(n,0)}else{if("on"!=n)throw new u("insertobject-invalid-place-parameter-value",o);e.setSelection(t,"on")}}(n,t,o.setSelection,c),a})}(this,e,t,n,i)}deleteContent(e,t){cl(this,e,t)}modifySelection(e,t){!function(e,t,n={}){const i=e.schema,o="backward"!=n.direction,r=n.unit?n.unit:"character",s=!!n.treatEmojiAsSingleUnit,a=t.focus,c=new Ws({boundaries:fl(a,o),singleCharacters:!0,direction:o?"forward":"backward"}),l={walker:c,schema:i,isForward:o,unit:r,treatEmojiAsSingleUnit:s};let d;for(;d=c.next();){if(d.done)return;const n=pl(l,d.value);if(n)return void(t instanceof ma?e.change(e=>{e.setSelectionFocus(n)}):t.setFocus(n))}}(this,e,t)}getSelectedContent(e){return function(e,t){return e.change(e=>{const n=e.createDocumentFragment(),i=t.getFirstRange();if(!i||i.isCollapsed)return n;const o=i.start.root,r=i.start.getCommonPath(i.end),s=o.getNodeByPath(r);let a;a=i.start.parent==i.end.parent?i:e.createRange(e.createPositionAt(s,i.start.path[r.length]),e.createPositionAt(s,i.end.path[r.length]+1));const c=a.end.offset-a.start.offset;for(const t of a.getItems({shallow:!0}))t.is("$textProxy")?e.appendText(t.data,t.getAttributes(),n):e.append(e.cloneElement(t,!0),n);if(a!=i){const t=i._getTransformedByMove(a.start,e.createPositionAt(n,0),c)[0],o=e.createRange(e.createPositionAt(n,0),t.start);kl(e.createRange(t.end,e.createPositionAt(n,"end")),e),kl(o,e)}return n})}(this,e)}hasContent(e,t={}){const n=e instanceof Gs?Js._createIn(e):e;if(n.isCollapsed)return!1;const{ignoreWhitespaces:i=!1,ignoreMarkers:o=!1}=t;if(!o)for(const e of this.markers.getMarkersIntersectingRange(n))if(e.affectsData)return!0;for(const e of n.getItems())if(this.schema.isContent(e)){if(!e.is("$textProxy"))return!0;if(!i)return!0;if(-1!==e.data.search(/\S/))return!0}return!1}createPositionFromPath(e,t,n){return new Hs(e,t,n)}createPositionAt(e,t){return Hs._createAt(e,t)}createPositionAfter(e){return Hs._createAfter(e)}createPositionBefore(e){return Hs._createBefore(e)}createRange(e,t){return new Js(e,t)}createRangeIn(e){return Js._createIn(e)}createRangeOn(e){return Js._createOn(e)}createSelection(e,t,n){return new oa(e,t,n)}createBatch(e){return new mc(e)}createOperationFromJSON(e){return nl.fromJSON(e,this.document)}destroy(){this.document.destroy(),this.stopListening()}_runPendingChanges(){const e=[];for(this.fire("_beforeChanges");this._pendingChanges.length;){const t=this._pendingChanges[0].batch;this._currentWriter=new Oc(this,t);const n=this._pendingChanges[0].callback(this._currentWriter);e.push(n),this.document._handleChangeBlock(this._currentWriter),this._pendingChanges.shift(),this._currentWriter=null}return this.fire("_afterChanges"),e}}rt(wl,Qe);class Cl extends zs{constructor(e){super(),this.editor=e}set(e,t,n={}){if("string"==typeof t){const e=t;t=(t,n)=>{this.editor.execute(e),n()}}super.set(e,t,n)}}class Il{constructor(e={}){const t=e.language||this.constructor.defaultConfig&&this.constructor.defaultConfig.language;this._context=e.context||new Yn({language:t}),this._context._addEditor(this,!e.context);const n=Array.from(this.constructor.builtinPlugins||[]);this.config=new Nn(e,this.constructor.defaultConfig),this.config.define("plugins",n),this.config.define(this._context._getEditorConfig()),this.plugins=new Gn(this,n,this._context.plugins),this.locale=this._context.locale,this.t=this.locale.t,this._readOnlyLocks=new Set,this.commands=new Va,this.set("state","initializing"),this.once("ready",()=>this.state="ready",{priority:"high"}),this.once("destroy",()=>this.state="destroyed",{priority:"high"}),this.model=new wl;const i=new zi;this.data=new lc(this.model,i),this.editing=new La(this.model,i),this.editing.view.document.bind("isReadOnly").to(this),this.conversion=new dc([this.editing.downcastDispatcher,this.data.downcastDispatcher],this.data.upcastDispatcher),this.conversion.addAlias("dataDowncast",this.data.downcastDispatcher),this.conversion.addAlias("editingDowncast",this.editing.downcastDispatcher),this.keystrokes=new Cl(this),this.keystrokes.listenTo(this.editing.view.document)}get isReadOnly(){return this._readOnlyLocks.size>0}set isReadOnly(e){throw new u("editor-isreadonly-has-no-setter")}enableReadOnlyMode(e){if("string"!=typeof e&&"symbol"!=typeof e)throw new u("editor-read-only-lock-id-invalid",null,{lockId:e});this._readOnlyLocks.has(e)||(this._readOnlyLocks.add(e),1===this._readOnlyLocks.size&&this.fire("change:isReadOnly","isReadOnly",!0,!1))}disableReadOnlyMode(e){if("string"!=typeof e&&"symbol"!=typeof e)throw new u("editor-read-only-lock-id-invalid",null,{lockId:e});this._readOnlyLocks.has(e)&&(this._readOnlyLocks.delete(e),0===this._readOnlyLocks.size&&this.fire("change:isReadOnly","isReadOnly",!1,!0))}initPlugins(){const e=this.config,t=e.get("plugins"),n=e.get("removePlugins")||[],i=e.get("extraPlugins")||[],o=e.get("substitutePlugins")||[];return this.plugins.init(t.concat(i),n,o)}destroy(){let e=Promise.resolve();return"initializing"==this.state&&(e=new Promise(e=>this.once("ready",e))),e.then(()=>{this.fire("destroy"),this.stopListening(),this.commands.destroy()}).then(()=>this.plugins.destroy()).then(()=>{this.model.destroy(),this.data.destroy(),this.editing.destroy(),this.keystrokes.destroy()}).then(()=>this._context._removeEditor(this))}execute(...e){try{return this.commands.execute(...e)}catch(e){u.rethrowUnexpectedError(e,this)}}focus(){this.editing.view.focus()}}rt(Il,Qe);class xl{constructor(e){this.editor=e,this._components=new Map}*names(){for(const e of this._components.values())yield e.originalName}add(e,t){this._components.set(Sl(e),{callback:t,originalName:e})}create(e){if(!this.has(e))throw new u("componentfactory-item-missing",this,{name:e});return this._components.get(Sl(e)).callback(this.editor.locale)}has(e){return this._components.has(Sl(e))}}function Sl(e){return String(e).toLowerCase()}class El{constructor(e){this.editor=e,this.componentFactory=new xl(e),this.focusTracker=new Fs,this.set("viewportOffset",this._readViewportOffsetFromConfig()),this._editableElementsMap=new Map,this.listenTo(e.editing.view.document,"layoutChanged",()=>this.update())}get element(){return null}update(){this.fire("update")}destroy(){this.stopListening(),this.focusTracker.destroy();for(const e of this._editableElementsMap.values())e.ckeditorInstance=null;this._editableElementsMap=new Map}setEditableElement(e,t){this._editableElementsMap.set(e,t),t.ckeditorInstance||(t.ckeditorInstance=this.editor)}getEditableElement(e="main"){return this._editableElementsMap.get(e)}getEditableElementsNames(){return this._editableElementsMap.keys()}get _editableElements(){return console.warn("editor-ui-deprecated-editable-elements: The EditorUI#_editableElements property has been deprecated and will be removed in the near future.",{editorUI:this}),this._editableElementsMap}_readViewportOffsetFromConfig(){const e=this.editor,t=e.config.get("ui.viewportOffset");if(t)return t;const n=e.config.get("toolbar.viewportTopOffset");return n?(console.warn("editor-ui-deprecated-viewport-offset-config: The `toolbar.vieportTopOffset` configuration option is deprecated. It will be removed from future CKEditor versions. Use `ui.viewportOffset.top` instead."),{top:n}):{top:0}}}rt(El,Qe);const jl={setData(e){this.data.set(e)},getData(e){return this.data.get(e)}},Tl=jl,Dl={updateSourceElement(){if(!this.sourceElement)throw new u("editor-missing-sourceelement",this);!function(e,t){e instanceof HTMLTextAreaElement&&(e.value=t),e.innerHTML=t}(this.sourceElement,this.data.get())}},Pl=Dl;class Rl extends Zn{static get pluginName(){return"PendingActions"}init(){this.set("hasAny",!1),this._actions=new Un({idProperty:"_id"}),this._actions.delegate("add","remove").to(this)}add(e){if("string"!=typeof e)throw new u("pendingactions-add-invalid-message",this);const t=Object.create(Qe);return t.set("message",e),this._actions.add(t),this.hasAny=!0,t}remove(e){this._actions.remove(e),this.hasAny=!!this._actions.length}get first(){return this._actions.get(0)}[Symbol.iterator](){return this._actions[Symbol.iterator]()}}const Ol='',Fl='';function zl({emitter:e,activator:t,callback:n,contextElements:i}){e.listenTo(document,"mousedown",(e,o)=>{if(!t())return;const r="function"==typeof o.composedPath?o.composedPath():[];for(const e of i)if(e.contains(o.target)||r.includes(e))return;n()})}function Ml(e){e.set("_isCssTransitionsDisabled",!1),e.disableCssTransitions=()=>{e._isCssTransitionsDisabled=!0},e.enableCssTransitions=()=>{e._isCssTransitionsDisabled=!1},e.extendTemplate({attributes:{class:[e.bindTemplate.if("_isCssTransitionsDisabled","ck-transitions-disabled")]}})}function $l({view:e}){e.listenTo(e.element,"submit",(t,n)=>{n.preventDefault(),e.fire("submit")},{useCapture:!0})}class Nl extends Un{constructor(e=[]){super(e,{idProperty:"viewUid"}),this.on("add",(e,t,n)=>{this._renderViewIntoCollectionParent(t,n)}),this.on("remove",(e,t)=>{t.element&&this._parentElement&&t.element.remove()}),this._parentElement=null}destroy(){this.map(e=>e.destroy())}setParent(e){this._parentElement=e;for(const e of this)this._renderViewIntoCollectionParent(e)}delegate(...e){if(!e.length||!function(e){return e.every(e=>"string"==typeof e)}(e))throw new u("ui-viewcollection-delegate-wrong-events",this);return{to:t=>{for(const n of this)for(const i of e)n.delegate(i).to(t);this.on("add",(n,i)=>{for(const n of e)i.delegate(n).to(t)}),this.on("remove",(n,i)=>{for(const n of e)i.stopDelegating(n,t)})}}}_renderViewIntoCollectionParent(e,t){e.isRendered||e.render(),e.element&&this._parentElement&&this._parentElement.insertBefore(e.element,this._parentElement.children[t])}}var Bl=r(150);sr()(Bl.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Bl.Z.locals;class Ll{constructor(e){this.element=null,this.isRendered=!1,this.locale=e,this.t=e&&e.t,this._viewCollections=new Un,this._unboundChildren=this.createCollection(),this._viewCollections.on("add",(t,n)=>{n.locale=e}),this.decorate("render")}get bindTemplate(){return this._bindTemplate?this._bindTemplate:this._bindTemplate=Vl.bind(this,this)}createCollection(e){const t=new Nl(e);return this._viewCollections.add(t),t}registerChild(e){Vn(e)||(e=[e]);for(const t of e)this._unboundChildren.add(t)}deregisterChild(e){Vn(e)||(e=[e]);for(const t of e)this._unboundChildren.remove(t)}setTemplate(e){this.template=new Vl(e)}extendTemplate(e){Vl.extend(this.template,e)}render(){if(this.isRendered)throw new u("ui-view-render-already-rendered",this);this.template&&(this.element=this.template.render(),this.registerChild(this.template.getViews())),this.isRendered=!0}destroy(){this.stopListening(),this._viewCollections.map(e=>e.destroy()),this.template&&this.template._revertData&&this.template.revert(this.element)}}rt(Ll,Sr),rt(Ll,Qe);class Vl{constructor(e){Object.assign(this,Xl(Jl(e))),this._isRendered=!1,this._revertData=null}render(){const e=this._renderNode({intoFragment:!0});return this._isRendered=!0,e}apply(e){return this._revertData={children:[],bindings:[],attributes:{}},this._renderNode({node:e,isApplying:!0,revertData:this._revertData}),e}revert(e){if(!this._revertData)throw new u("ui-template-revert-not-applied",[this,e]);this._revertTemplateFromNode(e,this._revertData)}*getViews(){yield*function*e(t){if(t.children)for(const n of t.children)od(n)?yield n:rd(n)&&(yield*e(n))}(this)}static bind(e,t){return{to:(n,i)=>new Gl({eventNameOrFunction:n,attribute:n,observable:e,emitter:t,callback:i}),if:(n,i,o)=>new Wl({observable:e,emitter:t,attribute:n,valueIfTrue:i,callback:o})}}static extend(e,t){if(e._isRendered)throw new u("template-extend-render",[this,e]);nd(e,Xl(Jl(t)))}_renderNode(e){let t;if(t=e.node?this.tag&&this.text:this.tag?this.text:!this.text,t)throw new u("ui-template-wrong-syntax",this);return this.text?this._renderText(e):this._renderElement(e)}_renderElement(e){let t=e.node;return t||(t=e.node=document.createElementNS(this.ns||"http://www.w3.org/1999/xhtml",this.tag)),this._renderAttributes(e),this._renderElementChildren(e),this._setUpListeners(e),t}_renderText(e){let t=e.node;return t?e.revertData.text=t.textContent:t=e.node=document.createTextNode(""),ql(this.text)?this._bindToObservable({schema:this.text,updater:Kl(t),data:e}):t.textContent=this.text.join(""),t}_renderAttributes(e){let t,n,i,o;if(!this.attributes)return;const r=e.node,s=e.revertData;for(t in this.attributes)if(i=r.getAttribute(t),n=this.attributes[t],s&&(s.attributes[t]=i),o=S(n[0])&&n[0].ns?n[0].ns:null,ql(n)){const a=o?n[0].value:n;s&&cd(t)&&a.unshift(i),this._bindToObservable({schema:a,updater:Yl(r,t,o),data:e})}else"style"==t&&"string"!=typeof n[0]?this._renderStyleAttribute(n[0],e):(s&&i&&cd(t)&&n.unshift(i),n=n.map(e=>e&&e.value||e).reduce((e,t)=>e.concat(t),[]).reduce(ed,""),id(n)||r.setAttributeNS(o,t,n))}_renderStyleAttribute(e,t){const n=t.node;for(const i in e){const o=e[i];ql(o)?this._bindToObservable({schema:[o],updater:Zl(n,i),data:t}):n.style[i]=o}}_renderElementChildren(e){const t=e.node,n=e.intoFragment?document.createDocumentFragment():t,i=e.isApplying;let o=0;for(const r of this.children)if(sd(r)){if(!i){r.setParent(t);for(const e of r)n.appendChild(e.element)}}else if(od(r))i||(r.isRendered||r.render(),n.appendChild(r.element));else if(or(r))n.appendChild(r);else if(i){const t=e.revertData,i=ad();t.children.push(i),r._renderNode({node:n.childNodes[o++],isApplying:!0,revertData:i})}else n.appendChild(r.render());e.intoFragment&&t.appendChild(n)}_setUpListeners(e){if(this.eventListeners)for(const t in this.eventListeners){const n=this.eventListeners[t].map(n=>{const[i,o]=t.split("@");return n.activateDomEventListener(i,o,e)});e.revertData&&e.revertData.bindings.push(n)}}_bindToObservable({schema:e,updater:t,data:n}){const i=n.revertData;Hl(e,t,n);const o=e.filter(e=>!id(e)).filter(e=>e.observable).map(i=>i.activateAttributeListener(e,t,n));i&&i.bindings.push(o)}_revertTemplateFromNode(e,t){for(const e of t.bindings)for(const t of e)t();if(t.text)e.textContent=t.text;else{for(const n in t.attributes){const i=t.attributes[n];null===i?e.removeAttribute(n):e.setAttribute(n,i)}for(let n=0;nHl(e,t,n);return this.emitter.listenTo(this.observable,"change:"+this.attribute,i),()=>{this.emitter.stopListening(this.observable,"change:"+this.attribute,i)}}}class Gl extends Ul{activateDomEventListener(e,t,n){const i=(e,n)=>{t&&!n.target.matches(t)||("function"==typeof this.eventNameOrFunction?this.eventNameOrFunction(n):this.observable.fire(this.eventNameOrFunction,n))};return this.emitter.listenTo(n.node,e,i),()=>{this.emitter.stopListening(n.node,e,i)}}}class Wl extends Ul{getValue(e){return!id(super.getValue(e))&&(this.valueIfTrue||!0)}}function ql(e){return!!e&&(e.value&&(e=e.value),Array.isArray(e)?e.some(ql):e instanceof Ul)}function Hl(e,t,{node:n}){let i=function(e,t){return e.map(e=>e instanceof Ul?e.getValue(t):e)}(e,n);i=1==e.length&&e[0]instanceof Wl?i[0]:i.reduce(ed,""),id(i)?t.remove():t.set(i)}function Kl(e){return{set(t){e.textContent=t},remove(){e.textContent=""}}}function Yl(e,t,n){return{set(i){e.setAttributeNS(n,t,i)},remove(){e.removeAttributeNS(n,t)}}}function Zl(e,t){return{set(n){e.style[t]=n},remove(){e.style[t]=null}}}function Jl(e){const t=Mn(e,e=>{if(e&&(e instanceof Ul||rd(e)||od(e)||sd(e)))return e});return t}function Xl(e){if("string"==typeof e?e=function(e){return{text:[e]}}(e):e.text&&function(e){e.text=Wn(e.text)}(e),e.on&&(e.eventListeners=function(e){for(const t in e)Ql(e,t);return e}(e.on),delete e.on),!e.text){e.attributes&&function(e){for(const t in e)e[t].value&&(e[t].value=Wn(e[t].value)),Ql(e,t)}(e.attributes);const t=[];if(e.children)if(sd(e.children))t.push(e.children);else for(const n of e.children)rd(n)||od(n)||or(n)?t.push(n):t.push(new Vl(n));e.children=t}return e}function Ql(e,t){e[t]=Wn(e[t])}function ed(e,t){return id(t)?e:id(e)?t:`${e} ${t}`}function td(e,t){for(const n in t)e[n]?e[n].push(...t[n]):e[n]=t[n]}function nd(e,t){if(t.attributes&&(e.attributes||(e.attributes={}),td(e.attributes,t.attributes)),t.eventListeners&&(e.eventListeners||(e.eventListeners={}),td(e.eventListeners,t.eventListeners)),t.text&&e.text.push(...t.text),t.children&&t.children.length){if(e.children.length!=t.children.length)throw new u("ui-template-extend-children-mismatch",e);let n=0;for(const i of t.children)nd(e.children[n++],i)}}function id(e){return!e&&0!==e}function od(e){return e instanceof Ll}function rd(e){return e instanceof Vl}function sd(e){return e instanceof Nl}function ad(){return{children:[],bindings:[],attributes:{}}}function cd(e){return"class"==e||"style"==e}const ld=function(e){return"string"==typeof e||!Ie(e)&&be(e)&&"[object String]"==$(e)};class dd extends Nl{constructor(e,t=[]){super(t),this.locale=e}attachToDom(){this._bodyCollectionContainer=new Vl({tag:"div",attributes:{class:["ck","ck-reset_all","ck-body","ck-rounded-corners"],dir:this.locale.uiLanguageDirection},children:this}).render();let e=document.querySelector(".ck-body-wrapper");e||(e=function(e,t,n={},i=[]){const o=n&&n.xmlns,r=o?e.createElementNS(o,t):e.createElement(t);for(const e in n)r.setAttribute(e,n[e]);!ld(i)&&Vn(i)||(i=[i]);for(let t of i)ld(t)&&(t=e.createTextNode(t)),r.appendChild(t);return r}(document,"div",{class:"ck-body-wrapper"}),document.body.appendChild(e)),e.appendChild(this._bodyCollectionContainer)}detachFromDom(){super.destroy(),this._bodyCollectionContainer&&this._bodyCollectionContainer.remove();const e=document.querySelector(".ck-body-wrapper");e&&0==e.childElementCount&&e.remove()}}var ud=r(174);sr()(ud.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),ud.Z.locals;class hd extends Ll{constructor(){super();const e=this.bindTemplate;this.set("content",""),this.set("viewBox","0 0 20 20"),this.set("fillColor",""),this.setTemplate({tag:"svg",ns:"http://www.w3.org/2000/svg",attributes:{class:["ck","ck-icon"],viewBox:e.to("viewBox")}})}render(){super.render(),this._updateXMLContent(),this._colorFillPaths(),this.on("change:content",()=>{this._updateXMLContent(),this._colorFillPaths()}),this.on("change:fillColor",()=>{this._colorFillPaths()})}_updateXMLContent(){if(this.content){const e=(new DOMParser).parseFromString(this.content.trim(),"image/svg+xml").querySelector("svg"),t=e.getAttribute("viewBox");for(t&&(this.viewBox=t),this.element.innerHTML="";e.childNodes.length>0;)this.element.appendChild(e.childNodes[0])}}_colorFillPaths(){this.fillColor&&this.element.querySelectorAll(".ck-icon__fill").forEach(e=>{e.style.fill=this.fillColor})}}var md=r(948);sr()(md.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),md.Z.locals;class gd extends Ll{constructor(e){super(e),this.set("text",""),this.set("position","s");const t=this.bindTemplate;this.setTemplate({tag:"span",attributes:{class:["ck","ck-tooltip",t.to("position",e=>"ck-tooltip_"+e),t.if("text","ck-hidden",e=>!e.trim())]},children:[{tag:"span",attributes:{class:["ck","ck-tooltip__text"]},children:[{text:t.to("text")}]}]})}}var pd=r(499);sr()(pd.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),pd.Z.locals;class fd extends Ll{constructor(e){super(e);const t=this.bindTemplate,n=a();this.set("class"),this.set("labelStyle"),this.set("icon"),this.set("isEnabled",!0),this.set("isOn",!1),this.set("isVisible",!0),this.set("isToggleable",!1),this.set("keystroke"),this.set("label"),this.set("tabindex",-1),this.set("tooltip"),this.set("tooltipPosition","s"),this.set("type","button"),this.set("withText",!1),this.set("withKeystroke",!1),this.children=this.createCollection(),this.tooltipView=this._createTooltipView(),this.labelView=this._createLabelView(n),this.iconView=new hd,this.iconView.extendTemplate({attributes:{class:"ck-button__icon"}}),this.keystrokeView=this._createKeystrokeView(),this.bind("_tooltipString").to(this,"tooltip",this,"label",this,"keystroke",this._getTooltipString.bind(this)),this.setTemplate({tag:"button",attributes:{class:["ck","ck-button",t.to("class"),t.if("isEnabled","ck-disabled",e=>!e),t.if("isVisible","ck-hidden",e=>!e),t.to("isOn",e=>e?"ck-on":"ck-off"),t.if("withText","ck-button_with-text"),t.if("withKeystroke","ck-button_with-keystroke")],type:t.to("type",e=>e||"button"),tabindex:t.to("tabindex"),"aria-labelledby":`ck-editor__aria-label_${n}`,"aria-disabled":t.if("isEnabled",!0,e=>!e),"aria-pressed":t.to("isOn",e=>!!this.isToggleable&&String(e))},children:this.children,on:{mousedown:t.to(e=>{e.preventDefault()}),click:t.to(e=>{this.isEnabled?this.fire("execute"):e.preventDefault()})}})}render(){super.render(),this.icon&&(this.iconView.bind("content").to(this,"icon"),this.children.add(this.iconView)),this.children.add(this.tooltipView),this.children.add(this.labelView),this.withKeystroke&&this.keystroke&&this.children.add(this.keystrokeView)}focus(){this.element.focus()}_createTooltipView(){const e=new gd;return e.bind("text").to(this,"_tooltipString"),e.bind("position").to(this,"tooltipPosition"),e}_createLabelView(e){const t=new Ll,n=this.bindTemplate;return t.setTemplate({tag:"span",attributes:{class:["ck","ck-button__label"],style:n.to("labelStyle"),id:`ck-editor__aria-label_${e}`},children:[{text:this.bindTemplate.to("label")}]}),t}_createKeystrokeView(){const e=new Ll;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__keystroke"]},children:[{text:this.bindTemplate.to("keystroke",e=>Co(e))}]}),e}_getTooltipString(e,t,n){return e?"string"==typeof e?e:(n&&(n=Co(n)),e instanceof Function?e(t,n):`${t}${n?` (${n})`:""}`):""}}var _d=r(681);sr()(_d.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),_d.Z.locals;class bd extends fd{constructor(e){super(e),this.isToggleable=!0,this.toggleSwitchView=this._createToggleView(),this.extendTemplate({attributes:{class:"ck-switchbutton"}})}render(){super.render(),this.children.add(this.toggleSwitchView)}_createToggleView(){const e=new Ll;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__toggle"]},children:[{tag:"span",attributes:{class:["ck","ck-button__toggle__inner"]}}]}),e}}function kd(e){return"string"==typeof e?{model:e,label:e,hasBorder:!1,view:{name:"span",styles:{color:e}}}:{model:e.color,label:e.label||e.color,hasBorder:void 0!==e.hasBorder&&e.hasBorder,view:{name:"span",styles:{color:`${e.color}`}}}}class vd extends fd{constructor(e){super(e);const t=this.bindTemplate;this.set("color"),this.set("hasBorder"),this.icon='',this.extendTemplate({attributes:{style:{backgroundColor:t.to("color")},class:["ck","ck-color-grid__tile",t.if("hasBorder","ck-color-table__color-tile_bordered")]}})}render(){super.render(),this.iconView.fillColor="hsl(0, 0%, 100%)"}}function Ad(e){return!!(e&&e.getClientRects&&e.getClientRects().length)}class yd{constructor(e){if(Object.assign(this,e),e.actions&&e.keystrokeHandler)for(const t in e.actions){let n=e.actions[t];"string"==typeof n&&(n=[n]);for(const i of n)e.keystrokeHandler.set(i,(e,n)=>{this[t](),n()})}}get first(){return this.focusables.find(wd)||null}get last(){return this.focusables.filter(wd).slice(-1)[0]||null}get next(){return this._getFocusableItem(1)}get previous(){return this._getFocusableItem(-1)}get current(){let e=null;return null===this.focusTracker.focusedElement?null:(this.focusables.find((t,n)=>{const i=t.element===this.focusTracker.focusedElement;return i&&(e=n),i}),e)}focusFirst(){this._focus(this.first)}focusLast(){this._focus(this.last)}focusNext(){this._focus(this.next)}focusPrevious(){this._focus(this.previous)}_focus(e){e&&e.focus()}_getFocusableItem(e){const t=this.current,n=this.focusables.length;if(!n)return null;if(null===t)return this[1===e?"first":"last"];let i=(t+n+e)%n;do{const t=this.focusables.get(i);if(wd(t))return t;i=(i+n+e)%n}while(i!==t);return null}}function wd(e){return!(!e.focus||!Ad(e.element))}var Cd=r(923);sr()(Cd.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Cd.Z.locals;class Id extends Ll{constructor(e,t){super(e);const n=t&&t.colorDefinitions||[],i={};t&&t.columns&&(i.gridTemplateColumns=`repeat( ${t.columns}, 1fr)`),this.set("selectedColor"),this.items=this.createCollection(),this.focusTracker=new Fs,this.keystrokes=new zs,this._focusCycler=new yd({focusables:this.items,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"arrowleft",focusNext:"arrowright"}}),this.items.on("add",(e,t)=>{t.isOn=t.color===this.selectedColor}),n.forEach(e=>{const t=new vd;t.set({color:e.color,label:e.label,tooltip:!0,hasBorder:e.options.hasBorder}),t.on("execute",()=>{this.fire("execute",{value:e.color,hasBorder:e.options.hasBorder,label:e.label})}),this.items.add(t)}),this.setTemplate({tag:"div",children:this.items,attributes:{class:["ck","ck-color-grid"],style:i}}),this.on("change:selectedColor",(e,t,n)=>{for(const e of this.items)e.isOn=e.color===n})}focus(){this.items.length&&this.items.first.focus()}focusLast(){this.items.length&&this.items.last.focus()}render(){super.render();for(const e of this.items)this.focusTracker.add(e.element);this.items.on("add",(e,t)=>{this.focusTracker.add(t.element)}),this.items.on("remove",(e,t)=>{this.focusTracker.remove(t.element)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}}class xd extends fd{constructor(e){super(e),this.arrowView=this._createArrowView(),this.extendTemplate({attributes:{"aria-haspopup":!0}}),this.delegate("execute").to(this,"open")}render(){super.render(),this.children.add(this.arrowView)}_createArrowView(){const e=new hd;return e.content='',e.extendTemplate({attributes:{class:"ck-dropdown__arrow"}}),e}}var Sd=r(66);sr()(Sd.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Sd.Z.locals;class Ed extends Ll{constructor(e){super(e);const t=this.bindTemplate;this.set("isVisible",!1),this.set("position","se"),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-dropdown__panel",t.to("position",e=>`ck-dropdown__panel_${e}`),t.if("isVisible","ck-dropdown__panel-visible")]},children:this.children,on:{selectstart:t.to(e=>e.preventDefault())}})}focus(){this.children.length&&this.children.first.focus()}focusLast(){if(this.children.length){const e=this.children.last;"function"==typeof e.focusLast?e.focusLast():e.focus()}}}var jd=r(488);function Td({element:e,target:t,positions:n,limiter:i,fitInViewport:o,viewportOffsetConfig:r}){N(t)&&(t=t()),N(i)&&(i=i());const s=function(e){return e&&e.parentNode?e.offsetParent===hr.document.body?null:e.offsetParent:null}(e),a=new ks(e);let c;const l={targetRect:new ks(t),elementRect:a,positionedElementAncestor:s};if(i||o){const e=i&&new ks(i).getVisible(),t=o&&function(e){e=Object.assign({top:0,bottom:0,left:0,right:0},e);const t=new ks(hr.window);return t.top+=e.top,t.height-=e.top,t.bottom-=e.bottom,t.height-=e.bottom,t}(r);Object.assign(l,{limiterRect:e,viewportRect:t}),c=function(e,t){const{elementRect:n}=t,i=n.getArea(),o=e.map(e=>new Pd(e,t)).filter(e=>!!e.name);let r=0,s=null;for(const e of o){const{_limiterIntersectionArea:t,_viewportIntersectionArea:n}=e;if(t===i)return e;const o=n**2+t**2;o>r&&(r=o,s=e)}return s}(n,l)||new Pd(n[0],l)}else c=new Pd(n[0],l);return c}function Dd(e){const{scrollX:t,scrollY:n}=hr.window;return e.clone().moveBy(t,n)}sr()(jd.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),jd.Z.locals;class Pd{constructor(e,t){const n=e(t.targetRect,t.elementRect,t.viewportRect);if(!n)return;const{left:i,top:o,name:r,config:s}=n;Object.assign(this,{name:r,config:s}),this._positioningFunctionCorrdinates={left:i,top:o},this._options=t}get left(){return this._absoluteRect.left}get top(){return this._absoluteRect.top}get _limiterIntersectionArea(){const e=this._options.limiterRect;if(e){const t=this._options.viewportRect;if(!t)return e.getIntersectionArea(this._rect);{const n=e.getIntersection(t);if(n)return n.getIntersectionArea(this._rect)}}return 0}get _viewportIntersectionArea(){const e=this._options.viewportRect;return e?e.getIntersectionArea(this._rect):0}get _rect(){return this._cachedRect||(this._cachedRect=this._options.elementRect.clone().moveTo(this._positioningFunctionCorrdinates.left,this._positioningFunctionCorrdinates.top)),this._cachedRect}get _absoluteRect(){return this._cachedAbsoluteRect||(this._cachedAbsoluteRect=Dd(this._rect),this._options.positionedElementAncestor&&function(e,t){const n=Dd(new ks(t)),i=_s(t);let o=0,r=0;o-=n.left,r-=n.top,o+=t.scrollLeft,r+=t.scrollTop,o-=i.left,r-=i.top,e.moveBy(o,r)}(this._cachedAbsoluteRect,this._options.positionedElementAncestor)),this._cachedAbsoluteRect}}class Rd extends Ll{constructor(e,t,n){super(e);const i=this.bindTemplate;this.buttonView=t,this.panelView=n,this.set("isOpen",!1),this.set("isEnabled",!0),this.set("class"),this.set("id"),this.set("panelPosition","auto"),this.keystrokes=new zs,this.setTemplate({tag:"div",attributes:{class:["ck","ck-dropdown",i.to("class"),i.if("isEnabled","ck-disabled",e=>!e)],id:i.to("id"),"aria-describedby":i.to("ariaDescribedById")},children:[t,n]}),t.extendTemplate({attributes:{class:["ck-dropdown__button"]}})}render(){super.render(),this.listenTo(this.buttonView,"open",()=>{this.isOpen=!this.isOpen}),this.panelView.bind("isVisible").to(this,"isOpen"),this.on("change:isOpen",()=>{this.isOpen&&("auto"===this.panelPosition?this.panelView.position=Rd._getOptimalPosition({element:this.panelView.element,target:this.buttonView.element,fitInViewport:!0,positions:this._panelPositions}).name:this.panelView.position=this.panelPosition)}),this.keystrokes.listenTo(this.element);const e=(e,t)=>{this.isOpen&&(this.buttonView.focus(),this.isOpen=!1,t())};this.keystrokes.set("arrowdown",(e,t)=>{this.buttonView.isEnabled&&!this.isOpen&&(this.isOpen=!0,t())}),this.keystrokes.set("arrowright",(e,t)=>{this.isOpen&&t()}),this.keystrokes.set("arrowleft",e),this.keystrokes.set("esc",e)}focus(){this.buttonView.focus()}get _panelPositions(){const{south:e,north:t,southEast:n,southWest:i,northEast:o,northWest:r,southMiddleEast:s,southMiddleWest:a,northMiddleEast:c,northMiddleWest:l}=Rd.defaultPanelPositions;return"rtl"!==this.locale.uiLanguageDirection?[n,i,s,a,e,o,r,c,l,t]:[i,n,a,s,e,r,o,l,c,t]}}Rd.defaultPanelPositions={south:(e,t)=>({top:e.bottom,left:e.left-(t.width-e.width)/2,name:"s"}),southEast:e=>({top:e.bottom,left:e.left,name:"se"}),southWest:(e,t)=>({top:e.bottom,left:e.left-t.width+e.width,name:"sw"}),southMiddleEast:(e,t)=>({top:e.bottom,left:e.left-(t.width-e.width)/4,name:"sme"}),southMiddleWest:(e,t)=>({top:e.bottom,left:e.left-3*(t.width-e.width)/4,name:"smw"}),north:(e,t)=>({top:e.top-t.height,left:e.left-(t.width-e.width)/2,name:"n"}),northEast:(e,t)=>({top:e.top-t.height,left:e.left,name:"ne"}),northWest:(e,t)=>({top:e.top-t.height,left:e.left-t.width+e.width,name:"nw"}),northMiddleEast:(e,t)=>({top:e.top-t.height,left:e.left-(t.width-e.width)/4,name:"nme"}),northMiddleWest:(e,t)=>({top:e.top-t.height,left:e.left-3*(t.width-e.width)/4,name:"nmw"})},Rd._getOptimalPosition=Td;class Od extends Ll{constructor(e){super(e),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__separator"]}})}}class Fd extends Ll{constructor(e){super(e),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__line-break"]}})}}function zd(e){return e.bindTemplate.to(t=>{t.target===e.element&&t.preventDefault()})}function Md(e){return Array.isArray(e)?{items:e,removeItems:[]}:e?Object.assign({items:[],removeItems:[]},e):{items:[],removeItems:[]}}var $d=r(571);sr()($d.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),$d.Z.locals;class Nd extends Ll{constructor(e,t){super(e);const n=this.bindTemplate,i=this.t;this.options=t||{},this.set("ariaLabel",i("Editor toolbar")),this.set("maxWidth","auto"),this.items=this.createCollection(),this.focusTracker=new Fs,this.keystrokes=new zs,this.set("class"),this.set("isCompact",!1),this.itemsView=new Bd(e),this.children=this.createCollection(),this.children.add(this.itemsView),this.focusables=this.createCollection();const o="rtl"===e.uiLanguageDirection;this._focusCycler=new yd({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:[o?"arrowright":"arrowleft","arrowup"],focusNext:[o?"arrowleft":"arrowright","arrowdown"]}});const r=["ck","ck-toolbar",n.to("class"),n.if("isCompact","ck-toolbar_compact")];this.options.shouldGroupWhenFull&&this.options.isFloating&&r.push("ck-toolbar_floating"),this.setTemplate({tag:"div",attributes:{class:r,role:"toolbar","aria-label":n.to("ariaLabel"),style:{maxWidth:n.to("maxWidth")}},children:this.children,on:{mousedown:zd(this)}}),this._behavior=this.options.shouldGroupWhenFull?new Vd(this):new Ld(this)}render(){super.render();for(const e of this.items)this.focusTracker.add(e.element);this.items.on("add",(e,t)=>{this.focusTracker.add(t.element)}),this.items.on("remove",(e,t)=>{this.focusTracker.remove(t.element)}),this.keystrokes.listenTo(this.element),this._behavior.render(this)}destroy(){return this._behavior.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy(),super.destroy()}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}fillFromConfig(e,t){const n=Md(e),i=n.items.filter((e,i,o)=>"|"===e||-1===n.removeItems.indexOf(e)&&("-"===e?!this.options.shouldGroupWhenFull||(h("toolbarview-line-break-ignored-when-grouping-items",o),!1):!!t.has(e)||(h("toolbarview-item-unavailable",{name:e}),!1))),o=this._cleanSeparators(i).map(e=>"|"===e?new Od:"-"===e?new Fd:t.create(e));this.items.addMany(o)}_cleanSeparators(e){const t=e=>"-"!==e&&"|"!==e,n=e.length,i=e.findIndex(t),o=n-e.slice().reverse().findIndex(t);return e.slice(i,o).filter((e,n,i)=>!!t(e)||!(n>0&&i[n-1]===e))}}class Bd extends Ll{constructor(e){super(e),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-toolbar__items"]},children:this.children})}}class Ld{constructor(e){const t=e.bindTemplate;e.set("isVertical",!1),e.itemsView.children.bindTo(e.items).using(e=>e),e.focusables.bindTo(e.items).using(e=>e),e.extendTemplate({attributes:{class:[t.if("isVertical","ck-toolbar_vertical")]}})}render(){}destroy(){}}class Vd{constructor(e){this.view=e,this.viewChildren=e.children,this.viewFocusables=e.focusables,this.viewItemsView=e.itemsView,this.viewFocusTracker=e.focusTracker,this.viewLocale=e.locale,this.ungroupedItems=e.createCollection(),this.groupedItems=e.createCollection(),this.groupedItemsDropdown=this._createGroupedItemsDropdown(),this.resizeObserver=null,this.cachedPadding=null,this.shouldUpdateGroupingOnNextResize=!1,e.itemsView.children.bindTo(this.ungroupedItems).using(e=>e),this.ungroupedItems.on("add",this._updateFocusCycleableItems.bind(this)),this.ungroupedItems.on("remove",this._updateFocusCycleableItems.bind(this)),e.children.on("add",this._updateFocusCycleableItems.bind(this)),e.children.on("remove",this._updateFocusCycleableItems.bind(this)),e.items.on("change",(e,t)=>{const n=t.index;for(const e of t.removed)n>=this.ungroupedItems.length?this.groupedItems.remove(e):this.ungroupedItems.remove(e);for(let e=n;ethis.ungroupedItems.length?this.groupedItems.add(i,e-this.ungroupedItems.length):this.ungroupedItems.add(i,e)}this._updateGrouping()}),e.extendTemplate({attributes:{class:["ck-toolbar_grouping"]}})}render(e){this.viewElement=e.element,this._enableGroupingOnResize(),this._enableGroupingOnMaxWidthChange(e)}destroy(){this.groupedItemsDropdown.destroy(),this.resizeObserver.destroy()}_updateGrouping(){if(!this.viewElement.ownerDocument.body.contains(this.viewElement))return;if(!Ad(this.viewElement))return void(this.shouldUpdateGroupingOnNextResize=!0);const e=this.groupedItems.length;let t;for(;this._areItemsOverflowing;)this._groupLastItem(),t=!0;if(!t&&this.groupedItems.length){for(;this.groupedItems.length&&!this._areItemsOverflowing;)this._ungroupFirstItem();this._areItemsOverflowing&&this._groupLastItem()}this.groupedItems.length!==e&&this.view.fire("groupedItemsUpdate")}get _areItemsOverflowing(){if(!this.ungroupedItems.length)return!1;const e=this.viewElement,t=this.viewLocale.uiLanguageDirection,n=new ks(e.lastChild),i=new ks(e);if(!this.cachedPadding){const n=hr.window.getComputedStyle(e),i="ltr"===t?"paddingRight":"paddingLeft";this.cachedPadding=Number.parseInt(n[i])}return"ltr"===t?n.right>i.right-this.cachedPadding:n.left{e&&e===t.contentRect.width&&!this.shouldUpdateGroupingOnNextResize||(this.shouldUpdateGroupingOnNextResize=!1,this._updateGrouping(),e=t.contentRect.width)}),this._updateGrouping()}_enableGroupingOnMaxWidthChange(e){e.on("change:maxWidth",()=>{this._updateGrouping()})}_groupLastItem(){this.groupedItems.length||(this.viewChildren.add(new Od),this.viewChildren.add(this.groupedItemsDropdown),this.viewFocusTracker.add(this.groupedItemsDropdown.element)),this.groupedItems.add(this.ungroupedItems.remove(this.ungroupedItems.last),0)}_ungroupFirstItem(){this.ungroupedItems.add(this.groupedItems.remove(this.groupedItems.first)),this.groupedItems.length||(this.viewChildren.remove(this.groupedItemsDropdown),this.viewChildren.remove(this.viewChildren.last),this.viewFocusTracker.remove(this.groupedItemsDropdown.element))}_createGroupedItemsDropdown(){const e=this.viewLocale,t=e.t,n=Yd(e);return n.class="ck-toolbar__grouped-dropdown",n.panelPosition="ltr"===e.uiLanguageDirection?"sw":"se",Zd(n,[]),n.buttonView.set({label:t("Show more items"),tooltip:!0,tooltipPosition:"rtl"===e.uiLanguageDirection?"se":"sw",icon:''}),n.toolbarView.items.bindTo(this.groupedItems).using(e=>e),n}_updateFocusCycleableItems(){this.viewFocusables.clear(),this.ungroupedItems.map(e=>{this.viewFocusables.add(e)}),this.groupedItems.length&&this.viewFocusables.add(this.groupedItemsDropdown)}}var Ud=r(162);sr()(Ud.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Ud.Z.locals;class Gd extends Ll{constructor(){super(),this.items=this.createCollection(),this.focusTracker=new Fs,this.keystrokes=new zs,this._focusCycler=new yd({focusables:this.items,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"arrowup",focusNext:"arrowdown"}}),this.setTemplate({tag:"ul",attributes:{class:["ck","ck-reset","ck-list"]},children:this.items})}render(){super.render();for(const e of this.items)this.focusTracker.add(e.element);this.items.on("add",(e,t)=>{this.focusTracker.add(t.element)}),this.items.on("remove",(e,t)=>{this.focusTracker.remove(t.element)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}}class Wd extends Ll{constructor(e){super(e),this.children=this.createCollection(),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__item"]},children:this.children})}focus(){this.children.first.focus()}}class qd extends Ll{constructor(e){super(e),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__separator"]}})}}var Hd=r(75);sr()(Hd.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Hd.Z.locals;var Kd=r(875);function Yd(e,t=xd){const n=new t(e),i=new Ed(e),o=new Rd(e,n,i);return n.bind("isEnabled").to(o),n instanceof xd?n.bind("isOn").to(o,"isOpen"):n.arrowView.bind("isOn").to(o,"isOpen"),function(e){(function(e){e.on("render",()=>{zl({emitter:e,activator:()=>e.isOpen,callback:()=>{e.isOpen=!1},contextElements:[e.element]})})})(e),function(e){e.on("execute",t=>{t.source instanceof bd||(e.isOpen=!1)})}(e),function(e){e.keystrokes.set("arrowdown",(t,n)=>{e.isOpen&&(e.panelView.focus(),n())}),e.keystrokes.set("arrowup",(t,n)=>{e.isOpen&&(e.panelView.focusLast(),n())})}(e)}(o),o}function Zd(e,t){const n=e.locale,i=n.t,o=e.toolbarView=new Nd(n);o.set("ariaLabel",i("Dropdown toolbar")),e.extendTemplate({attributes:{class:["ck-toolbar-dropdown"]}}),t.map(e=>o.items.add(e)),e.panelView.children.add(o),o.items.delegate("execute").to(e)}function Jd(e,t){const n=e.locale,i=e.listView=new Gd(n);i.items.bindTo(t).using(({type:e,model:t})=>{if("separator"===e)return new qd(n);if("button"===e||"switchbutton"===e){const i=new Wd(n);let o;return o="button"===e?new fd(n):new bd(n),o.bind(...Object.keys(t)).to(t),o.delegate("execute").to(i),i.children.add(o),i}}),e.panelView.children.add(i),i.items.delegate("execute").to(e)}sr()(Kd.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Kd.Z.locals;var Xd=r(547);sr()(Xd.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Xd.Z.locals;class Qd extends Ll{constructor(e){super(e),this.body=new dd(e)}render(){super.render(),this.body.attachToDom()}destroy(){return this.body.detachFromDom(),super.destroy()}}var eu=r(751);sr()(eu.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),eu.Z.locals;class tu extends Ll{constructor(e){super(e),this.set("text"),this.set("for"),this.id=`ck-editor__label_${a()}`;const t=this.bindTemplate;this.setTemplate({tag:"label",attributes:{class:["ck","ck-label"],id:this.id,for:t.to("for")},children:[{text:t.to("text")}]})}}class nu extends Qd{constructor(e){super(e),this.top=this.createCollection(),this.main=this.createCollection(),this._voiceLabelView=this._createVoiceLabel(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-editor","ck-rounded-corners"],role:"application",dir:e.uiLanguageDirection,lang:e.uiLanguage,"aria-labelledby":this._voiceLabelView.id},children:[this._voiceLabelView,{tag:"div",attributes:{class:["ck","ck-editor__top","ck-reset_all"],role:"presentation"},children:this.top},{tag:"div",attributes:{class:["ck","ck-editor__main"],role:"presentation"},children:this.main}]})}_createVoiceLabel(){const e=this.t,t=new tu;return t.text=e("Rich Text Editor"),t.extendTemplate({attributes:{class:"ck-voice-label"}}),t}}class iu extends Ll{constructor(e,t,n){super(e),this.setTemplate({tag:"div",attributes:{class:["ck","ck-content","ck-editor__editable","ck-rounded-corners"],lang:e.contentLanguage,dir:e.contentLanguageDirection}}),this.name=null,this.set("isFocused",!1),this._editableElement=n,this._hasExternalElement=!!this._editableElement,this._editingView=t}render(){super.render(),this._hasExternalElement?this.template.apply(this.element=this._editableElement):this._editableElement=this.element,this.on("change:isFocused",()=>this._updateIsFocusedClasses()),this._updateIsFocusedClasses()}destroy(){this._hasExternalElement&&this.template.revert(this._editableElement),super.destroy()}_updateIsFocusedClasses(){const e=this._editingView;function t(t){e.change(n=>{const i=e.document.getRoot(t.name);n.addClass(t.isFocused?"ck-focused":"ck-blurred",i),n.removeClass(t.isFocused?"ck-blurred":"ck-focused",i)})}e.isRenderingInProgress?function n(i){e.once("change:isRenderingInProgress",(e,o,r)=>{r?n(i):t(i)})}(this):t(this)}}class ou extends iu{constructor(e,t,n){super(e,t,n),this.extendTemplate({attributes:{role:"textbox",class:"ck-editor__editable_inline"}})}render(){super.render();const e=this._editingView,t=this.t;e.change(n=>{const i=e.document.getRoot(this.name);n.setAttribute("aria-label",t("Rich Text Editor, %0",this.name),i)})}}var ru=r(523);sr()(ru.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),ru.Z.locals;var su=r(985);sr()(su.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),su.Z.locals;class au extends Ll{constructor(e){super(e),this.set("value"),this.set("id"),this.set("placeholder"),this.set("isReadOnly",!1),this.set("hasError",!1),this.set("ariaDescribedById"),this.focusTracker=new Fs,this.bind("isFocused").to(this.focusTracker),this.set("isEmpty",!0),this.set("inputMode","text");const t=this.bindTemplate;this.setTemplate({tag:"input",attributes:{class:["ck","ck-input",t.if("isFocused","ck-input_focused"),t.if("isEmpty","ck-input-text_empty"),t.if("hasError","ck-error")],id:t.to("id"),placeholder:t.to("placeholder"),readonly:t.to("isReadOnly"),inputmode:t.to("inputMode"),"aria-invalid":t.if("hasError",!0),"aria-describedby":t.to("ariaDescribedById")},on:{input:t.to((...e)=>{this.fire("input",...e),this._updateIsEmpty()}),change:t.to(this._updateIsEmpty.bind(this))}})}render(){super.render(),this.focusTracker.add(this.element),this._setDomElementValue(this.value),this._updateIsEmpty(),this.on("change:value",(e,t,n)=>{this._setDomElementValue(n),this._updateIsEmpty()})}destroy(){super.destroy(),this.focusTracker.destroy()}select(){this.element.select()}focus(){this.element.focus()}_updateIsEmpty(){this.isEmpty=function(e){return!e.value}(this.element)}_setDomElementValue(e){this.element.value=e||0===e?e:""}}class cu extends au{constructor(e){super(e),this.extendTemplate({attributes:{type:"text",class:["ck-input-text"]}})}}var lu=r(111);sr()(lu.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),lu.Z.locals;class du extends Ll{constructor(e,t){super(e);const n=`ck-labeled-field-view-${a()}`,i=`ck-labeled-field-view-status-${a()}`;this.fieldView=t(this,n,i),this.set("label"),this.set("isEnabled",!0),this.set("isEmpty",!0),this.set("isFocused",!1),this.set("errorText",null),this.set("infoText",null),this.set("class"),this.set("placeholder"),this.labelView=this._createLabelView(n),this.statusView=this._createStatusView(i),this.bind("_statusText").to(this,"errorText",this,"infoText",(e,t)=>e||t);const o=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view",o.to("class"),o.if("isEnabled","ck-disabled",e=>!e),o.if("isEmpty","ck-labeled-field-view_empty"),o.if("isFocused","ck-labeled-field-view_focused"),o.if("placeholder","ck-labeled-field-view_placeholder"),o.if("errorText","ck-error")]},children:[{tag:"div",attributes:{class:["ck","ck-labeled-field-view__input-wrapper"]},children:[this.fieldView,this.labelView]},this.statusView]})}_createLabelView(e){const t=new tu(this.locale);return t.for=e,t.bind("text").to(this,"label"),t}_createStatusView(e){const t=new Ll(this.locale),n=this.bindTemplate;return t.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view__status",n.if("errorText","ck-labeled-field-view__status_error"),n.if("_statusText","ck-hidden",e=>!e)],id:e,role:n.if("errorText","alert")},children:[{text:n.to("_statusText")}]}),t}focus(){this.fieldView.focus()}}function uu(e,t,n){const i=new cu(e.locale);return i.set({id:t,ariaDescribedById:n}),i.bind("isReadOnly").to(e,"isEnabled",e=>!e),i.bind("hasError").to(e,"errorText",e=>!!e),i.on("input",()=>{e.errorText=null}),e.bind("isEmpty","isFocused","placeholder").to(i),i}class hu extends Zn{static get pluginName(){return"Notification"}init(){this.on("show:warning",(e,t)=>{window.alert(t.message)},{priority:"lowest"})}showSuccess(e,t={}){this._showNotification({message:e,type:"success",namespace:t.namespace,title:t.title})}showInfo(e,t={}){this._showNotification({message:e,type:"info",namespace:t.namespace,title:t.title})}showWarning(e,t={}){this._showNotification({message:e,type:"warning",namespace:t.namespace,title:t.title})}_showNotification(e){const t=`show:${e.type}`+(e.namespace?`:${e.namespace}`:"");this.fire(t,{message:e.message,type:e.type,title:e.title||""})}}class mu{constructor(e,t){t&&qe(this,t),e&&this.set(e)}}function gu(e){return t=>t+e}rt(mu,Qe);var pu=r(245);sr()(pu.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),pu.Z.locals;const fu=gu("px"),_u=hr.document.body;class bu extends Ll{constructor(e){super(e);const t=this.bindTemplate;this.set("top",0),this.set("left",0),this.set("position","arrow_nw"),this.set("isVisible",!1),this.set("withArrow",!0),this.set("class"),this.content=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-balloon-panel",t.to("position",e=>`ck-balloon-panel_${e}`),t.if("isVisible","ck-balloon-panel_visible"),t.if("withArrow","ck-balloon-panel_with-arrow"),t.to("class")],style:{top:t.to("top",fu),left:t.to("left",fu)}},children:this.content})}show(){this.isVisible=!0}hide(){this.isVisible=!1}attachTo(e){this.show();const t=bu.defaultPositions,n=Object.assign({},{element:this.element,positions:[t.southArrowNorth,t.southArrowNorthMiddleWest,t.southArrowNorthMiddleEast,t.southArrowNorthWest,t.southArrowNorthEast,t.northArrowSouth,t.northArrowSouthMiddleWest,t.northArrowSouthMiddleEast,t.northArrowSouthWest,t.northArrowSouthEast,t.viewportStickyNorth],limiter:_u,fitInViewport:!0},e),i=bu._getOptimalPosition(n),o=parseInt(i.left),r=parseInt(i.top),{name:s,config:a={}}=i,{withArrow:c=!0}=a;Object.assign(this,{top:r,left:o,position:s,withArrow:c})}pin(e){this.unpin(),this._pinWhenIsVisibleCallback=()=>{this.isVisible?this._startPinning(e):this._stopPinning()},this._startPinning(e),this.listenTo(this,"change:isVisible",this._pinWhenIsVisibleCallback)}unpin(){this._pinWhenIsVisibleCallback&&(this._stopPinning(),this.stopListening(this,"change:isVisible",this._pinWhenIsVisibleCallback),this._pinWhenIsVisibleCallback=null,this.hide())}_startPinning(e){this.attachTo(e);const t=ku(e.target),n=e.limiter?ku(e.limiter):_u;this.listenTo(hr.document,"scroll",(i,o)=>{const r=o.target,s=t&&r.contains(t),a=n&&r.contains(n);!s&&!a&&t&&n||this.attachTo(e)},{useCapture:!0}),this.listenTo(hr.window,"resize",()=>{this.attachTo(e)})}_stopPinning(){this.stopListening(hr.document,"scroll"),this.stopListening(hr.window,"resize")}}function ku(e){return $n(e)?e:fs(e)?e.commonAncestorContainer:"function"==typeof e?ku(e()):null}bu.arrowHorizontalOffset=25,bu.arrowVerticalOffset=10,bu.stickyVerticalOffset=20,bu._getOptimalPosition=Td,bu.defaultPositions=function({horizontalOffset:e=bu.arrowHorizontalOffset,verticalOffset:t=bu.arrowVerticalOffset,stickyVerticalOffset:n=bu.stickyVerticalOffset,config:i}={}){return{northWestArrowSouthWest:(t,n)=>({top:o(t,n),left:t.left-e,name:"arrow_sw",...i&&{config:i}}),northWestArrowSouthMiddleWest:(t,n)=>({top:o(t,n),left:t.left-.25*n.width-e,name:"arrow_smw",...i&&{config:i}}),northWestArrowSouth:(e,t)=>({top:o(e,t),left:e.left-t.width/2,name:"arrow_s",...i&&{config:i}}),northWestArrowSouthMiddleEast:(t,n)=>({top:o(t,n),left:t.left-.75*n.width+e,name:"arrow_sme",...i&&{config:i}}),northWestArrowSouthEast:(t,n)=>({top:o(t,n),left:t.left-n.width+e,name:"arrow_se",...i&&{config:i}}),northArrowSouthWest:(t,n)=>({top:o(t,n),left:t.left+t.width/2-e,name:"arrow_sw",...i&&{config:i}}),northArrowSouthMiddleWest:(t,n)=>({top:o(t,n),left:t.left+t.width/2-.25*n.width-e,name:"arrow_smw",...i&&{config:i}}),northArrowSouth:(e,t)=>({top:o(e,t),left:e.left+e.width/2-t.width/2,name:"arrow_s",...i&&{config:i}}),northArrowSouthMiddleEast:(t,n)=>({top:o(t,n),left:t.left+t.width/2-.75*n.width+e,name:"arrow_sme",...i&&{config:i}}),northArrowSouthEast:(t,n)=>({top:o(t,n),left:t.left+t.width/2-n.width+e,name:"arrow_se",...i&&{config:i}}),northEastArrowSouthWest:(t,n)=>({top:o(t,n),left:t.right-e,name:"arrow_sw",...i&&{config:i}}),northEastArrowSouthMiddleWest:(t,n)=>({top:o(t,n),left:t.right-.25*n.width-e,name:"arrow_smw",...i&&{config:i}}),northEastArrowSouth:(e,t)=>({top:o(e,t),left:e.right-t.width/2,name:"arrow_s",...i&&{config:i}}),northEastArrowSouthMiddleEast:(t,n)=>({top:o(t,n),left:t.right-.75*n.width+e,name:"arrow_sme",...i&&{config:i}}),northEastArrowSouthEast:(t,n)=>({top:o(t,n),left:t.right-n.width+e,name:"arrow_se",...i&&{config:i}}),southWestArrowNorthWest:(t,n)=>({top:r(t),left:t.left-e,name:"arrow_nw",...i&&{config:i}}),southWestArrowNorthMiddleWest:(t,n)=>({top:r(t),left:t.left-.25*n.width-e,name:"arrow_nmw",...i&&{config:i}}),southWestArrowNorth:(e,t)=>({top:r(e),left:e.left-t.width/2,name:"arrow_n",...i&&{config:i}}),southWestArrowNorthMiddleEast:(t,n)=>({top:r(t),left:t.left-.75*n.width+e,name:"arrow_nme",...i&&{config:i}}),southWestArrowNorthEast:(t,n)=>({top:r(t),left:t.left-n.width+e,name:"arrow_ne",...i&&{config:i}}),southArrowNorthWest:(t,n)=>({top:r(t),left:t.left+t.width/2-e,name:"arrow_nw",...i&&{config:i}}),southArrowNorthMiddleWest:(t,n)=>({top:r(t),left:t.left+t.width/2-.25*n.width-e,name:"arrow_nmw",...i&&{config:i}}),southArrowNorth:(e,t)=>({top:r(e),left:e.left+e.width/2-t.width/2,name:"arrow_n",...i&&{config:i}}),southArrowNorthMiddleEast:(t,n)=>({top:r(t),left:t.left+t.width/2-.75*n.width+e,name:"arrow_nme",...i&&{config:i}}),southArrowNorthEast:(t,n)=>({top:r(t),left:t.left+t.width/2-n.width+e,name:"arrow_ne",...i&&{config:i}}),southEastArrowNorthWest:(t,n)=>({top:r(t),left:t.right-e,name:"arrow_nw",...i&&{config:i}}),southEastArrowNorthMiddleWest:(t,n)=>({top:r(t),left:t.right-.25*n.width-e,name:"arrow_nmw",...i&&{config:i}}),southEastArrowNorth:(e,t)=>({top:r(e),left:e.right-t.width/2,name:"arrow_n",...i&&{config:i}}),southEastArrowNorthMiddleEast:(t,n)=>({top:r(t),left:t.right-.75*n.width+e,name:"arrow_nme",...i&&{config:i}}),southEastArrowNorthEast:(t,n)=>({top:r(t),left:t.right-n.width+e,name:"arrow_ne",...i&&{config:i}}),viewportStickyNorth:(e,t,o)=>e.getIntersection(o)?{top:o.top+n,left:e.left+e.width/2-t.width/2,name:"arrowless",config:{withArrow:!1,...i}}:null};function o(e,n){return e.top-n.height-t}function r(e){return e.bottom+t}}();var vu=r(757);sr()(vu.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),vu.Z.locals;var Au=r(553);sr()(Au.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Au.Z.locals;const yu=gu("px");class wu extends st{static get pluginName(){return"ContextualBalloon"}constructor(e){super(e),this.positionLimiter=()=>{const e=this.editor.editing.view,t=e.document.selection.editableElement;return t?e.domConverter.mapViewToDom(t.root):null},this.set("visibleView",null),this.view=new bu(e.locale),e.ui.view.body.add(this.view),e.ui.focusTracker.add(this.view.element),this._viewToStack=new Map,this._idToStack=new Map,this.set("_numberOfStacks",0),this.set("_singleViewMode",!1),this._rotatorView=this._createRotatorView(),this._fakePanelsView=this._createFakePanelsView()}destroy(){super.destroy(),this.view.destroy(),this._rotatorView.destroy(),this._fakePanelsView.destroy()}hasView(e){return Array.from(this._viewToStack.keys()).includes(e)}add(e){if(this.hasView(e.view))throw new u("contextualballoon-add-view-exist",[this,e]);const t=e.stackId||"main";if(!this._idToStack.has(t))return this._idToStack.set(t,new Map([[e.view,e]])),this._viewToStack.set(e.view,this._idToStack.get(t)),this._numberOfStacks=this._idToStack.size,void(this._visibleStack&&!e.singleViewMode||this.showStack(t));const n=this._idToStack.get(t);e.singleViewMode&&this.showStack(t),n.set(e.view,e),this._viewToStack.set(e.view,n),n===this._visibleStack&&this._showView(e)}remove(e){if(!this.hasView(e))throw new u("contextualballoon-remove-view-not-exist",[this,e]);const t=this._viewToStack.get(e);this._singleViewMode&&this.visibleView===e&&(this._singleViewMode=!1),this.visibleView===e&&(1===t.size?this._idToStack.size>1?this._showNextStack():(this.view.hide(),this.visibleView=null,this._rotatorView.hideView()):this._showView(Array.from(t.values())[t.size-2])),1===t.size?(this._idToStack.delete(this._getStackId(t)),this._numberOfStacks=this._idToStack.size):t.delete(e),this._viewToStack.delete(e)}updatePosition(e){e&&(this._visibleStack.get(this.visibleView).position=e),this.view.pin(this._getBalloonPosition()),this._fakePanelsView.updatePosition()}showStack(e){this.visibleStack=e;const t=this._idToStack.get(e);if(!t)throw new u("contextualballoon-showstack-stack-not-exist",this);this._visibleStack!==t&&this._showView(Array.from(t.values()).pop())}get _visibleStack(){return this._viewToStack.get(this.visibleView)}_getStackId(e){return Array.from(this._idToStack.entries()).find(t=>t[1]===e)[0]}_showNextStack(){const e=Array.from(this._idToStack.values());let t=e.indexOf(this._visibleStack)+1;e[t]||(t=0),this.showStack(this._getStackId(e[t]))}_showPrevStack(){const e=Array.from(this._idToStack.values());let t=e.indexOf(this._visibleStack)-1;e[t]||(t=e.length-1),this.showStack(this._getStackId(e[t]))}_createRotatorView(){const e=new Cu(this.editor.locale),t=this.editor.locale.t;return this.view.content.add(e),e.bind("isNavigationVisible").to(this,"_numberOfStacks",this,"_singleViewMode",(e,t)=>!t&&e>1),e.on("change:isNavigationVisible",()=>this.updatePosition(),{priority:"low"}),e.bind("counter").to(this,"visibleView",this,"_numberOfStacks",(e,n)=>{if(n<2)return"";const i=Array.from(this._idToStack.values()).indexOf(this._visibleStack)+1;return t("%0 of %1",[i,n])}),e.buttonNextView.on("execute",()=>{e.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showNextStack()}),e.buttonPrevView.on("execute",()=>{e.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showPrevStack()}),e}_createFakePanelsView(){const e=new Iu(this.editor.locale,this.view);return e.bind("numberOfPanels").to(this,"_numberOfStacks",this,"_singleViewMode",(e,t)=>!t&&e>=2?Math.min(e-1,2):0),e.listenTo(this.view,"change:top",()=>e.updatePosition()),e.listenTo(this.view,"change:left",()=>e.updatePosition()),this.editor.ui.view.body.add(e),e}_showView({view:e,balloonClassName:t="",withArrow:n=!0,singleViewMode:i=!1}){this.view.class=t,this.view.withArrow=n,this._rotatorView.showView(e),this.visibleView=e,this.view.pin(this._getBalloonPosition()),this._fakePanelsView.updatePosition(),i&&(this._singleViewMode=!0)}_getBalloonPosition(){let e=Array.from(this._visibleStack.values()).pop().position;return e&&(e.limiter||(e=Object.assign({},e,{limiter:this.positionLimiter})),e=Object.assign({},e,{viewportOffsetConfig:this.editor.ui.viewportOffset})),e}}class Cu extends Ll{constructor(e){super(e);const t=e.t,n=this.bindTemplate;this.set("isNavigationVisible",!0),this.focusTracker=new Fs,this.buttonPrevView=this._createButtonView(t("Previous"),''),this.buttonNextView=this._createButtonView(t("Next"),''),this.content=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-balloon-rotator"],"z-index":"-1"},children:[{tag:"div",attributes:{class:["ck-balloon-rotator__navigation",n.to("isNavigationVisible",e=>e?"":"ck-hidden")]},children:[this.buttonPrevView,{tag:"span",attributes:{class:["ck-balloon-rotator__counter"]},children:[{text:n.to("counter")}]},this.buttonNextView]},{tag:"div",attributes:{class:"ck-balloon-rotator__content"},children:this.content}]})}render(){super.render(),this.focusTracker.add(this.element)}destroy(){super.destroy(),this.focusTracker.destroy()}showView(e){this.hideView(),this.content.add(e)}hideView(){this.content.clear()}_createButtonView(e,t){const n=new fd(this.locale);return n.set({label:e,icon:t,tooltip:!0}),n}}class Iu extends Ll{constructor(e,t){super(e);const n=this.bindTemplate;this.set("top",0),this.set("left",0),this.set("height",0),this.set("width",0),this.set("numberOfPanels",0),this.content=this.createCollection(),this._balloonPanelView=t,this.setTemplate({tag:"div",attributes:{class:["ck-fake-panel",n.to("numberOfPanels",e=>e?"":"ck-hidden")],style:{top:n.to("top",yu),left:n.to("left",yu),width:n.to("width",yu),height:n.to("height",yu)}},children:this.content}),this.on("change:numberOfPanels",(e,t,n,i)=>{n>i?this._addPanels(n-i):this._removePanels(i-n),this.updatePosition()})}_addPanels(e){for(;e--;){const e=new Ll;e.setTemplate({tag:"div"}),this.content.add(e),this.registerChild(e)}}_removePanels(e){for(;e--;){const e=this.content.last;this.content.remove(e),this.deregisterChild(e),e.destroy()}}updatePosition(){if(this.numberOfPanels){const{top:e,left:t}=this._balloonPanelView,{width:n,height:i}=new ks(this._balloonPanelView.element);Object.assign(this,{top:e,left:t,width:n,height:i})}}}var xu=r(609);sr()(xu.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),xu.Z.locals;const Su=gu("px");class Eu extends Ll{constructor(e){super(e);const t=this.bindTemplate;this.set("isActive",!1),this.set("isSticky",!1),this.set("limiterElement",null),this.set("limiterBottomOffset",50),this.set("viewportTopOffset",0),this.set("_marginLeft",null),this.set("_isStickyToTheLimiter",!1),this.set("_hasViewportTopOffset",!1),this.content=this.createCollection(),this._contentPanelPlaceholder=new Vl({tag:"div",attributes:{class:["ck","ck-sticky-panel__placeholder"],style:{display:t.to("isSticky",e=>e?"block":"none"),height:t.to("isSticky",e=>e?Su(this._panelRect.height):null)}}}).render(),this._contentPanel=new Vl({tag:"div",attributes:{class:["ck","ck-sticky-panel__content",t.if("isSticky","ck-sticky-panel__content_sticky"),t.if("_isStickyToTheLimiter","ck-sticky-panel__content_sticky_bottom-limit")],style:{width:t.to("isSticky",e=>e?Su(this._contentPanelPlaceholder.getBoundingClientRect().width):null),top:t.to("_hasViewportTopOffset",e=>e?Su(this.viewportTopOffset):null),bottom:t.to("_isStickyToTheLimiter",e=>e?Su(this.limiterBottomOffset):null),marginLeft:t.to("_marginLeft")}},children:this.content}).render(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-sticky-panel"]},children:[this._contentPanelPlaceholder,this._contentPanel]})}render(){super.render(),this._checkIfShouldBeSticky(),this.listenTo(hr.window,"scroll",()=>{this._checkIfShouldBeSticky()}),this.listenTo(this,"change:isActive",()=>{this._checkIfShouldBeSticky()})}_checkIfShouldBeSticky(){const e=this._panelRect=this._contentPanel.getBoundingClientRect();let t;this.limiterElement?(t=this._limiterRect=this.limiterElement.getBoundingClientRect(),this.isSticky=this.isActive&&t.top!e.is("uiElement"));if(n)return!1;if(t)return!0;const i=e.document;if(!i.isFocused)return!0;const o=i.selection.anchor;return o&&o.parent!==e}(r,n.keepOnFocus)?function(e,t){return!t.hasClass("ck-placeholder")&&(e.addClass("ck-placeholder",t),!0)}(e,r)&&(s=!0):function(e,t){return!!t.hasClass("ck-placeholder")&&(e.removeClass("ck-placeholder",t),!0)}(e,r)&&(s=!0),s}function Ou(e){if(e.childCount){const t=e.getChild(0);if(t.is("element")&&!t.is("uiElement")&&!t.is("attributeElement"))return t}return null}const Fu=new Map;function zu(e,t,n){let i=Fu.get(e);i||(i=new Map,Fu.set(e,i)),i.set(t,n)}function Mu(e){return[e]}function $u(e,t,n={}){const i=function(e,t){const n=Fu.get(e);return n&&n.has(t)?n.get(t):Mu}(e.constructor,t.constructor);try{return i(e=e.clone(),t,n)}catch(e){throw e}}function Nu(e,t,n){e=e.slice(),t=t.slice();const i=new Bu(n.document,n.useRelations,n.forceWeakRemove);i.setOriginalOperations(e),i.setOriginalOperations(t);const o=i.originalOperations;if(0==e.length||0==t.length)return{operationsA:e,operationsB:t,originalOperations:o};const r=new WeakMap;for(const t of e)r.set(t,0);const s={nextBaseVersionA:e[e.length-1].baseVersion+1,nextBaseVersionB:t[t.length-1].baseVersion+1,originalOperationsACount:e.length,originalOperationsBCount:t.length};let a=0;for(;a{if(e.key===t.key&&e.range.start.hasSameParentAs(t.range.start)){const i=e.range.getDifference(t.range).map(t=>new Cc(t,e.key,e.oldValue,e.newValue,0)),o=e.range.getIntersection(t.range);return o&&n.aIsStrong&&i.push(new Cc(o,t.key,t.newValue,e.newValue,0)),0==i.length?[new el(0)]:i}return[e]}),zu(Cc,Sc,(e,t)=>{if(e.range.start.hasSameParentAs(t.position)&&e.range.containsPosition(t.position)){const n=e.range._getTransformedByInsertion(t.position,t.howMany,!t.shouldReceiveAttributes).map(t=>new Cc(t,e.key,e.oldValue,e.newValue,e.baseVersion));if(t.shouldReceiveAttributes){const i=Uu(t,e.key,e.oldValue);i&&n.unshift(i)}return n}return e.range=e.range._getTransformedByInsertion(t.position,t.howMany,!1)[0],[e]}),zu(Cc,Dc,(e,t)=>{const n=[];e.range.start.hasSameParentAs(t.deletionPosition)&&(e.range.containsPosition(t.deletionPosition)||e.range.start.isEqual(t.deletionPosition))&&n.push(Js._createFromPositionAndShift(t.graveyardPosition,1));const i=e.range._getTransformedByMergeOperation(t);return i.isCollapsed||n.push(i),n.map(t=>new Cc(t,e.key,e.oldValue,e.newValue,e.baseVersion))}),zu(Cc,xc,(e,t)=>{const n=function(e,t){const n=Js._createFromPositionAndShift(t.sourcePosition,t.howMany);let i=null,o=[];n.containsRange(e,!0)?i=e:e.start.hasSameParentAs(n.start)?(o=e.getDifference(n),i=e.getIntersection(n)):o=[e];const r=[];for(let e of o){e=e._getTransformedByDeletion(t.sourcePosition,t.howMany);const n=t.getMovedRangeStart(),i=e.start.hasSameParentAs(n);e=e._getTransformedByInsertion(n,t.howMany,i),r.push(...e)}return i&&r.push(i._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,!1)[0]),r}(e.range,t);return n.map(t=>new Cc(t,e.key,e.oldValue,e.newValue,e.baseVersion))}),zu(Cc,Pc,(e,t)=>{if(e.range.end.isEqual(t.insertionPosition))return t.graveyardPosition||e.range.end.offset++,[e];if(e.range.start.hasSameParentAs(t.splitPosition)&&e.range.containsPosition(t.splitPosition)){const n=e.clone();return n.range=new Js(t.moveTargetPosition.clone(),e.range.end._getCombined(t.splitPosition,t.moveTargetPosition)),e.range.end=t.splitPosition.clone(),e.range.end.stickiness="toPrevious",[e,n]}return e.range=e.range._getTransformedBySplitOperation(t),[e]}),zu(Sc,Cc,(e,t)=>{const n=[e];if(e.shouldReceiveAttributes&&e.position.hasSameParentAs(t.range.start)&&t.range.containsPosition(e.position)){const i=Uu(e,t.key,t.newValue);i&&n.push(i)}return n}),zu(Sc,Sc,(e,t,n)=>(e.position.isEqual(t.position)&&n.aIsStrong||(e.position=e.position._getTransformedByInsertOperation(t)),[e])),zu(Sc,xc,(e,t)=>(e.position=e.position._getTransformedByMoveOperation(t),[e])),zu(Sc,Pc,(e,t)=>(e.position=e.position._getTransformedBySplitOperation(t),[e])),zu(Sc,Dc,(e,t)=>(e.position=e.position._getTransformedByMergeOperation(t),[e])),zu(Ec,Sc,(e,t)=>(e.oldRange&&(e.oldRange=e.oldRange._getTransformedByInsertOperation(t)[0]),e.newRange&&(e.newRange=e.newRange._getTransformedByInsertOperation(t)[0]),[e])),zu(Ec,Ec,(e,t,n)=>{if(e.name==t.name){if(!n.aIsStrong)return[new el(0)];e.oldRange=t.newRange?t.newRange.clone():null}return[e]}),zu(Ec,Dc,(e,t)=>(e.oldRange&&(e.oldRange=e.oldRange._getTransformedByMergeOperation(t)),e.newRange&&(e.newRange=e.newRange._getTransformedByMergeOperation(t)),[e])),zu(Ec,xc,(e,t,n)=>{if(e.oldRange&&(e.oldRange=Js._createFromRanges(e.oldRange._getTransformedByMoveOperation(t))),e.newRange){if(n.abRelation){const i=Js._createFromRanges(e.newRange._getTransformedByMoveOperation(t));if("left"==n.abRelation.side&&t.targetPosition.isEqual(e.newRange.start))return e.newRange.start.path=n.abRelation.path,e.newRange.end=i.end,[e];if("right"==n.abRelation.side&&t.targetPosition.isEqual(e.newRange.end))return e.newRange.start=i.start,e.newRange.end.path=n.abRelation.path,[e]}e.newRange=Js._createFromRanges(e.newRange._getTransformedByMoveOperation(t))}return[e]}),zu(Ec,Pc,(e,t,n)=>{if(e.oldRange&&(e.oldRange=e.oldRange._getTransformedBySplitOperation(t)),e.newRange){if(n.abRelation){const i=e.newRange._getTransformedBySplitOperation(t);return e.newRange.start.isEqual(t.splitPosition)&&n.abRelation.wasStartBeforeMergedElement?e.newRange.start=Hs._createAt(t.insertionPosition):e.newRange.start.isEqual(t.splitPosition)&&!n.abRelation.wasInLeftElement&&(e.newRange.start=Hs._createAt(t.moveTargetPosition)),e.newRange.end.isEqual(t.splitPosition)&&n.abRelation.wasInRightElement?e.newRange.end=Hs._createAt(t.moveTargetPosition):e.newRange.end.isEqual(t.splitPosition)&&n.abRelation.wasEndBeforeMergedElement?e.newRange.end=Hs._createAt(t.insertionPosition):e.newRange.end=i.end,[e]}e.newRange=e.newRange._getTransformedBySplitOperation(t)}return[e]}),zu(Dc,Sc,(e,t)=>(e.sourcePosition.hasSameParentAs(t.position)&&(e.howMany+=t.howMany),e.sourcePosition=e.sourcePosition._getTransformedByInsertOperation(t),e.targetPosition=e.targetPosition._getTransformedByInsertOperation(t),[e])),zu(Dc,Dc,(e,t,n)=>{if(e.sourcePosition.isEqual(t.sourcePosition)&&e.targetPosition.isEqual(t.targetPosition)){if(n.bWasUndone){const n=t.graveyardPosition.path.slice();return n.push(0),e.sourcePosition=new Hs(t.graveyardPosition.root,n),e.howMany=0,[e]}return[new el(0)]}if(e.sourcePosition.isEqual(t.sourcePosition)&&!e.targetPosition.isEqual(t.targetPosition)&&!n.bWasUndone&&"splitAtSource"!=n.abRelation){const i="$graveyard"==e.targetPosition.root.rootName,o="$graveyard"==t.targetPosition.root.rootName;if(o&&!i||(!i||o)&&n.aIsStrong){const n=t.targetPosition._getTransformedByMergeOperation(t),i=e.targetPosition._getTransformedByMergeOperation(t);return[new xc(n,e.howMany,i,0)]}return[new el(0)]}return e.sourcePosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.sourcePosition=e.sourcePosition._getTransformedByMergeOperation(t),e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),e.graveyardPosition.isEqual(t.graveyardPosition)&&n.aIsStrong||(e.graveyardPosition=e.graveyardPosition._getTransformedByMergeOperation(t)),[e]}),zu(Dc,xc,(e,t,n)=>{const i=Js._createFromPositionAndShift(t.sourcePosition,t.howMany);return"remove"==t.type&&!n.bWasUndone&&!n.forceWeakRemove&&e.deletionPosition.hasSameParentAs(t.sourcePosition)&&i.containsPosition(e.sourcePosition)?[new el(0)]:(e.sourcePosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.sourcePosition.hasSameParentAs(t.sourcePosition)&&(e.howMany-=t.howMany),e.sourcePosition=e.sourcePosition._getTransformedByMoveOperation(t),e.targetPosition=e.targetPosition._getTransformedByMoveOperation(t),e.graveyardPosition.isEqual(t.targetPosition)||(e.graveyardPosition=e.graveyardPosition._getTransformedByMoveOperation(t)),[e])}),zu(Dc,Pc,(e,t,n)=>{if(t.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedByDeletion(t.graveyardPosition,1),e.deletionPosition.isEqual(t.graveyardPosition)&&(e.howMany=t.howMany)),e.targetPosition.isEqual(t.splitPosition)){const i=0!=t.howMany,o=t.graveyardPosition&&e.deletionPosition.isEqual(t.graveyardPosition);if(i||o||"mergeTargetNotMoved"==n.abRelation)return e.sourcePosition=e.sourcePosition._getTransformedBySplitOperation(t),[e]}if(e.sourcePosition.isEqual(t.splitPosition)){if("mergeSourceNotMoved"==n.abRelation)return e.howMany=0,e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e];if("mergeSameElement"==n.abRelation||e.sourcePosition.offset>0)return e.sourcePosition=t.moveTargetPosition.clone(),e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e]}return e.sourcePosition.hasSameParentAs(t.splitPosition)&&(e.howMany=t.splitPosition.offset),e.sourcePosition=e.sourcePosition._getTransformedBySplitOperation(t),e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e]}),zu(xc,Sc,(e,t)=>{const n=Js._createFromPositionAndShift(e.sourcePosition,e.howMany)._getTransformedByInsertOperation(t,!1)[0];return e.sourcePosition=n.start,e.howMany=n.end.offset-n.start.offset,e.targetPosition.isEqual(t.position)||(e.targetPosition=e.targetPosition._getTransformedByInsertOperation(t)),[e]}),zu(xc,xc,(e,t,n)=>{const i=Js._createFromPositionAndShift(e.sourcePosition,e.howMany),o=Js._createFromPositionAndShift(t.sourcePosition,t.howMany);let r,s=n.aIsStrong,a=!n.aIsStrong;if("insertBefore"==n.abRelation||"insertAfter"==n.baRelation?a=!0:"insertAfter"!=n.abRelation&&"insertBefore"!=n.baRelation||(a=!1),r=e.targetPosition.isEqual(t.targetPosition)&&a?e.targetPosition._getTransformedByDeletion(t.sourcePosition,t.howMany):e.targetPosition._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),Gu(e,t)&&Gu(t,e))return[t.getReversed()];if(i.containsPosition(t.targetPosition)&&i.containsRange(o,!0))return i.start=i.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),i.end=i.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),Wu([i],r);if(o.containsPosition(e.targetPosition)&&o.containsRange(i,!0))return i.start=i.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),i.end=i.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),Wu([i],r);const c=Jn(e.sourcePosition.getParentPath(),t.sourcePosition.getParentPath());if("prefix"==c||"extension"==c)return i.start=i.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),i.end=i.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),Wu([i],r);"remove"!=e.type||"remove"==t.type||n.aWasUndone||n.forceWeakRemove?"remove"==e.type||"remove"!=t.type||n.bWasUndone||n.forceWeakRemove||(s=!1):s=!0;const l=[],d=i.getDifference(o);for(const e of d){e.start=e.start._getTransformedByDeletion(t.sourcePosition,t.howMany),e.end=e.end._getTransformedByDeletion(t.sourcePosition,t.howMany);const n="same"==Jn(e.start.getParentPath(),t.getMovedRangeStart().getParentPath()),i=e._getTransformedByInsertion(t.getMovedRangeStart(),t.howMany,n);l.push(...i)}const u=i.getIntersection(o);return null!==u&&s&&(u.start=u.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),u.end=u.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),0===l.length?l.push(u):1==l.length?o.start.isBefore(i.start)||o.start.isEqual(i.start)?l.unshift(u):l.push(u):l.splice(1,0,u)),0===l.length?[new el(e.baseVersion)]:Wu(l,r)}),zu(xc,Pc,(e,t,n)=>{let i=e.targetPosition.clone();e.targetPosition.isEqual(t.insertionPosition)&&t.graveyardPosition&&"moveTargetAfter"!=n.abRelation||(i=e.targetPosition._getTransformedBySplitOperation(t));const o=Js._createFromPositionAndShift(e.sourcePosition,e.howMany);if(o.end.isEqual(t.insertionPosition))return t.graveyardPosition||e.howMany++,e.targetPosition=i,[e];if(o.start.hasSameParentAs(t.splitPosition)&&o.containsPosition(t.splitPosition)){let e=new Js(t.splitPosition,o.end);return e=e._getTransformedBySplitOperation(t),Wu([new Js(o.start,t.splitPosition),e],i)}e.targetPosition.isEqual(t.splitPosition)&&"insertAtSource"==n.abRelation&&(i=t.moveTargetPosition),e.targetPosition.isEqual(t.insertionPosition)&&"insertBetween"==n.abRelation&&(i=e.targetPosition);const r=[o._getTransformedBySplitOperation(t)];if(t.graveyardPosition){const i=o.start.isEqual(t.graveyardPosition)||o.containsPosition(t.graveyardPosition);e.howMany>1&&i&&!n.aWasUndone&&r.push(Js._createFromPositionAndShift(t.insertionPosition,1))}return Wu(r,i)}),zu(xc,Dc,(e,t,n)=>{const i=Js._createFromPositionAndShift(e.sourcePosition,e.howMany);if(t.deletionPosition.hasSameParentAs(e.sourcePosition)&&i.containsPosition(t.sourcePosition))if("remove"!=e.type||n.forceWeakRemove){if(1==e.howMany)return n.bWasUndone?(e.sourcePosition=t.graveyardPosition.clone(),e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),[e]):[new el(0)]}else if(!n.aWasUndone){const n=[];let i=t.graveyardPosition.clone(),o=t.targetPosition._getTransformedByMergeOperation(t);e.howMany>1&&(n.push(new xc(e.sourcePosition,e.howMany-1,e.targetPosition,0)),i=i._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany-1),o=o._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany-1));const r=t.deletionPosition._getCombined(e.sourcePosition,e.targetPosition),s=new xc(i,1,r,0),a=s.getMovedRangeStart().path.slice();a.push(0);const c=new Hs(s.targetPosition.root,a);o=o._getTransformedByMove(i,r,1);const l=new xc(o,t.howMany,c,0);return n.push(s),n.push(l),n}const o=Js._createFromPositionAndShift(e.sourcePosition,e.howMany)._getTransformedByMergeOperation(t);return e.sourcePosition=o.start,e.howMany=o.end.offset-o.start.offset,e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),[e]}),zu(jc,Sc,(e,t)=>(e.position=e.position._getTransformedByInsertOperation(t),[e])),zu(jc,Dc,(e,t)=>e.position.isEqual(t.deletionPosition)?(e.position=t.graveyardPosition.clone(),e.position.stickiness="toNext",[e]):(e.position=e.position._getTransformedByMergeOperation(t),[e])),zu(jc,xc,(e,t)=>(e.position=e.position._getTransformedByMoveOperation(t),[e])),zu(jc,jc,(e,t,n)=>{if(e.position.isEqual(t.position)){if(!n.aIsStrong)return[new el(0)];e.oldName=t.newName}return[e]}),zu(jc,Pc,(e,t)=>{if("same"==Jn(e.position.path,t.splitPosition.getParentPath())&&!t.graveyardPosition){const t=new jc(e.position.getShiftedBy(1),e.oldName,e.newName,0);return[e,t]}return e.position=e.position._getTransformedBySplitOperation(t),[e]}),zu(Tc,Tc,(e,t,n)=>{if(e.root===t.root&&e.key===t.key){if(!n.aIsStrong||e.newValue===t.newValue)return[new el(0)];e.oldValue=t.newValue}return[e]}),zu(Pc,Sc,(e,t)=>(e.splitPosition.hasSameParentAs(t.position)&&e.splitPosition.offset{if(!e.graveyardPosition&&!n.bWasUndone&&e.splitPosition.hasSameParentAs(t.sourcePosition)){const n=t.graveyardPosition.path.slice();n.push(0);const i=new Hs(t.graveyardPosition.root,n),o=Pc.getInsertionPosition(new Hs(t.graveyardPosition.root,n)),r=new Pc(i,0,o,null,0);return e.splitPosition=e.splitPosition._getTransformedByMergeOperation(t),e.insertionPosition=Pc.getInsertionPosition(e.splitPosition),e.graveyardPosition=r.insertionPosition.clone(),e.graveyardPosition.stickiness="toNext",[r,e]}return e.splitPosition.hasSameParentAs(t.deletionPosition)&&!e.splitPosition.isAfter(t.deletionPosition)&&e.howMany--,e.splitPosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.splitPosition=e.splitPosition._getTransformedByMergeOperation(t),e.insertionPosition=Pc.getInsertionPosition(e.splitPosition),e.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedByMergeOperation(t)),[e]}),zu(Pc,xc,(e,t,n)=>{const i=Js._createFromPositionAndShift(t.sourcePosition,t.howMany);if(e.graveyardPosition){const o=i.start.isEqual(e.graveyardPosition)||i.containsPosition(e.graveyardPosition);if(!n.bWasUndone&&o){const n=e.splitPosition._getTransformedByMoveOperation(t),i=e.graveyardPosition._getTransformedByMoveOperation(t),o=i.path.slice();o.push(0);const r=new Hs(i.root,o);return[new xc(n,e.howMany,r,0)]}e.graveyardPosition=e.graveyardPosition._getTransformedByMoveOperation(t)}const o=e.splitPosition.isEqual(t.targetPosition);if(o&&("insertAtSource"==n.baRelation||"splitBefore"==n.abRelation))return e.howMany+=t.howMany,e.splitPosition=e.splitPosition._getTransformedByDeletion(t.sourcePosition,t.howMany),e.insertionPosition=Pc.getInsertionPosition(e.splitPosition),[e];if(o&&n.abRelation&&n.abRelation.howMany){const{howMany:t,offset:i}=n.abRelation;return e.howMany+=t,e.splitPosition=e.splitPosition.getShiftedBy(i),[e]}if(e.splitPosition.hasSameParentAs(t.sourcePosition)&&i.containsPosition(e.splitPosition)){const n=t.howMany-(e.splitPosition.offset-t.sourcePosition.offset);return e.howMany-=n,e.splitPosition.hasSameParentAs(t.targetPosition)&&e.splitPosition.offset{if(e.splitPosition.isEqual(t.splitPosition)){if(!e.graveyardPosition&&!t.graveyardPosition)return[new el(0)];if(e.graveyardPosition&&t.graveyardPosition&&e.graveyardPosition.isEqual(t.graveyardPosition))return[new el(0)];if("splitBefore"==n.abRelation)return e.howMany=0,e.graveyardPosition=e.graveyardPosition._getTransformedBySplitOperation(t),[e]}if(e.graveyardPosition&&t.graveyardPosition&&e.graveyardPosition.isEqual(t.graveyardPosition)){const i="$graveyard"==e.splitPosition.root.rootName,o="$graveyard"==t.splitPosition.root.rootName;if(o&&!i||(!i||o)&&n.aIsStrong){const n=[];return t.howMany&&n.push(new xc(t.moveTargetPosition,t.howMany,t.splitPosition,0)),e.howMany&&n.push(new xc(e.splitPosition,e.howMany,e.moveTargetPosition,0)),n}return[new el(0)]}if(e.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedBySplitOperation(t)),e.splitPosition.isEqual(t.insertionPosition)&&"splitBefore"==n.abRelation)return e.howMany++,[e];if(t.splitPosition.isEqual(e.insertionPosition)&&"splitBefore"==n.baRelation){const n=t.insertionPosition.path.slice();n.push(0);const i=new Hs(t.insertionPosition.root,n);return[e,new xc(e.insertionPosition,1,i,0)]}return e.splitPosition.hasSameParentAs(t.splitPosition)&&e.splitPosition.offset({path:"background.color",value:e})),e.setReducer("background",e=>{const t=[];return t.push(["background-color",e.color]),t}),e.setStyleRelation("background",["background-color"])}function uh(e){const t={},n=function(e){return e.replace(/, /g,",").split(" ").map(e=>e.replace(/,/g,", "))}(e);for(const e of n)ih(e)?(t.repeat=t.repeat||[],t.repeat.push(e)):rh(e)?(t.position=t.position||[],t.position.push(e)):ah(e)?t.attachment=e:th(e)?t.color=e:lh(e)&&(t.image=e);return{path:"background",value:t}}class hh extends El{constructor(e,t){super(e),this.view=t,this._toolbarConfig=Md(e.config.get("toolbar")),this._elementReplacer=new ps}get element(){return this.view.element}init(e){const t=this.editor,n=this.view,i=t.editing.view,o=n.editable,r=i.document.getRoot();o.name=r.rootName,n.render();const s=o.element;this.setEditableElement(o.name,s),this.focusTracker.add(s),n.editable.bind("isFocused").to(this.focusTracker),i.attachDomRoot(s),e&&this._elementReplacer.replace(e,this.element),this._initPlaceholder(),this._initToolbar(),this.fire("ready")}destroy(){const e=this.view,t=this.editor.editing.view;this._elementReplacer.restore(),t.detachDomRoot(e.editable.name),e.destroy(),super.destroy()}_initToolbar(){const e=this.editor,t=this.view,n=e.editing.view;t.stickyPanel.bind("isActive").to(this.focusTracker,"isFocused"),t.stickyPanel.limiterElement=t.element,t.stickyPanel.bind("viewportTopOffset").to(this,"viewportOffset",({top:e})=>e),t.toolbar.fillFromConfig(this._toolbarConfig,this.componentFactory),function({origin:e,originKeystrokeHandler:t,originFocusTracker:n,toolbar:i,beforeFocus:o,afterBlur:r}){n.add(i.element),t.set("Alt+F10",(e,t)=>{n.isFocused&&!i.focusTracker.isFocused&&(o&&o(),i.focus(),t())}),i.keystrokes.set("Esc",(t,n)=>{i.focusTracker.isFocused&&(e.focus(),r&&r(),n())})}({origin:n,originFocusTracker:this.focusTracker,originKeystrokeHandler:e.keystrokes,toolbar:t.toolbar})}_initPlaceholder(){const e=this.editor,t=e.editing.view,n=t.document.getRoot(),i=e.sourceElement,o=e.config.get("placeholder")||i&&"textarea"===i.tagName.toLowerCase()&&i.getAttribute("placeholder");o&&function(e){const{view:t,element:n,text:i,isDirectHost:o=!0,keepOnFocus:r=!1}=e,s=t.document;Du.has(s)||(Du.set(s,new Map),s.registerPostFixer(e=>Pu(s,e))),Du.get(s).set(n,{text:i,isDirectHost:o,keepOnFocus:r,hostElement:o?n:null}),t.change(e=>Pu(s,e))}({view:t,element:n,text:o,isDirectHost:!1,keepOnFocus:!0})}}var mh=r(638);sr()(mh.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),mh.Z.locals;class gh extends nu{constructor(e,t,n={}){super(e),this.stickyPanel=new Eu(e),this.toolbar=new Nd(e,{shouldGroupWhenFull:n.shouldToolbarGroupWhenFull}),this.editable=new ou(e,t)}render(){super.render(),this.stickyPanel.content.add(this.toolbar),this.top.add(this.stickyPanel),this.main.add(this.editable)}}class ph extends Il{constructor(e,t={}){if(!$n(e)&&void 0!==t.initialData)throw new u("editor-create-initial-data",null);super(t),void 0===this.config.get("initialData")&&this.config.set("initialData",function(e){return $n(e)?function(e){return e instanceof HTMLTextAreaElement?e.value:e.innerHTML}(e):e}(e)),$n(e)&&(this.sourceElement=e),this.model.document.createRoot();const n=!this.config.get("toolbar.shouldNotGroupWhenFull"),i=new gh(this.locale,this.editing.view,{shouldToolbarGroupWhenFull:n});this.ui=new hh(this,i),function(e){if(!N(e.updateSourceElement))throw new u("attachtoform-missing-elementapi-interface",e);const t=e.sourceElement;if(t&&"textarea"===t.tagName.toLowerCase()&&t.form){let n;const i=t.form,o=()=>e.updateSourceElement();N(i.submit)&&(n=i.submit,i.submit=()=>{o(),n.apply(i)}),i.addEventListener("submit",o),e.on("destroy",()=>{i.removeEventListener("submit",o),n&&(i.submit=n)})}}(this)}destroy(){return this.sourceElement&&this.updateSourceElement(),this.ui.destroy(),super.destroy()}static create(e,t={}){return new Promise(n=>{const i=new this(e,t);n(i.initPlugins().then(()=>i.ui.init($n(e)?e:null)).then(()=>i.data.init(i.config.get("initialData"))).then(()=>i.fire("ready")).then(()=>i))})}}rt(ph,Tl),rt(ph,Pl);const fh=["left","right","center","justify"];function _h(e){return fh.includes(e)}function bh(e,t){return"rtl"==t.contentLanguageDirection?"right"===e:"left"===e}function kh(e){const t=e.map(e=>{let t;return t="string"==typeof e?{name:e}:e,t}).filter(e=>{const t=!!fh.includes(e.name);return t||h("alignment-config-name-not-recognized",{option:e}),t}),n=t.filter(e=>!!e.className).length;if(n&&n{const o=i.slice(n+1),r=o.some(e=>e.name==t.name);if(r)throw new u("alignment-config-name-already-defined",{option:t,configuredOptions:e});if(t.className){const n=o.some(e=>e.className==t.className);if(n)throw new u("alignment-config-classname-already-defined",{option:t,configuredOptions:e})}}),t}const vh="alignment";class Ah extends ct{refresh(){const e=this.editor.locale,t=Os(this.editor.model.document.selection.getSelectedBlocks());this.isEnabled=!!t&&this._canBeAligned(t),this.isEnabled&&t.hasAttribute("alignment")?this.value=t.getAttribute("alignment"):this.value="rtl"===e.contentLanguageDirection?"right":"left"}execute(e={}){const t=this.editor,n=t.locale,i=t.model,o=i.document,r=e.value;i.change(e=>{const t=Array.from(o.selection.getSelectedBlocks()).filter(e=>this._canBeAligned(e)),i=t[0].getAttribute("alignment");bh(r,n)||i===r||!r?function(e,t){for(const n of e)t.removeAttribute(vh,n)}(t,e):function(e,t,n){for(const i of e)t.setAttribute(vh,n,i)}(t,e,r)})}_canBeAligned(e){return this.editor.model.schema.checkAttribute(e,vh)}}class yh extends st{static get pluginName(){return"AlignmentEditing"}constructor(e){super(e),e.config.define("alignment",{options:[...fh.map(e=>({name:e}))]})}init(){const e=this.editor,t=e.locale,n=e.model.schema,i=kh(e.config.get("alignment.options")).filter(e=>_h(e.name)&&!bh(e.name,t)),o=i.some(e=>!!e.className);n.extend("$block",{allowAttributes:"alignment"}),e.model.schema.setAttributeProperties("alignment",{isFormatting:!0}),o?e.conversion.attributeToAttribute(function(e){const t={model:{key:"alignment",values:e.map(e=>e.name)},view:{}};for(const n of e)t.view[n.name]={key:"class",value:n.className};return t}(i)):e.conversion.for("downcast").attributeToAttribute(function(e){const t={model:{key:"alignment",values:e.map(e=>e.name)},view:{}};for(const{name:n}of e)t.view[n]={key:"style",value:{"text-align":n}};return t}(i));const r=function(e){const t=[];for(const{name:n}of e)t.push({view:{key:"style",value:{"text-align":n}},model:{key:"alignment",value:n}});return t}(i);for(const t of r)e.conversion.for("upcast").attributeToAttribute(t);const s=function(e){const t=[];for(const{name:n}of e)t.push({view:{key:"align",value:n},model:{key:"alignment",value:n}});return t}(i);for(const t of s)e.conversion.for("upcast").attributeToAttribute(t);e.commands.add("alignment",new Ah(e))}}const wh=new Map([["left",''],["right",''],["center",''],["justify",'']]);class Ch extends st{get localizedOptionTitles(){const e=this.editor.t;return{left:e("Align left"),right:e("Align right"),center:e("Align center"),justify:e("Justify")}}static get pluginName(){return"AlignmentUI"}init(){const e=this.editor,t=e.ui.componentFactory,n=e.t,i=kh(e.config.get("alignment.options"));i.map(e=>e.name).filter(_h).forEach(e=>this._addButton(e)),t.add("alignment",e=>{const o=Yd(e),r=i.map(e=>t.create(`alignment:${e.name}`));Zd(o,r),o.buttonView.set({label:n("Text alignment"),tooltip:!0}),o.toolbarView.isVertical=!0,o.toolbarView.ariaLabel=n("Text alignment toolbar"),o.extendTemplate({attributes:{class:"ck-alignment-dropdown"}});const s="rtl"===e.contentLanguageDirection?wh.get("right"):wh.get("left");return o.buttonView.bind("icon").toMany(r,"isOn",(...e)=>{const t=e.findIndex(e=>e);return t<0?s:r[t].icon}),o.bind("isEnabled").toMany(r,"isEnabled",(...e)=>e.some(e=>e)),o})}_addButton(e){const t=this.editor;t.ui.componentFactory.add(`alignment:${e}`,n=>{const i=t.commands.get("alignment"),o=new fd(n);return o.set({label:this.localizedOptionTitles[e],icon:wh.get(e),tooltip:!0,isToggleable:!0}),o.bind("isEnabled").to(i),o.bind("isOn").to(i,"value",t=>t===e),this.listenTo(o,"execute",()=>{t.execute("alignment",{value:e}),t.editing.view.focus()}),o})}}function*Ih(e,t){for(const n of t)n&&e.getAttributeProperties(n[0]).copyOnEnter&&(yield n)}class xh extends ct{execute(){const e=this.editor.model,t=e.document;e.change(n=>{!function(e,t,n,i){const o=n.isCollapsed,r=n.getFirstRange(),s=r.start.parent,a=r.end.parent;if(i.isLimit(s)||i.isLimit(a))o||s!=a||e.deleteContent(n);else if(o){const e=Ih(t.model.schema,n.getAttributes());Sh(t,r.start),t.setSelectionAttribute(e)}else{const i=!(r.start.isAtStart&&r.end.isAtEnd),o=s==a;e.deleteContent(n,{leaveUnmerged:i}),i&&(o?Sh(t,n.focus):t.setSelection(a,0))}}(this.editor.model,n,t.selection,e.schema),this.fire("afterExecute",{writer:n})})}}function Sh(e,t){e.split(t),e.setSelection(t.parent.nextSibling,0)}class Eh extends Tr{constructor(e){super(e);const t=this.document;t.on("keydown",(e,n)=>{if(this.isEnabled&&n.keyCode==vo.enter){const i=new Qi(t,"enter",t.selection.getFirstRange());t.fire(i,new Yr(t,n.domEvent,{isSoft:n.shiftKey})),i.stop.called&&e.stop()}})}observe(){}}class jh extends st{static get pluginName(){return"Enter"}init(){const e=this.editor,t=e.editing.view,n=t.document;t.addObserver(Eh),e.commands.add("enter",new xh(e)),this.listenTo(n,"enter",(n,i)=>{i.preventDefault(),i.isSoft||(e.execute("enter"),t.scrollToTheSelection())},{priority:"low"})}}class Th extends ct{execute(){const e=this.editor.model,t=e.document;e.change(n=>{!function(e,t,n){const i=n.isCollapsed,o=n.getFirstRange(),r=o.start.parent,s=o.end.parent,a=r==s;if(i){const i=Ih(e.schema,n.getAttributes());Dh(e,t,o.end),t.removeSelectionAttribute(n.getAttributeKeys()),t.setSelectionAttribute(i)}else{const i=!(o.start.isAtStart&&o.end.isAtEnd);e.deleteContent(n,{leaveUnmerged:i}),a?Dh(e,t,n.focus):i&&t.setSelection(s,0)}}(e,n,t.selection),this.fire("afterExecute",{writer:n})})}refresh(){const e=this.editor.model,t=e.document;this.isEnabled=function(e,t){if(t.rangeCount>1)return!1;const n=t.anchor;if(!n||!e.checkChild(n,"softBreak"))return!1;const i=t.getFirstRange(),o=i.start.parent,r=i.end.parent;return!Ph(o,e)&&!Ph(r,e)||o===r}(e.schema,t.selection)}}function Dh(e,t,n){const i=t.createElement("softBreak");e.insertContent(i,n),t.setSelection(i,"after")}function Ph(e,t){return!e.is("rootElement")&&(t.isLimit(e)||Ph(e.parent,t))}class Rh extends st{static get pluginName(){return"ShiftEnter"}init(){const e=this.editor,t=e.model.schema,n=e.conversion,i=e.editing.view,o=i.document;t.register("softBreak",{allowWhere:"$text",isInline:!0}),n.for("upcast").elementToElement({model:"softBreak",view:"br"}),n.for("downcast").elementToElement({model:"softBreak",view:(e,{writer:t})=>t.createEmptyElement("br")}),i.addObserver(Eh),e.commands.add("shiftEnter",new Th(e)),this.listenTo(o,"enter",(t,n)=>{n.preventDefault(),n.isSoft&&(e.execute("shiftEnter"),i.scrollToTheSelection())},{priority:"low"})}}class Oh{constructor(e,t=20){this.model=e,this.size=0,this.limit=t,this.isLocked=!1,this._changeCallback=(e,t)=>{t.isLocal&&t.isUndoable&&t!==this._batch&&this._reset(!0)},this._selectionChangeCallback=()=>{this._reset()},this.model.document.on("change",this._changeCallback),this.model.document.selection.on("change:range",this._selectionChangeCallback),this.model.document.selection.on("change:attribute",this._selectionChangeCallback)}get batch(){return this._batch||(this._batch=this.model.createBatch({isTyping:!0})),this._batch}input(e){this.size+=e,this.size>=this.limit&&this._reset(!0)}lock(){this.isLocked=!0}unlock(){this.isLocked=!1}destroy(){this.model.document.off("change",this._changeCallback),this.model.document.selection.off("change:range",this._selectionChangeCallback),this.model.document.selection.off("change:attribute",this._selectionChangeCallback)}_reset(e){this.isLocked&&!e||(this._batch=null,this.size=0)}}class Fh extends ct{constructor(e,t){super(e),this._buffer=new Oh(e.model,t)}get buffer(){return this._buffer}destroy(){super.destroy(),this._buffer.destroy()}execute(e={}){const t=this.editor.model,n=t.document,i=e.text||"",o=i.length,r=e.range?t.createSelection(e.range):n.selection,s=e.resultRange;t.enqueueChange(this._buffer.batch,e=>{this._buffer.lock(),t.deleteContent(r),i&&t.insertContent(e.createText(i,n.selection.getAttributes()),r),s?e.setSelection(s):r.is("documentSelection")||e.setSelection(r),this._buffer.unlock(),this._buffer.input(o)})}}function zh(e){if(e.newChildren.length-e.oldChildren.length!=1)return;const t=function(e,t){const n=[];let i,o=0;return e.forEach(e=>{"equal"==e?(r(),o++):"insert"==e?(s("insert")?i.values.push(t[o]):(r(),i={type:"insert",index:o,values:[t[o]]}),o++):s("delete")?i.howMany++:(r(),i={type:"delete",index:o,howMany:1})}),r(),n;function r(){i&&(n.push(i),i=null)}function s(e){return i&&i.type==e}}(er(e.oldChildren,e.newChildren,Mh),e.newChildren);if(t.length>1)return;const n=t[0];return n.values[0]&&n.values[0].is("$text")?n:void 0}function Mh(e,t){return e&&e.is("$text")&&t&&t.is("$text")?e.data===t.data:e===t}function $h(e,t){const n=t.selection,i=e.shiftKey&&e.keyCode===vo.delete,o=!n.isCollapsed;return i&&o}const Nh=[yo("arrowUp"),yo("arrowRight"),yo("arrowDown"),yo("arrowLeft"),9,16,17,18,19,20,27,33,34,35,36,45,91,93,144,145,173,174,175,176,177,178,179,255];for(let e=112;e<=135;e++)Nh.push(e);function Bh(e){return!(!e.ctrlKey&&!e.metaKey)||Nh.includes(e.keyCode)}class Lh{constructor(e){this.editor=e,this.editing=this.editor.editing}handle(e,t){if(function(e){if(0==e.length)return!1;for(const t of e)if("children"===t.type&&!zh(t))return!0;return!1}(e))this._handleContainerChildrenMutations(e,t);else for(const n of e)this._handleTextMutation(n,t),this._handleTextNodeInsertion(n)}_handleContainerChildrenMutations(e,t){const n=function(e){const t=e.map(e=>e.node).reduce((e,t)=>e.getCommonAncestor(t,{includeSelf:!0}));if(t)return t.getAncestors({includeSelf:!0,parentFirst:!0}).find(e=>e.is("containerElement")||e.is("rootElement"))}(e);if(!n)return;const i=this.editor.editing.view.domConverter.mapViewToDom(n),o=new Ar(this.editor.editing.view.document),r=this.editor.data.toModel(o.domToView(i)).getChild(0),s=this.editor.editing.mapper.toModelElement(n);if(!s)return;const a=Array.from(r.getChildren()),c=Array.from(s.getChildren()),l=a[a.length-1],d=c[c.length-1],u=l&&l.is("element","softBreak"),h=d&&!d.is("element","softBreak");u&&h&&a.pop();const m=this.editor.model.schema;if(!Vh(a,m)||!Vh(c,m))return;const g=a.map(e=>e.is("$text")?e.data:"@").join("").replace(/\u00A0/g," "),p=c.map(e=>e.is("$text")?e.data:"@").join("").replace(/\u00A0/g," ");if(p===g)return;const f=er(p,g),{firstChangeAt:_,insertions:b,deletions:k}=Uh(f);let v=null;t&&(v=this.editing.mapper.toModelRange(t.getFirstRange()));const A=g.substr(_,b),y=this.editor.model.createRange(this.editor.model.createPositionAt(s,_),this.editor.model.createPositionAt(s,_+k));this.editor.execute("input",{text:A,range:y,resultRange:v})}_handleTextMutation(e,t){if("text"!=e.type)return;const n=e.newText.replace(/\u00A0/g," "),i=e.oldText.replace(/\u00A0/g," ");if(i===n)return;const o=er(i,n),{firstChangeAt:r,insertions:s,deletions:a}=Uh(o);let c=null;t&&(c=this.editing.mapper.toModelRange(t.getFirstRange()));const l=this.editing.view.createPositionAt(e.node,r),d=this.editing.mapper.toModelPosition(l),u=this.editor.model.createRange(d,d.getShiftedBy(a)),h=n.substr(r,s);this.editor.execute("input",{text:h,range:u,resultRange:c})}_handleTextNodeInsertion(e){if("children"!=e.type)return;const t=zh(e),n=this.editing.view.createPositionAt(e.node,t.index),i=this.editing.mapper.toModelPosition(n),o=t.values[0].data;this.editor.execute("input",{text:o.replace(/\u00A0/g," "),range:this.editor.model.createRange(i)})}}function Vh(e,t){return e.every(e=>t.isInline(e))}function Uh(e){let t=null,n=null;for(let i=0;i{n.deleteContent(n.document.selection)}),e.unlock()}fo.isAndroid?i.document.on("beforeinput",(e,t)=>r(t),{priority:"lowest"}):i.document.on("keydown",(e,t)=>r(t),{priority:"lowest"}),i.document.on("compositionstart",function(){const e=n.document,t=1!==e.selection.rangeCount||e.selection.getFirstRange().isFlat;e.selection.isCollapsed||t||s()},{priority:"lowest"}),i.document.on("compositionend",()=>{t=n.createSelection(n.document.selection)},{priority:"lowest"})}(e),function(e){e.editing.view.document.on("mutations",(t,n,i)=>{new Lh(e).handle(n,i)})}(e)}}class Wh extends ct{constructor(e,t){super(e),this.direction=t,this._buffer=new Oh(e.model,e.config.get("typing.undoStep"))}get buffer(){return this._buffer}execute(e={}){const t=this.editor.model,n=t.document;t.enqueueChange(this._buffer.batch,i=>{this._buffer.lock();const o=i.createSelection(e.selection||n.selection),r=e.sequence||1,s=o.isCollapsed;if(o.isCollapsed&&t.modifySelection(o,{direction:this.direction,unit:e.unit,treatEmojiAsSingleUnit:!0}),this._shouldEntireContentBeReplacedWithParagraph(r))return void this._replaceEntireContentWithParagraph(i);if(this._shouldReplaceFirstBlockWithParagraph(o,r))return void this.editor.execute("paragraph",{selection:o});if(o.isCollapsed)return;let a=0;o.getFirstRange().getMinimalFlatRanges().forEach(e=>{a+=Zi(e.getWalker({singleCharacters:!0,ignoreElementEnd:!0,shallow:!0}))}),t.deleteContent(o,{doNotResetEntireContent:s,direction:this.direction}),this._buffer.input(a),i.setSelection(o),this._buffer.unlock()})}_shouldEntireContentBeReplacedWithParagraph(e){if(e>1)return!1;const t=this.editor.model,n=t.document.selection,i=t.schema.getLimitElement(n);if(!n.isCollapsed||!n.containsEntireContent(i))return!1;if(!t.schema.checkChild(i,"paragraph"))return!1;const o=i.getChild(0);return!o||"paragraph"!==o.name}_replaceEntireContentWithParagraph(e){const t=this.editor.model,n=t.document.selection,i=t.schema.getLimitElement(n),o=e.createElement("paragraph");e.remove(e.createRangeIn(i)),e.insert(o,i),e.setSelection(o,0)}_shouldReplaceFirstBlockWithParagraph(e,t){const n=this.editor.model;if(t>1||"backward"!=this.direction)return!1;if(!e.isCollapsed)return!1;const i=e.getFirstPosition(),o=n.schema.getLimitElement(i),r=o.getChild(0);return i.parent==r&&!!e.containsEntireContent(r)&&!!n.schema.checkChild(o,"paragraph")&&"paragraph"!=r.name}}class qh extends Tr{constructor(e){super(e);const t=e.document;let n=0;function i(e,n,i){const o=new Qi(t,"delete",t.selection.getFirstRange());t.fire(o,new Yr(t,n,i)),o.stop.called&&e.stop()}t.on("keyup",(e,t)=>{t.keyCode!=vo.delete&&t.keyCode!=vo.backspace||(n=0)}),t.on("keydown",(e,o)=>{if(fo.isWindows&&$h(o,t))return;const r={};if(o.keyCode==vo.delete)r.direction="forward",r.unit="character";else{if(o.keyCode!=vo.backspace)return;r.direction="backward",r.unit="codePoint"}const s=fo.isMac?o.altKey:o.ctrlKey;r.unit=s?"word":r.unit,r.sequence=++n,i(e,o.domEvent,r)}),fo.isAndroid&&t.on("beforeinput",(t,n)=>{if("deleteContentBackward"!=n.domEvent.inputType)return;const o={unit:"codepoint",direction:"backward",sequence:1},r=n.domTarget.ownerDocument.defaultView.getSelection();r.anchorNode==r.focusNode&&r.anchorOffset+1!=r.focusOffset&&(o.selectionToRemove=e.domConverter.domSelectionToView(r)),i(t,n.domEvent,o)})}observe(){}}class Hh extends st{static get pluginName(){return"Delete"}init(){const e=this.editor,t=e.editing.view,n=t.document,i=e.model.document;t.addObserver(qh),this._undoOnBackspace=!1;const o=new Wh(e,"forward");if(e.commands.add("deleteForward",o),e.commands.add("forwardDelete",o),e.commands.add("delete",new Wh(e,"backward")),this.listenTo(n,"delete",(n,i)=>{const o={unit:i.unit,sequence:i.sequence};if(i.selectionToRemove){const t=e.model.createSelection(),n=[];for(const t of i.selectionToRemove.getRanges())n.push(e.editing.mapper.toModelRange(t));t.setTo(n),o.selection=t}e.execute("forward"==i.direction?"deleteForward":"delete",o),i.preventDefault(),t.scrollToTheSelection()},{priority:"low"}),fo.isAndroid){let e=null;this.listenTo(n,"delete",(t,n)=>{const i=n.domTarget.ownerDocument.defaultView.getSelection();e={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}},{priority:"lowest"}),this.listenTo(n,"keyup",(t,n)=>{if(e){const t=n.domTarget.ownerDocument.defaultView.getSelection();t.collapse(e.anchorNode,e.anchorOffset),t.extend(e.focusNode,e.focusOffset),e=null}})}this.editor.plugins.has("UndoEditing")&&(this.listenTo(n,"delete",(t,n)=>{this._undoOnBackspace&&"backward"==n.direction&&1==n.sequence&&"codePoint"==n.unit&&(this._undoOnBackspace=!1,e.execute("undo"),n.preventDefault(),t.stop())},{context:"$capture"}),this.listenTo(i,"change",()=>{this._undoOnBackspace=!1}))}requestUndoOnBackspace(){this.editor.plugins.has("UndoEditing")&&(this._undoOnBackspace=!0)}}class Kh extends st{static get requires(){return[Gh,Hh]}static get pluginName(){return"Typing"}}function Yh(e,t){let n=e.start;return{text:Array.from(e.getItems()).reduce((e,i)=>i.is("$text")||i.is("$textProxy")?e+i.data:(n=t.createPositionAfter(i),""),""),range:t.createRange(n,e.end)}}class Zh{constructor(e,t){this.model=e,this.testCallback=t,this.hasMatch=!1,this.set("isEnabled",!0),this.on("change:isEnabled",()=>{this.isEnabled?this._startListening():(this.stopListening(e.document.selection),this.stopListening(e.document))}),this._startListening()}_startListening(){const e=this.model.document;this.listenTo(e.selection,"change:range",(t,{directChange:n})=>{n&&(e.selection.isCollapsed?this._evaluateTextBeforeSelection("selection"):this.hasMatch&&(this.fire("unmatched"),this.hasMatch=!1))}),this.listenTo(e,"change:data",(e,t)=>{!t.isUndo&&t.isLocal&&this._evaluateTextBeforeSelection("data",{batch:t})})}_evaluateTextBeforeSelection(e,t={}){const n=this.model,i=n.document.selection,o=n.createRange(n.createPositionAt(i.focus.parent,0),i.focus),{text:r,range:s}=Yh(o,n),a=this.testCallback(r);if(!a&&this.hasMatch&&this.fire("unmatched"),this.hasMatch=!!a,a){const n=Object.assign(t,{text:r,range:s});"object"==typeof a&&Object.assign(n,a),this.fire(`matched:${e}`,n)}}}rt(Zh,Qe);class Jh extends st{static get pluginName(){return"TwoStepCaretMovement"}constructor(e){super(e),this.attributes=new Set,this._overrideUid=null}init(){const e=this.editor,t=e.model,n=e.editing.view,i=e.locale,o=t.document.selection;this.listenTo(n.document,"arrowKey",(e,t)=>{if(!o.isCollapsed)return;if(t.shiftKey||t.altKey||t.ctrlKey)return;const n=t.keyCode==vo.arrowright,r=t.keyCode==vo.arrowleft;if(!n&&!r)return;const s=i.contentLanguageDirection;let a=!1;a="ltr"===s&&n||"rtl"===s&&r?this._handleForwardMovement(t):this._handleBackwardMovement(t),!0===a&&e.stop()},{context:"$text",priority:"highest"}),this._isNextGravityRestorationSkipped=!1,this.listenTo(o,"change:range",(e,t)=>{this._isNextGravityRestorationSkipped?this._isNextGravityRestorationSkipped=!1:this._isGravityOverridden&&(!t.directChange&&tm(o.getFirstPosition(),this.attributes)||this._restoreGravity())})}registerAttribute(e){this.attributes.add(e)}_handleForwardMovement(e){const t=this.attributes,n=this.editor.model.document.selection,i=n.getFirstPosition();return!this._isGravityOverridden&&(!i.isAtStart||!Xh(n,t))&&(tm(i,t)?(em(e),this._overrideGravity(),!0):void 0)}_handleBackwardMovement(e){const t=this.attributes,n=this.editor.model,i=n.document.selection,o=i.getFirstPosition();return this._isGravityOverridden?(em(e),this._restoreGravity(),Qh(n,t,o),!0):o.isAtStart?!!Xh(i,t)&&(em(e),Qh(n,t,o),!0):function(e,t){return tm(e.getShiftedBy(-1),t)}(o,t)?o.isAtEnd&&!Xh(i,t)&&tm(o,t)?(em(e),Qh(n,t,o),!0):(this._isNextGravityRestorationSkipped=!0,this._overrideGravity(),!1):void 0}get _isGravityOverridden(){return!!this._overrideUid}_overrideGravity(){this._overrideUid=this.editor.model.change(e=>e.overrideSelectionGravity())}_restoreGravity(){this.editor.model.change(e=>{e.restoreSelectionGravity(this._overrideUid),this._overrideUid=null})}}function Xh(e,t){for(const n of t)if(e.hasAttribute(n))return!0;return!1}function Qh(e,t,n){const i=n.nodeBefore;e.change(e=>{i?e.setSelectionAttribute(i.getAttributes()):e.removeSelectionAttribute(t)})}function em(e){e.preventDefault()}function tm(e,t){const{nodeBefore:n,nodeAfter:i}=e;for(const e of t){const t=n?n.getAttribute(e):void 0;if((i?i.getAttribute(e):void 0)!==t)return!0}return!1}function nm(e){return new RegExp(`(^|\\s)(${e})([^${e}]*)(${e})$`)}function im(e,t,n,i){return i.createRange(om(e,t,n,!0,i),om(e,t,n,!1,i))}function om(e,t,n,i,o){let r=e.textNode||(i?e.nodeBefore:e.nodeAfter),s=null;for(;r&&r.getAttribute(t)==n;)s=r,r=i?r.previousSibling:r.nextSibling;return s?o.createPositionAt(s,i?"before":"after"):e}nm('"'),nm("'"),nm("'"),nm('"'),nm('"'),nm("'");class rm extends ct{refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(e={}){const t=this.editor.model,n=t.schema,i=t.document.selection,o=Array.from(i.getSelectedBlocks()),r=void 0===e.forceValue?!this.value:e.forceValue;t.change(e=>{if(r){const t=o.filter(e=>sm(e)||cm(n,e));this._applyQuote(e,t)}else this._removeQuote(e,o.filter(sm))})}_getValue(){const e=Os(this.editor.model.document.selection.getSelectedBlocks());return!(!e||!sm(e))}_checkEnabled(){if(this.value)return!0;const e=this.editor.model.document.selection,t=this.editor.model.schema,n=Os(e.getSelectedBlocks());return!!n&&cm(t,n)}_removeQuote(e,t){am(e,t).reverse().forEach(t=>{if(t.start.isAtStart&&t.end.isAtEnd)return void e.unwrap(t.start.parent);if(t.start.isAtStart){const n=e.createPositionBefore(t.start.parent);return void e.move(t,n)}t.end.isAtEnd||e.split(t.end);const n=e.createPositionAfter(t.end.parent);e.move(t,n)})}_applyQuote(e,t){const n=[];am(e,t).reverse().forEach(t=>{let i=sm(t.start);i||(i=e.createElement("blockQuote"),e.wrap(t,i)),n.push(i)}),n.reverse().reduce((t,n)=>t.nextSibling==n?(e.merge(e.createPositionAfter(t)),t):n)}}function sm(e){return"blockQuote"==e.parent.name?e.parent:null}function am(e,t){let n,i=0;const o=[];for(;i{const i=e.model.document.differ.getChanges();for(const e of i)if("insert"==e.type){const i=e.position.nodeAfter;if(!i)continue;if(i.is("element","blockQuote")&&i.isEmpty)return n.remove(i),!0;if(i.is("element","blockQuote")&&!t.checkChild(e.position,i))return n.unwrap(i),!0;if(i.is("element")){const e=n.createRangeIn(i);for(const i of e.getItems())if(i.is("element","blockQuote")&&!t.checkChild(n.createPositionBefore(i),i))return n.unwrap(i),!0}}else if("remove"==e.type){const t=e.position.parent;if(t.is("element","blockQuote")&&t.isEmpty)return n.remove(t),!0}return!1});const n=this.editor.editing.view.document,i=e.model.document.selection,o=e.commands.get("blockQuote");this.listenTo(n,"enter",(t,n)=>{i.isCollapsed&&o.value&&i.getLastPosition().parent.isEmpty&&(e.execute("blockQuote"),e.editing.view.scrollToTheSelection(),n.preventDefault(),t.stop())},{context:"blockquote"}),this.listenTo(n,"delete",(t,n)=>{if("backward"!=n.direction||!i.isCollapsed||!o.value)return;const r=i.getLastPosition().parent;r.isEmpty&&!r.previousSibling&&(e.execute("blockQuote"),e.editing.view.scrollToTheSelection(),n.preventDefault(),t.stop())},{context:"blockquote"})}}var dm=r(636);sr()(dm.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),dm.Z.locals;class um extends st{static get pluginName(){return"BlockQuoteUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add("blockQuote",n=>{const i=e.commands.get("blockQuote"),o=new fd(n);return o.set({label:t("Block quote"),icon:'',tooltip:!0,isToggleable:!0}),o.bind("isOn","isEnabled").to(i,"value","isEnabled"),this.listenTo(o,"execute",()=>{e.execute("blockQuote"),e.editing.view.focus()}),o})}}class hm extends ct{constructor(e,t){super(e),this.attributeKey=t}refresh(){const e=this.editor.model,t=e.document;this.value=this._getValueFromFirstAllowedNode(),this.isEnabled=e.schema.checkAttributeInSelection(t.selection,this.attributeKey)}execute(e={}){const t=this.editor.model,n=t.document.selection,i=void 0===e.forceValue?!this.value:e.forceValue;t.change(e=>{if(n.isCollapsed)i?e.setSelectionAttribute(this.attributeKey,!0):e.removeSelectionAttribute(this.attributeKey);else{const o=t.schema.getValidRanges(n.getRanges(),this.attributeKey);for(const t of o)i?e.setAttribute(this.attributeKey,i,t):e.removeAttribute(this.attributeKey,t)}})}_getValueFromFirstAllowedNode(){const e=this.editor.model,t=e.schema,n=e.document.selection;if(n.isCollapsed)return n.hasAttribute(this.attributeKey);for(const e of n.getRanges())for(const n of e.getItems())if(t.checkAttribute(n,this.attributeKey))return n.hasAttribute(this.attributeKey);return!1}}const mm="bold";class gm extends st{static get pluginName(){return"BoldEditing"}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:mm}),e.model.schema.setAttributeProperties(mm,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:mm,view:"strong",upcastAlso:["b",e=>{const t=e.getStyle("font-weight");return t?"bold"==t||Number(t)>=600?{name:!0,styles:["font-weight"]}:void 0:null}]}),e.commands.add(mm,new hm(e,mm)),e.keystrokes.set("CTRL+B",mm)}}const pm="bold";class fm extends st{static get pluginName(){return"BoldUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add(pm,n=>{const i=e.commands.get(pm),o=new fd(n);return o.set({label:t("Bold"),icon:'',keystroke:"CTRL+B",tooltip:!0,isToggleable:!0}),o.bind("isOn","isEnabled").to(i,"value","isEnabled"),this.listenTo(o,"execute",()=>{e.execute(pm),e.editing.view.focus()}),o})}}class _m{constructor(e){this.files=function(e){const t=Array.from(e.files||[]),n=Array.from(e.items||[]);return t.length?t:n.filter(e=>"file"===e.kind).map(e=>e.getAsFile())}(e),this._native=e}get types(){return this._native.types}getData(e){return this._native.getData(e)}setData(e,t){this._native.setData(e,t)}set effectAllowed(e){this._native.effectAllowed=e}get effectAllowed(){return this._native.effectAllowed}set dropEffect(e){this._native.dropEffect=e}get dropEffect(){return this._native.dropEffect}get isCanceled(){return"none"==this._native.dropEffect||!!this._native.mozUserCancelled}}class bm extends Zr{constructor(e){super(e);const t=this.document;function n(e){return(n,o)=>{o.preventDefault();const r=o.dropRange?[o.dropRange]:null,s=new i(t,e);t.fire(s,{dataTransfer:o.dataTransfer,method:n.name,targetRanges:r,target:o.target}),s.stop.called&&o.stopPropagation()}}this.domEventType=["paste","copy","cut","drop","dragover","dragstart","dragend","dragenter","dragleave"],this.listenTo(t,"paste",n("clipboardInput"),{priority:"low"}),this.listenTo(t,"drop",n("clipboardInput"),{priority:"low"}),this.listenTo(t,"dragover",n("dragging"),{priority:"low"})}onDomEvent(e){const t={dataTransfer:new _m(e.clipboardData?e.clipboardData:e.dataTransfer)};"drop"!=e.type&&"dragover"!=e.type||(t.dropRange=function(e,t){const n=t.target.ownerDocument,i=t.clientX,o=t.clientY;let r;return n.caretRangeFromPoint&&n.caretRangeFromPoint(i,o)?r=n.caretRangeFromPoint(i,o):t.rangeParent&&(r=n.createRange(),r.setStart(t.rangeParent,t.rangeOffset),r.collapse(!0)),r?e.domConverter.domRangeToView(r):null}(this.view,e)),this.fire(e.type,e,t)}}const km=["figcaption","li"];function vm(e){let t="";if(e.is("$text")||e.is("$textProxy"))t=e.data;else if(e.is("element","img")&&e.hasAttribute("alt"))t=e.getAttribute("alt");else if(e.is("element","br"))t="\n";else{let n=null;for(const i of e.getChildren()){const e=vm(i);n&&(n.is("containerElement")||i.is("containerElement"))&&(km.includes(n.name)||km.includes(i.name)?t+="\n":t+="\n\n"),t+=e,n=i}}return t}class Am extends st{static get pluginName(){return"ClipboardPipeline"}init(){this.editor.editing.view.addObserver(bm),this._setupPasteDrop(),this._setupCopyCut()}_setupPasteDrop(){const e=this.editor,t=e.model,n=e.editing.view,o=n.document;this.listenTo(o,"clipboardInput",t=>{e.isReadOnly&&t.stop()},{priority:"highest"}),this.listenTo(o,"clipboardInput",(e,t)=>{const o=t.dataTransfer;let r=t.content||"";r||(o.getData("text/html")?r=function(e){return e.replace(/(\s+)<\/span>/g,(e,t)=>1==t.length?" ":t).replace(//g,"")}(o.getData("text/html")):o.getData("text/plain")&&(r=function(e){return((e=e.replace(//g,">").replace(/\r?\n\r?\n/g,"

").replace(/\r?\n/g,"
").replace(/^\s/," ").replace(/\s$/," ").replace(/\s\s/g,"  ")).includes("

")||e.includes("
"))&&(e=`

${e}

`),e}(o.getData("text/plain"))),r=this.editor.data.htmlProcessor.toView(r));const s=new i(this,"inputTransformation");this.fire(s,{content:r,dataTransfer:o,targetRanges:t.targetRanges,method:t.method}),s.stop.called&&e.stop(),n.scrollToTheSelection()},{priority:"low"}),this.listenTo(this,"inputTransformation",(e,n)=>{if(n.content.isEmpty)return;const i=this.editor.data.toModel(n.content,"$clipboardHolder");0!=i.childCount&&(e.stop(),t.change(()=>{this.fire("contentInsertion",{content:i,method:n.method,dataTransfer:n.dataTransfer,targetRanges:n.targetRanges})}))},{priority:"low"}),this.listenTo(this,"contentInsertion",(e,n)=>{n.resultRange=t.insertContent(n.content)},{priority:"low"})}_setupCopyCut(){const e=this.editor,t=e.model.document,n=e.editing.view.document;function i(i,o){const r=o.dataTransfer;o.preventDefault();const s=e.data.toView(e.model.getSelectedContent(t.selection));n.fire("clipboardOutput",{dataTransfer:r,content:s,method:i.name})}this.listenTo(n,"copy",i,{priority:"low"}),this.listenTo(n,"cut",(t,n)=>{e.isReadOnly?n.preventDefault():i(t,n)},{priority:"low"}),this.listenTo(n,"clipboardOutput",(n,i)=>{i.content.isEmpty||(i.dataTransfer.setData("text/html",this.editor.data.htmlProcessor.toData(i.content)),i.dataTransfer.setData("text/plain",vm(i.content))),"cut"==i.method&&e.model.deleteContent(t.selection)},{priority:"low"})}}class ym{constructor(){this._stack=[]}add(e,t){const n=this._stack,i=n[0];this._insertDescriptor(e);const o=n[0];i===o||wm(i,o)||this.fire("change:top",{oldDescriptor:i,newDescriptor:o,writer:t})}remove(e,t){const n=this._stack,i=n[0];this._removeDescriptor(e);const o=n[0];i===o||wm(i,o)||this.fire("change:top",{oldDescriptor:i,newDescriptor:o,writer:t})}_insertDescriptor(e){const t=this._stack,n=t.findIndex(t=>t.id===e.id);if(wm(e,t[n]))return;n>-1&&t.splice(n,1);let i=0;for(;t[i]&&Cm(t[i],e);)i++;t.splice(i,0,e)}_removeDescriptor(e){const t=this._stack,n=t.findIndex(t=>t.id===e);n>-1&&t.splice(n,1)}}function wm(e,t){return e&&t&&e.priority==t.priority&&Im(e.classes)==Im(t.classes)}function Cm(e,t){return e.priority>t.priority||!(e.priorityIm(t.classes)}function Im(e){return Array.isArray(e)?e.sort().join(","):e}rt(ym,b);const xm="ck-widget_selected";function Sm(e){return!!e.is("element")&&!!e.getCustomProperty("widget")}function Em(e,t,n={}){if(!e.is("containerElement"))throw new u("widget-to-widget-wrong-element-type",null,{element:e});return t.setAttribute("contenteditable","false",e),t.addClass("ck-widget",e),t.setCustomProperty("widget",!0,e),e.getFillerOffset=Pm,n.label&&function(e,t,n){n.setCustomProperty("widgetLabel",t,e)}(e,n.label,t),n.hasSelectionHandle&&function(e,t){const n=t.createUIElement("div",{class:"ck ck-widget__selection-handle"},function(e){const t=this.toDomElement(e),n=new hd;return n.set("content",''),n.render(),t.appendChild(n.element),t});t.insert(t.createPositionAt(e,0),n),t.addClass(["ck-widget_with-selection-handle"],e)}(e,t),function(e,t,n=jm,i=Tm){const o=new ym;o.on("change:top",(t,o)=>{o.oldDescriptor&&i(e,o.oldDescriptor,o.writer),o.newDescriptor&&n(e,o.newDescriptor,o.writer)}),t.setCustomProperty("addHighlight",(e,t,n)=>o.add(t,n),e),t.setCustomProperty("removeHighlight",(e,t,n)=>o.remove(t,n),e)}(e,t),e}function jm(e,t,n){if(t.classes&&n.addClass(Wn(t.classes),e),t.attributes)for(const i in t.attributes)n.setAttribute(i,t.attributes[i],e)}function Tm(e,t,n){if(t.classes&&n.removeClass(Wn(t.classes),e),t.attributes)for(const i in t.attributes)n.removeAttribute(i,e)}function Dm(e){const t=e.getCustomProperty("widgetLabel");return t?"function"==typeof t?t():t:""}function Pm(){return null}const Rm="widget-type-around";function Om(e,t,n){return e&&Sm(e)&&!n.isInline(t)}function Fm(e){return e.getAttribute(Rm)}var zm=r(137);sr()(zm.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),zm.Z.locals;const Mm=["before","after"],$m=(new DOMParser).parseFromString('',"image/svg+xml").firstChild,Nm="ck-widget__type-around_disabled";class Bm extends st{static get pluginName(){return"WidgetTypeAround"}static get requires(){return[jh,Hh]}constructor(e){super(e),this._currentFakeCaretModelElement=null}init(){const e=this.editor,t=e.editing.view;this.on("change:isEnabled",(n,i,o)=>{t.change(e=>{for(const n of t.document.roots)o?e.removeClass(Nm,n):e.addClass(Nm,n)}),o||e.model.change(e=>{e.removeSelectionAttribute(Rm)})}),this._enableTypeAroundUIInjection(),this._enableInsertingParagraphsOnButtonClick(),this._enableInsertingParagraphsOnEnterKeypress(),this._enableInsertingParagraphsOnTypingKeystroke(),this._enableTypeAroundFakeCaretActivationUsingKeyboardArrows(),this._enableDeleteIntegration(),this._enableInsertContentIntegration(),this._enableInsertObjectIntegration(),this._enableDeleteContentIntegration()}destroy(){this._currentFakeCaretModelElement=null}_insertParagraph(e,t){const n=this.editor,i=n.editing.view,o=n.model.schema.getAttributesWithProperty(e,"copyOnReplace",!0);n.execute("insertParagraph",{position:n.model.createPositionAt(e,t),attributes:o}),i.focus(),i.scrollToTheSelection()}_listenToIfEnabled(e,t,n,i){this.listenTo(e,t,(...e)=>{this.isEnabled&&n(...e)},i)}_insertParagraphAccordingToFakeCaretPosition(){const e=this.editor.model.document.selection,t=Fm(e);if(!t)return!1;const n=e.getSelectedElement();return this._insertParagraph(n,t),!0}_enableTypeAroundUIInjection(){const e=this.editor,t=e.model.schema,n=e.locale.t,i={before:n("Insert paragraph before block"),after:n("Insert paragraph after block")};e.editing.downcastDispatcher.on("insert",(e,n,o)=>{const r=o.mapper.toViewElement(n.item);Om(r,n.item,t)&&function(e,t,n){const i=e.createUIElement("div",{class:"ck ck-reset_all ck-widget__type-around"},function(e){const n=this.toDomElement(e);return function(e,t){for(const n of Mm){const i=new Vl({tag:"div",attributes:{class:["ck","ck-widget__type-around__button",`ck-widget__type-around__button_${n}`],title:t[n]},children:[e.ownerDocument.importNode($m,!0)]});e.appendChild(i.render())}}(n,t),function(e){const t=new Vl({tag:"div",attributes:{class:["ck","ck-widget__type-around__fake-caret"]}});e.appendChild(t.render())}(n),n});e.insert(e.createPositionAt(n,"end"),i)}(o.writer,i,r)},{priority:"low"})}_enableTypeAroundFakeCaretActivationUsingKeyboardArrows(){const e=this.editor,t=e.model,n=t.document.selection,i=t.schema,o=e.editing.view;function r(e){return`ck-widget_type-around_show-fake-caret_${e}`}this._listenToIfEnabled(o.document,"arrowKey",(e,t)=>{this._handleArrowKeyPress(e,t)},{context:[Sm,"$text"],priority:"high"}),this._listenToIfEnabled(n,"change:range",(t,n)=>{n.directChange&&e.model.change(e=>{e.removeSelectionAttribute(Rm)})}),this._listenToIfEnabled(t.document,"change:data",()=>{const t=n.getSelectedElement();t&&Om(e.editing.mapper.toViewElement(t),t,i)||e.model.change(e=>{e.removeSelectionAttribute(Rm)})}),this._listenToIfEnabled(e.editing.downcastDispatcher,"selection",(e,t,n)=>{const o=n.writer;if(this._currentFakeCaretModelElement){const e=n.mapper.toViewElement(this._currentFakeCaretModelElement);e&&(o.removeClass(Mm.map(r),e),this._currentFakeCaretModelElement=null)}const s=t.selection.getSelectedElement();if(!s)return;const a=n.mapper.toViewElement(s);if(!Om(a,s,i))return;const c=Fm(t.selection);c&&(o.addClass(r(c),a),this._currentFakeCaretModelElement=s)}),this._listenToIfEnabled(e.ui.focusTracker,"change:isFocused",(t,n,i)=>{i||e.model.change(e=>{e.removeSelectionAttribute(Rm)})})}_handleArrowKeyPress(e,t){const n=this.editor,i=n.model,o=i.document.selection,r=i.schema,s=n.editing.view,a=function(e,t){const n=Io(e,t);return"down"===n||"right"===n}(t.keyCode,n.locale.contentLanguageDirection),c=s.document.selection.getSelectedElement();let l;Om(c,n.editing.mapper.toModelElement(c),r)?l=this._handleArrowKeyPressOnSelectedWidget(a):o.isCollapsed?l=this._handleArrowKeyPressWhenSelectionNextToAWidget(a):t.shiftKey||(l=this._handleArrowKeyPressWhenNonCollapsedSelection(a)),l&&(t.preventDefault(),e.stop())}_handleArrowKeyPressOnSelectedWidget(e){const t=this.editor.model,n=Fm(t.document.selection);return t.change(t=>n?n!==(e?"after":"before")&&(t.removeSelectionAttribute(Rm),!0):(t.setSelectionAttribute(Rm,e?"after":"before"),!0))}_handleArrowKeyPressWhenSelectionNextToAWidget(e){const t=this.editor,n=t.model,i=n.schema,o=t.plugins.get("Widget"),r=o._getObjectElementNextToSelection(e);return!!Om(t.editing.mapper.toViewElement(r),r,i)&&(n.change(t=>{o._setSelectionOverElement(r),t.setSelectionAttribute(Rm,e?"before":"after")}),!0)}_handleArrowKeyPressWhenNonCollapsedSelection(e){const t=this.editor,n=t.model,i=n.schema,o=t.editing.mapper,r=n.document.selection,s=e?r.getLastPosition().nodeBefore:r.getFirstPosition().nodeAfter;return!!Om(o.toViewElement(s),s,i)&&(n.change(t=>{t.setSelection(s,"on"),t.setSelectionAttribute(Rm,e?"after":"before")}),!0)}_enableInsertingParagraphsOnButtonClick(){const e=this.editor,t=e.editing.view;this._listenToIfEnabled(t.document,"mousedown",(n,i)=>{const o=function(e){return e.closest(".ck-widget__type-around__button")}(i.domTarget);if(!o)return;const r=function(e){return e.classList.contains("ck-widget__type-around__button_before")?"before":"after"}(o),s=function(e,t){const n=e.closest(".ck-widget");return t.mapDomToView(n)}(o,t.domConverter),a=e.editing.mapper.toModelElement(s);this._insertParagraph(a,r),i.preventDefault(),n.stop()})}_enableInsertingParagraphsOnEnterKeypress(){const e=this.editor,t=e.model.document.selection,n=e.editing.view;this._listenToIfEnabled(n.document,"enter",(n,i)=>{if("atTarget"!=n.eventPhase)return;const o=t.getSelectedElement(),r=e.editing.mapper.toViewElement(o),s=e.model.schema;let a;this._insertParagraphAccordingToFakeCaretPosition()?a=!0:Om(r,o,s)&&(this._insertParagraph(o,i.isSoft?"before":"after"),a=!0),a&&(i.preventDefault(),n.stop())},{context:Sm})}_enableInsertingParagraphsOnTypingKeystroke(){const e=this.editor.editing.view,t=[vo.enter,vo.delete,vo.backspace];this._listenToIfEnabled(e.document,"keydown",(e,n)=>{t.includes(n.keyCode)||Bh(n)||this._insertParagraphAccordingToFakeCaretPosition()},{priority:"high"})}_enableDeleteIntegration(){const e=this.editor,t=e.editing.view,n=e.model,i=n.schema;this._listenToIfEnabled(t.document,"delete",(t,o)=>{if("atTarget"!=t.eventPhase)return;const r=Fm(n.document.selection);if(!r)return;const s=o.direction,a=n.document.selection.getSelectedElement(),c="forward"==s;if("before"===r===c)e.execute("delete",{selection:n.createSelection(a,"on")});else{const t=i.getNearestSelectionRange(n.createPositionAt(a,r),s);if(t)if(t.isCollapsed){const o=n.createSelection(t.start);if(n.modifySelection(o,{direction:s}),o.focus.isEqual(t.start)){const e=function(e,t){let n=t;for(const i of t.getAncestors({parentFirst:!0})){if(i.childCount>1||e.isLimit(i))break;n=i}return n}(i,t.start.parent);n.deleteContent(n.createSelection(e,"on"),{doNotAutoparagraph:!0})}else n.change(n=>{n.setSelection(t),e.execute(c?"deleteForward":"delete")})}else n.change(n=>{n.setSelection(t),e.execute(c?"deleteForward":"delete")})}o.preventDefault(),t.stop()},{context:Sm})}_enableInsertContentIntegration(){const e=this.editor,t=this.editor.model,n=t.document.selection;this._listenToIfEnabled(e.model,"insertContent",(e,[i,o])=>{if(o&&!o.is("documentSelection"))return;const r=Fm(n);return r?(e.stop(),t.change(e=>{const o=n.getSelectedElement(),s=t.createPositionAt(o,r),a=e.createSelection(s),c=t.insertContent(i,a);return e.setSelection(a),c})):void 0},{priority:"high"})}_enableInsertObjectIntegration(){const e=this.editor,t=this.editor.model.document.selection;this._listenToIfEnabled(e.model,"insertObject",(e,n)=>{const[,i,,o={}]=n;if(i&&!i.is("documentSelection"))return;const r=Fm(t);r&&(o.findOptimalPosition=r,n[3]=o)},{priority:"high"})}_enableDeleteContentIntegration(){const e=this.editor,t=this.editor.model.document.selection;this._listenToIfEnabled(e.model,"deleteContent",(e,[n])=>{n&&!n.is("documentSelection")||Fm(t)&&e.stop()},{priority:"high"})}}function Lm(e,t,n){const i=e.schema,o=e.createRangeIn(t.root),r="forward"==n?"elementStart":"elementEnd";for(const{previousPosition:e,item:s,type:a}of o.getWalker({startPosition:t,direction:n})){if(i.isLimit(s)&&!i.isInline(s))return e;if(a==r&&i.isBlock(s))return null}return null}function Vm(e,t,n){const i="backward"==n?t.end:t.start;if(e.checkChild(i,"$text"))return i;for(const{nextPosition:i}of t.getWalker({direction:n}))if(e.checkChild(i,"$text"))return i;return null}var Um=r(507);sr()(Um.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Um.Z.locals;class Gm extends st{static get pluginName(){return"Widget"}static get requires(){return[Bm,Hh]}init(){const e=this.editor,t=e.editing.view,n=t.document;this._previouslySelected=new Set,this.editor.editing.downcastDispatcher.on("selection",(t,n,i)=>{const o=i.writer,r=n.selection;if(r.isCollapsed)return;const s=r.getSelectedElement();if(!s)return;const a=e.editing.mapper.toViewElement(s);Sm(a)&&i.consumable.consume(r,"selection")&&o.setSelection(o.createRangeOn(a),{fake:!0,label:Dm(a)})}),this.editor.editing.downcastDispatcher.on("selection",(e,t,n)=>{this._clearPreviouslySelectedWidgets(n.writer);const i=n.writer,o=i.document.selection;let r=null;for(const e of o.getRanges())for(const t of e){const e=t.item;Sm(e)&&!Wm(e,r)&&(i.addClass(xm,e),this._previouslySelected.add(e),r=e)}},{priority:"low"}),t.addObserver(Hu),this.listenTo(n,"mousedown",(...e)=>this._onMousedown(...e)),this.listenTo(n,"arrowKey",(...e)=>{this._handleSelectionChangeOnArrowKeyPress(...e)},{context:[Sm,"$text"]}),this.listenTo(n,"arrowKey",(...e)=>{this._preventDefaultOnArrowKeyPress(...e)},{context:"$root"}),this.listenTo(n,"arrowKey",function(e){const t=e.model;return(n,i)=>{const o=i.keyCode==vo.arrowup,r=i.keyCode==vo.arrowdown,s=i.shiftKey,a=t.document.selection;if(!o&&!r)return;const c=r;if(s&&function(e,t){return!e.isCollapsed&&e.isBackward==t}(a,c))return;const l=function(e,t,n){const i=e.model;if(n){const e=t.isCollapsed?t.focus:t.getLastPosition(),n=Lm(i,e,"forward");if(!n)return null;const o=i.createRange(e,n),r=Vm(i.schema,o,"backward");return r?i.createRange(e,r):null}{const e=t.isCollapsed?t.focus:t.getFirstPosition(),n=Lm(i,e,"backward");if(!n)return null;const o=i.createRange(n,e),r=Vm(i.schema,o,"forward");return r?i.createRange(r,e):null}}(e,a,c);if(l){if(l.isCollapsed){if(a.isCollapsed)return;if(s)return}(l.isCollapsed||function(e,t,n){const i=e.model,o=e.view.domConverter;if(n){const e=i.createSelection(t.start);i.modifySelection(e),e.focus.isAtEnd||t.start.isEqual(e.focus)||(t=i.createRange(e.focus,t.end))}const r=e.mapper.toViewRange(t),s=o.viewRangeToDom(r),a=ks.getDomRangeRects(s);let c;for(const e of a)if(void 0!==c){if(Math.round(e.top)>=c)return!1;c=Math.max(c,Math.round(e.bottom))}else c=Math.round(e.bottom);return!0}(e,l,c))&&(t.change(e=>{const n=c?l.end:l.start;if(s){const i=t.createSelection(a.anchor);i.setFocus(n),e.setSelection(i)}else e.setSelection(n)}),n.stop(),i.preventDefault(),i.stopPropagation())}}}(this.editor.editing),{context:"$text"}),this.listenTo(n,"delete",(e,t)=>{this._handleDelete("forward"==t.direction)&&(t.preventDefault(),e.stop())},{context:"$root"})}_onMousedown(e,t){const n=this.editor,i=n.editing.view,o=i.document;let r=t.target;if(function(e){for(;e;){if(e.is("editableElement")&&!e.is("rootElement"))return!0;if(Sm(e))return!1;e=e.parent}return!1}(r)){if((fo.isSafari||fo.isGecko)&&t.domEvent.detail>=3){const e=n.editing.mapper,i=r.is("attributeElement")?r.findAncestor(e=>!e.is("attributeElement")):r,o=e.toModelElement(i);t.preventDefault(),this.editor.model.change(e=>{e.setSelection(o,"in")})}return}if(!Sm(r)&&(r=r.findAncestor(Sm),!r))return;fo.isAndroid&&t.preventDefault(),o.isFocused||i.focus();const s=n.editing.mapper.toModelElement(r);this._setSelectionOverElement(s)}_handleSelectionChangeOnArrowKeyPress(e,t){const n=t.keyCode,i=this.editor.model,o=i.schema,r=i.document.selection,s=r.getSelectedElement(),a=Io(n,this.editor.locale.contentLanguageDirection),c="down"==a||"right"==a,l="up"==a||"down"==a;if(s&&o.isObject(s)){const n=c?r.getLastPosition():r.getFirstPosition(),s=o.getNearestSelectionRange(n,c?"forward":"backward");return void(s&&(i.change(e=>{e.setSelection(s)}),t.preventDefault(),e.stop()))}if(!r.isCollapsed&&!t.shiftKey){const n=r.getFirstPosition(),s=r.getLastPosition(),a=n.nodeAfter,l=s.nodeBefore;return void((a&&o.isObject(a)||l&&o.isObject(l))&&(i.change(e=>{e.setSelection(c?s:n)}),t.preventDefault(),e.stop()))}if(!r.isCollapsed)return;const d=this._getObjectElementNextToSelection(c);if(d&&o.isObject(d)){if(o.isInline(d)&&l)return;this._setSelectionOverElement(d),t.preventDefault(),e.stop()}}_preventDefaultOnArrowKeyPress(e,t){const n=this.editor.model,i=n.schema,o=n.document.selection.getSelectedElement();o&&i.isObject(o)&&(t.preventDefault(),e.stop())}_handleDelete(e){if(this.editor.isReadOnly)return;const t=this.editor.model.document.selection;if(!t.isCollapsed)return;const n=this._getObjectElementNextToSelection(e);return n?(this.editor.model.change(e=>{let i=t.anchor.parent;for(;i.isEmpty;){const t=i;i=t.parent,e.remove(t)}this._setSelectionOverElement(n)}),!0):void 0}_setSelectionOverElement(e){this.editor.model.change(t=>{t.setSelection(t.createRangeOn(e))})}_getObjectElementNextToSelection(e){const t=this.editor.model,n=t.schema,i=t.document.selection,o=t.createSelection(i);if(t.modifySelection(o,{direction:e?"forward":"backward"}),o.isEqual(i))return null;const r=e?o.focus.nodeBefore:o.focus.nodeAfter;return r&&n.isObject(r)?r:null}_clearPreviouslySelectedWidgets(e){for(const t of this._previouslySelected)e.removeClass(xm,t);this._previouslySelected.clear()}}function Wm(e,t){return!!t&&Array.from(e.getAncestors()).includes(t)}const qm=function(e,t,n){var i=!0,o=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return S(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),ls(e,t,{leading:i,maxWait:t,trailing:o})};var Hm=r(390);sr()(Hm.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Hm.Z.locals;class Km extends st{static get pluginName(){return"DragDrop"}static get requires(){return[Am,Gm]}init(){const e=this.editor,t=e.editing.view;this._draggedRange=null,this._draggingUid="",this._draggableElement=null,this._updateDropMarkerThrottled=qm(e=>this._updateDropMarker(e),40),this._removeDropMarkerDelayed=Jm(()=>this._removeDropMarker(),40),this._clearDraggableAttributesDelayed=Jm(()=>this._clearDraggableAttributes(),40),t.addObserver(bm),t.addObserver(Hu),this._setupDragging(),this._setupContentInsertionIntegration(),this._setupClipboardInputIntegration(),this._setupDropMarker(),this._setupDraggableAttributeHandling(),this.listenTo(e,"change:isReadOnly",(e,t,n)=>{n?this.forceDisabled("readOnlyMode"):this.clearForceDisabled("readOnlyMode")}),this.on("change:isEnabled",(e,t,n)=>{n||this._finalizeDragging(!1)}),fo.isAndroid&&this.forceDisabled("noAndroidSupport")}destroy(){return this._draggedRange&&(this._draggedRange.detach(),this._draggedRange=null),this._updateDropMarkerThrottled.cancel(),this._removeDropMarkerDelayed.cancel(),this._clearDraggableAttributesDelayed.cancel(),super.destroy()}_setupDragging(){const e=this.editor,t=e.model,n=t.document,i=e.editing.view,o=i.document;this.listenTo(o,"dragstart",(i,r)=>{const s=n.selection;if(r.target&&r.target.is("editableElement"))return void r.preventDefault();const c=r.target?Xm(r.target):null;if(c){const n=e.editing.mapper.toModelElement(c);this._draggedRange=la.fromRange(t.createRangeOn(n)),e.plugins.has("WidgetToolbarRepository")&&e.plugins.get("WidgetToolbarRepository").forceDisabled("dragDrop")}else if(!o.selection.isCollapsed){const e=o.selection.getSelectedElement();e&&Sm(e)||(this._draggedRange=la.fromRange(s.getFirstRange()))}if(!this._draggedRange)return void r.preventDefault();this._draggingUid=a(),r.dataTransfer.effectAllowed=this.isEnabled?"copyMove":"copy",r.dataTransfer.setData("application/ckeditor5-dragging-uid",this._draggingUid);const l=t.createSelection(this._draggedRange.toRange()),d=e.data.toView(t.getSelectedContent(l));o.fire("clipboardOutput",{dataTransfer:r.dataTransfer,content:d,method:i.name}),this.isEnabled||(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid="")},{priority:"low"}),this.listenTo(o,"dragend",(e,t)=>{this._finalizeDragging(!t.dataTransfer.isCanceled&&"move"==t.dataTransfer.dropEffect)},{priority:"low"}),this.listenTo(o,"dragenter",()=>{this.isEnabled&&i.focus()}),this.listenTo(o,"dragleave",()=>{this._removeDropMarkerDelayed()}),this.listenTo(o,"dragging",(t,n)=>{if(!this.isEnabled)return void(n.dataTransfer.dropEffect="none");this._removeDropMarkerDelayed.cancel();const i=Ym(e,n.targetRanges,n.target);this._draggedRange||(n.dataTransfer.dropEffect="copy"),fo.isGecko||("copy"==n.dataTransfer.effectAllowed?n.dataTransfer.dropEffect="copy":["all","copyMove"].includes(n.dataTransfer.effectAllowed)&&(n.dataTransfer.dropEffect="move")),i&&this._updateDropMarkerThrottled(i)},{priority:"low"})}_setupClipboardInputIntegration(){const e=this.editor,t=e.editing.view.document;this.listenTo(t,"clipboardInput",(t,n)=>{if("drop"!=n.method)return;const i=Ym(e,n.targetRanges,n.target);return this._removeDropMarker(),i?(this._draggedRange&&this._draggingUid!=n.dataTransfer.getData("application/ckeditor5-dragging-uid")&&(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid=""),"move"==Zm(n.dataTransfer)&&this._draggedRange&&this._draggedRange.containsRange(i,!0)?(this._finalizeDragging(!1),void t.stop()):void(n.targetRanges=[e.editing.mapper.toViewRange(i)])):(this._finalizeDragging(!1),void t.stop())},{priority:"high"})}_setupContentInsertionIntegration(){const e=this.editor.plugins.get(Am);e.on("contentInsertion",(e,t)=>{if(!this.isEnabled||"drop"!==t.method)return;const n=t.targetRanges.map(e=>this.editor.editing.mapper.toModelRange(e));this.editor.model.change(e=>e.setSelection(n))},{priority:"high"}),e.on("contentInsertion",(e,t)=>{if(!this.isEnabled||"drop"!==t.method)return;const n="move"==Zm(t.dataTransfer),i=!t.resultRange||!t.resultRange.isCollapsed;this._finalizeDragging(i&&n)},{priority:"lowest"})}_setupDraggableAttributeHandling(){const e=this.editor,t=e.editing.view,n=t.document;this.listenTo(n,"mousedown",(i,o)=>{if(fo.isAndroid||!o)return;this._clearDraggableAttributesDelayed.cancel();let r=Xm(o.target);if(fo.isBlink&&!e.isReadOnly&&!r&&!n.selection.isCollapsed){const e=n.selection.getSelectedElement();e&&Sm(e)||(r=n.selection.editableElement)}r&&(t.change(e=>{e.setAttribute("draggable","true",r)}),this._draggableElement=e.editing.mapper.toModelElement(r))}),this.listenTo(n,"mouseup",()=>{fo.isAndroid||this._clearDraggableAttributesDelayed()})}_clearDraggableAttributes(){const e=this.editor.editing;e.view.change(t=>{this._draggableElement&&"$graveyard"!=this._draggableElement.root.rootName&&t.removeAttribute("draggable",e.mapper.toViewElement(this._draggableElement)),this._draggableElement=null})}_setupDropMarker(){const e=this.editor;e.conversion.for("editingDowncast").markerToHighlight({model:"drop-target",view:{classes:["ck-clipboard-drop-target-range"]}}),e.conversion.for("editingDowncast").markerToElement({model:"drop-target",view:(t,{writer:n})=>{if(e.model.schema.checkChild(t.markerRange.start,"$text"))return n.createUIElement("span",{class:"ck ck-clipboard-drop-target-position"},function(e){const t=this.toDomElement(e);return t.innerHTML="⁠⁠",t})}})}_updateDropMarker(e){const t=this.editor,n=t.model.markers;t.model.change(t=>{n.has("drop-target")?n.get("drop-target").getRange().isEqual(e)||t.updateMarker("drop-target",{range:e}):t.addMarker("drop-target",{range:e,usingOperation:!1,affectsData:!1})})}_removeDropMarker(){const e=this.editor.model;this._removeDropMarkerDelayed.cancel(),this._updateDropMarkerThrottled.cancel(),e.markers.has("drop-target")&&e.change(e=>{e.removeMarker("drop-target")})}_finalizeDragging(e){const t=this.editor,n=t.model;this._removeDropMarker(),this._clearDraggableAttributes(),t.plugins.has("WidgetToolbarRepository")&&t.plugins.get("WidgetToolbarRepository").clearForceDisabled("dragDrop"),this._draggingUid="",this._draggedRange&&(e&&this.isEnabled&&n.deleteContent(n.createSelection(this._draggedRange),{doNotAutoparagraph:!0}),this._draggedRange.detach(),this._draggedRange=null)}}function Ym(e,t,n){const i=e.model,o=e.editing.mapper;let r=null;const s=t?t[0].start:null;if(n.is("uiElement")&&(n=n.parent),r=function(e,t){const n=e.model,i=e.editing.mapper;if(Sm(t))return n.createRangeOn(i.toModelElement(t));if(!t.is("editableElement")){const e=t.findAncestor(e=>Sm(e)||e.is("editableElement"));if(Sm(e))return n.createRangeOn(i.toModelElement(e))}return null}(e,n),r)return r;const a=function(e,t){const n=e.editing.mapper,i=e.editing.view,o=n.toModelElement(t);if(o)return o;const r=i.createPositionBefore(t),s=n.findMappedViewAncestor(r);return n.toModelElement(s)}(e,n),c=s?o.toModelPosition(s):null;return c?(r=function(e,t,n){const i=e.model;if(!i.schema.checkChild(n,"$block"))return null;const o=i.createPositionAt(n,0),r=t.path.slice(0,o.path.length),s=i.createPositionFromPath(t.root,r).nodeAfter;return s&&i.schema.isObject(s)?i.createRangeOn(s):null}(e,c,a),r||(r=i.schema.getNearestSelectionRange(c,fo.isGecko?"forward":"backward"),r||function(e,t){const n=e.model;for(;t;){if(n.schema.isObject(t))return n.createRangeOn(t);t=t.parent}}(e,c.parent))):function(e,t){const n=e.model,i=n.schema,o=n.createPositionAt(t,0);return i.getNearestSelectionRange(o,"forward")}(e,a)}function Zm(e){return fo.isGecko?e.dropEffect:["all","copyMove"].includes(e.effectAllowed)?"move":"copy"}function Jm(e,t){let n;function i(...o){i.cancel(),n=setTimeout(()=>e(...o),t)}return i.cancel=()=>{clearTimeout(n)},i}function Xm(e){if(e.is("editableElement"))return null;if(e.hasClass("ck-widget__selection-handle"))return e.findAncestor(Sm);if(Sm(e))return e;const t=e.findAncestor(e=>Sm(e)||e.is("editableElement"));return Sm(t)?t:null}class Qm extends st{static get pluginName(){return"PastePlainText"}static get requires(){return[Am]}init(){const e=this.editor,t=e.model,n=e.editing.view,i=n.document,o=t.document.selection;let r=!1;n.addObserver(bm),this.listenTo(i,"keydown",(e,t)=>{r=t.shiftKey}),e.plugins.get(Am).on("contentInsertion",(e,n)=>{(r||function(e,t){if(e.childCount>1)return!1;const n=e.getChild(0);return!t.isObject(n)&&0==[...n.getAttributeKeys()].length}(n.content,t.schema))&&t.change(e=>{const i=Array.from(o.getAttributes()).filter(([e])=>t.schema.getAttributeProperties(e).isFormatting);o.isCollapsed||t.deleteContent(o,{doNotAutoparagraph:!0}),i.push(...o.getAttributes());const r=e.createRangeIn(n.content);for(const t of r.getItems())t.is("$textProxy")&&e.setAttributes(i,t)})})}}class eg extends st{static get pluginName(){return"Clipboard"}static get requires(){return[Am,Km,Qm]}}class tg extends ct{constructor(e){super(e),this.affectsData=!1}execute(){const e=this.editor.model,t=e.document.selection;let n=e.schema.getLimitElement(t);if(t.containsEntireContent(n)||!ng(e.schema,n))do{if(n=n.parent,!n)return}while(!ng(e.schema,n));e.change(e=>{e.setSelection(n,"in")})}}function ng(e,t){return e.isLimit(t)&&(e.checkChild(t,"$text")||e.checkChild(t,"paragraph"))}const ig=wo("Ctrl+A");class og extends st{static get pluginName(){return"SelectAllEditing"}init(){const e=this.editor,t=e.editing.view.document;e.commands.add("selectAll",new tg(e)),this.listenTo(t,"keydown",(t,n)=>{yo(n)===ig&&(e.execute("selectAll"),n.preventDefault())})}}class rg extends st{static get pluginName(){return"SelectAllUI"}init(){const e=this.editor;e.ui.componentFactory.add("selectAll",t=>{const n=e.commands.get("selectAll"),i=new fd(t),o=t.t;return i.set({label:o("Select all"),icon:'',keystroke:"Ctrl+A",tooltip:!0}),i.bind("isOn","isEnabled").to(n,"value","isEnabled"),this.listenTo(i,"execute",()=>{e.execute("selectAll"),e.editing.view.focus()}),i})}}class sg extends st{static get requires(){return[og,rg]}static get pluginName(){return"SelectAll"}}class ag extends ct{constructor(e){super(e),this._stack=[],this._createdBatches=new WeakSet,this.refresh(),this.listenTo(e.data,"set",(e,t)=>{t[1]={...t[1]};const n=t[1];n.batchType||(n.batchType={isUndoable:!1})},{priority:"high"}),this.listenTo(e.data,"set",(e,t)=>{t[1].batchType.isUndoable||this.clearStack()})}refresh(){this.isEnabled=this._stack.length>0}addBatch(e){const t=this.editor.model.document.selection,n={ranges:t.hasOwnRange?Array.from(t.getRanges()):[],isBackward:t.isBackward};this._stack.push({batch:e,selection:n}),this.refresh()}clearStack(){this._stack=[],this.refresh()}_restoreSelection(e,t,n){const i=this.editor.model,o=i.document,r=[],s=e.map(e=>e.getTransformedByOperations(n)),a=s.flat();for(const e of s){const t=e.filter(e=>e.root!=o.graveyard).filter(e=>!lg(e,a));t.length&&(cg(t),r.push(t[0]))}r.length&&i.change(e=>{e.setSelection(r,{backward:t})})}_undo(e,t){const n=this.editor.model,i=n.document;this._createdBatches.add(t);const o=e.operations.slice().filter(e=>e.isDocumentOperation);o.reverse();for(const e of o){const o=e.baseVersion+1,r=Array.from(i.history.getOperations(o)),s=Nu([e.getReversed()],r,{useRelations:!0,document:this.editor.model.document,padWithNoOps:!1,forceWeakRemove:!0}).operationsA;for(const o of s)t.addOperation(o),n.applyOperation(o),i.history.setOperationAsUndone(e,o)}}}function cg(e){e.sort((e,t)=>e.start.isBefore(t.start)?-1:1);for(let t=1;tt!==e&&t.containsRange(e,!0))}class dg extends ag{execute(e=null){const t=e?this._stack.findIndex(t=>t.batch==e):this._stack.length-1,n=this._stack.splice(t,1)[0],i=this.editor.model.createBatch({isUndo:!0});this.editor.model.enqueueChange(i,()=>{this._undo(n.batch,i);const e=this.editor.model.document.history.getOperations(n.batch.baseVersion);this._restoreSelection(n.selection.ranges,n.selection.isBackward,e),this.fire("revert",n.batch,i)}),this.refresh()}}class ug extends ag{execute(){const e=this._stack.pop(),t=this.editor.model.createBatch({isUndo:!0});this.editor.model.enqueueChange(t,()=>{const n=e.batch.operations[e.batch.operations.length-1].baseVersion+1,i=this.editor.model.document.history.getOperations(n);this._restoreSelection(e.selection.ranges,e.selection.isBackward,i),this._undo(e.batch,t)}),this.refresh()}}class hg extends st{static get pluginName(){return"UndoEditing"}constructor(e){super(e),this._batchRegistry=new WeakSet}init(){const e=this.editor;this._undoCommand=new dg(e),this._redoCommand=new ug(e),e.commands.add("undo",this._undoCommand),e.commands.add("redo",this._redoCommand),this.listenTo(e.model,"applyOperation",(e,t)=>{const n=t[0];if(!n.isDocumentOperation)return;const i=n.batch,o=this._redoCommand._createdBatches.has(i),r=this._undoCommand._createdBatches.has(i);this._batchRegistry.has(i)||(this._batchRegistry.add(i),i.isUndoable&&(o?this._undoCommand.addBatch(i):r||(this._undoCommand.addBatch(i),this._redoCommand.clearStack())))},{priority:"highest"}),this.listenTo(this._undoCommand,"revert",(e,t,n)=>{this._redoCommand.addBatch(n)}),e.keystrokes.set("CTRL+Z","undo"),e.keystrokes.set("CTRL+Y","redo"),e.keystrokes.set("CTRL+SHIFT+Z","redo")}}const mg='',gg='';class pg extends st{static get pluginName(){return"UndoUI"}init(){const e=this.editor,t=e.locale,n=e.t,i="ltr"==t.uiLanguageDirection?mg:gg,o="ltr"==t.uiLanguageDirection?gg:mg;this._addButton("undo",n("Undo"),"CTRL+Z",i),this._addButton("redo",n("Redo"),"CTRL+Y",o)}_addButton(e,t,n,i){const o=this.editor;o.ui.componentFactory.add(e,r=>{const s=o.commands.get(e),a=new fd(r);return a.set({label:t,icon:i,keystroke:n,tooltip:!0}),a.bind("isEnabled").to(s,"isEnabled"),this.listenTo(a,"execute",()=>{o.execute(e),o.editing.view.focus()}),a})}}class fg extends st{static get requires(){return[hg,pg]}static get pluginName(){return"Undo"}}class _g extends ct{constructor(e,t){super(e),this.attributeKey=t}refresh(){const e=this.editor.model,t=e.document;this.value=t.selection.getAttribute(this.attributeKey),this.isEnabled=e.schema.checkAttributeInSelection(t.selection,this.attributeKey)}execute(e={}){const t=this.editor.model,n=t.document.selection,i=e.value;t.change(e=>{if(n.isCollapsed)i?e.setSelectionAttribute(this.attributeKey,i):e.removeSelectionAttribute(this.attributeKey);else{const o=t.schema.getValidRanges(n.getRanges(),this.attributeKey);for(const t of o)i?e.setAttribute(this.attributeKey,i,t):e.removeAttribute(this.attributeKey,t)}})}}class bg extends Un{constructor(e){super(e),this.set("isEmpty",!0),this.on("change",()=>{this.set("isEmpty",0===this.length)})}add(e,t){this.find(t=>t.color===e.color)||super.add(e,t)}hasColor(e){return!!this.find(t=>t.color===e)}}rt(bg,Qe);var kg=r(585);sr()(kg.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),kg.Z.locals;class vg extends Ll{constructor(e,{colors:t,columns:n,removeButtonLabel:i,documentColorsLabel:o,documentColorsCount:r}){super(e),this.items=this.createCollection(),this.colorDefinitions=t,this.focusTracker=new Fs,this.keystrokes=new zs,this.set("selectedColor"),this.removeButtonLabel=i,this.columns=n,this.documentColors=new bg,this.documentColorsCount=r,this._focusCycler=new yd({focusables:this.items,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"arrowup",focusNext:"arrowdown"}}),this._documentColorsLabel=o,this.setTemplate({tag:"div",attributes:{class:["ck","ck-color-table"]},children:this.items}),this.items.add(this._removeColorButton())}updateDocumentColors(e,t){const n=e.document,i=this.documentColorsCount;this.documentColors.clear();for(const o of n.getRootNames()){const r=n.getRoot(o),s=e.createRangeIn(r);for(const e of s.getItems())if(e.is("$textProxy")&&e.hasAttribute(t)&&(this._addColorToDocumentColors(e.getAttribute(t)),this.documentColors.length>=i))return}}updateSelectedColors(){const e=this.documentColorsGrid,t=this.staticColorsGrid,n=this.selectedColor;t.selectedColor=n,e&&(e.selectedColor=n)}render(){super.render();for(const e of this.items)this.focusTracker.add(e.element);this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}appendGrids(){if(!this.staticColorsGrid&&(this.staticColorsGrid=this._createStaticColorsGrid(),this.items.add(this.staticColorsGrid),this.documentColorsCount)){const e=Vl.bind(this.documentColors,this.documentColors),t=new tu(this.locale);t.text=this._documentColorsLabel,t.extendTemplate({attributes:{class:["ck","ck-color-grid__label",e.if("isEmpty","ck-hidden")]}}),this.items.add(t),this.documentColorsGrid=this._createDocumentColorsGrid(),this.items.add(this.documentColorsGrid)}}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}_removeColorButton(){const e=new fd;return e.set({withText:!0,icon:'',tooltip:!0,label:this.removeButtonLabel}),e.class="ck-color-table__remove-color",e.on("execute",()=>{this.fire("execute",{value:null})}),e}_createStaticColorsGrid(){const e=new Id(this.locale,{colorDefinitions:this.colorDefinitions,columns:this.columns});return e.delegate("execute").to(this),e}_createDocumentColorsGrid(){const e=Vl.bind(this.documentColors,this.documentColors),t=new Id(this.locale,{columns:this.columns});return t.delegate("execute").to(this),t.extendTemplate({attributes:{class:e.if("isEmpty","ck-hidden")}}),t.items.bindTo(this.documentColors).using(e=>{const t=new vd;return t.set({color:e.color,hasBorder:e.options&&e.options.hasBorder}),e.label&&t.set({label:e.label,tooltip:!0}),t.on("execute",()=>{this.fire("execute",{value:e.color})}),t}),this.documentColors.on("change:isEmpty",(e,n,i)=>{i&&(t.selectedColor=null)}),t}_addColorToDocumentColors(e){const t=this.colorDefinitions.find(t=>t.color===e);t?this.documentColors.add(Object.assign({},t)):this.documentColors.add({color:e,label:e,options:{hasBorder:!1}})}}const Ag="fontColor",yg="fontBackgroundColor";function wg(e){return t=>function(e){return e.replace(/\s/g,"")}(t.getStyle(e))}function Cg(e){return(t,{writer:n})=>n.createAttributeElement("span",{style:`${e}:${t}`},{priority:7})}class Ig extends _g{constructor(e){super(e,yg)}}class xg extends st{static get pluginName(){return"FontBackgroundColorEditing"}constructor(e){super(e),e.config.define(yg,{colors:[{color:"hsl(0, 0%, 0%)",label:"Black"},{color:"hsl(0, 0%, 30%)",label:"Dim grey"},{color:"hsl(0, 0%, 60%)",label:"Grey"},{color:"hsl(0, 0%, 90%)",label:"Light grey"},{color:"hsl(0, 0%, 100%)",label:"White",hasBorder:!0},{color:"hsl(0, 75%, 60%)",label:"Red"},{color:"hsl(30, 75%, 60%)",label:"Orange"},{color:"hsl(60, 75%, 60%)",label:"Yellow"},{color:"hsl(90, 75%, 60%)",label:"Light green"},{color:"hsl(120, 75%, 60%)",label:"Green"},{color:"hsl(150, 75%, 60%)",label:"Aquamarine"},{color:"hsl(180, 75%, 60%)",label:"Turquoise"},{color:"hsl(210, 75%, 60%)",label:"Light blue"},{color:"hsl(240, 75%, 60%)",label:"Blue"},{color:"hsl(270, 75%, 60%)",label:"Purple"}],columns:5}),e.data.addStyleProcessorRules(dh),e.conversion.for("upcast").elementToAttribute({view:{name:"span",styles:{"background-color":/[\s\S]+/}},model:{key:yg,value:wg("background-color")}}),e.conversion.for("downcast").attributeToElement({model:yg,view:Cg("background-color")}),e.commands.add(yg,new Ig(e)),e.model.schema.extend("$text",{allowAttributes:yg}),e.model.schema.setAttributeProperties(yg,{isFormatting:!0,copyOnEnter:!0})}}class Sg extends st{constructor(e,{commandName:t,icon:n,componentName:i,dropdownLabel:o}){super(e),this.commandName=t,this.componentName=i,this.icon=n,this.dropdownLabel=o,this.columns=e.config.get(`${this.componentName}.columns`),this.colorTableView=void 0}init(){const e=this.editor,t=e.locale,n=t.t,i=e.commands.get(this.commandName),o=function(e,t){const n=e.t,i={Black:n("Black"),"Dim grey":n("Dim grey"),Grey:n("Grey"),"Light grey":n("Light grey"),White:n("White"),Red:n("Red"),Orange:n("Orange"),Yellow:n("Yellow"),"Light green":n("Light green"),Green:n("Green"),Aquamarine:n("Aquamarine"),Turquoise:n("Turquoise"),"Light blue":n("Light blue"),Blue:n("Blue"),Purple:n("Purple")};return t.map(e=>{const t=i[e.label];return t&&t!=e.label&&(e.label=t),e})}(t,function(e){return e.map(kd).filter(e=>!!e)}(e.config.get(this.componentName).colors)),r=e.config.get(`${this.componentName}.documentColors`);e.ui.componentFactory.add(this.componentName,t=>{const s=Yd(t);return this.colorTableView=function({dropdownView:e,colors:t,columns:n,removeButtonLabel:i,documentColorsLabel:o,documentColorsCount:r}){const s=e.locale,a=new vg(s,{colors:t,columns:n,removeButtonLabel:i,documentColorsLabel:o,documentColorsCount:r});return e.colorTableView=a,e.panelView.children.add(a),a.delegate("execute").to(e,"execute"),a}({dropdownView:s,colors:o.map(e=>({label:e.label,color:e.model,options:{hasBorder:e.hasBorder}})),columns:this.columns,removeButtonLabel:n("Remove color"),documentColorsLabel:0!==r?n("Document colors"):void 0,documentColorsCount:void 0===r?this.columns:r}),this.colorTableView.bind("selectedColor").to(i,"value"),s.buttonView.set({label:this.dropdownLabel,icon:this.icon,tooltip:!0}),s.extendTemplate({attributes:{class:"ck-color-ui-dropdown"}}),s.bind("isEnabled").to(i),s.on("execute",(t,n)=>{e.execute(this.commandName,n),e.editing.view.focus()}),s.on("change:isOpen",(t,n,i)=>{s.colorTableView.appendGrids(),i&&(0!==r&&this.colorTableView.updateDocumentColors(e.model,this.componentName),this.colorTableView.updateSelectedColors())}),s})}}class Eg extends Sg{constructor(e){const t=e.locale.t;super(e,{commandName:yg,componentName:yg,icon:'',dropdownLabel:t("Font Background Color")})}static get pluginName(){return"FontBackgroundColorUI"}}class jg extends _g{constructor(e){super(e,Ag)}}class Tg extends st{static get pluginName(){return"FontColorEditing"}constructor(e){super(e),e.config.define(Ag,{colors:[{color:"hsl(0, 0%, 0%)",label:"Black"},{color:"hsl(0, 0%, 30%)",label:"Dim grey"},{color:"hsl(0, 0%, 60%)",label:"Grey"},{color:"hsl(0, 0%, 90%)",label:"Light grey"},{color:"hsl(0, 0%, 100%)",label:"White",hasBorder:!0},{color:"hsl(0, 75%, 60%)",label:"Red"},{color:"hsl(30, 75%, 60%)",label:"Orange"},{color:"hsl(60, 75%, 60%)",label:"Yellow"},{color:"hsl(90, 75%, 60%)",label:"Light green"},{color:"hsl(120, 75%, 60%)",label:"Green"},{color:"hsl(150, 75%, 60%)",label:"Aquamarine"},{color:"hsl(180, 75%, 60%)",label:"Turquoise"},{color:"hsl(210, 75%, 60%)",label:"Light blue"},{color:"hsl(240, 75%, 60%)",label:"Blue"},{color:"hsl(270, 75%, 60%)",label:"Purple"}],columns:5}),e.conversion.for("upcast").elementToAttribute({view:{name:"span",styles:{color:/[\s\S]+/}},model:{key:Ag,value:wg("color")}}),e.conversion.for("upcast").elementToAttribute({view:{name:"font",attributes:{color:/^#?\w+$/}},model:{key:Ag,value:e=>e.getAttribute("color")}}),e.conversion.for("downcast").attributeToElement({model:Ag,view:Cg("color")}),e.commands.add(Ag,new jg(e)),e.model.schema.extend("$text",{allowAttributes:Ag}),e.model.schema.setAttributeProperties(Ag,{isFormatting:!0,copyOnEnter:!0})}}class Dg extends Sg{constructor(e){const t=e.locale.t;super(e,{commandName:Ag,componentName:Ag,icon:'',dropdownLabel:t("Font Color")})}static get pluginName(){return"FontColorUI"}}class Pg extends ct{refresh(){const e=this.editor.model,t=Os(e.document.selection.getSelectedBlocks());this.value=!!t&&t.is("element","paragraph"),this.isEnabled=!!t&&Rg(t,e.schema)}execute(e={}){const t=this.editor.model,n=t.document;t.change(i=>{const o=(e.selection||n.selection).getSelectedBlocks();for(const e of o)!e.is("element","paragraph")&&Rg(e,t.schema)&&i.rename(e,"paragraph")})}}function Rg(e,t){return t.checkChild(e.parent,"paragraph")&&!t.isObject(e)}class Og extends ct{execute(e){const t=this.editor.model,n=e.attributes;let i=e.position;t.change(e=>{const o=e.createElement("paragraph");if(n&&t.schema.setAllowedAttributes(o,n,e),!t.schema.checkChild(i.parent,o)){const n=t.schema.findAllowedParent(i,o);if(!n)return;i=e.split(i,n).position}t.insertContent(o,i),e.setSelection(o,"in")})}}class Fg extends st{static get pluginName(){return"Paragraph"}init(){const e=this.editor,t=e.model;e.commands.add("paragraph",new Pg(e)),e.commands.add("insertParagraph",new Og(e)),t.schema.register("paragraph",{inheritAllFrom:"$block"}),e.conversion.elementToElement({model:"paragraph",view:"p"}),e.conversion.for("upcast").elementToElement({model:(e,{writer:t})=>Fg.paragraphLikeElements.has(e.name)?e.isEmpty?null:t.createElement("paragraph"):null,view:/.+/,converterPriority:"low"})}}Fg.paragraphLikeElements=new Set(["blockquote","dd","div","dt","h1","h2","h3","h4","h5","h6","li","p","td","th"]);class zg extends ct{constructor(e,t){super(e),this.modelElements=t}refresh(){const e=Os(this.editor.model.document.selection.getSelectedBlocks());this.value=!!e&&this.modelElements.includes(e.name)&&e.name,this.isEnabled=!!e&&this.modelElements.some(t=>Mg(e,t,this.editor.model.schema))}execute(e){const t=this.editor.model,n=t.document,i=e.value;t.change(e=>{const o=Array.from(n.selection.getSelectedBlocks()).filter(e=>Mg(e,i,t.schema));for(const t of o)t.is("element",i)||e.rename(t,i)})}}function Mg(e,t,n){return n.checkChild(e.parent,t)&&!n.isObject(e)}const $g="paragraph";class Ng extends st{static get pluginName(){return"HeadingEditing"}constructor(e){super(e),e.config.define("heading",{options:[{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_heading3"}]})}static get requires(){return[Fg]}init(){const e=this.editor,t=e.config.get("heading.options"),n=[];for(const i of t)i.model!==$g&&(e.model.schema.register(i.model,{inheritAllFrom:"$block"}),e.conversion.elementToElement(i),n.push(i.model));this._addDefaultH1Conversion(e),e.commands.add("heading",new zg(e,n))}afterInit(){const e=this.editor,t=e.commands.get("enter"),n=e.config.get("heading.options");t&&this.listenTo(t,"afterExecute",(t,i)=>{const o=e.model.document.selection.getFirstPosition().parent,r=n.some(e=>o.is("element",e.model));r&&!o.is("element",$g)&&0===o.childCount&&i.writer.rename(o,$g)})}_addDefaultH1Conversion(e){e.conversion.for("upcast").elementToElement({model:"heading1",view:"h1",converterPriority:l.get("low")+1})}}var Bg=r(230);sr()(Bg.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Bg.Z.locals;class Lg extends st{static get pluginName(){return"HeadingUI"}init(){const e=this.editor,t=e.t,n=function(e){const t=e.t,n={Paragraph:t("Paragraph"),"Heading 1":t("Heading 1"),"Heading 2":t("Heading 2"),"Heading 3":t("Heading 3"),"Heading 4":t("Heading 4"),"Heading 5":t("Heading 5"),"Heading 6":t("Heading 6")};return e.config.get("heading.options").map(e=>{const t=n[e.title];return t&&t!=e.title&&(e.title=t),e})}(e),i=t("Choose heading"),o=t("Heading");e.ui.componentFactory.add("heading",t=>{const r={},s=new Un,a=e.commands.get("heading"),c=e.commands.get("paragraph"),l=[a];for(const e of n){const t={type:"button",model:new mu({label:e.title,class:e.class,withText:!0})};"paragraph"===e.model?(t.model.bind("isOn").to(c,"value"),t.model.set("commandName","paragraph"),l.push(c)):(t.model.bind("isOn").to(a,"value",t=>t===e.model),t.model.set({commandName:"heading",commandValue:e.model})),s.add(t),r[e.model]=e.title}const d=Yd(t);return Jd(d,s),d.buttonView.set({isOn:!1,withText:!0,tooltip:o}),d.extendTemplate({attributes:{class:["ck-heading-dropdown"]}}),d.bind("isEnabled").toMany(l,"isEnabled",(...e)=>e.some(e=>e)),d.buttonView.bind("label").to(a,"value",c,"value",(e,t)=>{const n=e||t&&"paragraph";return r[n]?r[n]:i}),this.listenTo(d,"execute",t=>{e.execute(t.source.commandName,t.source.commandValue?{value:t.source.commandValue}:void 0),e.editing.view.focus()}),d})}}class Vg{constructor(e){this.set("activeHandlePosition",null),this.set("proposedWidthPercents",null),this.set("proposedWidth",null),this.set("proposedHeight",null),this.set("proposedHandleHostWidth",null),this.set("proposedHandleHostHeight",null),this._options=e,this._referenceCoordinates=null}begin(e,t,n){const i=new ks(t);this.activeHandlePosition=function(e){const t=["top-left","top-right","bottom-right","bottom-left"];for(const n of t)if(e.classList.contains(Ug(n)))return n}(e),this._referenceCoordinates=function(e,t){const n=new ks(e),i=t.split("-"),o={x:"right"==i[1]?n.right:n.left,y:"bottom"==i[0]?n.bottom:n.top};return o.x+=e.ownerDocument.defaultView.scrollX,o.y+=e.ownerDocument.defaultView.scrollY,o}(t,function(e){const t=e.split("-"),n={top:"bottom",bottom:"top",left:"right",right:"left"};return`${n[t[0]]}-${n[t[1]]}`}(this.activeHandlePosition)),this.originalWidth=i.width,this.originalHeight=i.height,this.aspectRatio=i.width/i.height;const o=n.style.width;o&&o.match(/^\d+(\.\d*)?%$/)?this.originalWidthPercents=parseFloat(o):this.originalWidthPercents=function(e,t){const n=e.parentElement,i=parseFloat(n.ownerDocument.defaultView.getComputedStyle(n).width);return t.width/i*100}(n,i)}update(e){this.proposedWidth=e.width,this.proposedHeight=e.height,this.proposedWidthPercents=e.widthPercents,this.proposedHandleHostWidth=e.handleHostWidth,this.proposedHandleHostHeight=e.handleHostHeight}}function Ug(e){return`ck-widget__resizer__handle-${e}`}rt(Vg,Qe);class Gg extends Ll{constructor(){super();const e=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-size-view",e.to("_viewPosition",e=>e?`ck-orientation-${e}`:"")],style:{display:e.if("_isVisible","none",e=>!e)}},children:[{text:e.to("_label")}]})}_bindToState(e,t){this.bind("_isVisible").to(t,"proposedWidth",t,"proposedHeight",(e,t)=>null!==e&&null!==t),this.bind("_label").to(t,"proposedHandleHostWidth",t,"proposedHandleHostHeight",t,"proposedWidthPercents",(t,n,i)=>"px"===e.unit?`${t}×${n}`:`${i}%`),this.bind("_viewPosition").to(t,"activeHandlePosition",t,"proposedHandleHostWidth",t,"proposedHandleHostHeight",(e,t,n)=>t<50||n<50?"above-center":e)}_dismiss(){this.unbind(),this._isVisible=!1}}class Wg{constructor(e){this._options=e,this._viewResizerWrapper=null,this.set("isEnabled",!0),this.decorate("begin"),this.decorate("cancel"),this.decorate("commit"),this.decorate("updateSize"),this.on("commit",e=>{this.state.proposedWidth||this.state.proposedWidthPercents||(this._cleanup(),e.stop())},{priority:"high"}),this.on("change:isEnabled",()=>{this.isEnabled&&this.redraw()})}attach(){const e=this,t=this._options.viewElement;this._options.editor.editing.view.change(n=>{const i=n.createUIElement("div",{class:"ck ck-reset_all ck-widget__resizer"},function(t){const n=this.toDomElement(t);return e._appendHandles(n),e._appendSizeUI(n),e.on("change:isEnabled",(e,t,i)=>{n.style.display=i?"":"none"}),n.style.display=e.isEnabled?"":"none",n});n.insert(n.createPositionAt(t,"end"),i),n.addClass("ck-widget_with-resizer",t),this._viewResizerWrapper=i})}begin(e){this.state=new Vg(this._options),this._sizeView._bindToState(this._options,this.state),this._initialViewWidth=this._options.viewElement.getStyle("width"),this.state.begin(e,this._getHandleHost(),this._getResizeHost())}updateSize(e){const t=this._proposeNewSize(e);this._options.editor.editing.view.change(e=>{const n=this._options.unit||"%",i=("%"===n?t.widthPercents:t.width)+n;e.setStyle("width",i,this._options.viewElement)});const n=this._getHandleHost(),i=new ks(n);t.handleHostWidth=Math.round(i.width),t.handleHostHeight=Math.round(i.height);const o=new ks(n);t.width=Math.round(o.width),t.height=Math.round(o.height),this.redraw(i),this.state.update(t)}commit(){const e=this._options.unit||"%",t=("%"===e?this.state.proposedWidthPercents:this.state.proposedWidth)+e;this._options.editor.editing.view.change(()=>{this._cleanup(),this._options.onCommit(t)})}cancel(){this._cleanup()}destroy(){this.cancel()}redraw(e){const t=this._domResizerWrapper;if(!function(e){return e&&e.ownerDocument&&e.ownerDocument.contains(e)}(t))return;const n=t.parentElement,i=this._getHandleHost(),o=this._viewResizerWrapper,r=[o.getStyle("width"),o.getStyle("height"),o.getStyle("left"),o.getStyle("top")];let s;if(n.isSameNode(i)){const t=e||new ks(i);s=[t.width+"px",t.height+"px",void 0,void 0]}else s=[i.offsetWidth+"px",i.offsetHeight+"px",i.offsetLeft+"px",i.offsetTop+"px"];"same"!==Jn(r,s)&&this._options.editor.editing.view.change(e=>{e.setStyle({width:s[0],height:s[1],left:s[2],top:s[3]},o)})}containsHandle(e){return this._domResizerWrapper.contains(e)}static isResizeHandle(e){return e.classList.contains("ck-widget__resizer__handle")}_cleanup(){this._sizeView._dismiss(),this._options.editor.editing.view.change(e=>{e.setStyle("width",this._initialViewWidth,this._options.viewElement)})}_proposeNewSize(e){const t=this.state,n=function(e){return{x:e.pageX,y:e.pageY}}(e),i=!this._options.isCentered||this._options.isCentered(this),o={x:t._referenceCoordinates.x-(n.x+t.originalWidth),y:n.y-t.originalHeight-t._referenceCoordinates.y};i&&t.activeHandlePosition.endsWith("-right")&&(o.x=n.x-(t._referenceCoordinates.x+t.originalWidth)),i&&(o.x*=2);const r={width:Math.abs(t.originalWidth+o.x),height:Math.abs(t.originalHeight+o.y)};r.dominant=r.width/t.aspectRatio>r.height?"width":"height",r.max=r[r.dominant];const s={width:r.width,height:r.height};return"width"==r.dominant?s.height=s.width/t.aspectRatio:s.width=s.height*t.aspectRatio,{width:Math.round(s.width),height:Math.round(s.height),widthPercents:Math.min(Math.round(t.originalWidthPercents/t.originalWidth*s.width*100)/100,100)}}_getResizeHost(){const e=this._domResizerWrapper.parentElement;return this._options.getResizeHost(e)}_getHandleHost(){const e=this._domResizerWrapper.parentElement;return this._options.getHandleHost(e)}get _domResizerWrapper(){return this._options.editor.editing.view.domConverter.mapViewToDom(this._viewResizerWrapper)}_appendHandles(e){const t=["top-left","top-right","bottom-right","bottom-left"];for(const n of t)e.appendChild(new Vl({tag:"div",attributes:{class:`ck-widget__resizer__handle ${qg(n)}`}}).render())}_appendSizeUI(e){this._sizeView=new Gg,this._sizeView.render(),e.appendChild(this._sizeView.element)}}function qg(e){return`ck-widget__resizer__handle-${e}`}rt(Wg,Qe);var Hg=r(263);sr()(Hg.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Hg.Z.locals;class Kg extends st{static get pluginName(){return"WidgetResize"}init(){const e=this.editor.editing,t=hr.window.document;this.set("visibleResizer",null),this.set("_activeResizer",null),this._resizers=new Map,e.view.addObserver(Hu),this._observer=Object.create(Sr),this.listenTo(e.view.document,"mousedown",this._mouseDownListener.bind(this),{priority:"high"}),this._observer.listenTo(t,"mousemove",this._mouseMoveListener.bind(this)),this._observer.listenTo(t,"mouseup",this._mouseUpListener.bind(this));const n=()=>{this.visibleResizer&&this.visibleResizer.redraw()};this._redrawFocusedResizerThrottled=qm(n,200),this.on("change:visibleResizer",n),this.editor.ui.on("update",this._redrawFocusedResizerThrottled),this.editor.model.document.on("change",()=>{for(const[e,t]of this._resizers)e.isAttached()||(this._resizers.delete(e),t.destroy())},{priority:"lowest"}),this._observer.listenTo(hr.window,"resize",this._redrawFocusedResizerThrottled);const i=this.editor.editing.view.document.selection;i.on("change",()=>{const e=i.getSelectedElement();this.visibleResizer=this.getResizerByViewElement(e)||null})}destroy(){this._observer.stopListening();for(const e of this._resizers.values())e.destroy();this._redrawFocusedResizerThrottled.cancel()}attachTo(e){const t=new Wg(e),n=this.editor.plugins;if(t.attach(),n.has("WidgetToolbarRepository")){const e=n.get("WidgetToolbarRepository");t.on("begin",()=>{e.forceDisabled("resize")},{priority:"lowest"}),t.on("cancel",()=>{e.clearForceDisabled("resize")},{priority:"highest"}),t.on("commit",()=>{e.clearForceDisabled("resize")},{priority:"highest"})}this._resizers.set(e.viewElement,t);const i=this.editor.editing.view.document.selection.getSelectedElement();return this.getResizerByViewElement(i)==t&&(this.visibleResizer=t),t}getResizerByViewElement(e){return this._resizers.get(e)}_getResizerByHandle(e){for(const t of this._resizers.values())if(t.containsHandle(e))return t}_mouseDownListener(e,t){const n=t.domTarget;Wg.isResizeHandle(n)&&(this._activeResizer=this._getResizerByHandle(n),this._activeResizer&&(this._activeResizer.begin(n),e.stop(),t.preventDefault()))}_mouseMoveListener(e,t){this._activeResizer&&this._activeResizer.updateSize(t)}_mouseUpListener(){this._activeResizer&&(this._activeResizer.commit(),this._activeResizer=null)}}rt(Kg,Qe);class Yg extends ct{refresh(){const e=this.editor.plugins.get("ImageUtils").getClosestSelectedImageElement(this.editor.model.document.selection);this.isEnabled=!!e,this.isEnabled&&e.hasAttribute("alt")?this.value=e.getAttribute("alt"):this.value=!1}execute(e){const t=this.editor,n=t.plugins.get("ImageUtils"),i=t.model,o=n.getClosestSelectedImageElement(i.document.selection);i.change(t=>{t.setAttribute("alt",e.newValue,o)})}}function Zg(e){return e.createContainerElement("figure",{class:"image"},[e.createEmptyElement("img"),e.createSlot()])}function Jg(e,t){const n=e.plugins.get("ImageUtils"),i=e.plugins.has("ImageInlineEditing")&&e.plugins.has("ImageBlockEditing");return e=>n.isInlineImageView(e)?i&&(e.findAncestor(n.isBlockImageView)?"imageBlock":"imageInline")!==t?null:function(e){const t={name:!0};return e.hasAttribute("src")&&(t.attributes=["src"]),t}(e):null}function Xg(e,t){const n=Os(t.getSelectedBlocks());return!n||e.isObject(n)||n.isEmpty&&"listItem"!=n.name?"imageBlock":"imageInline"}class Qg extends st{static get pluginName(){return"ImageUtils"}isImage(e){return this.isInlineImage(e)||this.isBlockImage(e)}isInlineImageView(e){return!!e&&e.is("element","img")}isBlockImageView(e){return!!e&&e.is("element","figure")&&e.hasClass("image")}insertImage(e={},t=null,n=null){const i=this.editor,o=i.model,r=o.document.selection;n=ep(i,t||r,n),e={...Object.fromEntries(r.getAttributes()),...e};for(const t in e)o.schema.checkAttribute(n,t)||delete e[t];return o.change(i=>{const r=i.createElement(n,e);return o.insertObject(r,t,null,{setSelection:"on",findOptimalPosition:!t&&"imageInline"!=n}),r.parent?r:null})}getClosestSelectedImageWidget(e){const t=e.getSelectedElement();if(t&&this.isImageWidget(t))return t;let n=e.getFirstPosition().parent;for(;n;){if(n.is("element")&&this.isImageWidget(n))return n;n=n.parent}return null}getClosestSelectedImageElement(e){const t=e.getSelectedElement();return this.isImage(t)?t:e.getFirstPosition().findAncestor("imageBlock")}isImageAllowed(){const e=this.editor.model.document.selection;return function(e,t){if("imageBlock"==ep(e,t)){const n=function(e,t){const n=function(e,t){const n=e.getSelectedElement();if(n){const i=Fm(e);if(i)return t.createRange(t.createPositionAt(n,i))}return al(e,t)}(e,t),i=n.start.parent;return i.isEmpty&&!i.is("element","$root")?i.parent:i}(t,e.model);if(e.model.schema.checkChild(n,"imageBlock"))return!0}else if(e.model.schema.checkChild(t.focus,"imageInline"))return!0;return!1}(this.editor,e)&&function(e){return[...e.focus.getAncestors()].every(e=>!e.is("element","imageBlock"))}(e)}toImageWidget(e,t,n){return t.setCustomProperty("image",!0,e),Em(e,t,{label:()=>{const t=this.findViewImgElement(e).getAttribute("alt");return t?`${t} ${n}`:n}})}isImageWidget(e){return!!e.getCustomProperty("image")&&Sm(e)}isBlockImage(e){return!!e&&e.is("element","imageBlock")}isInlineImage(e){return!!e&&e.is("element","imageInline")}findViewImgElement(e){if(this.isInlineImageView(e))return e;const t=this.editor.editing.view;for(const{item:n}of t.createRangeIn(e))if(this.isInlineImageView(n))return n}}function ep(e,t,n){const i=e.model.schema,o=e.config.get("image.insert.type");return e.plugins.has("ImageBlockEditing")?e.plugins.has("ImageInlineEditing")?n||("inline"===o?"imageInline":"block"===o?"imageBlock":t.is("selection")?Xg(i,t):i.checkChild(t,"imageInline")?"imageInline":"imageBlock"):"imageBlock":"imageInline"}class tp extends st{static get requires(){return[Qg]}static get pluginName(){return"ImageTextAlternativeEditing"}init(){this.editor.commands.add("imageTextAlternative",new Yg(this.editor))}}var np=r(831);sr()(np.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),np.Z.locals;var ip=r(590);sr()(ip.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),ip.Z.locals;class op extends Ll{constructor(e){super(e);const t=this.locale.t;this.focusTracker=new Fs,this.keystrokes=new zs,this.labeledInput=this._createLabeledInputView(),this.saveButtonView=this._createButton(t("Save"),Fl,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(t("Cancel"),Ol,"ck-button-cancel","cancel"),this._focusables=new Nl,this._focusCycler=new yd({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"form",attributes:{class:["ck","ck-text-alternative-form","ck-responsive-form"],tabindex:"-1"},children:[this.labeledInput,this.saveButtonView,this.cancelButtonView]}),Ml(this)}render(){super.render(),this.keystrokes.listenTo(this.element),$l({view:this}),[this.labeledInput,this.saveButtonView,this.cancelButtonView].forEach(e=>{this._focusables.add(e),this.focusTracker.add(e.element)})}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_createButton(e,t,n,i){const o=new fd(this.locale);return o.set({label:e,icon:t,tooltip:!0}),o.extendTemplate({attributes:{class:n}}),i&&o.delegate("execute").to(this,i),o}_createLabeledInputView(){const e=this.locale.t,t=new du(this.locale,uu);return t.label=e("Text alternative"),t}}function rp(e){const t=e.editing.view,n=bu.defaultPositions,i=e.plugins.get("ImageUtils");return{target:t.domConverter.viewToDom(i.getClosestSelectedImageWidget(t.document.selection)),positions:[n.northArrowSouth,n.northArrowSouthWest,n.northArrowSouthEast,n.southArrowNorth,n.southArrowNorthWest,n.southArrowNorthEast,n.viewportStickyNorth]}}class sp extends st{static get requires(){return[wu]}static get pluginName(){return"ImageTextAlternativeUI"}init(){this._createButton(),this._createForm()}destroy(){super.destroy(),this._form.destroy()}_createButton(){const e=this.editor,t=e.t;e.ui.componentFactory.add("imageTextAlternative",n=>{const i=e.commands.get("imageTextAlternative"),o=new fd(n);return o.set({label:t("Change image text alternative"),icon:'',tooltip:!0}),o.bind("isEnabled").to(i,"isEnabled"),this.listenTo(o,"execute",()=>{this._showForm()}),o})}_createForm(){const e=this.editor,t=e.editing.view.document,n=e.plugins.get("ImageUtils");this._balloon=this.editor.plugins.get("ContextualBalloon"),this._form=new op(e.locale),this._form.render(),this.listenTo(this._form,"submit",()=>{e.execute("imageTextAlternative",{newValue:this._form.labeledInput.fieldView.element.value}),this._hideForm(!0)}),this.listenTo(this._form,"cancel",()=>{this._hideForm(!0)}),this._form.keystrokes.set("Esc",(e,t)=>{this._hideForm(!0),t()}),this.listenTo(e.ui,"update",()=>{n.getClosestSelectedImageWidget(t.selection)?this._isVisible&&function(e){const t=e.plugins.get("ContextualBalloon");if(e.plugins.get("ImageUtils").getClosestSelectedImageWidget(e.editing.view.document.selection)){const n=rp(e);t.updatePosition(n)}}(e):this._hideForm(!0)}),zl({emitter:this._form,activator:()=>this._isVisible,contextElements:[this._balloon.view.element],callback:()=>this._hideForm()})}_showForm(){if(this._isVisible)return;const e=this.editor,t=e.commands.get("imageTextAlternative"),n=this._form.labeledInput;this._form.disableCssTransitions(),this._isInBalloon||this._balloon.add({view:this._form,position:rp(e)}),n.fieldView.value=n.fieldView.element.value=t.value||"",this._form.labeledInput.fieldView.select(),this._form.enableCssTransitions()}_hideForm(e){this._isInBalloon&&(this._form.focusTracker.isFocused&&this._form.saveButtonView.focus(),this._balloon.remove(this._form),e&&this.editor.editing.view.focus())}get _isVisible(){return this._balloon.visibleView===this._form}get _isInBalloon(){return this._balloon.hasView(this._form)}}class ap extends st{static get requires(){return[tp,sp]}static get pluginName(){return"ImageTextAlternative"}}function cp(e,t){return e=>{e.on(`attribute:srcset:${t}`,n)};function n(t,n,i){if(!i.consumable.consume(n.item,t.name))return;const o=i.writer,r=i.mapper.toViewElement(n.item),s=e.findViewImgElement(r);if(null===n.attributeNewValue){const e=n.attributeOldValue;e.data&&(o.removeAttribute("srcset",s),o.removeAttribute("sizes",s),e.width&&o.removeAttribute("width",s))}else{const e=n.attributeNewValue;e.data&&(o.setAttribute("srcset",e.data,s),o.setAttribute("sizes","100vw",s),e.width&&o.setAttribute("width",e.width,s))}}}function lp(e,t,n){return e=>{e.on(`attribute:${n}:${t}`,i)};function i(t,n,i){if(!i.consumable.consume(n.item,t.name))return;const o=i.writer,r=i.mapper.toViewElement(n.item),s=e.findViewImgElement(r);o.setAttribute(n.attributeKey,n.attributeNewValue||"",s)}}class dp extends Tr{observe(e){this.listenTo(e,"load",(e,t)=>{const n=t.target;this.checkShouldIgnoreEventFromTarget(n)||"IMG"==n.tagName&&this._fireEvents(t)},{useCapture:!0})}_fireEvents(e){this.isEnabled&&(this.document.fire("layoutChanged"),this.document.fire("imageLoaded",e))}}class up extends ct{constructor(e){super(e);const t=e.config.get("image.insert.type");e.plugins.has("ImageBlockEditing")||"block"===t&&h("image-block-plugin-required"),e.plugins.has("ImageInlineEditing")||"inline"===t&&h("image-inline-plugin-required")}refresh(){this.isEnabled=this.editor.plugins.get("ImageUtils").isImageAllowed()}execute(e){const t=Wn(e.source),n=this.editor.model.document.selection,i=this.editor.plugins.get("ImageUtils"),o=Object.fromEntries(n.getAttributes());t.forEach((e,t)=>{const r=n.getSelectedElement();if("string"==typeof e&&(e={src:e}),t&&r&&i.isImage(r)){const t=this.editor.model.createPositionAfter(r);i.insertImage({...e,...o},t)}else i.insertImage({...e,...o})})}}class hp extends st{static get requires(){return[Qg]}static get pluginName(){return"ImageEditing"}init(){const e=this.editor,t=e.conversion;e.editing.view.addObserver(dp),t.for("upcast").attributeToAttribute({view:{name:"img",key:"alt"},model:"alt"}).attributeToAttribute({view:{name:"img",key:"srcset"},model:{key:"srcset",value:e=>{const t={data:e.getAttribute("srcset")};return e.hasAttribute("width")&&(t.width=e.getAttribute("width")),t}}});const n=new up(e);e.commands.add("insertImage",n),e.commands.add("imageInsert",n)}}class mp extends ct{constructor(e,t){super(e),this._modelElementName=t}refresh(){const e=this.editor.plugins.get("ImageUtils"),t=e.getClosestSelectedImageElement(this.editor.model.document.selection);"imageBlock"===this._modelElementName?this.isEnabled=e.isInlineImage(t):this.isEnabled=e.isBlockImage(t)}execute(){const e=this.editor,t=this.editor.model,n=e.plugins.get("ImageUtils"),i=n.getClosestSelectedImageElement(t.document.selection),o=Object.fromEntries(i.getAttributes());return o.src||o.uploadId?t.change(e=>{const r=Array.from(t.markers).filter(e=>e.getRange().containsItem(i)),s=n.insertImage(o,t.createSelection(i,"on"),this._modelElementName);if(!s)return null;const a=e.createRangeOn(s);for(const t of r){const n=t.getRange(),i="$graveyard"!=n.root.rootName?n.getJoined(a,!0):a;e.updateMarker(t,{range:i})}return{oldElement:i,newElement:s}}):null}}class gp extends st{static get requires(){return[hp,Qg,Am]}static get pluginName(){return"ImageBlockEditing"}init(){const e=this.editor;e.model.schema.register("imageBlock",{inheritAllFrom:"$blockObject",allowAttributes:["alt","src","srcset"]}),this._setupConversion(),e.plugins.has("ImageInlineEditing")&&(e.commands.add("imageTypeBlock",new mp(this.editor,"imageBlock")),this._setupClipboardIntegration())}_setupConversion(){const e=this.editor,t=e.t,n=e.conversion,i=e.plugins.get("ImageUtils");n.for("dataDowncast").elementToStructure({model:"imageBlock",view:(e,{writer:t})=>Zg(t)}),n.for("editingDowncast").elementToStructure({model:"imageBlock",view:(e,{writer:n})=>i.toImageWidget(Zg(n),n,t("image widget"))}),n.for("downcast").add(lp(i,"imageBlock","src")).add(lp(i,"imageBlock","alt")).add(cp(i,"imageBlock")),n.for("upcast").elementToElement({view:Jg(e,"imageBlock"),model:(e,{writer:t})=>t.createElement("imageBlock",e.hasAttribute("src")?{src:e.getAttribute("src")}:null)}).add(function(e){return e=>{e.on("element:figure",t)};function t(t,n,i){if(!i.consumable.test(n.viewItem,{name:!0,classes:"image"}))return;const o=e.findViewImgElement(n.viewItem);if(!o||!i.consumable.test(o,{name:!0}))return;i.consumable.consume(n.viewItem,{name:!0,classes:"image"});const r=Os(i.convertItem(o,n.modelCursor).modelRange.getItems());r?(i.convertChildren(n.viewItem,r),i.updateConversionResult(r,n)):i.consumable.revert(n.viewItem,{name:!0,classes:"image"})}}(i))}_setupClipboardIntegration(){const e=this.editor,t=e.model,n=e.editing.view,i=e.plugins.get("ImageUtils");this.listenTo(e.plugins.get("ClipboardPipeline"),"inputTransformation",(o,r)=>{const s=Array.from(r.content.getChildren());let a;if(!s.every(i.isInlineImageView))return;a=r.targetRanges?e.editing.mapper.toModelRange(r.targetRanges[0]):t.document.selection.getFirstRange();const c=t.createSelection(a);if("imageBlock"===Xg(t.schema,c)){const e=new Ku(n.document),t=s.map(t=>e.createElement("figure",{class:"image"},t));r.content=e.createDocumentFragment(t)}})}}var pp=r(48);sr()(pp.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),pp.Z.locals;class fp extends st{static get requires(){return[gp,Gm,ap]}static get pluginName(){return"ImageBlock"}}class _p extends st{static get requires(){return[hp,Qg,Am]}static get pluginName(){return"ImageInlineEditing"}init(){const e=this.editor,t=e.model.schema;t.register("imageInline",{inheritAllFrom:"$inlineObject",allowAttributes:["alt","src","srcset"]}),t.addChildCheck((e,t)=>{if(e.endsWith("caption")&&"imageInline"===t.name)return!1}),this._setupConversion(),e.plugins.has("ImageBlockEditing")&&(e.commands.add("imageTypeInline",new mp(this.editor,"imageInline")),this._setupClipboardIntegration())}_setupConversion(){const e=this.editor,t=e.t,n=e.conversion,i=e.plugins.get("ImageUtils");n.for("dataDowncast").elementToElement({model:"imageInline",view:(e,{writer:t})=>t.createEmptyElement("img")}),n.for("editingDowncast").elementToStructure({model:"imageInline",view:(e,{writer:n})=>i.toImageWidget(function(e){return e.createContainerElement("span",{class:"image-inline"},e.createEmptyElement("img"))}(n),n,t("image widget"))}),n.for("downcast").add(lp(i,"imageInline","src")).add(lp(i,"imageInline","alt")).add(cp(i,"imageInline")),n.for("upcast").elementToElement({view:Jg(e,"imageInline"),model:(e,{writer:t})=>t.createElement("imageInline",e.hasAttribute("src")?{src:e.getAttribute("src")}:null)})}_setupClipboardIntegration(){const e=this.editor,t=e.model,n=e.editing.view,i=e.plugins.get("ImageUtils");this.listenTo(e.plugins.get("ClipboardPipeline"),"inputTransformation",(o,r)=>{const s=Array.from(r.content.getChildren());let a;if(!s.every(i.isBlockImageView))return;a=r.targetRanges?e.editing.mapper.toModelRange(r.targetRanges[0]):t.document.selection.getFirstRange();const c=t.createSelection(a);if("imageInline"===Xg(t.schema,c)){const e=new Ku(n.document),t=s.map(t=>1===t.childCount?(Array.from(t.getAttributes()).forEach(n=>e.setAttribute(...n,i.findViewImgElement(t))),t.getChild(0)):t);r.content=e.createDocumentFragment(t)}})}}class bp extends st{static get requires(){return[_p,Gm,ap]}static get pluginName(){return"ImageInline"}}class kp extends ct{refresh(){const e=this.editor,t=e.plugins.get("ImageUtils").getClosestSelectedImageElement(e.model.document.selection);this.isEnabled=!!t,t&&t.hasAttribute("width")?this.value={width:t.getAttribute("width"),height:null}:this.value=null}execute(e){const t=this.editor,n=t.model,i=t.plugins.get("ImageUtils").getClosestSelectedImageElement(n.document.selection);this.value={width:e.width,height:null},i&&n.change(t=>{t.setAttribute("width",e.width,i)})}}class vp extends st{static get requires(){return[Qg]}static get pluginName(){return"ImageResizeEditing"}constructor(e){super(e),e.config.define("image",{resizeUnit:"%",resizeOptions:[{name:"resizeImage:original",value:null,icon:"original"},{name:"resizeImage:25",value:"25",icon:"small"},{name:"resizeImage:50",value:"50",icon:"medium"},{name:"resizeImage:75",value:"75",icon:"large"}]})}init(){const e=this.editor,t=new kp(e);this._registerSchema(),this._registerConverters("imageBlock"),this._registerConverters("imageInline"),e.commands.add("resizeImage",t),e.commands.add("imageResize",t)}_registerSchema(){this.editor.plugins.has("ImageBlockEditing")&&this.editor.model.schema.extend("imageBlock",{allowAttributes:"width"}),this.editor.plugins.has("ImageInlineEditing")&&this.editor.model.schema.extend("imageInline",{allowAttributes:"width"})}_registerConverters(e){const t=this.editor;t.conversion.for("downcast").add(t=>t.on(`attribute:width:${e}`,(e,t,n)=>{if(!n.consumable.consume(t.item,e.name))return;const i=n.writer,o=n.mapper.toViewElement(t.item);null!==t.attributeNewValue?(i.setStyle("width",t.attributeNewValue,o),i.addClass("image_resized",o)):(i.removeStyle("width",o),i.removeClass("image_resized",o))})),t.conversion.for("upcast").attributeToAttribute({view:{name:"imageBlock"===e?"figure":"img",styles:{width:/.+/}},model:{key:"width",value:e=>e.getStyle("width")}})}}const Ap={small:'',medium:'',large:'',original:''};class yp extends st{static get requires(){return[vp]}static get pluginName(){return"ImageResizeButtons"}constructor(e){super(e),this._resizeUnit=e.config.get("image.resizeUnit")}init(){const e=this.editor,t=e.config.get("image.resizeOptions"),n=e.commands.get("resizeImage");this.bind("isEnabled").to(n);for(const e of t)this._registerImageResizeButton(e);this._registerImageResizeDropdown(t)}_registerImageResizeButton(e){const t=this.editor,{name:n,value:i,icon:o}=e,r=i?i+this._resizeUnit:null;t.ui.componentFactory.add(n,n=>{const i=new fd(n),s=t.commands.get("resizeImage"),a=this._getOptionLabelValue(e,!0);if(!Ap[o])throw new u("imageresizebuttons-missing-icon",t,e);return i.set({label:a,icon:Ap[o],tooltip:a,isToggleable:!0}),i.bind("isEnabled").to(this),i.bind("isOn").to(s,"value",wp(r)),this.listenTo(i,"execute",()=>{t.execute("resizeImage",{width:r})}),i})}_registerImageResizeDropdown(e){const t=this.editor,n=t.t,i=e.find(e=>!e.value),o=o=>{const r=t.commands.get("resizeImage"),s=Yd(o,xd),a=s.buttonView;return a.set({tooltip:n("Resize image"),commandValue:i.value,icon:Ap.medium,isToggleable:!0,label:this._getOptionLabelValue(i),withText:!0,class:"ck-resize-image-button"}),a.bind("label").to(r,"value",e=>e&&e.width?e.width:this._getOptionLabelValue(i)),s.bind("isOn").to(r),s.bind("isEnabled").to(this),Jd(s,this._getResizeDropdownListItemDefinitions(e,r)),s.listView.ariaLabel=n("Image resize list"),this.listenTo(s,"execute",e=>{t.execute(e.source.commandName,{width:e.source.commandValue}),t.editing.view.focus()}),s};t.ui.componentFactory.add("resizeImage",o),t.ui.componentFactory.add("imageResize",o)}_getOptionLabelValue(e,t){const n=this.editor.t;return e.label?e.label:t?e.value?n("Resize image to %0",e.value+this._resizeUnit):n("Resize image to the original size"):e.value?e.value+this._resizeUnit:n("Original")}_getResizeDropdownListItemDefinitions(e,t){const n=new Un;return e.map(e=>{const i=e.value?e.value+this._resizeUnit:null,o={type:"button",model:new mu({commandName:"resizeImage",commandValue:i,label:this._getOptionLabelValue(e),withText:!0,icon:null})};o.model.bind("isOn").to(t,"value",wp(i)),n.add(o)}),n}}function wp(e){return t=>null===e&&t===e||t&&t.width===e}const Cp=/(image|image-inline)/,Ip="image_resized";class xp extends st{static get requires(){return[Kg]}static get pluginName(){return"ImageResizeHandles"}init(){const e=this.editor.commands.get("resizeImage");this.bind("isEnabled").to(e),this._setupResizerCreator()}_setupResizerCreator(){const e=this.editor,t=e.editing.view;t.addObserver(dp),this.listenTo(t.document,"imageLoaded",(n,i)=>{if(!i.target.matches("figure.image.ck-widget > img,figure.image.ck-widget > picture > img,figure.image.ck-widget > a > img,figure.image.ck-widget > a > picture > img,span.image-inline.ck-widget > img,span.image-inline.ck-widget > picture > img"))return;const o=e.editing.view.domConverter,r=o.domToView(i.target).findAncestor({classes:Cp});let s=this.editor.plugins.get(Kg).getResizerByViewElement(r);if(s)return void s.redraw();const a=e.editing.mapper,c=a.toModelElement(r);s=e.plugins.get(Kg).attachTo({unit:e.config.get("image.resizeUnit"),modelElement:c,viewElement:r,editor:e,getHandleHost:e=>e.querySelector("img"),getResizeHost:()=>o.viewToDom(a.toViewElement(c.parent)),isCentered(){const e=c.getAttribute("imageStyle");return!e||"block"==e||"alignCenter"==e},onCommit(n){t.change(e=>{e.removeClass(Ip,r)}),e.execute("resizeImage",{width:n})}}),s.on("updateSize",()=>{r.hasClass(Ip)||t.change(e=>{e.addClass(Ip,r)})}),s.bind("isEnabled").to(this)})}}var Sp=r(43);sr()(Sp.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Sp.Z.locals;class Ep{constructor(){const e=new window.FileReader;this._reader=e,this._data=void 0,this.set("loaded",0),e.onprogress=e=>{this.loaded=e.loaded}}get error(){return this._reader.error}get data(){return this._data}read(e){const t=this._reader;return this.total=e.size,new Promise((n,i)=>{t.onload=()=>{const e=t.result;this._data=e,n(e)},t.onerror=()=>{i("error")},t.onabort=()=>{i("aborted")},this._reader.readAsDataURL(e)})}abort(){this._reader.abort()}}rt(Ep,Qe);class jp extends st{static get pluginName(){return"FileRepository"}static get requires(){return[Rl]}init(){this.loaders=new Un,this.loaders.on("add",()=>this._updatePendingAction()),this.loaders.on("remove",()=>this._updatePendingAction()),this._loadersMap=new Map,this._pendingAction=null,this.set("uploaded",0),this.set("uploadTotal",null),this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",(e,t)=>t?e/t*100:0)}getLoader(e){return this._loadersMap.get(e)||null}createLoader(e){if(!this.createUploadAdapter)return h("filerepository-no-upload-adapter"),null;const t=new Tp(Promise.resolve(e),this.createUploadAdapter);return this.loaders.add(t),this._loadersMap.set(e,t),e instanceof Promise&&t.file.then(e=>{this._loadersMap.set(e,t)}).catch(()=>{}),t.on("change:uploaded",()=>{let e=0;for(const t of this.loaders)e+=t.uploaded;this.uploaded=e}),t.on("change:uploadTotal",()=>{let e=0;for(const t of this.loaders)t.uploadTotal&&(e+=t.uploadTotal);this.uploadTotal=e}),t}destroyLoader(e){const t=e instanceof Tp?e:this.getLoader(e);t._destroy(),this.loaders.remove(t),this._loadersMap.forEach((e,n)=>{e===t&&this._loadersMap.delete(n)})}_updatePendingAction(){const e=this.editor.plugins.get(Rl);if(this.loaders.length){if(!this._pendingAction){const t=this.editor.t,n=e=>`${t("Upload in progress")} ${parseInt(e)}%.`;this._pendingAction=e.add(n(this.uploadedPercent)),this._pendingAction.bind("message").to(this,"uploadedPercent",n)}}else e.remove(this._pendingAction),this._pendingAction=null}}rt(jp,Qe);class Tp{constructor(e,t){this.id=a(),this._filePromiseWrapper=this._createFilePromiseWrapper(e),this._adapter=t(this),this._reader=new Ep,this.set("status","idle"),this.set("uploaded",0),this.set("uploadTotal",null),this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",(e,t)=>t?e/t*100:0),this.set("uploadResponse",null)}get file(){return this._filePromiseWrapper?this._filePromiseWrapper.promise.then(e=>this._filePromiseWrapper?e:null):Promise.resolve(null)}get data(){return this._reader.data}read(){if("idle"!=this.status)throw new u("filerepository-read-wrong-status",this);return this.status="reading",this.file.then(e=>this._reader.read(e)).then(e=>{if("reading"!==this.status)throw this.status;return this.status="idle",e}).catch(e=>{if("aborted"===e)throw this.status="aborted","aborted";throw this.status="error",this._reader.error?this._reader.error:e})}upload(){if("idle"!=this.status)throw new u("filerepository-upload-wrong-status",this);return this.status="uploading",this.file.then(()=>this._adapter.upload()).then(e=>(this.uploadResponse=e,this.status="idle",e)).catch(e=>{if("aborted"===this.status)throw"aborted";throw this.status="error",e})}abort(){const e=this.status;this.status="aborted",this._filePromiseWrapper.isFulfilled?"reading"==e?this._reader.abort():"uploading"==e&&this._adapter.abort&&this._adapter.abort():(this._filePromiseWrapper.promise.catch(()=>{}),this._filePromiseWrapper.rejecter("aborted")),this._destroy()}_destroy(){this._filePromiseWrapper=void 0,this._reader=void 0,this._adapter=void 0,this.uploadResponse=void 0}_createFilePromiseWrapper(e){const t={};return t.promise=new Promise((n,i)=>{t.rejecter=i,t.isFulfilled=!1,e.then(e=>{t.isFulfilled=!0,n(e)}).catch(e=>{t.isFulfilled=!0,i(e)})}),t}}rt(Tp,Qe);class Dp extends Ll{constructor(e){super(e),this.buttonView=new fd(e),this._fileInputView=new Pp(e),this._fileInputView.bind("acceptedType").to(this),this._fileInputView.bind("allowMultipleFiles").to(this),this._fileInputView.delegate("done").to(this),this.setTemplate({tag:"span",attributes:{class:"ck-file-dialog-button"},children:[this.buttonView,this._fileInputView]}),this.buttonView.on("execute",()=>{this._fileInputView.open()})}focus(){this.buttonView.focus()}}class Pp extends Ll{constructor(e){super(e),this.set("acceptedType"),this.set("allowMultipleFiles",!1);const t=this.bindTemplate;this.setTemplate({tag:"input",attributes:{class:["ck-hidden"],type:"file",tabindex:"-1",accept:t.to("acceptedType"),multiple:t.to("allowMultipleFiles")},on:{change:t.to(()=>{this.element&&this.element.files&&this.element.files.length&&this.fire("done",this.element.files),this.element.value=""})}})}open(){this.element.click()}}class Rp{constructor(e,t){this.loader=e,this.options=t}upload(){return this.loader.file.then(e=>new Promise((t,n)=>{this._initRequest(),this._initListeners(t,n,e),this._sendRequest(e)}))}abort(){this.xhr&&this.xhr.abort()}_initRequest(){const e=this.xhr=new XMLHttpRequest;e.open("POST",this.options.uploadUrl,!0),e.responseType="json"}_initListeners(e,t,n){const i=this.xhr,o=this.loader,r=`Couldn't upload file: ${n.name}.`;i.addEventListener("error",()=>t(r)),i.addEventListener("abort",()=>t()),i.addEventListener("load",()=>{const n=i.response;if(!n||n.error)return t(n&&n.error&&n.error.message?n.error.message:r);const o=n.url?{default:n.url}:n.urls;e({...n,urls:o})}),i.upload&&i.upload.addEventListener("progress",e=>{e.lengthComputable&&(o.uploadTotal=e.total,o.uploaded=e.loaded)})}_sendRequest(e){const t=this.options.headers||{},n=this.options.withCredentials||!1;for(const e of Object.keys(t))this.xhr.setRequestHeader(e,t[e]);this.xhr.withCredentials=n;const i=new FormData;i.append("upload",e),this.xhr.send(i)}}function Op(e){const t=e.map(e=>e.replace("+","\\+"));return new RegExp(`^image\\/(${t.join("|")})$`)}function Fp(e){return new Promise((t,n)=>{const i=e.getAttribute("src");fetch(i).then(e=>e.blob()).then(e=>{const n=zp(e,i),o=n.replace("image/",""),r=new File([e],`image.${o}`,{type:n});t(r)}).catch(e=>e&&"TypeError"===e.name?function(e){return function(e){return new Promise((t,n)=>{const i=hr.document.createElement("img");i.addEventListener("load",()=>{const e=hr.document.createElement("canvas");e.width=i.width,e.height=i.height,e.getContext("2d").drawImage(i,0,0),e.toBlob(e=>e?t(e):n())}),i.addEventListener("error",()=>n()),i.src=e})}(e).then(t=>{const n=zp(t,e),i=n.replace("image/","");return new File([t],`image.${i}`,{type:n})})}(i).then(t).catch(n):n(e))})}function zp(e,t){return e.type?e.type:t.match(/data:(image\/\w+);base64/)?t.match(/data:(image\/\w+);base64/)[1].toLowerCase():"image/jpeg"}class Mp extends st{static get pluginName(){return"ImageUploadUI"}init(){const e=this.editor,t=e.t,n=n=>{const i=new Dp(n),o=e.commands.get("uploadImage"),r=e.config.get("image.upload.types"),s=Op(r);return i.set({acceptedType:r.map(e=>`image/${e}`).join(","),allowMultipleFiles:!0}),i.buttonView.set({label:t("Insert image"),icon:'',tooltip:!0}),i.buttonView.bind("isEnabled").to(o),i.on("done",(t,n)=>{const i=Array.from(n).filter(e=>s.test(e.type));i.length&&e.execute("uploadImage",{file:i})}),i};e.ui.componentFactory.add("uploadImage",n),e.ui.componentFactory.add("imageUpload",n)}}var $p=r(870);sr()($p.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),$p.Z.locals;var Np=r(899);sr()(Np.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Np.Z.locals;var Bp=r(825);sr()(Bp.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Bp.Z.locals;class Lp extends st{static get pluginName(){return"ImageUploadProgress"}constructor(e){super(e),this.placeholder="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="}init(){const e=this.editor;e.plugins.has("ImageBlockEditing")&&e.editing.downcastDispatcher.on("attribute:uploadStatus:imageBlock",(...e)=>this.uploadStatusChange(...e)),e.plugins.has("ImageInlineEditing")&&e.editing.downcastDispatcher.on("attribute:uploadStatus:imageInline",(...e)=>this.uploadStatusChange(...e))}uploadStatusChange(e,t,n){const i=this.editor,o=t.item,r=o.getAttribute("uploadId");if(!n.consumable.consume(t.item,e.name))return;const s=i.plugins.get("ImageUtils"),a=i.plugins.get(jp),c=r?t.attributeNewValue:null,l=this.placeholder,d=i.editing.mapper.toViewElement(o),u=n.writer;if("reading"==c)return Vp(d,u),void Up(s,l,d,u);if("uploading"==c){const e=a.loaders.get(r);return Vp(d,u),void(e?(Gp(d,u),function(e,t,n,i){const o=function(e){const t=e.createUIElement("div",{class:"ck-progress-bar"});return e.setCustomProperty("progressBar",!0,t),t}(t);t.insert(t.createPositionAt(e,"end"),o),n.on("change:uploadedPercent",(e,t,n)=>{i.change(e=>{e.setStyle("width",n+"%",o)})})}(d,u,e,i.editing.view),function(e,t,n,i){if(i.data){const o=e.findViewImgElement(t);n.setAttribute("src",i.data,o)}}(s,d,u,e)):Up(s,l,d,u))}"complete"==c&&a.loaders.get(r)&&function(e,t,n){const i=t.createUIElement("div",{class:"ck-image-upload-complete-icon"});t.insert(t.createPositionAt(e,"end"),i),setTimeout(()=>{n.change(e=>e.remove(e.createRangeOn(i)))},3e3)}(d,u,i.editing.view),function(e,t){qp(e,t,"progressBar")}(d,u),Gp(d,u),function(e,t){t.removeClass("ck-appear",e)}(d,u)}}function Vp(e,t){e.hasClass("ck-appear")||t.addClass("ck-appear",e)}function Up(e,t,n,i){n.hasClass("ck-image-upload-placeholder")||i.addClass("ck-image-upload-placeholder",n);const o=e.findViewImgElement(n);o.getAttribute("src")!==t&&i.setAttribute("src",t,o),Wp(n,"placeholder")||i.insert(i.createPositionAfter(o),function(e){const t=e.createUIElement("div",{class:"ck-upload-placeholder-loader"});return e.setCustomProperty("placeholder",!0,t),t}(i))}function Gp(e,t){e.hasClass("ck-image-upload-placeholder")&&t.removeClass("ck-image-upload-placeholder",e),qp(e,t,"placeholder")}function Wp(e,t){for(const n of e.getChildren())if(n.getCustomProperty(t))return n}function qp(e,t,n){const i=Wp(e,n);i&&t.remove(t.createRangeOn(i))}class Hp extends ct{refresh(){const e=this.editor,t=e.plugins.get("ImageUtils"),n=e.model.document.selection.getSelectedElement();this.isEnabled=t.isImageAllowed()||t.isImage(n)}execute(e){const t=Wn(e.file),n=this.editor.model.document.selection,i=this.editor.plugins.get("ImageUtils"),o=Object.fromEntries(n.getAttributes());t.forEach((e,t)=>{const r=n.getSelectedElement();if(t&&r&&i.isImage(r)){const t=this.editor.model.createPositionAfter(r);this._uploadImage(e,o,t)}else this._uploadImage(e,o)})}_uploadImage(e,t,n){const i=this.editor,o=i.plugins.get(jp).createLoader(e),r=i.plugins.get("ImageUtils");o&&r.insertImage({...t,uploadId:o.id},n)}}class Kp extends st{static get requires(){return[jp,hu,Am,Qg]}static get pluginName(){return"ImageUploadEditing"}constructor(e){super(e),e.config.define("image",{upload:{types:["jpeg","png","gif","bmp","webp","tiff"]}}),this._uploadImageElements=new Map}init(){const e=this.editor,t=e.model.document,n=e.conversion,i=e.plugins.get(jp),o=e.plugins.get("ImageUtils"),r=Op(e.config.get("image.upload.types")),s=new Hp(e);e.commands.add("uploadImage",s),e.commands.add("imageUpload",s),n.for("upcast").attributeToAttribute({view:{name:"img",key:"uploadId"},model:"uploadId"}),this.listenTo(e.editing.view.document,"clipboardInput",(t,n)=>{if(function(e){return Array.from(e.types).includes("text/html")&&""!==e.getData("text/html")}(n.dataTransfer))return;const i=Array.from(n.dataTransfer.files).filter(e=>!!e&&r.test(e.type));i.length&&(t.stop(),e.model.change(t=>{n.targetRanges&&t.setSelection(n.targetRanges.map(t=>e.editing.mapper.toModelRange(t))),e.model.enqueueChange(()=>{e.execute("uploadImage",{file:i})})}))}),this.listenTo(e.plugins.get("ClipboardPipeline"),"inputTransformation",(t,n)=>{const r=Array.from(e.editing.view.createRangeIn(n.content)).filter(e=>function(e,t){return!(!e.isInlineImageView(t)||!t.getAttribute("src"))&&(t.getAttribute("src").match(/^data:image\/\w+;base64,/g)||t.getAttribute("src").match(/^blob:/g))}(o,e.item)&&!e.item.getAttribute("uploadProcessed")).map(e=>({promise:Fp(e.item),imageElement:e.item}));if(!r.length)return;const s=new Ku(e.editing.view.document);for(const e of r){s.setAttribute("uploadProcessed",!0,e.imageElement);const t=i.createLoader(e.promise);t&&(s.setAttribute("src","",e.imageElement),s.setAttribute("uploadId",t.id,e.imageElement))}}),e.editing.view.document.on("dragover",(e,t)=>{t.preventDefault()}),t.on("change",()=>{const n=t.differ.getChanges({includeChangesInGraveyard:!0}).reverse(),o=new Set;for(const t of n)if("insert"==t.type&&"$text"!=t.name){const n=t.position.nodeAfter,r="$graveyard"==t.position.root.rootName;for(const t of Yp(e,n)){const e=t.getAttribute("uploadId");if(!e)continue;const n=i.loaders.get(e);n&&(r?o.has(e)||n.abort():(o.add(e),this._uploadImageElements.set(e,t),"idle"==n.status&&this._readAndUpload(n)))}}}),this.on("uploadComplete",(e,{imageElement:t,data:n})=>{const i=n.urls?n.urls:n;this.editor.model.change(e=>{e.setAttribute("src",i.default,t),this._parseAndSetSrcsetAttributeOnImage(i,t,e)})},{priority:"low"})}afterInit(){const e=this.editor.model.schema;this.editor.plugins.has("ImageBlockEditing")&&e.extend("imageBlock",{allowAttributes:["uploadId","uploadStatus"]}),this.editor.plugins.has("ImageInlineEditing")&&e.extend("imageInline",{allowAttributes:["uploadId","uploadStatus"]})}_readAndUpload(e){const t=this.editor,n=t.model,i=t.locale.t,o=t.plugins.get(jp),r=t.plugins.get(hu),s=t.plugins.get("ImageUtils"),a=this._uploadImageElements;return n.enqueueChange({isUndoable:!1},t=>{t.setAttribute("uploadStatus","reading",a.get(e.id))}),e.read().then(()=>{const i=e.upload(),o=a.get(e.id);if(fo.isSafari){const e=t.editing.mapper.toViewElement(o),n=s.findViewImgElement(e);t.editing.view.once("render",()=>{if(!n.parent)return;const e=t.editing.view.domConverter.mapViewToDom(n.parent);if(!e)return;const i=e.style.display;e.style.display="none",e._ckHack=e.offsetHeight,e.style.display=i})}return n.enqueueChange({isUndoable:!1},e=>{e.setAttribute("uploadStatus","uploading",o)}),i}).then(t=>{n.enqueueChange({isUndoable:!1},n=>{const i=a.get(e.id);n.setAttribute("uploadStatus","complete",i),this.fire("uploadComplete",{data:t,imageElement:i})}),c()}).catch(t=>{if("error"!==e.status&&"aborted"!==e.status)throw t;"error"==e.status&&t&&r.showWarning(t,{title:i("Upload failed"),namespace:"upload"}),n.enqueueChange({isUndoable:!1},t=>{t.remove(a.get(e.id))}),c()});function c(){n.enqueueChange({isUndoable:!1},t=>{const n=a.get(e.id);t.removeAttribute("uploadId",n),t.removeAttribute("uploadStatus",n),a.delete(e.id)}),o.destroyLoader(e)}}_parseAndSetSrcsetAttributeOnImage(e,t,n){let i=0;const o=Object.keys(e).filter(e=>{const t=parseInt(e,10);if(!isNaN(t))return i=Math.max(i,t),!0}).map(t=>`${e[t]} ${t}w`).join(", ");""!=o&&n.setAttribute("srcset",{data:o,width:i},t)}}function Yp(e,t){const n=e.plugins.get("ImageUtils");return Array.from(e.model.createRangeOn(t)).filter(e=>n.isImage(e.item)).map(e=>e.item)}const Zp="italic";class Jp extends st{static get pluginName(){return"ItalicEditing"}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:Zp}),e.model.schema.setAttributeProperties(Zp,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:Zp,view:"i",upcastAlso:["em",{styles:{"font-style":"italic"}}]}),e.commands.add(Zp,new hm(e,Zp)),e.keystrokes.set("CTRL+I",Zp)}}const Xp="italic";class Qp extends st{static get pluginName(){return"ItalicUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add(Xp,n=>{const i=e.commands.get(Xp),o=new fd(n);return o.set({label:t("Italic"),icon:'',keystroke:"CTRL+I",tooltip:!0,isToggleable:!0}),o.bind("isOn","isEnabled").to(i,"value","isEnabled"),this.listenTo(o,"execute",()=>{e.execute(Xp),e.editing.view.focus()}),o})}}class ef{constructor(){this._definitions=new Set}get length(){return this._definitions.size}add(e){Array.isArray(e)?e.forEach(e=>this._definitions.add(e)):this._definitions.add(e)}getDispatcher(){return e=>{e.on("attribute:linkHref",(e,t,n)=>{if(!n.consumable.test(t.item,"attribute:linkHref"))return;if(!t.item.is("selection")&&!n.schema.isInline(t.item))return;const i=n.writer,o=i.document.selection;for(const e of this._definitions){const r=i.createAttributeElement("a",e.attributes,{priority:5});e.classes&&i.addClass(e.classes,r);for(const t in e.styles)i.setStyle(t,e.styles[t],r);i.setCustomProperty("link",!0,r),e.callback(t.attributeNewValue)?t.item.is("selection")?i.wrap(o.getFirstRange(),r):i.wrap(n.mapper.toViewRange(t.range),r):i.unwrap(n.mapper.toViewRange(t.range),r)}},{priority:"high"})}}getDispatcherForLinkedImage(){return e=>{e.on("attribute:linkHref:imageBlock",(e,t,{writer:n,mapper:i})=>{const o=i.toViewElement(t.item),r=Array.from(o.getChildren()).find(e=>"a"===e.name);for(const e of this._definitions){const i=ni(e.attributes);if(e.callback(t.attributeNewValue)){for(const[e,t]of i)"class"===e?n.addClass(t,r):n.setAttribute(e,t,r);e.classes&&n.addClass(e.classes,r);for(const t in e.styles)n.setStyle(t,e.styles[t],r)}else{for(const[e,t]of i)"class"===e?n.removeClass(t,r):n.removeAttribute(e,r);e.classes&&n.removeClass(e.classes,r);for(const t in e.styles)n.removeStyle(t,r)}}})}}}var tf=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");const nf=function(e){return tf.test(e)};var of="\\ud800-\\udfff",rf="["+of+"]",sf="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",af="\\ud83c[\\udffb-\\udfff]",cf="[^"+of+"]",lf="(?:\\ud83c[\\udde6-\\uddff]){2}",df="[\\ud800-\\udbff][\\udc00-\\udfff]",uf="(?:"+sf+"|"+af+")?",hf="[\\ufe0e\\ufe0f]?",mf=hf+uf+"(?:\\u200d(?:"+[cf,lf,df].join("|")+")"+hf+uf+")*",gf="(?:"+[cf+sf+"?",sf,lf,df,rf].join("|")+")",pf=RegExp(af+"(?="+af+")|"+gf+mf,"g");const ff=function(e){return nf(e)?function(e){return e.match(pf)||[]}(e):function(e){return e.split("")}(e)},_f=function(e){return function(t){t=ki(t);var n=nf(t)?ff(t):void 0,i=n?n[0]:t.charAt(0),o=n?function(e,t,n){var i=e.length;return n=void 0===n?i:n,!t&&n>=i?e:Ci(e,t,n)}(n,1).join(""):t.slice(1);return i[e]()+o}}("toUpperCase"),bf=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g,kf=/^(?:(?:https?|ftps?|mailto):|[^a-z]|[a-z+.-]+(?:[^a-z+.:-]|$))/i,vf=/^[\S]+@((?![-_])(?:[-\w\u00a1-\uffff]{0,63}[^-_]\.))+(?:[a-z\u00a1-\uffff]{2,})$/i,Af=/^((\w+:(\/{2,})?)|(\W))/i,yf="Ctrl+K";function wf(e,{writer:t}){const n=t.createAttributeElement("a",{href:e},{priority:5});return t.setCustomProperty("link",!0,n),n}function Cf(e){return function(e){return e.replace(bf,"").match(kf)}(e=String(e))?e:"#"}function If(e,t){return!!e&&t.checkAttribute(e.name,"linkHref")}function xf(e,t){const n=function(e){return vf.test(e)}(e)?"mailto:":t,i=!!n&&!Af.test(e);return e&&i?n+e:e}function Sf(e){window.open(e,"_blank","noopener")}class Ef extends ct{constructor(e){super(e),this.manualDecorators=new Un,this.automaticDecorators=new ef}restoreManualDecoratorStates(){for(const e of this.manualDecorators)e.value=this._getDecoratorStateFromModel(e.id)}refresh(){const e=this.editor.model,t=e.document.selection,n=t.getSelectedElement()||Os(t.getSelectedBlocks());If(n,e.schema)?(this.value=n.getAttribute("linkHref"),this.isEnabled=e.schema.checkAttribute(n,"linkHref")):(this.value=t.getAttribute("linkHref"),this.isEnabled=e.schema.checkAttributeInSelection(t,"linkHref"));for(const e of this.manualDecorators)e.value=this._getDecoratorStateFromModel(e.id)}execute(e,t={}){const n=this.editor.model,i=n.document.selection,o=[],r=[];for(const e in t)t[e]?o.push(e):r.push(e);n.change(t=>{if(i.isCollapsed){const s=i.getFirstPosition();if(i.hasAttribute("linkHref")){const a=im(s,"linkHref",i.getAttribute("linkHref"),n);t.setAttribute("linkHref",e,a),o.forEach(e=>{t.setAttribute(e,!0,a)}),r.forEach(e=>{t.removeAttribute(e,a)}),t.setSelection(t.createPositionAfter(a.end.nodeBefore))}else if(""!==e){const r=ni(i.getAttributes());r.set("linkHref",e),o.forEach(e=>{r.set(e,!0)});const{end:a}=n.insertContent(t.createText(e,r),s);t.setSelection(a)}["linkHref",...o,...r].forEach(e=>{t.removeSelectionAttribute(e)})}else{const s=n.schema.getValidRanges(i.getRanges(),"linkHref"),a=[];for(const e of i.getSelectedBlocks())n.schema.checkAttribute(e,"linkHref")&&a.push(t.createRangeOn(e));const c=a.slice();for(const e of s)this._isRangeToUpdate(e,a)&&c.push(e);for(const n of c)t.setAttribute("linkHref",e,n),o.forEach(e=>{t.setAttribute(e,!0,n)}),r.forEach(e=>{t.removeAttribute(e,n)})}})}_getDecoratorStateFromModel(e){const t=this.editor.model,n=t.document.selection,i=n.getSelectedElement();return If(i,t.schema)?i.getAttribute(e):n.getAttribute(e)}_isRangeToUpdate(e,t){for(const n of t)if(n.containsRange(e))return!1;return!0}}class jf extends ct{refresh(){const e=this.editor.model,t=e.document.selection,n=t.getSelectedElement();If(n,e.schema)?this.isEnabled=e.schema.checkAttribute(n,"linkHref"):this.isEnabled=e.schema.checkAttributeInSelection(t,"linkHref")}execute(){const e=this.editor,t=this.editor.model,n=t.document.selection,i=e.commands.get("link");t.change(e=>{const o=n.isCollapsed?[im(n.getFirstPosition(),"linkHref",n.getAttribute("linkHref"),t)]:t.schema.getValidRanges(n.getRanges(),"linkHref");for(const t of o)if(e.removeAttribute("linkHref",t),i)for(const n of i.manualDecorators)e.removeAttribute(n.id,t)})}}class Tf{constructor({id:e,label:t,attributes:n,classes:i,styles:o,defaultValue:r}){this.id=e,this.set("value"),this.defaultValue=r,this.label=t,this.attributes=n,this.classes=i,this.styles=o}_createPattern(){return{attributes:this.attributes,classes:this.classes,styles:this.styles}}}rt(Tf,Qe);var Df=r(399);sr()(Df.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Df.Z.locals;const Pf="automatic",Rf=/^(https?:)?\/\//;class Of extends st{static get pluginName(){return"LinkEditing"}static get requires(){return[Jh,Gh,Am]}constructor(e){super(e),e.config.define("link",{addTargetToExternalLinks:!1})}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:"linkHref"}),e.conversion.for("dataDowncast").attributeToElement({model:"linkHref",view:wf}),e.conversion.for("editingDowncast").attributeToElement({model:"linkHref",view:(e,t)=>wf(Cf(e),t)}),e.conversion.for("upcast").elementToAttribute({view:{name:"a",attributes:{href:!0}},model:{key:"linkHref",value:e=>e.getAttribute("href")}}),e.commands.add("link",new Ef(e)),e.commands.add("unlink",new jf(e));const t=function(e,t){const n={"Open in a new tab":e("Open in a new tab"),Downloadable:e("Downloadable")};return t.forEach(e=>(e.label&&n[e.label]&&(e.label=n[e.label]),e)),t}(e.t,function(e){const t=[];if(e)for(const[n,i]of Object.entries(e)){const e=Object.assign({},i,{id:`link${_f(n)}`});t.push(e)}return t}(e.config.get("link.decorators")));this._enableAutomaticDecorators(t.filter(e=>e.mode===Pf)),this._enableManualDecorators(t.filter(e=>"manual"===e.mode)),e.plugins.get(Jh).registerAttribute("linkHref"),function(e,t,n,i){const o=e.editing.view,r=new Set;o.document.registerPostFixer(n=>{const o=e.model.document.selection;let s=!1;if(o.hasAttribute(t)){const a=im(o.getFirstPosition(),t,o.getAttribute(t),e.model),c=e.editing.mapper.toViewRange(a);for(const e of c.getItems())e.is("element","a")&&!e.hasClass(i)&&(n.addClass(i,e),r.add(e),s=!0)}return s}),e.conversion.for("editingDowncast").add(e=>{function t(){o.change(e=>{for(const t of r.values())e.removeClass(i,t),r.delete(t)})}e.on("insert",t,{priority:"highest"}),e.on("remove",t,{priority:"highest"}),e.on("attribute",t,{priority:"highest"}),e.on("selection",t,{priority:"highest"})})}(e,"linkHref",0,"ck-link_selected"),this._enableLinkOpen(),this._enableInsertContentSelectionAttributesFixer(),this._enableClickingAfterLink(),this._enableTypingOverLink(),this._handleDeleteContentAfterLink()}_enableAutomaticDecorators(e){const t=this.editor,n=t.commands.get("link").automaticDecorators;t.config.get("link.addTargetToExternalLinks")&&n.add({id:"linkIsExternal",mode:Pf,callback:e=>Rf.test(e),attributes:{target:"_blank",rel:"noopener noreferrer"}}),n.add(e),n.length&&t.conversion.for("downcast").add(n.getDispatcher())}_enableManualDecorators(e){if(!e.length)return;const t=this.editor,n=t.commands.get("link").manualDecorators;e.forEach(e=>{t.model.schema.extend("$text",{allowAttributes:e.id}),e=new Tf(e),n.add(e),t.conversion.for("downcast").attributeToElement({model:e.id,view:(t,{writer:n,schema:i},{item:o})=>{if(i.isInline(o)&&t){const t=n.createAttributeElement("a",e.attributes,{priority:5});e.classes&&n.addClass(e.classes,t);for(const i in e.styles)n.setStyle(i,e.styles[i],t);return n.setCustomProperty("link",!0,t),t}}}),t.conversion.for("upcast").elementToAttribute({view:{name:"a",...e._createPattern()},model:{key:e.id}})})}_enableLinkOpen(){const e=this.editor,t=e.editing.view.document,n=e.model.document;this.listenTo(t,"click",(e,t)=>{if(!(fo.isMac?t.domEvent.metaKey:t.domEvent.ctrlKey))return;let n=t.domTarget;if("a"!=n.tagName.toLowerCase()&&(n=n.closest("a")),!n)return;const i=n.getAttribute("href");i&&(e.stop(),t.preventDefault(),Sf(i))},{context:"$capture"}),this.listenTo(t,"enter",(e,t)=>{const i=n.selection,o=i.getSelectedElement(),r=o?o.getAttribute("linkHref"):i.getAttribute("linkHref");r&&t.domEvent.altKey&&(e.stop(),Sf(r))},{context:"a"})}_enableInsertContentSelectionAttributesFixer(){const e=this.editor.model,t=e.document.selection;this.listenTo(e,"insertContent",()=>{const n=t.anchor.nodeBefore,i=t.anchor.nodeAfter;t.hasAttribute("linkHref")&&n&&n.hasAttribute("linkHref")&&(i&&i.hasAttribute("linkHref")||e.change(t=>{Ff(t,Mf(e.schema))}))},{priority:"low"})}_enableClickingAfterLink(){const e=this.editor,t=e.model;e.editing.view.addObserver(Hu);let n=!1;this.listenTo(e.editing.view.document,"mousedown",()=>{n=!0}),this.listenTo(e.editing.view.document,"selectionChange",()=>{if(!n)return;n=!1;const e=t.document.selection;if(!e.isCollapsed)return;if(!e.hasAttribute("linkHref"))return;const i=e.getFirstPosition(),o=im(i,"linkHref",e.getAttribute("linkHref"),t);(i.isTouching(o.start)||i.isTouching(o.end))&&t.change(e=>{Ff(e,Mf(t.schema))})})}_enableTypingOverLink(){const e=this.editor,t=e.editing.view;let n,i;this.listenTo(t.document,"delete",()=>{i=!0},{priority:"high"}),this.listenTo(e.model,"deleteContent",()=>{const t=e.model.document.selection;t.isCollapsed||(i?i=!1:zf(e)&&function(e){const t=e.document.selection,n=t.getFirstPosition(),i=t.getLastPosition(),o=n.nodeAfter;if(!o)return!1;if(!o.is("$text"))return!1;if(!o.hasAttribute("linkHref"))return!1;if(o===(i.textNode||i.nodeBefore))return!0;return im(n,"linkHref",o.getAttribute("linkHref"),e).containsRange(e.createRange(n,i),!0)}(e.model)&&(n=t.getAttributes()))},{priority:"high"}),this.listenTo(e.model,"insertContent",(t,[o])=>{i=!1,zf(e)&&n&&(e.model.change(e=>{for(const[t,i]of n)e.setAttribute(t,i,o)}),n=null)},{priority:"high"})}_handleDeleteContentAfterLink(){const e=this.editor,t=e.model,n=t.document.selection,i=e.editing.view;let o=!1,r=!1;this.listenTo(i.document,"delete",(e,t)=>{r=t.domEvent.keyCode===vo.backspace},{priority:"high"}),this.listenTo(t,"deleteContent",()=>{o=!1;const e=n.getFirstPosition(),i=n.getAttribute("linkHref");if(!i)return;const r=im(e,"linkHref",i,t);o=r.containsPosition(e)||r.end.isEqual(e)},{priority:"high"}),this.listenTo(t,"deleteContent",()=>{r&&(r=!1,o||e.model.enqueueChange(e=>{Ff(e,Mf(t.schema))}))},{priority:"low"})}}function Ff(e,t){e.removeSelectionAttribute("linkHref");for(const n of t)e.removeSelectionAttribute(n)}function zf(e){return e.model.change(e=>e.batch).isTyping}function Mf(e){return e.getDefinition("$text").allowAttributes.filter(e=>e.startsWith("link"))}var $f=r(827);sr()($f.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),$f.Z.locals;class Nf extends Ll{constructor(e,t){super(e);const n=e.t;this.focusTracker=new Fs,this.keystrokes=new zs,this.urlInputView=this._createUrlInput(),this.saveButtonView=this._createButton(n("Save"),Fl,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(n("Cancel"),Ol,"ck-button-cancel","cancel"),this._manualDecoratorSwitches=this._createManualDecoratorSwitches(t),this.children=this._createFormChildren(t.manualDecorators),this._focusables=new Nl,this._focusCycler=new yd({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}});const i=["ck","ck-link-form","ck-responsive-form"];t.manualDecorators.length&&i.push("ck-link-form_layout-vertical","ck-vertical-form"),this.setTemplate({tag:"form",attributes:{class:i,tabindex:"-1"},children:this.children}),Ml(this)}getDecoratorSwitchesState(){return Array.from(this._manualDecoratorSwitches).reduce((e,t)=>(e[t.name]=t.isOn,e),{})}render(){super.render(),$l({view:this}),[this.urlInputView,...this._manualDecoratorSwitches,this.saveButtonView,this.cancelButtonView].forEach(e=>{this._focusables.add(e),this.focusTracker.add(e.element)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createUrlInput(){const e=this.locale.t,t=new du(this.locale,uu);return t.label=e("Link URL"),t}_createButton(e,t,n,i){const o=new fd(this.locale);return o.set({label:e,icon:t,tooltip:!0}),o.extendTemplate({attributes:{class:n}}),i&&o.delegate("execute").to(this,i),o}_createManualDecoratorSwitches(e){const t=this.createCollection();for(const n of e.manualDecorators){const i=new bd(this.locale);i.set({name:n.id,label:n.label,withText:!0}),i.bind("isOn").toMany([n,e],"value",(e,t)=>void 0===t&&void 0===e?n.defaultValue:e),i.on("execute",()=>{n.set("value",!i.isOn)}),t.add(i)}return t}_createFormChildren(e){const t=this.createCollection();if(t.add(this.urlInputView),e.length){const e=new Ll;e.setTemplate({tag:"ul",children:this._manualDecoratorSwitches.map(e=>({tag:"li",children:[e],attributes:{class:["ck","ck-list__item"]}})),attributes:{class:["ck","ck-reset","ck-list"]}}),t.add(e)}return t.add(this.saveButtonView),t.add(this.cancelButtonView),t}}var Bf=r(465);sr()(Bf.Z,{injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0}),Bf.Z.locals;class Lf extends Ll{constructor(e){super(e);const t=e.t;this.focusTracker=new Fs,this.keystrokes=new zs,this.previewButtonView=this._createPreviewButton(),this.unlinkButtonView=this._createButton(t("Unlink"),'',"unlink"),this.editButtonView=this._createButton(t("Edit link"),'',"edit"),this.set("href"),this._focusables=new Nl,this._focusCycler=new yd({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-link-actions","ck-responsive-form"],tabindex:"-1"},children:[this.previewButtonView,this.editButtonView,this.unlinkButtonView]})}render(){super.render(),[this.previewButtonView,this.editButtonView,this.unlinkButtonView].forEach(e=>{this._focusables.add(e),this.focusTracker.add(e.element)}),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createButton(e,t,n){const i=new fd(this.locale);return i.set({label:e,icon:t,tooltip:!0}),i.delegate("execute").to(this,n),i}_createPreviewButton(){const e=new fd(this.locale),t=this.bindTemplate,n=this.t;return e.set({withText:!0,tooltip:n("Open link in new tab")}),e.extendTemplate({attributes:{class:["ck","ck-link-actions__preview"],href:t.to("href",e=>e&&Cf(e)),target:"_blank",rel:"noopener noreferrer"}}),e.bind("label").to(this,"href",e=>e||n("This link has no URL")),e.bind("isEnabled").to(this,"href",e=>!!e),e.template.tag="a",e.template.eventListeners={},e}}const Vf="link-ui";class Uf extends st{static get requires(){return[wu]}static get pluginName(){return"LinkUI"}init(){const e=this.editor;e.editing.view.addObserver(qu),this.actionsView=this._createActionsView(),this.formView=this._createFormView(),this._balloon=e.plugins.get(wu),this._createToolbarLinkButton(),this._enableUserBalloonInteractions(),e.conversion.for("editingDowncast").markerToHighlight({model:Vf,view:{classes:["ck-fake-link-selection"]}}),e.conversion.for("editingDowncast").markerToElement({model:Vf,view:{name:"span",classes:["ck-fake-link-selection","ck-fake-link-selection_collapsed"]}})}destroy(){super.destroy(),this.formView.destroy()}_createActionsView(){const e=this.editor,t=new Lf(e.locale),n=e.commands.get("link"),i=e.commands.get("unlink");return t.bind("href").to(n,"value"),t.editButtonView.bind("isEnabled").to(n),t.unlinkButtonView.bind("isEnabled").to(i),this.listenTo(t,"edit",()=>{this._addFormView()}),this.listenTo(t,"unlink",()=>{e.execute("unlink"),this._hideUI()}),t.keystrokes.set("Esc",(e,t)=>{this._hideUI(),t()}),t.keystrokes.set(yf,(e,t)=>{this._addFormView(),t()}),t}_createFormView(){const e=this.editor,t=e.commands.get("link"),n=e.config.get("link.defaultProtocol"),i=new Nf(e.locale,t);return i.urlInputView.fieldView.bind("value").to(t,"value"),i.urlInputView.bind("isReadOnly").to(t,"isEnabled",e=>!e),i.saveButtonView.bind("isEnabled").to(t),this.listenTo(i,"submit",()=>{const{value:t}=i.urlInputView.fieldView.element,o=xf(t,n);e.execute("link",o,i.getDecoratorSwitchesState()),this._closeFormView()}),this.listenTo(i,"cancel",()=>{this._closeFormView()}),i.keystrokes.set("Esc",(e,t)=>{this._closeFormView(),t()}),i}_createToolbarLinkButton(){const e=this.editor,t=e.commands.get("link"),n=e.t;e.keystrokes.set(yf,(e,n)=>{n(),t.isEnabled&&this._showUI(!0)}),e.ui.componentFactory.add("link",e=>{const i=new fd(e);return i.isEnabled=!0,i.label=n("Link"),i.icon='',i.keystroke=yf,i.tooltip=!0,i.isToggleable=!0,i.bind("isEnabled").to(t,"isEnabled"),i.bind("isOn").to(t,"value",e=>!!e),this.listenTo(i,"execute",()=>this._showUI(!0)),i})}_enableUserBalloonInteractions(){const e=this.editor.editing.view.document;this.listenTo(e,"click",()=>{this._getSelectedLinkElement()&&this._showUI()}),this.editor.keystrokes.set("Tab",(e,t)=>{this._areActionsVisible&&!this.actionsView.focusTracker.isFocused&&(this.actionsView.focus(),t())},{priority:"high"}),this.editor.keystrokes.set("Esc",(e,t)=>{this._isUIVisible&&(this._hideUI(),t())}),zl({emitter:this.formView,activator:()=>this._isUIInPanel,contextElements:[this._balloon.view.element],callback:()=>this._hideUI()})}_addActionsView(){this._areActionsInPanel||this._balloon.add({view:this.actionsView,position:this._getBalloonPositionData()})}_addFormView(){if(this._isFormInPanel)return;const e=this.editor.commands.get("link");this.formView.disableCssTransitions(),this._balloon.add({view:this.formView,position:this._getBalloonPositionData()}),this._balloon.visibleView===this.formView&&this.formView.urlInputView.fieldView.select(),this.formView.enableCssTransitions(),this.formView.urlInputView.fieldView.element.value=e.value||""}_closeFormView(){const e=this.editor.commands.get("link");e.restoreManualDecoratorStates(),void 0!==e.value?this._removeFormView():this._hideUI()}_removeFormView(){this._isFormInPanel&&(this.formView.saveButtonView.focus(),this._balloon.remove(this.formView),this.editor.editing.view.focus(),this._hideFakeVisualSelection())}_showUI(e=!1){this._getSelectedLinkElement()?(this._areActionsVisible?this._addFormView():this._addActionsView(),e&&this._balloon.showStack("main")):(this._showFakeVisualSelection(),this._addActionsView(),e&&this._balloon.showStack("main"),this._addFormView()),this._startUpdatingUI()}_hideUI(){if(!this._isUIInPanel)return;const e=this.editor;this.stopListening(e.ui,"update"),this.stopListening(this._balloon,"change:visibleView"),e.editing.view.focus(),this._removeFormView(),this._balloon.remove(this.actionsView),this._hideFakeVisualSelection()}_startUpdatingUI(){const e=this.editor,t=e.editing.view.document;let n=this._getSelectedLinkElement(),i=r();const o=()=>{const e=this._getSelectedLinkElement(),t=r();n&&!e||!n&&t!==i?this._hideUI():this._isUIVisible&&this._balloon.updatePosition(this._getBalloonPositionData()),n=e,i=t};function r(){return t.selection.focus.getAncestors().reverse().find(e=>e.is("element"))}this.listenTo(e.ui,"update",o),this.listenTo(this._balloon,"change:visibleView",o)}get _isFormInPanel(){return this._balloon.hasView(this.formView)}get _areActionsInPanel(){return this._balloon.hasView(this.actionsView)}get _areActionsVisible(){return this._balloon.visibleView===this.actionsView}get _isUIInPanel(){return this._isFormInPanel||this._areActionsInPanel}get _isUIVisible(){return this._balloon.visibleView==this.formView||this._areActionsVisible}_getBalloonPositionData(){const e=this.editor.editing.view,t=this.editor.model,n=e.document;let i=null;if(t.markers.has(Vf)){const t=Array.from(this.editor.editing.mapper.markerNameToElements(Vf)),n=e.createRange(e.createPositionBefore(t[0]),e.createPositionAfter(t[t.length-1]));i=e.domConverter.viewRangeToDom(n)}else i=()=>{const t=this._getSelectedLinkElement();return t?e.domConverter.mapViewToDom(t):e.domConverter.viewRangeToDom(n.selection.getFirstRange())};return{target:i}}_getSelectedLinkElement(){const e=this.editor.editing.view,t=e.document.selection,n=t.getSelectedElement();if(t.isCollapsed||n&&Sm(n))return Gf(t.getFirstPosition());{const n=t.getFirstRange().getTrimmed(),i=Gf(n.start),o=Gf(n.end);return i&&i==o&&e.createRangeIn(i).getTrimmed().isEqual(n)?i:null}}_showFakeVisualSelection(){const e=this.editor.model;e.change(t=>{const n=e.document.selection.getFirstRange();if(e.markers.has(Vf))t.updateMarker(Vf,{range:n});else if(n.start.isAtEnd){const i=n.start.getLastMatchingPosition(({item:t})=>!e.schema.isContent(t),{boundaries:n});t.addMarker(Vf,{usingOperation:!1,affectsData:!1,range:t.createRange(i,n.end)})}else t.addMarker(Vf,{usingOperation:!1,affectsData:!1,range:n})})}_hideFakeVisualSelection(){const e=this.editor.model;e.markers.has(Vf)&&e.change(e=>{e.removeMarker(Vf)})}}function Gf(e){return e.getAncestors().find(e=>function(e){return e.is("attributeElement")&&!!e.getCustomProperty("link")}(e))}const Wf=new RegExp("(^|\\s)(((?:(?:(?:https?|ftp):)?\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(((?!www\\.)|(www\\.))(?![-_])(?:[-_a-z0-9\\u00a1-\\uffff]{1,63}\\.)+(?:[a-z\\u00a1-\\uffff]{2,63})))(?::\\d{2,5})?(?:[/?#]\\S*)?)|((www.|(\\S+@))((?![-_])(?:[-_a-z0-9\\u00a1-\\uffff]{1,63}\\.))+(?:[a-z\\u00a1-\\uffff]{2,63})))$","i");class qf extends st{static get requires(){return[Hh]}static get pluginName(){return"AutoLink"}init(){const e=this.editor.model.document.selection;e.on("change:range",()=>{this.isEnabled=!e.anchor.parent.is("element","codeBlock")}),this._enableTypingHandling()}afterInit(){this._enableEnterHandling(),this._enableShiftEnterHandling()}_enableTypingHandling(){const e=this.editor,t=new Zh(e.model,e=>{if(!function(e){return e.length>4&&" "===e[e.length-1]&&" "!==e[e.length-2]}(e))return;const t=Hf(e.substr(0,e.length-1));return t?{url:t}:void 0});t.on("matched:data",(t,n)=>{const{batch:i,range:o,url:r}=n;if(!i.isTyping)return;const s=o.end.getShiftedBy(-1),a=s.getShiftedBy(-r.length),c=e.model.createRange(a,s);this._applyAutoLink(r,c)}),t.bind("isEnabled").to(this)}_enableEnterHandling(){const e=this.editor,t=e.model,n=e.commands.get("enter");n&&n.on("execute",()=>{const e=t.document.selection.getFirstPosition();if(!e.parent.previousSibling)return;const n=t.createRangeIn(e.parent.previousSibling);this._checkAndApplyAutoLinkOnRange(n)})}_enableShiftEnterHandling(){const e=this.editor,t=e.model,n=e.commands.get("shiftEnter");n&&n.on("execute",()=>{const e=t.document.selection.getFirstPosition(),n=t.createRange(t.createPositionAt(e.parent,0),e.getShiftedBy(-1));this._checkAndApplyAutoLinkOnRange(n)})}_checkAndApplyAutoLinkOnRange(e){const t=this.editor.model,{text:n,range:i}=Yh(e,t),o=Hf(n);if(o){const e=t.createRange(i.end.getShiftedBy(-o.length),i.end);this._applyAutoLink(o,e)}}_applyAutoLink(e,t){const n=this.editor.model,i=this.editor.plugins.get("Delete");this.isEnabled&&function(e,t){return t.schema.checkAttributeInSelection(t.createSelection(e),"linkHref")}(t,n)&&n.enqueueChange(o=>{const r=this.editor.config.get("link.defaultProtocol"),s=xf(e,r);o.setAttribute("linkHref",s,t),n.enqueueChange(()=>{i.requestUndoOnBackspace()})})}}function Hf(e){const t=Wf.exec(e);return t?t[2]:null}class Kf extends ct{constructor(e,t){super(e),this.type=t}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(e={}){const t=this.editor.model,n=t.document,i=Array.from(n.selection.getSelectedBlocks()).filter(e=>Zf(e,t.schema)),o=void 0!==e.forceValue?!e.forceValue:this.value;t.change(e=>{if(o){let t=i[i.length-1].nextSibling,n=Number.POSITIVE_INFINITY,o=[];for(;t&&"listItem"==t.name&&0!==t.getAttribute("listIndent");){const e=t.getAttribute("listIndent");e=n;)r>o.getAttribute("listIndent")&&(r=o.getAttribute("listIndent")),o.getAttribute("listIndent")==r&&e[t?"unshift":"push"](o),o=o[t?"previousSibling":"nextSibling"]}}function Zf(e,t){return t.checkChild(e.parent,"listItem")&&!t.isObject(e)}class Jf extends ct{constructor(e,t){super(e),this._indentBy="forward"==t?1:-1}refresh(){this.isEnabled=this._checkEnabled()}execute(){const e=this.editor.model,t=e.document;let n=Array.from(t.selection.getSelectedBlocks());e.change(e=>{const t=n[n.length-1];let i=t.nextSibling;for(;i&&"listItem"==i.name&&i.getAttribute("listIndent")>t.getAttribute("listIndent");)n.push(i),i=i.nextSibling;this._indentBy<0&&(n=n.reverse());for(const t of n){const n=t.getAttribute("listIndent")+this._indentBy;n<0?e.rename(t,"paragraph"):e.setAttribute("listIndent",n,t)}this.fire("_executeCleanup",n)})}_checkEnabled(){const e=Os(this.editor.model.document.selection.getSelectedBlocks());if(!e||!e.is("element","listItem"))return!1;if(this._indentBy>0){const t=e.getAttribute("listIndent"),n=e.getAttribute("listType");let i=e.previousSibling;for(;i&&i.is("element","listItem")&&i.getAttribute("listIndent")>=t;){if(i.getAttribute("listIndent")==t)return i.getAttribute("listType")==n;i=i.previousSibling}return!1}return!0}}function Xf(e,t,n,i){const o=t.parent,r=n.mapper,s=n.writer;let a=r.toViewPosition(i.createPositionBefore(e));const c=t_(e.previousSibling,{sameIndent:!0,smallerIndent:!0,listIndent:e.getAttribute("listIndent")}),l=e.previousSibling;if(c&&c.getAttribute("listIndent")==e.getAttribute("listIndent")){const e=r.toViewElement(c);a=s.breakContainer(s.createPositionAfter(e))}else if(l&&"listItem"==l.name){a=r.toViewPosition(i.createPositionAt(l,"end"));const e=r.findMappedViewAncestor(a),t=function(e){for(const t of e.getChildren())if("ul"==t.name||"ol"==t.name)return t;return null}(e);a=t?s.createPositionBefore(t):s.createPositionAt(e,"end")}else a=r.toViewPosition(i.createPositionBefore(e));if(a=e_(a),s.insert(a,o),l&&"listItem"==l.name){const e=r.toViewElement(l),n=s.createRange(s.createPositionAt(e,0),a).getWalker({ignoreElementEnd:!0});for(const e of n)if(e.item.is("element","li")){const i=s.breakContainer(s.createPositionBefore(e.item)),o=e.item.parent,r=s.createPositionAt(t,"end");Qf(s,r.nodeBefore,r.nodeAfter),s.move(s.createRangeOn(o),r),n.position=i}}else{const n=o.nextSibling;if(n&&(n.is("element","ul")||n.is("element","ol"))){let i=null;for(const t of n.getChildren()){const n=r.toModelElement(t);if(!(n&&n.getAttribute("listIndent")>e.getAttribute("listIndent")))break;i=t}i&&(s.breakContainer(s.createPositionAfter(i)),s.move(s.createRangeOn(i.parent),s.createPositionAt(t,"end")))}}Qf(s,o,o.nextSibling),Qf(s,o.previousSibling,o)}function Qf(e,t,n){return!t||!n||"ul"!=t.name&&"ol"!=t.name||t.name!=n.name||t.getAttribute("class")!==n.getAttribute("class")?null:e.mergeContainers(e.createPositionAfter(t))}function e_(e){return e.getLastMatchingPosition(e=>e.item.is("uiElement"))}function t_(e,t){const n=!!t.sameIndent,i=!!t.smallerIndent,o=t.listIndent;let r=e;for(;r&&"listItem"==r.name;){const e=r.getAttribute("listIndent");if(n&&o==e||i&&o>e)return r;r="forward"===t.direction?r.nextSibling:r.previousSibling}return null}function n_(e,t,n,i){e.ui.componentFactory.add(t,o=>{const r=e.commands.get(t),s=new fd(o);return s.set({label:n,icon:i,tooltip:!0,isToggleable:!0}),s.bind("isOn","isEnabled").to(r,"value","isEnabled"),s.on("execute",()=>{e.execute(t),e.editing.view.focus()}),s})}function i_(){const e=!this.isEmpty&&("ul"==this.getChild(0).name||"ol"==this.getChild(0).name);return this.isEmpty||e?0:Vi.call(this)}function o_(e){return(t,n,i)=>{const o=i.consumable;if(!o.test(n.item,"insert")||!o.test(n.item,"attribute:listType")||!o.test(n.item,"attribute:listIndent"))return;o.consume(n.item,"insert"),o.consume(n.item,"attribute:listType"),o.consume(n.item,"attribute:listIndent");const r=n.item;Xf(r,function(e,t){const n=t.mapper,i=t.writer,o="numbered"==e.getAttribute("listType")?"ol":"ul",r=function(e){const t=e.createContainerElement("li");return t.getFillerOffset=i_,t}(i),s=i.createContainerElement(o,null);return i.insert(i.createPositionAt(s,0),r),n.bindElements(e,r),r}(r,i),i,e)}}function r_(e,t,n){if(!n.consumable.test(t.item,e.name))return;const i=n.mapper.toViewElement(t.item),o=n.writer;o.breakContainer(o.createPositionBefore(i)),o.breakContainer(o.createPositionAfter(i));const r=i.parent,s="numbered"==t.attributeNewValue?"ol":"ul";o.rename(s,r)}function s_(e,t,n){n.consumable.consume(t.item,e.name);const i=n.mapper.toViewElement(t.item).parent,o=n.writer;Qf(o,i,i.nextSibling),Qf(o,i.previousSibling,i)}function a_(e,t,n){if(n.consumable.test(t.item,e.name)&&"listItem"!=t.item.name){let e=n.mapper.toViewPosition(t.range.start);const i=n.writer,o=[];for(;("ul"==e.parent.name||"ol"==e.parent.name)&&(e=i.breakContainer(e),"li"==e.parent.name);){const t=e,n=i.createPositionAt(e.parent,"end");if(!t.isEqual(n)){const e=i.remove(i.createRange(t,n));o.push(e)}e=i.createPositionAfter(e.parent)}if(o.length>0){for(let t=0;t0){const t=Qf(i,n,n.nextSibling);t&&t.parent==n&&e.offset--}}Qf(i,e.nodeBefore,e.nodeAfter)}}}function c_(e,t,n){const i=n.mapper.toViewPosition(t.position),o=i.nodeBefore,r=i.nodeAfter;Qf(n.writer,o,r)}function l_(e,t,n){if(n.consumable.consume(t.viewItem,{name:!0})){const e=n.writer,i=e.createElement("listItem"),o=function(e){let t=0,n=e.parent;for(;n;){if(n.is("element","li"))t++;else{const e=n.previousSibling;e&&e.is("element","li")&&t++}n=n.parent}return t}(t.viewItem);e.setAttribute("listIndent",o,i);const r=t.viewItem.parent&&"ol"==t.viewItem.parent.name?"numbered":"bulleted";if(e.setAttribute("listType",r,i),!n.safeInsert(i,t.modelCursor))return;const s=function(e,t,n){const{writer:i,schema:o}=n;let r=i.createPositionAfter(e);for(const s of t)if("ul"==s.name||"ol"==s.name)r=n.convertItem(s,r).modelCursor;else{const t=n.convertItem(s,i.createPositionAt(e,"end")),a=t.modelRange.start.nodeAfter;a&&a.is("element")&&!o.checkChild(e,a.name)&&(e=t.modelCursor.parent.is("element","listItem")?t.modelCursor.parent:g_(t.modelCursor),r=i.createPositionAfter(e))}return r}(i,t.viewItem.getChildren(),n);t.modelRange=e.createRange(t.modelCursor,s),n.updateConversionResult(i,t)}}function d_(e,t,n){if(n.consumable.test(t.viewItem,{name:!0})){const e=Array.from(t.viewItem.getChildren());for(const t of e)!t.is("element","li")&&!f_(t)&&t._remove()}}function u_(e,t,n){if(n.consumable.test(t.viewItem,{name:!0})){if(0===t.viewItem.childCount)return;const e=[...t.viewItem.getChildren()];let n=!1;for(const t of e)n&&!f_(t)&&t._remove(),f_(t)&&(n=!0)}}function h_(e){return(t,n)=>{if(n.isPhantom)return;const i=n.modelPosition.nodeBefore;if(i&&i.is("element","listItem")){const t=n.mapper.toViewElement(i),o=t.getAncestors().find(f_),r=e.createPositionAt(t,0).getWalker();for(const e of r){if("elementStart"==e.type&&e.item.is("element","li")){n.viewPosition=e.previousPosition;break}if("elementEnd"==e.type&&e.item==o){n.viewPosition=e.nextPosition;break}}}}}function m_(e,[t,n]){let i,o=t.is("documentFragment")?t.getChild(0):t;if(i=n?this.createSelection(n):this.document.selection,o&&o.is("element","listItem")){const e=i.getFirstPosition();let t=null;if(e.parent.is("element","listItem")?t=e.parent:e.nodeBefore&&e.nodeBefore.is("element","listItem")&&(t=e.nodeBefore),t){const e=t.getAttribute("listIndent");if(e>0)for(;o&&o.is("element","listItem");)o._setAttribute("listIndent",o.getAttribute("listIndent")+e),o=o.nextSibling}}}function g_(e){const t=new Ws({startPosition:e});let n;do{n=t.next()}while(!n.value.item.is("element","listItem"));return n.value.item}function p_(e,t,n,i,o,r){const s=t_(t.nodeBefore,{sameIndent:!0,smallerIndent:!0,listIndent:e,foo:"b"}),a=o.mapper,c=o.writer,l=s?s.getAttribute("listIndent"):null;let d;if(s)if(l==e){const e=a.toViewElement(s).parent;d=c.createPositionAfter(e)}else{const e=r.createPositionAt(s,"end");d=a.toViewPosition(e)}else d=n;d=e_(d);for(const e of[...i.getChildren()])f_(e)&&(d=c.move(c.createRangeOn(e),d).end,Qf(c,e,e.nextSibling),Qf(c,e.previousSibling,e))}function f_(e){return e.is("element","ol")||e.is("element","ul")}class __ extends st{static get pluginName(){return"ListEditing"}static get requires(){return[jh,Hh]}init(){const e=this.editor;e.model.schema.register("listItem",{inheritAllFrom:"$block",allowAttributes:["listType","listIndent"]});const t=e.data,n=e.editing;e.model.document.registerPostFixer(t=>function(e,t){const n=e.document.differ.getChanges(),i=new Map;let o=!1;for(const i of n)if("insert"==i.type&&"listItem"==i.name)r(i.position);else if("insert"==i.type&&"listItem"!=i.name){if("$text"!=i.name){const n=i.position.nodeAfter;n.hasAttribute("listIndent")&&(t.removeAttribute("listIndent",n),o=!0),n.hasAttribute("listType")&&(t.removeAttribute("listType",n),o=!0),n.hasAttribute("listStyle")&&(t.removeAttribute("listStyle",n),o=!0),n.hasAttribute("listReversed")&&(t.removeAttribute("listReversed",n),o=!0),n.hasAttribute("listStart")&&(t.removeAttribute("listStart",n),o=!0);for(const t of Array.from(e.createRangeIn(n)).filter(e=>e.item.is("element","listItem")))r(t.previousPosition)}r(i.position.getShiftedBy(i.length))}else"remove"==i.type&&"listItem"==i.name?r(i.position):("attribute"==i.type&&"listIndent"==i.attributeKey||"attribute"==i.type&&"listType"==i.attributeKey)&&r(i.range.start);for(const e of i.values())s(e),a(e);return o;function r(e){const t=e.nodeBefore;if(t&&t.is("element","listItem")){let e=t;if(i.has(e))return;for(let t=e.previousSibling;t&&t.is("element","listItem");t=e.previousSibling)if(e=t,i.has(e))return;i.set(t,e)}else{const t=e.nodeAfter;t&&t.is("element","listItem")&&i.set(t,t)}}function s(e){let n=0,i=null;for(;e&&e.is("element","listItem");){const r=e.getAttribute("listIndent");if(r>n){let s;null===i?(i=r-n,s=n):(i>r&&(i=r),s=r-i),t.setAttribute("listIndent",s,e),o=!0}else i=null,n=e.getAttribute("listIndent")+1;e=e.nextSibling}}function a(e){let n=[],i=null;for(;e&&e.is("element","listItem");){const r=e.getAttribute("listIndent");if(i&&i.getAttribute("listIndent")>r&&(n=n.slice(0,r+1)),0!=r)if(n[r]){const i=n[r];e.getAttribute("listType")!=i&&(t.setAttribute("listType",i,e),o=!0)}else n[r]=e.getAttribute("listType");i=e,e=e.nextSibling}}}(e.model,t)),n.mapper.registerViewToModelLength("li",b_),t.mapper.registerViewToModelLength("li",b_),n.mapper.on("modelToViewPosition",h_(n.view)),n.mapper.on("viewToModelPosition",function(e){return(t,n)=>{const i=n.viewPosition,o=i.parent,r=n.mapper;if("ul"==o.name||"ol"==o.name){if(i.isAtEnd){const t=r.toModelElement(i.nodeBefore),o=r.getModelLength(i.nodeBefore);n.modelPosition=e.createPositionBefore(t).getShiftedBy(o)}else{const t=r.toModelElement(i.nodeAfter);n.modelPosition=e.createPositionBefore(t)}t.stop()}else if("li"==o.name&&i.nodeBefore&&("ul"==i.nodeBefore.name||"ol"==i.nodeBefore.name)){const s=r.toModelElement(o);let a=1,c=i.nodeBefore;for(;c&&f_(c);)a+=r.getModelLength(c),c=c.previousSibling;n.modelPosition=e.createPositionBefore(s).getShiftedBy(a),t.stop()}}}(e.model)),t.mapper.on("modelToViewPosition",h_(n.view)),e.conversion.for("editingDowncast").add(t=>{t.on("insert",a_,{priority:"high"}),t.on("insert:listItem",o_(e.model)),t.on("attribute:listType:listItem",r_,{priority:"high"}),t.on("attribute:listType:listItem",s_,{priority:"low"}),t.on("attribute:listIndent:listItem",function(e){return(t,n,i)=>{if(!i.consumable.consume(n.item,"attribute:listIndent"))return;const o=i.mapper.toViewElement(n.item),r=i.writer;r.breakContainer(r.createPositionBefore(o)),r.breakContainer(r.createPositionAfter(o));const s=o.parent,a=s.previousSibling,c=r.createRangeOn(s);r.remove(c),a&&a.nextSibling&&Qf(r,a,a.nextSibling),p_(n.attributeOldValue+1,n.range.start,c.start,o,i,e),Xf(n.item,o,i,e);for(const e of n.item.getChildren())i.consumable.consume(e,"insert")}}(e.model)),t.on("remove:listItem",function(e){return(t,n,i)=>{const o=i.mapper.toViewPosition(n.position).getLastMatchingPosition(e=>!e.item.is("element","li")),r=o.nodeAfter,s=i.writer;s.breakContainer(s.createPositionBefore(r)),s.breakContainer(s.createPositionAfter(r));const a=r.parent,c=a.previousSibling,l=s.createRangeOn(a),d=s.remove(l);c&&c.nextSibling&&Qf(s,c,c.nextSibling),p_(i.mapper.toModelElement(r).getAttribute("listIndent")+1,n.position,l.start,r,i,e);for(const e of s.createRangeIn(d).getItems())i.mapper.unbindViewElement(e);t.stop()}}(e.model)),t.on("remove",c_,{priority:"low"})}),e.conversion.for("dataDowncast").add(t=>{t.on("insert",a_,{priority:"high"}),t.on("insert:listItem",o_(e.model))}),e.conversion.for("upcast").add(e=>{e.on("element:ul",d_,{priority:"high"}),e.on("element:ol",d_,{priority:"high"}),e.on("element:li",u_,{priority:"high"}),e.on("element:li",l_)}),e.model.on("insertContent",m_,{priority:"high"}),e.commands.add("numberedList",new Kf(e,"numbered")),e.commands.add("bulletedList",new Kf(e,"bulleted")),e.commands.add("indentList",new Jf(e,"forward")),e.commands.add("outdentList",new Jf(e,"backward"));const i=n.view.document;this.listenTo(i,"enter",(e,t)=>{const n=this.editor.model.document,i=n.selection.getLastPosition().parent;n.selection.isCollapsed&&"listItem"==i.name&&i.isEmpty&&(this.editor.execute("outdentList"),t.preventDefault(),e.stop())},{context:"li"}),this.listenTo(i,"delete",(e,t)=>{if("backward"!==t.direction)return;const n=this.editor.model.document.selection;if(!n.isCollapsed)return;const i=n.getFirstPosition();if(!i.isAtStart)return;const o=i.parent;"listItem"===o.name&&(o.previousSibling&&"listItem"===o.previousSibling.name||(this.editor.execute("outdentList"),t.preventDefault(),e.stop()))},{context:"li"}),this.listenTo(e.editing.view.document,"tab",(t,n)=>{const i=n.shiftKey?"outdentList":"indentList";this.editor.commands.get(i).isEnabled&&(e.execute(i),n.stopPropagation(),n.preventDefault(),t.stop())},{context:"li"})}afterInit(){const e=this.editor.commands,t=e.get("indent"),n=e.get("outdent");t&&t.registerChildCommand(e.get("indentList")),n&&n.registerChildCommand(e.get("outdentList"))}}function b_(e){let t=1;for(const n of e.getChildren())if("ul"==n.name||"ol"==n.name)for(const e of n.getChildren())t+=b_(e);return t}class k_ extends st{static get pluginName(){return"ListUI"}init(){const e=this.editor.t;n_(this.editor,"numberedList",e("Numbered List"),''),n_(this.editor,"bulletedList",e("Bulleted List"),'')}}const v_="underline";class A_ extends st{static get pluginName(){return"UnderlineEditing"}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:v_}),e.model.schema.setAttributeProperties(v_,{isFormatting:!0,copyOnEnter:!0}),e.conversion.attributeToElement({model:v_,view:"u",upcastAlso:{styles:{"text-decoration":"underline"}}}),e.commands.add(v_,new hm(e,v_)),e.keystrokes.set("CTRL+U","underline")}}const y_="underline";class w_ extends st{static get pluginName(){return"UnderlineUI"}init(){const e=this.editor,t=e.t;e.ui.componentFactory.add(y_,n=>{const i=e.commands.get(y_),o=new fd(n);return o.set({label:t("Underline"),icon:'',keystroke:"CTRL+U",tooltip:!0,isToggleable:!0}),o.bind("isOn","isEnabled").to(i,"value","isEnabled"),this.listenTo(o,"execute",()=>{e.execute(y_),e.editing.view.focus()}),o})}}class C_ extends ph{}C_.builtinPlugins=[class extends st{static get requires(){return[yh,Ch]}static get pluginName(){return"Alignment"}},class extends st{static get requires(){return[lm,um]}static get pluginName(){return"BlockQuote"}},class extends st{static get requires(){return[gm,fm]}static get pluginName(){return"Bold"}},class extends st{static get requires(){return[eg,jh,sg,Rh,Kh,fg]}static get pluginName(){return"Essentials"}},class extends st{static get requires(){return[xg,Eg]}static get pluginName(){return"FontBackgroundColor"}},class extends st{static get requires(){return[Tg,Dg]}static get pluginName(){return"FontColor"}},class extends st{static get requires(){return[Ng,Lg]}static get pluginName(){return"Heading"}},class extends st{static get requires(){return[fp,bp]}static get pluginName(){return"Image"}},class extends st{static get requires(){return[vp,xp,yp]}static get pluginName(){return"ImageResize"}},class extends st{static get pluginName(){return"ImageUpload"}static get requires(){return[Kp,Mp,Lp]}},class extends st{static get requires(){return[Jp,Qp]}static get pluginName(){return"Italic"}},class extends st{static get requires(){return[Of,Uf,qf]}static get pluginName(){return"Link"}},class extends st{static get requires(){return[__,k_]}static get pluginName(){return"List"}},Fg,class extends st{static get requires(){return[jp]}static get pluginName(){return"SimpleUploadAdapter"}init(){const e=this.editor.config.get("simpleUpload");e&&(e.uploadUrl?this.editor.plugins.get(jp).createUploadAdapter=t=>new Rp(t,e):h("simple-upload-adapter-missing-uploadurl"))}},class extends st{static get requires(){return[A_,w_]}static get pluginName(){return"Underline"}}],C_.defaultConfig={toolbar:{items:["bold","italic","underline","|","heading","fontColor","fontBackgroundColor","alignment","|","blockQuote","bulletedList","numberedList","|","link","imageUpload","|","undo","redo"]},language:"fr"};const I_=C_})(),s.default})(),e.exports=i()},5594:(e,t,n)=>{"use strict";e.exports=n.p+"img/member-7b0dc9a7cc229b5ba65b.png"},5682:()=>{},5833:()=>{!function(e){const t=e.en=e.en||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 of %1","Align center":"Align center","Align left":"Align left","Align right":"Align right",Aquamarine:"Aquamarine",Black:"Black","Block quote":"Block quote",Blue:"Blue",Bold:"Bold","Break text":"Break text","Bulleted List":"Bulleted List",Cancel:"Cancel","Centered image":"Centered image","Change image text alternative":"Change image text alternative","Choose heading":"Choose heading","Dim grey":"Dim grey","Document colors":"Document colors",Downloadable:"Downloadable","Dropdown toolbar":"Dropdown toolbar","Edit block":"Edit block","Edit link":"Edit link","Editor toolbar":"Editor toolbar","Font Background Color":"Font Background Color","Font Color":"Font Color","Full size image":"Full size image",Green:"Green",Grey:"Grey",Heading:"Heading","Heading 1":"Heading 1","Heading 2":"Heading 2","Heading 3":"Heading 3","Heading 4":"Heading 4","Heading 5":"Heading 5","Heading 6":"Heading 6","Image resize list":"Image resize list","Image toolbar":"Image toolbar","image widget":"image widget","In line":"In line","Insert image":"Insert image","Insert paragraph after block":"Insert paragraph after block","Insert paragraph before block":"Insert paragraph before block",Italic:"Italic",Justify:"Justify","Left aligned image":"Left aligned image","Light blue":"Light blue","Light green":"Light green","Light grey":"Light grey",Link:"Link","Link URL":"Link URL",Next:"Next","Numbered List":"Numbered List","Open in a new tab":"Open in a new tab","Open link in new tab":"Open link in new tab",Orange:"Orange",Original:"Original",Paragraph:"Paragraph",Previous:"Previous",Purple:"Purple",Red:"Red",Redo:"Redo","Remove color":"Remove color","Resize image":"Resize image","Resize image to %0":"Resize image to %0","Resize image to the original size":"Resize image to the original size","Rich Text Editor":"Rich Text Editor","Rich Text Editor, %0":"Rich Text Editor, %0","Right aligned image":"Right aligned image",Save:"Save","Select all":"Select all","Show more items":"Show more items","Side image":"Side image","Text alignment":"Text alignment","Text alignment toolbar":"Text alignment toolbar","Text alternative":"Text alternative","This link has no URL":"This link has no URL",Turquoise:"Turquoise",Underline:"Underline",Undo:"Undo",Unlink:"Unlink","Upload failed":"Upload failed","Upload in progress":"Upload in progress",White:"White","Widget toolbar":"Widget toolbar","Wrap text":"Wrap text",Yellow:"Yellow"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}))},6041:(e,t,n)=>{"use strict";e.exports=n.p+"img/logoWeezeventSquare-9184b02c60dbc8695435.png"},6687:(e,t,n)=>{"use strict";e.exports=n.p+"svg/weezeventBlankMessages-76d6e6c79babc98388e9.svg"},6871:()=>{!function(e){const t=e.it=e.it||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 di %1","Align center":"Allinea al centro","Align left":"Allinea a sinistra","Align right":"Allinea a destra",Aquamarine:"Aquamarina",Black:"Nero","Block quote":"Blocco citazione",Blue:"Blu",Bold:"Grassetto","Break text":"Interrompi testo","Bulleted List":"Elenco puntato",Cancel:"Annulla","Centered image":"Immagine centrata","Change image text alternative":"Cambia testo alternativo dell'immagine","Choose heading":"Seleziona intestazione","Dim grey":"Grigio tenue","Document colors":"Colori del docmento",Downloadable:"Scaricabile","Dropdown toolbar":"Barra degli strumenti del menu a discesa","Edit block":"Modifica blocco","Edit link":"Modifica collegamento","Editor toolbar":"Barra degli strumenti dell'editor","Font Background Color":"Colore di sfondo caratteri","Font Color":"Colore caratteri","Full size image":"Immagine a dimensione intera",Green:"Verde",Grey:"Grigio",Heading:"Intestazione","Heading 1":"Intestazione 1","Heading 2":"Intestazione 2","Heading 3":"Intestazione 3","Heading 4":"Intestazione 4","Heading 5":"Intestazione 5","Heading 6":"Intestazione 6","Image resize list":"Elenco ridimensionamenti immagine","Image toolbar":"Barra degli strumenti dell'immagine","image widget":"Widget immagine","In line":"In linea","Insert image":"Inserisci immagine","Insert paragraph after block":"Inserisci paragrafo dopo blocco","Insert paragraph before block":"Inserisci paragrafo prima di blocco",Italic:"Corsivo",Justify:"Giustifica","Left aligned image":"Immagine allineata a sinistra","Light blue":"Azzurro","Light green":"Verde chiaro","Light grey":"Grigio chiaro",Link:"Collegamento","Link URL":"URL del collegamento",Next:"Avanti","Numbered List":"Elenco numerato","Open in a new tab":"Apri in una nuova scheda","Open link in new tab":"Apri collegamento in nuova scheda",Orange:"Arancio",Original:"Originale",Paragraph:"Paragrafo",Previous:"Indietro",Purple:"Porpora",Red:"Rosso",Redo:"Ripristina","Remove color":"Rimuovi colore","Resize image":"Ridimensiona immagine","Resize image to %0":"Ridimensiona immagine a %0","Resize image to the original size":"Ridimensiona immagine alle dimensioni originali","Rich Text Editor":"Editor di testo formattato","Rich Text Editor, %0":"Editor di testo formattato, %0","Right aligned image":"Immagine allineata a destra",Save:"Salva","Select all":"Seleziona tutto","Show more items":"Mostra più elementi","Side image":"Immagine laterale","Text alignment":"Allineamento del testo","Text alignment toolbar":"Barra degli strumenti dell'allineamento","Text alternative":"Testo alternativo","This link has no URL":"Questo collegamento non ha un URL",Turquoise:"Turchese",Underline:"Sottolineato",Undo:"Annulla",Unlink:"Elimina collegamento","Upload failed":"Caricamento fallito","Upload in progress":"Caricamento in corso",White:"Bianco","Widget toolbar":"Barra degli strumenti del widget","Wrap text":"Testo a capo",Yellow:"Giallo"}),t.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}))},6954:(e,t,n)=>{"use strict";e.exports=n.p+"img/googleSatellite-0706bcb1678d6e9f219c.png"},7008:(e,t,n)=>{"use strict";e.exports=n.p+"img/accreditation-7f66e46aebab965fa566.png"},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-7b756e9652a2a7882137.jpg"},8184:(e,t,n)=>{"use strict";e.exports=n.p+"svg/dnsWrongDomain-3954cd8d9805c779a7bc.svg"},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:()=>{},9844:()=>{!function(e){const t=e.es=e.es||{};t.dictionary=Object.assign(t.dictionary||{},{"%0 of %1":"%0 de %1","Align center":"Centrar","Align left":"Alinear a la izquierda","Align right":"Alinear a la derecha",Aquamarine:"Aguamarina",Black:"Negro","Block quote":"Cita de bloque",Blue:"Azul",Bold:"Negrita","Break text":"Permitir quebrar texto","Bulleted List":"Lista con viñetas",Cancel:"Cancelar","Centered image":"Imagen centrada","Change image text alternative":"Cambiar el texto alternativo de la imagen","Choose heading":"Elegir Encabezado","Dim grey":"Gris Oscuro","Document colors":"Colores del documento",Downloadable:"Descargable","Dropdown toolbar":"Barra de herramientas desplegable","Edit block":"Cuadro de edición","Edit link":"Editar enlace","Editor toolbar":"Barra de herramientas de edición","Font Background Color":"Color de Fondo","Font Color":"Color de Fuente","Full size image":"Imagen a tamaño completo",Green:"Verde",Grey:"Gris",Heading:"Encabezado","Heading 1":"Encabezado 1","Heading 2":"Encabezado 2","Heading 3":"Encabezado 3","Heading 4":"Encabezado 4","Heading 5":"Encabezado 5","Heading 6":"Encabezado 6","Image resize list":"Listado para redimensionar imagen","Image toolbar":"Barra de herramientas de imagen","image widget":"Widget de imagen","In line":"En línea","Insert image":"Insertar imagen","Insert paragraph after block":"Insertar párrafo después del bloque","Insert paragraph before block":"Insertar párrafo antes del bloque",Italic:"Cursiva",Justify:"Justificar","Left aligned image":"Imagen alineada a la izquierda","Light blue":"Azul Claro","Light green":"Verde Claro","Light grey":"Gris Claro",Link:"Enlace","Link URL":"URL del enlace",Next:"Siguiente","Numbered List":"Lista numerada","Open in a new tab":"Abrir en una pestaña nueva ","Open link in new tab":"Abrir enlace en una pestaña nueva",Orange:"Anaranjado",Original:"Original",Paragraph:"Párrafo",Previous:"Anterior",Purple:"Morado",Red:"Rojo",Redo:"Rehacer","Remove color":"Quitar color","Resize image":"Redimensionar imagen","Resize image to %0":"Redimensionar imagen al %0","Resize image to the original size":"Redimensionar imagen al tamaño original","Rich Text Editor":"Editor de Texto Enriquecido","Rich Text Editor, %0":"Editor de Texto Enriquecido, %0","Right aligned image":"Imagen alineada a la derecha",Save:"Guardar","Select all":"Seleccionar todo","Show more items":"Mostrar más elementos","Side image":"Imagen lateral","Text alignment":"Alineación del texto","Text alignment toolbar":"Barra de herramientas de alineación del texto","Text alternative":"Texto alternativo","This link has no URL":"Este enlace no tiene URL",Turquoise:"Turquesa",Underline:"Subrayado",Undo:"Deshacer",Unlink:"Quitar enlace","Upload failed":"Fallo en la subida","Upload in progress":"Subida en progreso",White:"Blanco","Widget toolbar":"Barra de herramientas del widget","Wrap text":"Mantener texto unido",Yellow:"Amarillo"}),t.getPluralForm=function(e){return 1!=e}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}))},9882:(e,t,n)=>{"use strict";e.exports=n.p+"img/ign-3cfd31ba578060a32efa.png"}},e=>{e.O(0,[121],()=>e(e.s=1623)),e.O()}]); //# sourceMappingURL=volunteers-6de49a5c0d08fd7a406a.cjs.map