PageSourceSearch

https://popstory.vercel.app/_next/static/chunks/4587.6b035811e522aae6.js

js popstory.vercel.app collected 2026-10-03 07:31:33 UTC 49,449 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4587],{4587:(e,t,l)=>{l.r(t),l.d(t,{AuthWithEmailCodeForm:()=>a._,BlogForm:()=>A,DocsForm:()=>I,EditProfileForm:()=>L.k,MultipleAccountsForm:()=>S.v,ResetPasswordForm:()=>O.F,SignInForm:()=>F.b,SignUpForm:()=>P.X,UsernameForm:()=>M.v,VerifyEmailForm:()=>R.A});var a=l(85825),n=l(95155),r=l(12115),i=l(22544),o=l(66942),s=l(70667),d=l(95409),u=l(4068),c=l(85801),p=l(40982),x=l(54002),m=l(54879);let h=m.Ik({title:m.Yj().min(1).max(100),coverId:m.Yj().optional().nullable(),html:m.Yj().optional().nullable(),category:m.Yj().optional().nullable(),featured:m.eu(!1).or(m.eu(!0)).optional().nullable()});m.Ik({slug:m.Yj().min(1),title:m.Yj().min(1).max(100),coverId:m.Yj().optional().nullable(),html:m.Yj().optional().nullable(),category:m.Yj().optional().nullable(),featured:m.eu(!1).or(m.eu(!0)).optional().nullable()});var f=l(56487),g=l(80549),b=l(1659),v=l(11525),j=l(38370),y=l(85235),k=l(97749),w=l(98672),N=l(25107);let A=(0,r.memo)(e=>{var t,l;let{dismiss:a,active:r}=e,{locale:m}=(0,w.PZ)(),{register:A,watch:C,setValue:_,getValues:T,handleSubmit:E,reset:I,unregister:L,formState:{errors:S}}=(0,i.mN)({defaultValues:{title:(null==r?void 0:r.title)||"",coverId:(null==r?void 0:r.coverId)||"",html:(null==r?void 0:r.html)||"",category:(null==r?void 0:r.category)||"",featured:!!(null==r?void 0:r.featured),...r?{slug:null==r?void 0:r.slug}:{}},resolver:(0,o.u)(h)}),{mutate:O,isPending:F}=(0,g.useMutation)({mutationFn:()=>b.A[r?"patch":"post"](v.n.BLOG,T()),onError:e=>{var t,l;j.toast.error((0,k.pb)(e,null==m||null==(l=m.toast_messages)||null==(t=l.error)?void 0:t.error_occured))},onSuccess:()=>{j.toast.success("Post ".concat(r?"updated":"created")),I(),null==a||a()}}),{loading:P,state:M}=(0,N.Bv)({fileIds:T("coverId")?[T("coverId")]:[],setFileIds(e){_("coverId",e[0])}});return(0,n.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,n.jsxs)("div",{className:"flex flex-row flex-wrap justify-between gap-4",children:[(0,n.jsx)(s.$,{onClick:E(()=>{O()},console.log),loading:F,children:"Submit"}),(0,n.jsx)(s.$,{onClick:a,loading:F,theme:"glass",children:"Cancel"})]}),(0,n.jsx)(p.p,{error:null==S||null==(t=S.title)?void 0:t.message,required:!0,placeholder:"Post title",...A("title")}),(0,n.jsx)(x.l,{placeholder:"Category",options:y.qr.map(e=>({label:e,value:e})),value:C("category")?[{label:C("category"),value:C("category")}]:void 0,onChange:e=>_("category",e.value)}),(0,n.jsx)("div",{className:"!z-50 w-full",children:(0,n.jsx)(u.V,{label:"Cover",error:!!(null==S||null==(l=S.coverId)?void 0:l.message),accept:["image/*"],maxFiles:1,initial:M,loading:P,setMyFileSelectedValue:e=>_("coverId",e),children:e=>{let{state:t,removeFile:l,loadFile:a,errorFile:r}=e;return(0,n.jsx)("div",{className:"w-full",children:t.map((e,i)=>(0,n.jsx)("div",{className:"relative",style:{zIndex:100*(t.length-i)},children:(0,n.jsx)(c.c,{loadFile:(e,t)=>{a(e,t),_("coverId",t)},errorFile:r,item:e,removeFile:()=>{(null==e?void 0:e.id)&&l(null==e?void 0:e.id),L("coverId")}})},e.id))})}})}),(0,n.jsx)(d.S,{required:!0,checked:C("featured")||void 0,label:"Featured Post",onChange:e=>_("featured",e.target.checked)}),(0,n.jsx)(f.RichTextEditor,{onChange:e=>_("html",e),content:C("html")||void 0}),(0,n.jsx)(s.$,{onClick:E(()=>{O()},console.log),loading:F,className:"mt-4",children:"Submit"})]})});var C=l(58894);let _=m.Ik({label:m.Yj().min(1),path:m.Yj().optional().nullable().nullish(),html:m.Yj().optional().nullable().nullish(),icon:m.Yj().optional().nullable().nullish(),position:m.ai().positive().optional().nullable().nullish(),disabled:m.eu(!1).or(m.eu(!0)).optional(),roles:m.Yj().min(1)});m.Ik({id:m.Yj().min(1),label:m.Yj().min(1).optional(),path:m.Yj().optional().nullable().nullish(),html:m.Yj().optional().nullable().nullish(),icon:m.Yj().optional().nullable().nullish(),position:m.ai().positive().optional().nullable().nullish(),disabled:m.eu(!1).or(m.eu(!0)).optional(),roles:m.Yj().min(1)}),m.YO(m.Ik({id:m.Yj().min(1),position:m.ai().positive().optional().nullable().nullish()}));var T=l(79450),E=l(77876);let I=(0,r.memo)(e=>{var t,l,a,d,u;let{dismiss:c,active:m,minimal:h}=e,{locale:y}=(0,w.PZ)(),{register:N,watch:A,setValue:I,getValues:L,handleSubmit:S,reset:O,formState:{errors:F}}=(0,i.mN)({defaultValues:{...m,html:(null==m?void 0:m.html)||"",icon:(null==m?void 0:m.icon)||"",position:+((null==m?void 0:m.position)||0)},resolver:(0,o.u)(_)}),[P,M]=(0,r.useState)((0,E.NZ)(null==m?void 0:m.roles,[]));(0,r.useEffect)(()=>{I("roles",(0,E.Ro)(P))},[P]);let{mutate:R,isPending:H}=(0,g.useMutation)({mutationFn:()=>b.A[m?"patch":"post"](v.n.DOCS,L()),onError:e=>{var t,l;j.toast.error((0,k.pb)(e,null==y||null==(l=y.toast_messages)||null==(t=l.error)?void 0:t.error_occured))},onSuccess:()=>{j.toast.success("Post ".concat(m?"updated":"created")),O(),null==c||c()}});return(0,n.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,n.jsx)(s.$,{onClick:S(()=>{R()},console.log),loading:H,className:"mt-4",children:"Submit"}),!h&&(0,n.jsx)(p.p,{error:null==F||null==(t=F.path)?void 0:t.message,required:!0,placeholder:"Path (/root/example/__index__)",...N("path"),wrpClassName:"!max-w-full"}),(0,n.jsx)(p.p,{wrpClassName:"!max-w-full",error:null==F||null==(l=F.label)?void 0:l.message,required:!0,placeholder:"Label",...N("label")}),(0,n.jsx)(p.p,{wrpClassName:"!max-w-full",error:null==F||null==(a=F.position)?void 0:a.message,required:!0,placeholder:"Position",...N("position",{valueAsNumber:!0})}),(0,n.jsx)(x.l,{error:null==F||null==(d=F.icon)?void 0:d.message,placeholder:"Icon",className:"!w-full !max-w-full",formatOptionLabel:e=>{var t;return(0,n.jsxs)("div",{className:"flex flex-row items-center gap-2",children:[(null==e?void 0:e.value)&&(null==(t=(0,k.sW)(null==e?void 0:e.value))?void 0:t({}))," ",null==e?void 0:e.label]})},options:[{label:"No icon",value:""},...Object.keys(T.Ze).map(e=>({label:e,value:e}))],defaultValue:A("icon")?[{label:A("icon"),value:A("icon")}]:void 0,value:A("icon")?[{label:A("icon"),value:A("icon")}]:void 0,onChange:e=>I("icon",e.value)}),(0,n.jsx)(x.l,{error:null==F||null==(u=F.roles)?void 0:u.message,placeholder:"Roles",isMulti:!0,className:"!w-full !max-w-full",options:[{label:"USER",value:"USER"},{label:"ADMIN",value:"ADMIN"}],defaultValue:P.map(e=>({label:e,value:e})),value:P.map(e=>({label:e,value:e})),onChange:e=>M(e.map(e=>e.value))}),(0,n.jsx)(C.d,{label:"Disabled",value:!!A("disabled"),onChange:()=>{I("disabled",!A("disabled")),R()}}),!h&&(0,n.jsx)(f.RichTextEditor,{onChange:e=>I("html",e),content:A("html")||void 0}),(0,n.jsx)(s.$,{onClick:S(()=>{R()},console.log),loading:H,className:"mt-4",children:"Submit"})]})});var L=l(18749),S=l(83980),O=l(24626),F=l(77374),P=l(91184),M=l(25082),R=l(76661)},24626:(e,t,l)=>{l.d(t,{F:()=>j});var a=l(95155),n=l(66942),r=l(80549),i=l(1659),o=l(90311),s=l(40982),d=l(70667),u=l(17287),c=l(11525),p=l(98672),x=l(12115),m=l(22544),h=l(38370),f=l(3123),g=l(54879);let b=g.Ik({email:g.Yj().email(),value:g.Yj()}),v="flex flex-col items-center justify-center gap-4",j=(0,x.memo)(()=>{var e;let{user:t,login:l}=(0,f.k)(e=>e),g=(0,f.K)(e=>e.hide),[j,y]=(0,x.useState)(0),{register:k,handleSubmit:w,formState:{errors:N},setValue:A,getValues:C,reset:_}=(0,m.mN)({defaultValues:{email:"",value:""},resolver:(0,n.u)(b)}),{locale:T}=(0,p.PZ)(),{mutate:E,isPending:I}=(0,r.useMutation)({mutationFn:()=>i.A.patch(c.n.ACCOUNT.RESET_PASSWORD,{value:+C("value")}),onError:()=>{y(0),A("value",""),h.toast.error("An error occured")},onSuccess:()=>{h.toast.success("We`ve sent you instructions on your email."),l({user:{...t,email_verified:!0}}),_(),g()}}),{mutate:L,isPending:S}=(0,r.useMutation)({mutationFn:()=>i.A.post(c.n.ACCOUNT.GET_CODE,{email:C("email")}),onError:()=>{h.toast.error("An error occured")},onSuccess:()=>{y(1)}}),O=I||S;return(0,a.jsx)(u.H,{activeIdx:j,setActiveIdx:y,withBorder:!1,disabled:O,items:[{contentClassName:v,children:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(s.p,{placeholder:T.input
1s.placeholders.email,type:"email",...k("email"),error:null==N||null==(e=N.email)?void 0:e.message}),(0,a.jsx)(d.$,{loading:O,fullWidth:!0,onClick:w(()=>{L()}),children:T.buttons.get_email_code})]})},{contentClassName:v,children:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.E,{disabled:O,onComplete:e=>A("value",e)}),(0,a.jsx)(d.$,{fullWidth:!0,onClick:w(()=>{E()}),loading:O,children:T.buttons.submit})]})}]})})},33840:(e,t,l)=>{l.d(t,{T:()=>u});var a=l(95155),n=l(12115),r=l(85203),i=l.n(r),o=l(55817),s=l(50742),d=l(31640);let u=(0,n.memo)((0,n.forwardRef)((e,t)=>{let{icon:l,errorIcon:r=(0,a.jsx)(s.wew,{color:"red"}),className:u,wrpClassName:c,wrpInputClassName:p,error:x,required:m,iconAction:h,placeholderWithAnimation:f=!0,placeholder:g,cols:b=5,rows:v=5,label:j,fullWidth:y,...k}=e,w=(0,n.useId)(),N=(0,n.useId)();return(0,a.jsxs)("div",{className:i()("flex flex-col w-full gap-1",c),children:["string"==typeof j&&(0,a.jsxs)("label",{className:"text-secondaryText",htmlFor:w,children:[j," ",(0,a.jsx)(d.I,{visible:m})]}),"string"!=typeof j&&j,(0,a.jsxs)("div",{id:N,className:i()("bg-onNeutralBg box-border border-[1px] border-solid border-default group shrink-0 max-w-[350px] min-h-12 relative w-full transition-all px-3 py-1 rounded-[8px]",{"!w-full !max-w-full":y},p),children:[(0,a.jsx)("textarea",{className:i()("peer mt-[6px] w-full text-defaultText bg-onNeutralBg",u,{"!text-red-500 border-red-500":!!x}),...k,rows:v,cols:b,id:w,ref:t,placeholder:f?" ":g}),f&&g&&(0,a.jsxs)("label",{htmlFor:w,className:i()("absolute text-[0.875rem] text-gray-500 !left-3 duration-300 transform -translate-y-4 scale-75 peer-placeholder-shown:top-2 peer-focus:top-3 top-3 z-10 origin-[0] start-2.5 peer-placeholder-shown:scale-100 peer-placeholder-shown:translate-y-0 peer-focus:scale-75 peer-focus:-translate-y-4 rtl:peer-focus:translate-x-1/4 rtl:peer-focus:left-auto",{"!text-red-500 border-red-500":!!x}),children:[g,(0,a.jsx)(d.I,{visible:m})]}),l&&!x&&(0,a.jsx)("span",{onClick:h,className:i()("absolute right-2.5  text-defaultText text-[20px] z-20 !top-2.5",{"hover:cursor-pointer hover:opacity-80":!!h}),children:l}),r&&!!x&&(0,a.jsx)("span",{"data-tooltip-id":w,"data-tooltip-content":String(x),className:i()("absolute right-2.5 text-[20px] z-20 !top-[14px]",{"!text-red-500":!!x}),children:r}),(0,a.jsx)(o.m_,{id:w})]})]})}))},54002:(e,t,l)=>{l.d(t,{l:()=>g});var a=l(95155),n=l(85203),r=l.n(n),i=l(82825),o=l(12115),s=l(45953),d=l(588),u=l(55817),c=l(50742),p=l(31640);let{ValueContainer:x,Placeholder:m,Control:h}=s.c,f=e=>{let{children:t,...l}=e;return(0,a.jsxs)(x,{...l,children:[(0,a.jsxs)(m,{...l,children:[l.selectProps.placeholder," ",(0,a.jsx)(p.I,{visible:l.selectProps.required})]}),o.Children.map(t,e=>e&&e.type!==m?e:null)]})},g=(0,o.memo)(e=>{var t;let{classNames:l,className:n,error:s,label:x,wrpClassName:m,fullWidth:g,required:b,...v}=e,j=(0,o.useId)();return(0,a.jsxs)("div",{className:r()("flex flex-col w-full gap-1",m),children:["string"==typeof x&&(0,a.jsxs)("label",{className:"text-secondaryText",htmlFor:j,children:[x," ",(0,a.jsx)(p.I,{visible:b})]}),"string"!=typeof x&&x,(0,a.jsx)(d.Ay,{menuPortalTarget:null==(t=document)?void 0:t.body,...v,className:r()("max-w-[350px] w-full shrink-0 !min-h-10",{"!w-full !max-w-full":g},n),classNames:{...l,control:function(){for(var e,t=arguments.length,a=Array(t),n=0;n<t;n++)a[n]=arguments[n];return r()("!rounded-[8px] !bg-onNeutralBg !border !border-default",{"!border-red-500":!!s},null==l||null==(e=l.control)?void 0:e.call(l,...a))},input:function(){for(var e,t=arguments.length,a=Array(t),n=0;n<t;n++)a[n]=arguments[n];return r()("!font-light !text-defaultText peer",null==l||null==(e=l.input)?void 0:e.call(l,...a))},valueContainer:function(){for(var e,t=arguments.length,a=Array(t),n=0;n<t;n++)a[n]=arguments[n];return r()("!py-1 !px-2.5",null==l||null==(e=l.valueContainer)?void 0:e.call(l,...a))},singleValue:function(){for(var e,t=arguments.length,a=Array(t),n=0;n<t;n++)a[n]=arguments[n];return r()("!text-defaultText !text-[0.875rem]",null==l||null==(e=l.singleValue)?void 0:e.call(l,...a))},placeholder:e=>{var t;return r()("!text-gray-500 !text-[0.875rem] !absolute !origin-top-left !scale-100  !transition-all !peer-focus-within:bg-[red]",{"!scale-75 !translate-y-[-12px]":e.hasValue||e.selectProps.inputValue},null==l||null==(t=l.placeholder)?void 0:t.call(l,e))},indicatorSeparator:function(){for(var e,t=arguments.length,a=Array(t),n=0;n<t;n++)a[n]=arguments[n];return r()("!hidden",null==l||null==(e=l.indicatorSeparator)?void 0:e.call(l,...a))},multiValue:function(){for(var e,t=arguments.length,a=Array(t),n=0;n<t;n++)a[n]=arguments[n];return r()("!text-defaultText !bg-neutralBg",null==l||null==(e=l.multiValue)?void 0:e.call(l,...a))},multiValueLabel:function(){for(var e,t=arguments.length,a=Array(t),n=0;n<t;n++)a[n]=arguments[n];return r()("!text-defaultText !text-[0.75rem]",null==l||null==(e=l.multiValueLabel)?void 0:e.call(l,...a))},menu:function(){for(var e,t=arguments.length,a=Array(t),n=0;n<t;n++)a[n]=arguments[n];return r()("!text-defaultText !bg-onNeutralbg !rounded-[8px]",null==l||null==(e=l.menu)?void 0:e.call(l,...a))},menuList:function(){for(var e,t=arguments.length,a=Array(t),n=0;n<t;n++)a[n]=arguments[n];return r()(null==l||null==(e=l.menuList)?void 0:e.call(l,...a),"!text-defaultText !bg-onNeutralbg !rounded-[8px]",i.Q)},menuPortal:function(){for(var e,t=arguments.length,a=Array(t),n=0;n<t;n++)a[n]=arguments[n];return r()(null==l||null==(e=l.menuPortal)?void 0:e.call(l,...a),"!text-defaultText !bg-onNeutralbg !rounded-[8px] z-[9999]")},option:function(){for(var e,t=arguments.length,a=Array(t),n=0;n<t;n++)a[n]=arguments[n];return r()(null==l||null==(e=l.option)?void 0:e.call(l,...a),"!text-defaultText !text-[0.75rem] !bg-onNeutralbg !rounded-[8px] hover:!opacity-80 hover:!bg-primaryBg hover:!cursor-pointer")}},styles:{option:e=>({...e,background:"var(--onNeutralBg)",borderRadius:"8px"}),menuList:e=>({...e,background:"var(--onNeutralBg)",borderRadius:"8px"}),menuPortal:e=>({...e,background:"var(--onNeutralBg)",borderRadius:"8px",zIndex:9999})},components:{ValueContainer:f,Control:e=>{let{children:t,...l}=e;return(0,a.jsxs)(h,{...l,children:[t,!!s&&(0,a.jsx)("span",{"data-tooltip-id":j,"data-tooltip-content":String(s),className:r()("z-20 absolute right-[2rem]",{"!text-red-500":!!s}
1),children:(0,a.jsx)(c.wew,{size:24})}),(0,a.jsx)(u.m_,{id:j})]})},...v.components}})]})})},56487:(e,t,l)=>{l.d(t,{RichTextEditor:()=>H});var a=l(95155),n=l(12115),r=l(85203),i=l.n(r),o=l(46098),s=l(9028),d=l(12338),u=l(22984),c=l(79371),p=l(78336),x=l(93777),m=l(19148),h=l(56135),f=l(63660),g=l(30232),b=l(49477),v=l(63827),j=l(76908);let y=j.bP.create({name:"iframe",group:"block",atom:!0,addOptions:()=>({allowFullscreen:!0,HTMLAttributes:{class:"iframe-wrapper"}}),addAttributes(){return{src:{default:null},frameborder:{default:0},allowfullscreen:{default:this.options.allowFullscreen,parseHTML:()=>this.options.allowFullscreen}}},parseHTML:()=>[{tag:"iframe"}],renderHTML(e){let{HTMLAttributes:t}=e;return["div",this.options.HTMLAttributes,["iframe",t]]},addCommands(){return{setIframe:e=>t=>{let{tr:l,dispatch:a}=t,{selection:n}=l,r=this.type.create(e);return a&&l.replaceRangeWith(n.from,n.to,r),!0}}}}),k=j.bP.create({name:"video",group:"block",atom:!0,addOptions:()=>({HTMLAttributes:{class:"video-wrapper",style:{width:"100%"},controls:1}}),addAttributes:()=>({src:{default:null},type:{default:null}}),parseHTML:()=>[{tag:"video"}],renderHTML(e){let{HTMLAttributes:t}=e;return["div",this.options.HTMLAttributes,["video",{...t,...this.options.HTMLAttributes},["source",t]]]},addCommands(){return{setVideo:e=>t=>{let{tr:l,dispatch:a}=t,{selection:n}=l,r=this.type.create(e);return a&&l.replaceRangeWith(n.from,n.to,r),!0}}}});var w=l(51876);function N(e,t){let{doc:l,selection:a}=e;if(!l||!a||!(a instanceof w.U3||a instanceof w.i5))return e;let{from:n,to:r}=a;return l.nodesBetween(n,r,(l,a)=>{var n;let r=l.type;return"paragraph"===r.name||"heading"===r.name?(e=function(e,t,l){var a;if(!e.doc)return e;let n=e.doc.nodeAt(t);if(!n)return e;let r=(a=(n.attrs.indent||0)+l,a<0?0:a>210?210:a);if(r===n.attrs.indent)return e;let i={...n.attrs,indent:r};return e.setNodeMarkup(t,n.type,i,n.marks)}(e,a,t),!1):"bullet_list"!==(n=l).type.name&&"order_list"!==n.type.name&&"todo_list"!==n.type.name}),e}let A=j.YY.create({name:"indent",addOptions:()=>({types:["heading","paragraph"],indentLevels:[0,30,60,90,120,150,180,210],defaultIndentLevel:0}),addGlobalAttributes(){return[{types:this.options.types,attributes:{indent:{default:this.options.defaultIndentLevel,renderHTML:e=>({style:"margin-left: ".concat(e.indent,"px!important;")}),parseHTML:e=>parseInt(e.style.marginLeft)||this.options.defaultIndentLevel}}}]},addCommands:()=>({indent:()=>e=>{let{tr:t,state:l,dispatch:a}=e,{selection:n}=l;return!!(t=N(t=t.setSelection(n),30)).docChanged&&(a&&a(t),!0)},outdent:()=>e=>{let{tr:t,state:l,dispatch:a}=e,{selection:n}=l;return!!(t=N(t=t.setSelection(n),-30)).docChanged&&(a&&a(t),!0)}})});var C=l(70667),_=l(53400),T=l(74233),E=l(70898),I=l(10630),L=l(6092),S=l(97267),O=l(30090);let F=e=>{var t;let{editor:l,children:n,disabled:r}=e;return l?(0,a.jsxs)("div",{className:"flex flex-wrap items-center",children:[(0,a.jsxs)("div",{className:"mr-[10px] mb-[10px]",children:[(0,a.jsx)("button",{disabled:r,onClick:()=>l.chain().focus().toggleHeading({level:1}).run(),className:i()("py-[6px] px-[12px] !border-default bg-transparent text-defaultText",{"!text-primary !bg-primaryForeground":l.isActive("heading",{level:1})}),title:"Heading 1",children:"H1"}),(0,a.jsx)("button",{disabled:r,onClick:()=>l.chain().focus().toggleHeading({level:2}).run(),className:i()("py-[6px] px-[12px] !border-default bg-transparent text-defaultText",{"!text-primary !bg-primaryForeground":l.isActive("heading",{level:2})}),title:"Heading 2",children:"H2"}),(0,a.jsx)("button",{disabled:r,onClick:()=>l.chain().focus().toggleHeading({level:3}).run(),className:i()("py-[6px] px-[12px] !border-default bg-transparent text-defaultText",{"!text-primary !bg-primaryForeground":l.isActive("heading",{level:3})}),title:"Heading 3",children:"H3"}),(0,a.jsx)("button",{disabled:r,onClick:()=>l.chain().focus().toggleHeading({level:4}).run(),className:i()("py-[6px] px-[12px] !border-default bg-transparent text-defaultText",{"!text-primary !bg-primaryForeground":l.isActive("heading",{level:4})}),title:"Heading 4",children:"H4"}),(0,a.jsx)("button",{disabled:r,onClick:()=>l.chain().focus().toggleHeading({level:5}).run(),className:i()("py-[6px] px-[12px] !border-default bg-transparent text-defaultText",{"!text-primary !bg-primaryForeground":l.isActive("heading",{level:5})}),title:"Heading 5",children:"H5"}),(0,a.jsx)("button",{disabled:r,onClick:()=>l.chain().focus().toggleHeading({level:6}).run(),className:i()("py-[6px] px-[12px] !border-default bg-transparent text-defaultText",{"!text-primary !bg-primaryForeground":l.isActive("heading",{level:6})}),title:"Heading 6",children:"H6"}),(0,a.jsx)("button",{disabled:r,onClick:()=>l.chain().focus().setParagraph().run(),className:i()("py-[6px] px-[12px] !border-default bg-transparent text-defaultText",{"!text-primary !bg-primaryForeground":l.isActive("paragraph")}),title:"Paragraph",children:"P"}),(0,a.jsx)("button",{disabled:r,onClick:()=>l.chain().focus().toggleCode().run(),className:i()("py-[6px] px-[12px] !border-default bg-transparent text-defaultText",{"!text-primary !bg-primaryForeground":l.isActive("code")}),title:"Code block",children:"pre"}),(0,a.jsx)("button",{disabled:r,onClick:()=>l.commands.toggleBlockquote(),className:i()("py-[6px] px-[12px] !border-default bg-transparent text-defaultText",{"!text-primary !bg-primaryForeground":l.isActive("blockquote")}),title:"Blockquote",children:(0,a.jsx)(T.Iht,{size:13})})]}),(0,a.jsxs)("div",{className:"mr-[10px] mb-[10px]",children:[(0,a.jsx)("button",{disabled:r,onClick:()=>l.chain().focus().toggleBold().run(),className:i()("py-[6px] px-[12px] !border-default bg-transparent text-defaultText",{"!text-primary !bg-primaryForeground":l.isActive("bold")}),title:"Bold",children:(0,a.jsx)(E.ljE,{size:13})}),(0,a.jsx)("button",{disabled:r,onClick:()=>l.chain().focus().toggleItalic().run(),className:i()("py-[6px] px-[12px] !border-default bg-transparent text-defaultText",{"!text-primary !bg-primaryForeground":l.isActive("italic")}),title:"Italic",children:(0,a.jsx)(E._Me,{size:13})}),(0,a.jsx)("button",{disabled:r,onClick:()=>l.chain().focus().toggleStrike().run(),className:i()("py-[6px] px-[12px] !border-default bg-transparent text-defaultText",{"!text-primary !bg-primaryForeground":l.isActive("strike")}
1),title:"Strikethrough",children:(0,a.jsx)(E.RPD,{size:13})}),(0,a.jsx)("button",{disabled:r,onClick:()=>l.chain().focus().toggleBulletList().run(),className:i()("py-[6px] px-[12px] !border-default bg-transparent text-defaultText",{"!text-primary !bg-primaryForeground":l.isActive("bulletList")}),title:"Bulletin list",children:(0,a.jsx)(E.v5n,{size:13})}),(0,a.jsx)("button",{disabled:r,onClick:()=>l.chain().focus().toggleOrderedList().run(),className:i()("py-[6px] px-[12px] !border-default bg-transparent text-defaultText",{"!text-primary !bg-primaryForeground":l.isActive("orderedList")}),title:"Ordered list",children:(0,a.jsx)(E.lfF,{size:13})}),(0,a.jsx)("button",{disabled:r,className:"py-[6px] px-[12px] !border-default !bg-transparent text-defaultText",onClick:()=>l.chain().focus().undo().run(),title:"Undo",children:(0,a.jsx)(E.EEI,{size:13})}),(0,a.jsx)("button",{disabled:r,className:"py-[6px] px-[12px] !border-default !bg-transparent text-defaultText",onClick:()=>l.chain().focus().redo().run(),title:"Redo",children:(0,a.jsx)(E.Swo,{size:13})}),(0,a.jsx)("button",{disabled:r,className:"py-[6px] px-[12px] !border-default !bg-transparent text-defaultText",onClick:()=>l.chain().focus().clearNodes().unsetAllMarks().run(),title:"Unset all marks",children:(0,a.jsx)(E.Rqy,{size:13})})]}),(0,a.jsxs)("div",{className:"mr-[10px] mb-[10px]",children:[(0,a.jsx)("button",{disabled:r,onClick:()=>l.commands.setTextAlign("left"),className:i()("py-[6px] px-[12px] !border-default bg-transparent text-defaultText",{"!text-primary !bg-primaryForeground":l.isActive({textAlign:"left"})}),title:"Align left",children:(0,a.jsx)(E.E7i,{size:13})}),(0,a.jsx)("button",{disabled:r,onClick:()=>{l.chain().focus().setTextAlign("center").run(),l.commands.setTextAlign("center")},className:i()("py-[6px] px-[12px] !border-default bg-transparent text-defaultText",{"!text-primary !bg-primaryForeground":l.isActive({textAlign:"center"})}),title:"Align center",children:(0,a.jsx)(E.qAe,{size:13})}),(0,a.jsx)("button",{disabled:r,onClick:()=>l.commands.setTextAlign("right"),className:i()("py-[6px] px-[12px] !border-default bg-transparent text-defaultText",{"!text-primary !bg-primaryForeground":l.isActive({textAlign:"right"})}),title:"Align right",children:(0,a.jsx)(E.v$9,{size:13})}),(0,a.jsx)("button",{disabled:r,className:i()("py-[6px] px-[12px] !border-default bg-transparent text-defaultText",{"!text-primary !bg-primaryForeground":l.isActive({textAlign:"justify"})}),title:"Align justify",children:(0,a.jsx)(E.f08,{size:13})}),(0,a.jsx)("button",{disabled:r,onClick:()=>l.chain().focus().indent().run(),className:i()("py-[6px] px-[12px] !border-default bg-transparent text-defaultText",{"!text-primary !bg-primaryForeground":l.isActive("indent")}),title:"Indent",children:(0,a.jsx)(E.kOH,{size:13})}),(0,a.jsx)("button",{disabled:r,onClick:()=>l.chain().focus().outdent().run(),className:i()("py-[6px] px-[12px] !border-default bg-transparent text-defaultText",{"!text-primary !bg-primaryForeground":l.isActive("outdent")}),title:"Outdent",children:(0,a.jsx)(E.LZs,{size:13})})]}),(0,a.jsxs)("div",{className:"mr-[10px] mb-[10px]",children:[n,(0,a.jsx)("button",{disabled:r,className:"py-[6px] px-[12px] !border-default !bg-transparent text-defaultText",onClick:()=>{let e=l.getAttributes("link").href,t=window.prompt("Enter URL",e);if(null!==t){if(""===t)return void l.chain().focus().extendMarkRange("link").unsetLink().run();l.chain().focus().extendMarkRange("link").setLink({href:t}).run()}},title:"Add link",children:(0,a.jsx)(E.AnD,{size:13})}),(0,a.jsx)("button",{disabled:r,className:"py-[6px] px-[12px] !border-default !bg-transparent text-defaultText",onClick:()=>{let e=window.prompt("Enter image URL or base64 string"),t=window.prompt("Width in px or percetage (e.g. 100%) or auto (default is 100%)"),a=window.prompt("Height in px or percetage (e.g. 100%) or auto (default is auto)"),n=window.prompt("Position (left, right, center) default is none");if(e&&l){let r={src:e,alt:"",title:"",width:t||void 0,height:a||void 0,style:"float: ".concat(n||"none","; width: ").concat(t||"100%"," !important; height: ").concat(a||"auto"," !important;")};l.chain().focus().setImage(r).run()}},title:"Add Image",children:(0,a.jsx)(E.dkL,{size:13})}),(0,a.jsx)("button",{disabled:r,className:"py-[6px] px-[12px] !border-default !bg-transparent text-defaultText",onClick:()=>{let e=window.prompt("Enter youtube video URL");e&&(e.includes("watch")&&(e=(e=e.split("watch?v="))[0]+"embed/"+e[1]),l.chain().focus().setIframe({src:e}).run())},title:"Add YouTube video URL",children:(0,a.jsx)(E.Vk6,{size:13})}),(0,a.jsx)("button",{disabled:r,className:"py-[6px] px-[12px] !border-default !bg-transparent text-defaultText",onClick:()=>{let e=window.prompt("Enter video URL (NOT YouTube)");if(e){let t=e.split(".").pop();l.chain().focus().setVideo({src:e,type:"video/"+t}).run()}},title:"Add video URL (not youtube)",children:(0,a.jsx)(I.Z7S,{size:13})})]}),(0,a.jsx)("div",{className:"mr-[10px] mb-[10px] flex flex-wrap gap-2 items-center flex-row",children:(0,a.jsx)("button",{className:i()("py-[6px] px-[12px] !border-default bg-transparent text-defaultText",{"!text-primary !bg-primaryForeground":l.isActive("table")}),onClick:()=>l.chain().focus().insertTable({rows:2,cols:2,withHeaderRow:!0}).run(),children:(0,a.jsx)(L.ZRA,{size:13})})}),(0,a.jsxs)("div",{className:"mb-[10px] mr-[10px] pointer-events-none text-defaultText",children:["Characters: ",l.storage.characterCount.characters()]}),(0,a.jsxs)("div",{className:"mb-[10px] mr-[10px] pointer-events-none text-defaultText",children:["Words: ",(null==(t=l.getText().match(/\S+/g))?void 0:t.length)||"0"]}),l.isActive("table")&&(0,a.jsx)(S.Accordion,{className:"mx-2",title:"Table controls",children:(0,a.jsxs)("div",{className:"flex flex-row flex-wrap gap-1",children:[(0,a.jsx)(O.c,{value:"Add column before",className:"text-left text-defaultText",onClick:()=>l.chain().focus().addColumnBefore().run()}),(0,a.jsx)(O.c,{value:"Add column after",className:"text-left text-defaultText",onClick:()=>l.chain().focus().addColumnAfter().run()}),(0,a.jsx)(O.c,{value:"Delete Column",className:"text-left text-defaultText",onClick:()=>l.chain().focus().deleteColumn().run()}),(0,a.jsx)(O.c,{value:"Add row before",className:"text-left text-defaultText",onClick:()=>l.chain().focus().addRowBefore().run()}),(0,a.jsx)(O.c,{value:"Add row after",className:"text-left text-defaultText",onClick:()=>l.chain().focus().addRowAfter().run()}),(0,a.jsx)(O.c,{value:"Delete row",className:"text-left text-defaultText",onClick:()=>l.chain().focus().deleteRow().run()}),(0,a.jsx)(O.c,{value:"Delete table",className:"text-left text-defaultText",onClick:()=>l.chain().focus().deleteTable().run()}),(0,a.jsx)(O.c,{value:"Merge cells",className:"text-left text-defaultText",onClick:()=>l.chain().focus().mergeCells().run()}),(0,a.jsx)(O.c,{value:"Split cell",className:"text-left text-defaultText",onClick:()=>l.chain().focus().splitCell().run()}),(0,a.jsx)(O.c,{value:"Toggle header column",className:"text-left text-defaultText",onClick:()=>l.chain().focus().toggleHeaderColumn().run()}),(0,a.jsx)(O.c,{value:"Toggle header row",className:"text-left text-defaultText",onClick:()=>l.chain().focus().toggleHeaderRow().run()}),(0,a.jsx)(O.c,{value:"Roggle header cell",className:"text-left text-defaultText",onClick:()=>l.chain().focus().toggleHeaderCell().run()}),(0,a.jsx)(O.c,{value:"Merge or split",className:"text-left text-defaultText",onClick:()=>l.chain().focus().mergeOrSplit().run()}),(0,a.jsx)(O.c,{value:"Set cell attribute",className:"text-left text-defaultText",onClick:()=>l.chain().focus().setCellAttribute("colspan",2).run()}),(0,a.jsx)(O.c,{value:"Fix tables",className:"text-left text-defaultText",onClick:()=>l.chain().focus().fixTables().run()}),(0,a.jsx)(O.c,{value:"Go to next cell",className:"text-left text-defaultText",onClick:()=>l.chain().focus().goToNextCell().run()}),(0,a.jsx)(O.c,{value:"Go to previous cell",className:"text-left text-defaultText",onClick:()=>l.chain().focus().goToPreviousCell().run()})]})})]}):null};var P=l(33840),M=l(77876);let R=(0,b.$)(v.l),H=(0,n.memo)(e=>{let{className:t,content:l="",onChange:r,withButtons:b=!1,onSaveAction:v,readonly:j,contentClassName:w}
1=e,[N,T]=(0,n.useState)(!1),[I,L]=(0,n.useState)(!1),[S,O]=(0,n.useState)(l),H=(0,o.hG)({extensions:[s.A,x.A.configure({lowlight:R}),m.A,h.Ay.configure({HTMLAttributes:{rel:"noopener noreferrer",target:"_self"}}),u.A,c.h,p.A,d.Ay.configure({resizable:!0}),f.Ay.extend({addAttributes:()=>({src:{default:""},alt:{default:void 0},title:{default:void 0},width:{default:void 0},height:{default:void 0},style:{default:void 0}})}).configure({allowBase64:!0,inline:!0}),y,g.A,A,k],content:l,onUpdate:e=>{let{editor:t}=e;O(t.getHTML())},editable:!j,editorProps:{handlePaste(e,t){var l;let a=(t.clipboardData||(null==t||null==(l=t.originalEvent)?void 0:l.clipboardData)).items;return(async()=>{for(let l=0;l<a.length;l++){let n=await a[l].getAsFile();if(!n)continue;let r=await (0,M.zM)(n),{schema:i}=e.state,o=e.posAtCoords({left:null==t?void 0:t.clientX,top:null==t?void 0:t.clientY}),s=i.nodes.image.create({src:r}),d=e.state.tr.insert((null==o?void 0:o.pos)||0,s);return e.dispatch(d)}})(),!1},handleDrop:(e,t,l,a)=>!a&&t.dataTransfer&&t.dataTransfer.files.length?((async()=>{for(let l=0;l<t.dataTransfer.files.length;l++){let a=t.dataTransfer.files[l];if(a.size/1024/1024>10||"image/jpeg"!==a.type&&"image/png"!==a.type)continue;let n=await (0,M.zM)(a),{schema:r}=e.state,i=e.posAtCoords({left:t.clientX,top:t.clientY}),o=r.nodes.image.create({src:n}),s=e.state.tr.insert((null==i?void 0:i.pos)||0,o);return e.dispatch(s)}})(),!0):(window.alert("Image need to be in jpg or png format and less than 10mb in size."),!1)}});return(0,n.useEffect)(()=>{S&&r&&r(S)},[S]),(0,a.jsx)("div",{className:i()("bg-onNeutralBg ",t),children:(0,a.jsx)(_.m,{px:!0,py:!0,children:(0,a.jsxs)("div",{className:i()("",{"border border-solid border-default":!0===b||!j}),children:[(0,a.jsx)("div",{className:i()("text-defaultText",{hidden:j}),children:(0,a.jsx)("a",{className:"m-2 underline",href:"https://tiptap.dev/docs/editor/api/keyboard-shortcuts",target:"_blank",children:"shortcuts"})}),!N&&(0,a.jsxs)("div",{children:[!j&&(0,a.jsx)(F,{editor:H,disabled:I,children:(0,a.jsx)("button",{className:i()("py-[6px] px-[12px] !border-default bg-transparent text-defaultText",{"!text-primary !bg-primaryForeground":I}),onClick:()=>{null==H||H.chain().focus().run(),!I&&r&&H&&r(H.getHTML()),I&&l&&(null==H||H.commands.setContent(l)),L(!I)},children:(0,a.jsx)(E.FSj,{size:13})})}),(0,a.jsx)(o.$Z,{editor:H,className:i()("text-defaultText bg-onNeutralBg [&>div]:p-3",w)}),I?(0,a.jsx)(P.T,{placeholder:"Type here",wrpClassName:"!max-w-full !w-full",value:l,onChange:e=>{r&&r(e.target.value)}}):(0,a.jsx)(o.$Z,{placeholder:"Type here",editor:H})]}),b&&(0,a.jsx)(C.$,{theme:"primary-outline",onClick:()=>{!N&&v&&v(S||""),T(!N)},children:N?"Edit text":"Save text"})]})})})})},73569:(e,t,l)=>{l.d(t,{l:()=>o});var a=l(95155),n=l(12115),r=l(85203),i=l.n(r);let o=(0,n.memo)(e=>{let{children:t,className:l}=e;return(0,a.jsxs)("div",{className:i()("relative flex justify-center items-center my-5",l),children:[(0,a.jsx)("div",{className:"w-1/3 border-t shrink-0 border-default"}),(0,a.jsx)("span",{className:"mx-4 text-default",children:t}),(0,a.jsx)("div",{className:"w-1/3 border-t shrink-0 border-default"})]})})},76661:(e,t,l)=>{l.d(t,{A:()=>y});var a=l(95155),n=l(80549),r=l(1659),i=l(12115),o=l(38370),s=l(98672),d=l(3123),u=l(11525),c=l(70667),p=l(17287),x=l(25107),m=l(66942),h=l(22544),f=l(54879),g=l(97749),b=l(90311);let v=f.Ik({value:f.Yj()}),j="flex flex-col items-center justify-center w-full gap-2",y=(0,i.memo)(()=>{let[e,t]=(0,x.Wn)(),{user:l,login:f}=(0,d.k)(e=>e),{show:y,hideAll:k}=(0,d.K)(e=>e),[w,N]=(0,i.useState)(0),{handleSubmit:A,setValue:C,getValues:_}=(0,h.mN)({defaultValues:{email:"",value:""},resolver:(0,m.u)(v)}),{locale:T}=(0,s.PZ)(),{mutate:E,isPending:I}=(0,n.useMutation)({mutationFn:()=>r.A.post(u.n.ACCOUNT.VERIFY_EMAIL,{value:+_("value")}),onError:e=>{var t,l;o.toast.error((0,g.pb)(e,null==T||null==(l=T.toast_messages)||null==(t=l.error)?void 0:t.error_occured)),N(0),C("value","")},onSuccess:()=>{o.toast.success("Your email was verified"),f({user:{...l,email_verified:!0}}),y("Success",{text:"Your email was verified.",action:()=>k()})}}),{mutate:L,isPending:S}=(0,n.useMutation)({mutationFn:()=>r.A.get(u.n.ACCOUNT.VERIFY_EMAIL),onError:e=>{var t,l;o.toast.error((0,g.pb)(e,null==T||null==(l=T.toast_messages)||null==(t=l.error)?void 0:t.error_occured))},onSuccess:()=>{N(1)}}),O=I||S||t;return(0,a.jsx)(p.H,{withBorder:!1,activeIdx:w,setActiveIdx:N,disabled:O,items:[{contentClassName:j,children:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(c.$,{loading:O,fullWidth:!0,onClick:A(()=>{L()}),children:T.buttons.get_auth_code}),(0,a.jsx)(c.$,{disabled:O,fullWidth:!0,theme:"outline",onClick:()=>e(),children:T.buttons.logout})]})},{contentClassName:j,children:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(b.E,{disabled:O,onComplete:e=>C("value",e)}),(0,a.jsx)(c.$,{className:"mt-4",fullWidth:!0,onClick:A(()=>{E()}),loading:O,children:T.buttons.submit})]})}]})})},77374:(e,t,l)=>{l.d(t,{b:()=>M});var a=l(95155),n=l(85203),r=l.n(n),i=l(38370),o=l(22544),s=l(12115),d=l(1659),u=l(80549),c=l(55817),p=l(52619),x=l.n(p),m=l(66942),h=l(98672),f=l(11525),g=l(40982),b=l(36139),v=l(70667
1),j=l(17287),y=l(30090),k=l(73569),w=l(25107),N=l(97749),A=l(77367),C=l(85825),_=l(24626),T=l(10630),E=l(70898),I=l(33828),L=l(87344),S=l(34311),O=l(20063);let{AUTH_OPTIONS:F}=b.U,P="flex flex-col items-center justify-center h-full gap-2",M=(0,s.memo)(()=>{var e,t,l,n,p,M,R;let{locale:H}=(0,h.PZ)(),[W,U]=(0,w.m6)("","sign-in-used-last-time"),[D,z]=(0,s.useState)(0),[B,Y]=(0,s.useState)(!1),G=(0,O.useSearchParams)(),$=G.get("backUrl")||"",{register:V,handleSubmit:K,getValues:q,formState:{errors:Z}}=(0,o.mN)({defaultValues:{email:"",password:""},resolver:(0,m.u)(A.I)}),{mutate:X,isPending:Q}=(0,u.useMutation)({mutationFn:e=>{let t={[F.APPLE.key]:"get",[F.GOOGLE.key]:"get",[F.TWITTER.key]:"get",[F.EMAIL_PASSWORD.key]:"post",[F.LINKEDIN.key]:"get",[F.FACEBOOK.key]:"get",[F.EMAIL_CODE.key]:"post"}[e],l={[F.APPLE.key]:f.n.AUTH.APPLE,[F.GOOGLE.key]:f.n.AUTH.GOOGLE,[F.TWITTER.key]:f.n.AUTH.TWITTER,[F.EMAIL_PASSWORD.key]:f.n.AUTH.SIGN_IN,[F.LINKEDIN.key]:f.n.AUTH.LINKEDIN,[F.FACEBOOK.key]:f.n.AUTH.FACEBOOK,[F.EMAIL_CODE.key]:""}[e];U(e);let a=new URLSearchParams;return G.has("backUrl")&&a.append("backUrl",G.get("backUrl")||""),e===F.GOOGLE.key&&a.append("redirectUrl",window.location.origin),d.A[t]("".concat(l,"?").concat(a.toString()),q())},onError:e=>{var t,l;i.toast.error((0,N.pb)(e,null==H||null==(l=H.toast_messages)||null==(t=l.error)?void 0:t.error_occured))},onSuccess:e=>{var t,l;(null==e||null==(t=e.data)?void 0:t.Location)?window.location.href=null==e||null==(l=e.data)?void 0:l.Location:$?window.location.href=$:window.location.href="/dashboard"}}),J=K(()=>{X(F.EMAIL_PASSWORD.key)});return(0,a.jsxs)("form",{onSubmit:J,className:"w-full max-w-[350px] flex flex-col gap-10 transition-all",children:[(0,a.jsx)(j.H,{className:"w-full max-w-[350px]  transition-all",activeIdx:D,setActiveIdx:z,items:[{title:(0,a.jsxs)("div",{className:"flex flex-row items-center justify-between w-full gap-4",children:[(0,a.jsx)("p",{children:"Sign in"})," ",(0,a.jsxs)("button",{onClick:()=>Y(e=>!e),children:[B?(0,a.jsx)(T.nHt,{}):(0,a.jsx)(T.a3o,{})," "]})]}),contentClassName:P,children:(0,a.jsxs)(a.Fragment,{children:[Object.values(F).map(e=>{if(e.enabled)return(0,a.jsx)(c.m_,{className:r()({"z-[999]":W===e.key}),place:B?"top":"right",id:e.key,delayHide:999999,isOpen:W===e.key,defaultIsOpen:W===e.key},e.key)}),(0,a.jsx)(y.c,{withArrow:!0,fullWidth:!0,value:"email & password",onClick:()=>z(2),"data-tooltip-id":F.EMAIL_PASSWORD.key,"data-tooltip-content":H.titles.used_last_time,wrpClassName:r()("mt-5",{hidden:!F.EMAIL_PASSWORD.enabled}),withBg:!0}),(0,a.jsx)(k.l,{className:"hidden",children:null==H||null==(e=H.texts)?void 0:e.or}),(0,a.jsxs)("div",{className:r()("flex flex-col w-full gap-2 gap-y-4",{"!flex-row justify-center flex-wrap":B}),children:[F.EMAIL_CODE.enabled&&(0,a.jsx)(v.$,{"data-tooltip-id":F.EMAIL_CODE.key,"data-tooltip-content":H.titles.used_last_time,loading:Q,fullWidth:!B,theme:"white",type:"button",onClick:()=>{U(F.EMAIL_CODE.key),z(1)},icon:(0,a.jsx)(S.MH0,{size:24}),compact:B,title:H.buttons.continue_with_email_code,children:H.buttons.continue_with_email_code}),F.GOOGLE.enabled&&(0,a.jsx)(v.$,{"data-tooltip-id":F.GOOGLE.key,"data-tooltip-content":H.titles.used_last_time,fullWidth:!B,loading:Q,onClick:()=>{X(F.GOOGLE.key)},theme:"white",type:"button",icon:(0,a.jsx)(L.F4b,{size:24}),compact:B,title:H.buttons.continue_with_google,children:H.buttons.continue_with_google}),F.APPLE.enabled&&(0,a.jsx)(v.$,{"data-tooltip-id":F.APPLE.key,"data-tooltip-content":H.titles.used_last_time,fullWidth:!B,loading:Q,onClick:()=>{X(F.APPLE.key)},theme:"white",type:"button",icon:(0,a.jsx)(E.eMv,{color:"black",size:24}),compact:B,title:H.buttons.continue_with_apple,children:H.buttons.continue_with_apple}),F.TWITTER.enabled&&(0,a.jsx)(v.$,{"data-tooltip-id":F.TWITTER.key,"data-tooltip-content":H.titles.used_last_time,fullWidth:!B,loading:Q,onClick:()=>{X(F.TWITTER.key)},theme:"white",type:"button",icon:(0,a.jsx)(I.TCj,{color:"black",size:24}),compact:B,title:H.buttons.continue_with_twitter_x,children:H.buttons.continue_with_twitter_x}),F.FACEBOOK.enabled&&(0,a.jsx)(v.$,{"data-tooltip-id":F.FACEBOOK.key,"data-tooltip-content":H.titles.used_last_time,fullWidth:!B,loading:Q,onClick:()=>{X(F.FACEBOOK.key)},theme:"white",type:"button",icon:(0,a.jsx)(I.iYk,{size:24,color:"#0866ff"}),compact:B,title:H.buttons.continue_with_facebook,children:H.buttons.continue_with_facebook}),F.LINKEDIN.enabled&&(0,a.jsx)(v.$,{"data-tooltip-id":F.LINKEDIN.key,"data-tooltip-content":H.titles.used_last_time,fullWidth:!B,loading:Q,onClick:()=>{X(F.LINKEDIN.key)},theme:"white",type:"button",icon:(0,a.jsx)(E.QEs,{size:24,color:"#0a66c2"}),compact:B,title:H.buttons.continue_with_linkedin,children:H.buttons.continue_with_linkedin})]})]})},{title:"Sign In",contentClassName:P,children:(0,a.jsx)(C._,{})},{title:"Sign In",contentClassName:P,children:(0,a.jsxs)("div",{"data-tooltip-id":F.EMAIL_PASSWORD.key,"data-tooltip-content":H.titles.used_last_time,className:r()("flex flex-col items-center justify-center w-full h-full gap-2"),children:[(0,a.jsx)(g.p,{...V("email"),placeholder:null==H||null==(l=H.inputs)||null==(t=l.placeholders)?void 0:t.email,type:"email",autoCorrect:"off",autoCapitalize:"none",required:!0,error:null==Z||null==(n=Z.email)?void 0:n.message}),(0,a.jsxs)("div",{className:"w-full",children:[b.U.ENABLE_PASSWORD_RESET&&(0,a.jsx)("button",{type:"button",onClick:()=>z(3),className:"text-defaultText ml-auto text-[0.7rem] opacity-80 block mb-1",children:"Forgot password"}),(0,a.jsx)(g.p,{...V("password"),placeholder:null==H||null==(M=H.inputs)||null==(p=M.placeholders)?void 0:p.password,type:"password",required:!0,error:null==Z||null==(R=Z.password)?void 0:R.message})]}),(0,a.jsx)(v.$,{fullWidth:!0,loading:Q,onClick:K(()=>{X(F.EMAIL_PASSWORD.key)}),className:"mt-4",type:"submit",children:H.buttons.sign_in})]})},{title:"Reset Password",contentClassName:P,children:(0,a.jsx)(_.F,{})}]}),(0,a.jsxs)("div",{className:"flex flex-row flex-wrap justify-center gap-4 text-defaultText",children:[(0,a.jsx)("p",{children:H.texts.dont_have_an_account})," ",(0,a.jsx)(x(),{className:"underline",href:"/sign-up?backUrl=".concat($),children:H.buttons.sign_up})]})]})})},85825:(e,t,l)=>{l.d(t,{_:()=>y});var a=l(95155),n=l(80549),r=l(1659),i=l(40982),o=l(70667),s=l(17287),d=l(11525),u=l(12115),c=l(38370),p=l(98672),x=l(22544),m=l(54879),h=l(66942),f=l(97749),g=l(90311),b=l(20063);let v=m.Ik({email:m.Yj().email(),value:m.Yj()}),j="flex flex-col items-center justify-center gap-4",y=(0,u.memo)(()=>{var e;let[t,l]=(0,u.useState)(0),m=(0,b.useSearchParams)().get("backUrl")||"",{register:y,handleSubmit:k,formState:{errors:w},setValue:N,getValues:A}=(0,x.mN)({defaultValues:{email:"",value:""},resolver:(0,h.u)(v)}),{locale:C}=(0,p.PZ)(),{mutate:_,isPending:T}=(0,n.useMutation)({mutationFn:()=>r.A.post(d.n.AUTH.SIGN_IN,{code:+A("value"),email:A("email")}),onError:e=>{var t,a;l(0),N("value",""),c.toast.error((0,f.pb)(e,null==C||null==(a=C.toast_messages)||null==(t=a.error)?void 0:t.error_occured))},onSuccess:e=>{var t,l;(null==e||null==(t=e.data)?void 0:t.Location)?window.location.href=null==e||null==(l=e.data)?void 0:l.Location:m?window.location.href=m:window.location.href="/dashboard"}}),{mutate:E,isPending:I}=(0,n.useMutation)({mutationFn:()=>r.A.post(d.n.ACCOUNT.GET_CODE,{email:A("email")}),onError:e=>{var t,l;c.toast.error((0,f.pb)(e,null==C||null==(l=C.toast_messages)||null==(t=l.error)?void 0:t.error_occured))},onSuccess:()=>{l(1)}}),L=I||T;return(0,a.jsx)(s.H,{activeIdx:t,setActiveIdx:l,withBorder:!1,disabled:L,items:[{contentClassName:j,children:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.p,{placeholder:C.inputs.placeholders.email,type:"email",...y("email"),error:null==w||null==(e=w.email)?void 0:e.message}),(0,a.jsx)(o.$,{loading:L,fullWidth:!0,onClick:k(()=>{E()}),children:C.buttons.get_auth_code})]})},{contentClassName:j,children:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(g.E,{disabled:L,onComplete:e=>N("value",e)}),(0,a.jsx)(o.$,{fullWidth:!0,onClick:k(()=>{_()}),loading:L,children:C.buttons.submit})]})}]})})},91184:(e,t,l)=>{l.d(t,{X:()=>M});var a=l(95155),n=l(85203),r=l.n(n),i=l(38370),o=l(66942),s=l(22544),d=l(12115),u=l(1659),c=l(80549),p=l(55817),x=l(52619),m=l.n(x),h=l(70898),f=l(33828),g=l(87344),b=l(34311),v=l(10630),j=l(98672),y=l(40982),k=l(70667),w=l(17287),N=l(30090),A=l(73569),C=l(25107),_=l(36139),T=l(11525),E=l(85853),I=l(85825),L=l(97749),S=l(14169),O=l(20063);let{AUTH_OPTIONS:F}=_.U,P="flex flex-col items-center justify-center h-full gap-2",M=(0,d.memo)(()=>{var e,t,l,n,x,_,M,R,H,W,U,D,z,B,Y;let{locale:G}=(0,j.PZ)(),[$,V]=(0,C.m6)("","sign-up-used-last-time"),[K,q]=(0,d.useState)(0),[Z,X]=(0,d.useState)(!1),Q=(0,O.useSearchParams)(),J=Q.get("backUrl")||"",{register:ee,handleSubmit:et,getValues:el,formState:{errors:ea}}=(0,s.mN)({mode:"all",criteriaMode:"all",reValidateMode:"onChange",defaultValues:{email:"",password:""},resolver:(0,o.u)(E.m)}),en=[].concat(null==(t=ea.password)||null==(e=t.types)?void 0:e.invalid_string).filter(
1Boolean),{mutate:er,isPending:ei}=(0,c.useMutation)({mutationFn:e=>{let t={[F.APPLE.key]:"get",[F.GOOGLE.key]:"get",[F.TWITTER.key]:"get",[F.EMAIL_PASSWORD.key]:"post",[F.LINKEDIN.key]:"get",[F.FACEBOOK.key]:"get",[F.EMAIL_CODE.key]:"post"}[e],l={[F.APPLE.key]:T.n.AUTH.APPLE,[F.GOOGLE.key]:T.n.AUTH.GOOGLE,[F.TWITTER.key]:T.n.AUTH.TWITTER,[F.EMAIL_PASSWORD.key]:T.n.AUTH.SIGN_UP,[F.LINKEDIN.key]:T.n.AUTH.LINKEDIN,[F.FACEBOOK.key]:T.n.AUTH.FACEBOOK,[F.EMAIL_CODE.key]:""}[e];V(e);let a=new URLSearchParams;return Q.has("backUrl")&&a.append("backUrl",Q.get("backUrl")||""),e===F.GOOGLE.key&&a.append("redirectUrl",window.location.origin),u.A[t]("".concat(l,"?").concat(a.toString()),el())},onError:e=>{var t,l;i.toast.error((0,L.pb)(e,null==G||null==(l=G.toast_messages)||null==(t=l.error)?void 0:t.error_occured))},onSuccess:e=>{var t,l;(null==e||null==(t=e.data)?void 0:t.Location)?window.location.href=null==e||null==(l=e.data)?void 0:l.Location:J?window.location.href=J:window.location.href="/dashboard"}}),eo=et(()=>{er(F.EMAIL_PASSWORD.key)});return(0,a.jsxs)("form",{onSubmit:eo,className:"w-full max-w-[350px] flex flex-col gap-10 transition-all",children:[(0,a.jsx)(w.H,{className:"w-full max-w-[350px]  transition-all",activeIdx:K,setActiveIdx:q,items:[{title:(0,a.jsxs)("div",{className:"flex flex-row items-center justify-between w-full gap-4",children:[(0,a.jsx)("p",{children:"Sign up"})," ",(0,a.jsxs)("button",{onClick:()=>X(e=>!e),children:[Z?(0,a.jsx)(v.nHt,{}):(0,a.jsx)(v.a3o,{})," "]})]}),contentClassName:P,children:(0,a.jsxs)(a.Fragment,{children:[Object.values(F).map(e=>{if(e.enabled)return(0,a.jsx)(p.m_,{className:r()({"z-[999]":$===e.key}),place:Z?"top":"right",id:e.key,delayHide:999999,isOpen:$===e.key,defaultIsOpen:$===e.key},e.key)}),(0,a.jsx)(N.c,{withArrow:!0,fullWidth:!0,value:"email & password",onClick:()=>q(2),"data-tooltip-id":F.EMAIL_PASSWORD.key,"data-tooltip-content":G.titles.used_last_time,wrpClassName:r()("mt-5",{hidden:!F.EMAIL_PASSWORD.enabled}),withBg:!0}),(0,a.jsx)(A.l,{className:"hidden",children:null==G||null==(l=G.texts)?void 0:l.or}),(0,a.jsxs)("div",{className:r()("flex flex-col w-full gap-2 gap-y-4",{"!flex-row justify-center flex-wrap":Z}),children:[F.EMAIL_CODE.enabled&&(0,a.jsx)(k.$,{"data-tooltip-id":F.EMAIL_CODE.key,"data-tooltip-content":G.titles.used_last_time,loading:ei,fullWidth:!Z,theme:"white",type:"button",onClick:()=>{V(F.EMAIL_CODE.key),q(1)},icon:(0,a.jsx)(b.MH0,{size:24}),compact:Z,title:G.buttons.continue_with_email_code,children:G.buttons.continue_with_email_code}),F.GOOGLE.enabled&&(0,a.jsx)(k.$,{"data-tooltip-id":F.GOOGLE.key,"data-tooltip-content":G.titles.used_last_time,fullWidth:!Z,loading:ei,onClick:()=>{er(F.GOOGLE.key)},theme:"white",type:"button",icon:(0,a.jsx)(g.F4b,{size:24}),compact:Z,title:G.buttons.continue_with_google,children:G.buttons.continue_with_google}),F.APPLE.enabled&&(0,a.jsx)(k.$,{"data-tooltip-id":F.APPLE.key,"data-tooltip-content":G.titles.used_last_time,fullWidth:!Z,loading:ei,onClick:()=>{er(F.APPLE.key)},theme:"white",type:"button",icon:(0,a.jsx)(h.eMv,{color:"black",size:24}),compact:Z,title:G.buttons.continue_with_apple,children:G.buttons.continue_with_apple}),F.TWITTER.enabled&&(0,a.jsx)(k.$,{"data-tooltip-id":F.TWITTER.key,"data-tooltip-content":G.titles.used_last_time,fullWidth:!Z,loading:ei,onClick:()=>{er(F.TWITTER.key)},theme:"white",type:"button",icon:(0,a.jsx)(f.TCj,{color:"black",size:24}),compact:Z,title:G.buttons.continue_with_twitter_x,children:G.buttons.continue_with_twitter_x}),F.FACEBOOK.enabled&&(0,a.jsx)(k.$,{"data-tooltip-id":F.FACEBOOK.key,"data-tooltip-content":G.titles.used_last_time,fullWidth:!Z,loading:ei,onClick:()=>{er(F.FACEBOOK.key)},theme:"white",type:"button",icon:(0,a.jsx)(f.iYk,{size:24,color:"#0866ff"}),compact:Z,title:G.buttons.continue_with_facebook,children:G.buttons.continue_with_facebook}),F.LINKEDIN.enabled&&(0,a.jsx)(k.$,{"data-tooltip-id":F.LINKEDIN.key,"data-tooltip-content":G.titles.used_last_time,fullWidth:!Z,loading:ei,onClick:()=>{er(F.LINKEDIN.key)},theme:"white",type:"button",icon:(0,a.jsx)(h.QEs,{size:24,color:"#0a66c2"}),compact:Z,title:G.buttons.continue_with_linkedin,children:G.buttons.continue_with_linkedin})]})]})},{title:"Sign Up",contentClassName:P,children:(0,a.jsx)(I._,{})},{title:"Sign Up",contentClassName:P,children:(0,a.jsxs)("div",{className:r()("flex flex-col items-center justify-center w-full h-full gap-2"),children:[(0,a.jsx)(y.p,{...ee("name"),placeholder:null==G||null==(x=G.inputs)||null==(n=x.placeholders)?void 0:n.name,required:!0,error:null==ea||null==(_=ea.name)?void 0:_.message}),(0,a.jsx)(y.p,{...ee("email"),placeholder:null==G||null==(R=G.inputs)||null==(M=R.placeholders)?void 0:M.email,type:"email",autoCorrect:"off",autoCapitalize:"none",required:!0,error:null==ea||null==(H=ea.email)?void 0:H.message}),(0,a.jsx)(y.p,{...ee("password"),placeholder:null==G||null==(U=G.inputs)||null==(W=U.placeholders)?void 0:W.password,type:"password",required:!0,error:null==ea||null==(D=ea.password)?void 0:D.message}),(0,a.jsx)(S.U,{type:"password",errorsList:en}),(0,a.jsx)(y.p,{...ee("confirmPassword"),placeholder:null==G||null==(B=G.inputs)||null==(z=B.placeholders)?void 0:z.password_repeat,type:"password",required:!0,error:null==ea||null==(Y=ea.confirmPassword)?void 0:Y.message}),(0,a.jsx)(k.$,{fullWidth:!0,loading:ei,onClick:et(()=>{er(F.EMAIL_PASSWORD.key)}),className:"mt-4",type:"submit",children:G.buttons.sign_up})]})}]}),(0,a.jsxs)("div",{className:"flex flex-row flex-wrap justify-center gap-4 text-defaultText",children:[(0,a.jsx)("p",{children:G.texts.already_have_an_account})," ",(0,a.jsx)(m(),{className:"underline",href:"/sign-in?backUrl=".concat(J),children:G.buttons.sign_in})]})]})})},95409:(e,t,l)=>{l.d(t,{S:()=>s});var a=l(95155),n=l(85203),r=l.n(n),i=l(31640),o=l(12115);let s=(0,o.memo)(e=>{let{label:t,checked:l,disabled:n,onChange:s,labelClassName:d,wrpClassName:u,required:c=!1}=e,p=(0,o.useId)();return(0,a.jsxs)("div",{className:r()("flex flex-row items-center",u),children:[(0,a.jsx)("input",{checked:l,className:r()("relative float-left  mr-[6px] mt-[0.15rem] h-[1.125rem] w-[1.125rem]"),type:"checkbox",id:p,onChange:s,disabled:n}),t&&(0,a.jsx)("label",{className:r()("inline-block pl-[0.15rem] hover:cursor-pointer text-defaultText",d),htmlFor:p,children:t}),(0,a.jsx)(i.I,{visible:c})]})})}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.