PageSourceSearch

https://www.u-school.org/_next/static/chunks/61633-db163f1526320552.js

js u-school.org collected 2026-10-02 14:32:52 UTC 49,843 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[61633],{152:(e,t,l)=>{l.d(t,{A:()=>o});var a=l(95155),s=l(12115),i=l(22544);let r={},n=e=>{let{defaultValues:t=r,nestedMapping:l,onSubmit:n,className:o,autoComplete:c="on",showValidationFailedMsg:d=!0,preventReset:u=!1,preventValidationScroll:m=!1,onDirty:x,children:h,ref:j}=e,f=(0,s.useMemo)(()=>((e,t)=>{if(t){for(let[l,a]of(e={...e},Object.entries(t)))if(e[l]&&"object"==typeof e[l]){for(let[t,s]of Object.entries(e[l]))e["".concat(a,"_").concat(t)]=s;delete e[l]}}return e})(t,l),[t,l]),p=s.useRef(null),v=(0,i.mN)({defaultValues:f}),{reset:g,formState:{isDirty:b}}=v;(0,s.useImperativeHandle)(j,()=>({submit(){var e;null==(e=p.current)||e.dispatchEvent(new Event("submit",{cancelable:!0,bubbles:!0}))},setValue:v.setValue,getValues:v.getValues,setError:v.setError,clearErrors:v.clearErrors,formState:v.formState,reset:v.reset,setFocus:v.setFocus,validate:v.trigger}),[p,v]);let y=!!Object.keys(v.formState.errors).length;return(0,s.useEffect)(()=>{x&&x(b)},[b,x]),(0,s.useEffect)(()=>{u||g(f)},[f,g,u]),(0,s.useEffect)(()=>{if(y&&!m){let e=document.querySelector(".main-wrapper");null==e||e.scrollTo({top:0,behavior:"smooth"})}},[y,m]),(0,a.jsx)(i.Op,{...v,children:(0,a.jsxs)("form",{className:o,onSubmit:e=>(e.preventDefault(),e.stopPropagation(),v.handleSubmit(e=>{if(Object.keys(e=((e,t)=>{if(t)for(let[l,a]of Object.entries(t)){let t={};for(let[l,s]of Object.entries(e))l.startsWith("".concat(a,"_"))&&(t[l.slice(l.indexOf("_")+1)]=s,delete e[l]);e[l]=t}return e})(e,l)).forEach(t=>{t.startsWith("vf_")&&delete e[t]}),n)return n(e)})(e)),autoComplete:c,ref:p,children:[d&&y&&(0,a.jsxs)("div",{className:"alert alert-danger",role:"alert",children:["Validation Failed: Please update the invalid fields accordingly."," "]}),h]})})};n.displayName="Form";let o=s.memo(n)},1137:(e,t,l)=>{l.d(t,{A:()=>d});var a=l(95155);l(12115);var s=l(22544),i=l(50046),r=l(55060),n=l(15345),o=l(84980);let c=(0,i.Tf)("Link",(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",height:"20",width:"20",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622 1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244"})}),e=>{let{$selection:t}=e;if((null==t?void 0:t.nodeName)==="A")(()=>{let e=document.getSelection();if(!e||0===e.rangeCount)return;let t=e.getRangeAt(0).commonAncestorContainer;for(;t&&t.nodeType!==Node.ELEMENT_NODE&&t.parentNode;)t=t.parentNode;if(t&&"A"===t.tagName){let e=t.parentNode;if(e){for(;t.firstChild;)e.insertBefore(t.firstChild,t);e.removeChild(t)}}})();else{var l;let e=null==(l=document.getSelection())?void 0:l.toString(),t=prompt("URL",""),a=t?'<a href="'.concat(t,'" target="_blank">').concat(e||t,"</a>"):e;a&&(e=>{let t=document.getSelection();if(!t||0===t.rangeCount)return;let l=t.getRangeAt(0);l.deleteContents();let a=document.createElement("div");a.innerHTML=e;let s=document.createDocumentFragment();for(;a.firstChild;)s.appendChild(a.firstChild);l.insertNode(s),t.removeAllRanges()})(a)}}),d=function(e){let{name:t,label:l,hint:d,height:u,hideToolbar:m,disabled:x,classNameLabel:h,admin:j,config:f={toolbar:"forecolor backcolor"}}=e,{control:p,formState:{errors:v}}=(0,s.xW)(),g=["rsw-editor","form-control","bg-white"];v&&v[t]&&g.push("is-invalid"),u&&g.push("tall");let b=m||x&&!j?null:(0,a.jsxs)(i.M7,{children:[(0,a.jsx)(i.d,{}),(0,a.jsx)(i.vo,{}),(0,a.jsx)(i.wv,{}),(0,a.jsx)(i.YT,{}),(0,a.jsx)(i.hh,{}),(0,a.jsx)(i.vP,{}),(0,a.jsx)(i.QQ,{}),(0,a.jsx)(i.wv,{}),(0,a.jsx)(i.FT,{}),(0,a.jsx)(i.tR,{}),(0,a.jsx)(i.wv,{}),(0,a.jsx)(c,{}),(0,a.jsx)(i.Fh,{}),(0,a.jsx)(i.wv,{}),(0,a.jsx)(i.vf,{})]});return(0,a.jsxs)("div",{className:v?"was-validated":"",children:[(0,a.jsx)(r.A,{label:l,required:null==f?void 0:f.required,className:h}),(0,a.jsx)(s.xI,{render:e=>{let{field:{onChange:t,value:l}}=e;return(0,a.jsx)(i.zz,{children:(0,a.jsx)(i.KE,{value:l,onChange:t,disabled:x,containerProps:{className:g.join(" "),style:{resize:"vertical"}},children:b})})},control:p,name:t,rules:f,defaultValue:""}),(0,a.jsx)(o.A,{error:v[t]}),(0,a.jsx)(n.A,{hint:d})]})}},1950:(e,t,l)=>{l.d(t,{A:()=>c});var a=l(95155),s=l(12115),i=l(32580),r=l.n(i),n=l(15633),o=l(78542);let c=function(e){let t,{file:l,imageProps:i={fill:!0},isPrivate:c=!1,enableLightbox:d=!1,enableDownload:u=!1,fullSizeIcons:m=!1,minimalPreview:x=!1,lightColor:h=!1,withPadding:j=!1,className:f=""}
1=e,[p,v]=(0,s.useState)(!1),g=["image/jpeg","image/png","image/gif","image/webp"],b=["video/mp4","video/webm","video/ogg","video/quicktime"],y={style:{objectFit:"contain"}},N={...y.style,...i.style||{}},A={...y,...i,style:N};if(l instanceof FileList){let e=l.item(0);if(!e)throw Error("FileList is empty");let a=g.includes(e.type)||b.includes(e.type);t={id:-1,mime:e.type,name:e.name,size:e.size,url:a||u?URL.createObjectURL(e):"",isPreview:!0}}else if(l instanceof File){let e=g.includes(l.type)||b.includes(l.type);t={id:-1,mime:l.type,name:l.name,size:l.size,url:e||u?URL.createObjectURL(l):"",isPreview:!0}}else t=l;if(g.includes(t.mime||"")){let e,l;return t.isPreview||c?e=t.url:(e=(0,o.VG)(t,"small","hub"),l=(0,o.VG)(t,"full","hub")),(0,a.jsx)(n.default,{...A,src:e,enableLightbox:d,lightboxSrc:l,unoptimized:t.isPreview||!1,alt:(null==t?void 0:t.name)||"preview",className:f})}if(b.includes(t.mime||"")){let e;return t.isPreview,e=t.url,(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"position-relative w-100 h-100 pi-border-radius",style:{cursor:d?"pointer":"default",backgroundColor:"#000"},onClick:()=>{d&&v(!0)},children:[(0,a.jsx)(r(),{url:e,width:"100%",height:"100%",controls:!d,light:!0,style:{pointerEvents:d?"none":"auto"}}),d&&(0,a.jsx)("div",{className:"position-absolute bottom-0 start-0 end-0 text-center pb-2",children:(0,a.jsx)("small",{className:"text-white",children:"Click to open preview"})})]}),d&&p&&(0,a.jsxs)("div",{className:"lightbox-overlay dismiss",onClick:()=>v(!1),children:[(0,a.jsx)("div",{style:{width:"90%",height:"90%",maxWidth:"1200px"},children:(0,a.jsx)(r(),{url:e,width:"100%",height:"100%",controls:!0,playing:!0})}),(0,a.jsx)("span",{className:"dismiss",onClick:()=>v(!1),children:"X"})]})]})}{let e=h?"text-light":"text-dark",l=(0,o.ti)(t.mime||"");if(x)return(0,a.jsx)("span",{className:"pi-file-image",title:t.name,children:(0,a.jsx)("i",{className:"me-3 ".concat(e," fa-3x fal ").concat(l.icon)})});if(m)return(0,a.jsx)("div",{className:"pi-file-image text-center",children:(0,a.jsx)("i",{className:"me-3 ".concat(e," fa-7x fal ").concat(l.icon)})});let s=(0,a.jsxs)("div",{className:"pi-file-image"+(j||t.isPreview?" p-3":""),children:[(0,a.jsx)("i",{className:"standalone float-start me-3 ".concat(e," fal ").concat(l.icon)}),(0,a.jsx)("p",{className:"m-0 ".concat(e),children:(0,a.jsx)("strong",{children:t.name})}),(0,a.jsx)("p",{className:"m-0 ".concat(e),children:(0,o.Xq)(t.size,t.isPreview?"b":"kb")})]});return u?(0,a.jsx)("a",{className:"no-arrow",href:t.url,target:"_blank",rel:"noreferrer",children:s}):s}}},10296:(e,t,l)=>{l.d(t,{A:()=>x});var a=l(95155),s=l(12115),i=l(22544),r=l(60382),n=l(60444),o=l(55060),c=l(15345),d=l(84980),u=l(76282);let m={},x=function(e){let{name:t,label:l,hint:x,config:h=m,classNameLabel:j,onChange:f,valueProp:p="id",fetchUrl:v,getOptions:g,asNumber:b=!0,disabled:y,firstOption:N,ariaLabel:A="Select Item"}=e,{data:C,isLoading:w,isError:k}=(0,u.useFetch)(v),{register:F,watch:S,getValues:_,setValue:E,formState:{errors:q}}=(0,i.xW)(),L=S(t),W=h;b&&(W={...h,valueAsNumber:!0}),(0,s.useEffect)(()=>{f&&C&&f(C.find(e=>e[p]==L))},[L,C,p,f]),(0,s.useEffect)(()=>{C&&E(t,_(t))},[C,t,E,_]),W.validate=e=>"blank"!==e||"This field is required";let I=[];return!w&&C&&(I=C.map((e,t)=>g?g(e,t):(0,a.jsx)("option",{value:e[p],children:e.title},e.id)),N&&I.unshift(N)),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.A,{label:l,required:W.required,className:j}),k?(0,a.jsx)(n.default,{error:{},message:"Failed to fetch remote options (".concat(v,")"),showMinimal:!0}):(0,a.jsx)(r.A.Select,{"aria-label":A,isInvalid:!!q[t],disabled:y||w,...F(t,W),children:I}),(0,a.jsx)(d.A,{error:q[t]}),(0,a.jsx)(c.A,{hint:x})]})}},15345:(e,t,l)=>{l.d(t,{A:()=>i});var a=l(95155);l(12115);var s=l(60382);let i=function(e){let{hint:t,className:l}=e;return t?(0,a.jsxs)(s.A.Text,{muted:!0,className:"pi-e-hint fst-italic".concat(l?" ".concat(l):""),children:[(0,a.jsx)("i",{className:"fal fa-info-circle me-1"}),t]}):null}},15633:(e,t,l)=>{l.d(t,{default:()=>r});var a=l(95155),s=l(12115),i=l(15239);let r=e=>{let{src:t,alt:l,enableLightbox:r=!1,lightboxSrc:n,...o}
1=e,[c,d]=(0,s.useState)(!1),u=()=>{d(!1)};return r&&((null==o?void 0:o.style)||(o.style={}),o.style.cursor="pointer"),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.default,{src:t,alt:l,...o,onClick:()=>{r&&d(!0)}}),r&&c&&(0,a.jsxs)("div",{className:"lightbox-overlay dismiss",onClick:u,children:[(0,a.jsx)("div",{children:(0,a.jsx)(i.default,{src:n||t,alt:"Preview",fill:!0})}),(0,a.jsx)("span",{className:"dismiss",onClick:u,children:(0,a.jsx)("i",{className:"fal fa-times"})})]})]})}},20690:(e,t,l)=>{l.d(t,{A:()=>i});var a=l(12115),s=l(76282);function i(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0],{data:t,isLoading:l}=(0,s.useFetch)(e?"/languages?_limit=300":null),i=(0,a.useMemo)(()=>t?new Map(t.map(e=>[String(e.id),e.name])):new Map,[t]);return{languages:t,isLoading:l,getLanguageName:(0,a.useCallback)(e=>i.get(String(e)),[i])}}},55060:(e,t,l)=>{l.d(t,{A:()=>r});var a=l(95155);l(12115);var s=l(60382),i=l(23878);let r=function(e){let{label:t,htmlFor:l,required:r,tooltip:n,tooltipId:o,className:c}=e;if(!t)return null;let d=(0,a.jsxs)(s.A.Label,{htmlFor:l,className:c,children:[t,r&&(0,a.jsx)("span",{className:"required",children:" *"}),n&&(0,a.jsxs)(a.Fragment,{children:[" ",(0,a.jsx)("i",{className:"fal fa-question-circle"})]})]});return n?(0,a.jsx)(i.A,{text:n,id:o,children:d}):d}},61633:(e,t,l)=>{l.d(t,{Hl:()=>u,t8:()=>j,n9:()=>b,VY:()=>y,Oi:()=>F,ef:()=>S.A,lV:()=>_.A,gE:()=>E,io:()=>W,dN:()=>R,pd:()=>M,dj:()=>T.A,pZ:()=>V,nJ:()=>D,RT:()=>G.A,Ms:()=>K,xf:()=>Z,r6:()=>ee,XD:()=>et.A,R:()=>ea,Ir:()=>ei,z6:()=>er,Q6:()=>eo,sD:()=>ec.A,jU:()=>ed,l6:()=>P,Cx:()=>ex,TM:()=>ej,GW:()=>ep,lM:()=>eg,tP:()=>eb.A,S$:()=>ey,Tu:()=>eS,yt:()=>e_,UU:()=>k});var a=l(95155),s=l(12115),i=l(22544),r=l(60382),n=l(33599),o=l(76282),c=l(15345);let d={},u=e=>{let{name:t,type:l,hint:u,onChange:m,onInit:x,config:h=d,className:j="py-4",disabled:f}=e,{data:p,isLoading:v}=(0,o.useFetch)("/acupuncture-points?".concat(l?"type=".concat(l,"&"):"","_sort=title")),{register:g,watch:b,setValue:y}=(0,i.xW)(),N=b(t),A=(0,s.useRef)(!1);(0,s.useEffect)(()=>{g(t,h)},[g,t,h]),(0,s.useEffect)(()=>{x&&N&&!A.current&&!v&&p&&(x(N.map(e=>p.find(t=>t.id===e)).filter(Boolean)),A.current=!0)},[N,p,v,x]);let C=e=>{let l,a=N||[],s=parseInt(e.target.id.split("-").pop()||"0",10);l=e.target.checked?[...a,s]:a.filter(e=>e!==s),m&&p&&m(l.map(e=>p.find(t=>t.id===e)).filter(Boolean)),y(t,l)},w=[];if(!v&&p){let e;w=p.map(t=>(e=null==N?void 0:N.includes(t.id),(0,a.jsx)("div",{className:"col-6",children:(0,a.jsx)(r.A.Group,{controlId:"cb-"+t.id,children:(0,a.jsx)(r.A.Check,{type:"checkbox",name:"cb-"+t.id,label:t.title,onChange:C,checked:e,disabled:f})})},t.id)))}return(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)(n.default,{className:"mb-4 "+j,children:[w,(0,a.jsx)(c.A,{hint:u})]})})};var m=l(12856),x=l(78542);let h=s.forwardRef((e,t)=>{let{name:l,label:n,hint:o,config:c={},disabled:d,className:u,variant:h,maxWords:j,onChange:f,onFocus:p,onBlur:v,autoFocus:g}=e,{control:b,watch:y,formState:{errors:N}}=(0,i.xW)(),A=(0,s.useRef)(null),C=(0,s.useRef)(null),w=y(l),k={...c};j&&!k.validate&&(k={...k,validate:e=>!e||e.split(/\s+/).length<=j||"Maximum word count is ".concat(j)}),(0,s.useEffect)(()=>{let e=A.current;return e&&(C.current=(e=>{let t=e.style,l=()=>{t.height="auto",t.height=e.scrollHeight+"px"};e.addEventListener("input",l),e.addEventListener("change",l);let a=!1;return{update:l,destroy:function(){a||(a=!0,e.removeEventListener("input",l),e.removeEventListener("change",l))}}})(e),t&&("function"==typeof t?t(e):t.current=e)),()=>{var e;return null==(e=C.current)?void 0:e.destroy()}},[t]);let F=(0,s.useMemo)(()=>j&&(null==w?void 0:w.length)?w.split(/\s+/).length:0,[w,j]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(r.A.Label,{children:[n," ",(null==k?void 0:k.required)&&(0,a.jsx)("span",{className:"required",children:"*"})]}),(0,a.jsx)(i.xI,{render:e=>{let{field:{onChange:t,onBlur:s,value:i}}=e;if(i&&"string"==typeof i&&A.current){var r;
1A.current.value=i||"",null==(r=C.current)||r.update()}return(0,a.jsx)(m.A,{as:"textarea",ref:A,className:"auto-growing-textarea "+(h||"")+(u?" "+u:""),isInvalid:!!N[l],disabled:d,rows:1,value:i||"",onChange:e=>{t(e),f&&f(e.target.value)},onBlur:e=>{s(),v&&v(e)},onFocus:p,autoFocus:g})},control:b,name:l,rules:k,defaultValue:"",shouldUnregister:!0}),(0,a.jsx)(r.A.Control.Feedback,{type:"invalid",children:N[l]&&(0,x.Kt)(N[l])}),o&&(0,a.jsxs)(r.A.Text,{muted:!0,className:"fst-italic",children:[(0,a.jsx)("i",{className:"fal fa-info-circle me-1"}),o]}),j&&(0,a.jsxs)(r.A.Text,{children:[" (word count: ",F,")"]})]})});h.displayName="AutoGrowingTextarea";let j=h;var f=l(59269);l(22522);var p=l(55060),v=l(84980);let g={},b=function(e){let{name:t,label:l,hint:s,displayFormat:r="MM/dd/yyyy",placeholder:n="mm/dd/yyyy",disabled:o,classNameLabel:d,config:u=g,shouldUnregister:m=!0,onChange:h}=e,{control:j,getValues:b,formState:{errors:y}}=(0,i.xW)(),N={...u};if(N.validate){let e=N.validate;N.validate=t=>e(t,b)}return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(p.A,{label:l,required:N.required,
1className:d}),(0,a.jsx)(i.xI,{render:e=>{let{field:{onChange:l,onBlur:s,value:i}}=e,c=i;return i&&"string"==typeof i&&(c=(0,x.EH)(i)),(0,a.jsx)(f.default,{inputProps:{className:"form-control"+(y[t]?" is-invalid":""),disabled:o},placeholder:n,format:r,formatDate:x.Yq,parseDate:x._U,value:c,onDayChange:e=>{l(e||""),h&&h(e)},onBlur:s})},control:j,name:t,rules:N,defaultValue:"",shouldUnregister:m}),(0,a.jsx)(v.A,{error:y[t]}),(0,a.jsx)(c.A,{hint:s})]})},y=function(e){let{text:t,className:l,style:s}=e;return t?(0,a.jsx)("div",{className:l,style:s,dangerouslySetInnerHTML:{__html:t}}):null};var N=l(63365),A=l(26549);let C={},w=Object.keys(A.P7).filter(e=>!A.jf.has(e));function k(){let e={other_value:""};for(let t of w)e[t]=!1;return e}let F=e=>{let{name:t="experience",label:l="Theory U Experience",hint:o,config:d=C,className:u="py-4",disabled:m,colWidth:x=6}=e,{register:h,watch:j,setValue:f}=(0,i.xW)(),p=j("".concat(t,".other"));return(0,s.useEffect)(()=>{!1===p&&f("".concat(t,".other_value"),"")},[p,t,f]),(0,a.jsxs)(n.default,{className:"mb-2 ".concat(u),children:[l&&(0,a.jsxs)(N.default,{sm:12,children:[(0,a.jsx)("strong",{className:"mb-3 fw-bold",children:l}),(0,a.jsx)(c.A,{hint:o,className:"d-block mb-3"})]}),w.map(e=>{let l=A.P7[e],s="".concat(t,".").concat(e);return"other"===e?(0,a.jsxs)(N.default,{sm:12,children:[(0,a.jsx)(r.A.Check,{type:"checkbox",id:"el-form-".concat(s),className:"d-inline-block small-text",label:"".concat(l,": "),disabled:m,...h(s,d)}),(0,a.jsx)("div",{className:"d-inline-block ms-2 small-text",style:{width:"60%"},children:(0,a.jsx)(r.A.Control,{size:"sm",className:"py-0",placeholder:'Please define "Other"',disabled:m||!p,...h("".concat(t,".other_value"))})})]},e):(0,a.jsx)(N.default,{sm:x,children:(0,a.jsx)(r.A.Check,{type:"checkbox",id:"el-form-".concat(s),className:"d-inline-block small-text",label:l,disabled:m,...h(s,d)})},e)})]})};var S=l(77203),_=l(152);function E(e){let{children:t,...l}=e;return(0,a.jsx)(r.A.Group,{...l,children:t})}var q=l(87606);let L=e=>!e||!e.trim(),W=e=>{let{name:t,hint:l,maxCount:s=5,meta:n}=e,o=(null==n?void 0:n.hosts_label_plural)||"Hosts",c=(null==n?void 0:n.members_label_plural)||"Members",d=(null==n?void 0:n.followers_label_plural)||"Followers",{field:{onChange:u,value:m},fieldState:{invalid:x}}=(0,i.as)({name:t,rules:{validate:e=>!e||e.every(e=>!L(e.label)&&!L(e.url)&&!L(e.allowed_roles))},defaultValue:[]}),h=(e,t)=>{let l=[...m];"label"===t.target.name?l[e].label=t.target.value:"url"===t.target.name?l[e].url=t.target.value:l[e].allowed_roles=t.target.value,u(l)},j=[];return m&&(j=m.map((e,l)=>(0,a.jsxs)("div",{className:"row my-3 input-group",style:{width:"100%"},children:[(0,a.jsx)(r.A.Control,{placeholder:"Button label (what the user sees)",className:"col-auto mx-3",name:"label",value:e.label,isInvalid:x&&L(e.label),onChange:e=>h(l,e)}),(0,a.jsx)(r.A.Control,{placeholder:"URL (where the button leads to)",className:"col-auto mx-3",name:"url",value:e.url,isInvalid:x&&L(e.url),onChange:e=>h(l,e)}),(0,a.jsxs)(r.A.Select,{name:"allowed_roles",className:"col-auto mx-3",value:e.allowed_roles?e.allowed_roles:"",isInvalid:x&&L(e.allowed_roles),onChange:e=>h(l,e),children:[(0,a.jsx)("option",{value:"",children:"–– Who should see this? ––"}),(0,a.jsxs)("option",{value:"hosts",children:[o," only"]}),(0,a.jsxs)("option",{value:"members",children:[o," and ",c]}),(0,a.jsxs)("option",{value:"followers",children:[o,", ",c," and ",d]}),(0,a.jsx)("option",{value:"all",children:"Everybody"})]}),(0,a.jsx)("div",{className:"form-group col-auto",children:(0,a.jsx)("button",{className:"btn btn-link me-3",type:"button",onClick:()=>(e=>{let t=[...m];t.splice(e,1),u(t)})(l),children:(0,a.jsx)("i",{className:"fal fa-minus"})})})]},"".concat(t,"-").concat(l)))),(0,a.jsxs)("div",{className:"DynamicLinks",children:[x&&(0,a.jsx)(q.default,{className:"alert-danger",children:"Link labels or urls cannot be empty and please define for each link, who should be allowed to see them. Please remove empty rows."}),j,j.length<s&&(0,a.jsxs)("button",{className:"btn btn-primary border-0",type:"button",onClick:()=>void u([...m||[],{label:"",url:"",allowed_roles:""}]),children:[(0,a.jsx)("i",{className:"fal fa-plus"}),j.length<1?" Add first link":" Add another link"]}),l&&(0,a.jsxs)(r.A.Text,{muted:!0,className:"fst-italic",children:[(0,a.jsx)("i",{className:"fal fa-info-circle me-1"}),l]})]})},I={},P=function(e){let{name:t,label:l,hint:n,config:o=I,className:d,classNameLabel:u,onChange:m,disabled:x,children:h}=e,{register:j,watch:f,getValues:g,formState:{errors:b}}=(0,i.xW)(),y=f(t),N=(0,s.useRef)(m);N.current=m;let A={...o};if(A.validate){let e=A.validate;A.validate=t=>e(t,g)}return(0,s.useEffect)(()=>{N.current&&N.current(y)},[y]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(p.A,{label:l,required:A.required,
1className:u}),(0,a.jsx)(r.A.Select,{className:d,"aria-label":l,isInvalid:!!b[t],disabled:x,...j(t,A),children:h}),(0,a.jsx)(v.A,{error:b[t]}),(0,a.jsx)(c.A,{hint:n})]})},R=function(e){return(0,a.jsxs)(P,{...e,children:[(0,a.jsx)("option",{value:"1",children:"1 am"}),(0,a.jsx)("option",{value:"2",children:"2 am"}),(0,a.jsx)("option",{value:"3",children:"3 am"}),(0,a.jsx)("option",{value:"4",children:"4 am"}),(0,a.jsx)("option",{value:"5",children:"5 am"}),(0,a.jsx)("option",{value:"6",children:"6 am"}),(0,a.jsx)("option",{value:"7",children:"7 am"}),(0,a.jsx)("option",{value:"8",children:"8 am"}),(0,a.jsx)("option",{value:"9",children:"9 am"}),(0,a.jsx)("option",{value:"10",children:"10 am"}),(0,a.jsx)("option",{value:"11",children:"11 am"}),(0,a.jsx)("option",{value:"12",children:"12 pm"}),(0,a.jsx)("option",{value:"13",children:"1 pm / 13"}),(0,a.jsx)("option",{value:"14",children:"2 pm / 14"}),(0,a.jsx)("option",{value:"15",children:"3 pm / 15"}),(0,a.jsx)("option",{value:"16",children:"4 pm / 16"}),(0,a.jsx)("option",{value:"17",children:"5 pm / 17"}),(0,a.jsx)("option",{value:"18",children:"6 pm / 18"}),(0,a.jsx)("option",{value:"19",children:"7 pm / 19"}),(0,a.jsx)("option",{value:"20",children:"8 pm / 20"}),(0,a.jsx)("option",{value:"21",children:"9 pm / 21"}),(0,a.jsx)("option",{value:"22",children:"10 pm / 22"}),(0,a.jsx)("option",{value:"23",children:"11 pm / 23"}),(0,a.jsx)("option",{value:"00",children:"12 midnight / 24"})]})},z={},M=function(e){let{name:t,label:l,hint:n,type:o="text",config:d=z,className:u,classNameLabel:m,placeholder:h,disabled:j,step:f,min:g,max:b,autoFocus:y,onFocus:N,onBlur:A,tooltip:C,autoComplete:w,style:k,onChange:F,onClick:S}=e,{register:_,watch:E,getValues:q,formState:{errors:L}}=(0,i.xW)(),W=E(t);(0,s.useEffect)(()=>{null!=W&&(F?F(W):S&&S(W))},[W,F,S]);let I=(0,x.Jt)(L,t),P={...d};"number"===o&&(P={...P,valueAsNumber:!0});let R=o;if("email"===o&&(P={...P,pattern:{value:x.Xw,message:"Email is invalid"}},R="text"),P.validate){let e=P.validate;P.validate=t=>e(t,q)}let M=_(t,P);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(p.A,{label:l,required:P.required,tooltip:C,tooltipId:"tooltip-".concat(t),className:m}),(0,a.jsx)(r.A.Control,{className:u,placeholder:h,step:f,type:R,max:b,min:g,disabled:j,isInvalid:!!I,onFocus:N,autoFocus:y,autoComplete:w,style:k,...M,onBlur:e=>{M.onBlur(e),null==A||A(e)}}),(0,a.jsx)(v.A,{error:I}),(0,a.jsx)(c.A,{hint:n})]})};var T=l(10296),O=l(20690);let B={},V=e=>{let{name:t,label:l,valueProp:n="id",hint:o,config:c=B,disabled:d,blankLabel:u="-- Please choose a language --"}=e,{languages:m,isLoading:h}=(0,O.A)(),{register:j,getValues:f,setValue:p,formState:{errors:v}}=(0,i.xW)();(0,s.useEffect)(()=>{if(m){let e=f(t);void 0!==e&&""!==e&&p(t,e)}},[m,t,p,f]);let g={...c,validate:e=>{if((null==c?void 0:c.required)&&""===e)return"This field is required"}},b=[];return!h&&m&&(b=m.map(e=>(0,a.jsx)("option",{value:e[n],children:e.name},e.id))).unshift((0,a.jsx)("option",{value:"",children:u},"blank")),(0,a.jsxs)(a.Fragment,{children:[l&&(0,a.jsxs)(r.A.Label,{children:[l," ",(null==c?void 0:c.required)&&(0,a.jsx)("span",{className:"required",children:"*"})]}),(0,a.jsx)(r.A.Select,{"aria-label":"Preferred language",isInvalid:!!v[t],disabled:d||h,...j(t,g),children:b}),(0,a.jsx)(r.A.Control.Feedback,{type:"invalid",children:v&&(0,x.Kt)(v[t])}),o&&(0,a.jsxs)(r.A.Text,{muted:!0,className:"fst-italic",children:[(0,a.jsx)("i",{className:"fal fa-info-circle me-1"}),o]})]})},U={},D=function(e){let{name:t,label:l,name2:r,label2:n,context:o,config:c=U,onChange:d}=e,{register:u,watch:m,setValue:x}=(0,i.xW)(),h=m(t),j=r?m(r):void 0;switch((0,s.useEffect)(()=>{u(t,c)},[u,t,c]),(0,s.useEffect)(()=>{r&&u(r,c)},[u,r,c]),(0,s.useEffect)(()=>{d&&d(h)},[h,d]),o){case"InfoCard":return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(p.A,{label:l}),(0,a.jsxs)("ul",{className:"card-layout-picker",children:[(0,a.jsx)("li",{children:(0,a.jsx)("a",{className:"layout-button "+(h&&"txt-bottom"==h?"active":""),onClick:()=>x(t,"txt-bottom"),children:(0,a.jsx)("img",{src:"/assets/layout-txt-bottom.jpg"})})}),(0,a.jsx)("li",{children:(0,a.jsx)("a",{className:"layout-button "+(h&&"txt-right"==h?"active":""),onClick:()=>x(t,"txt-right"),children:(0,a.jsx)("img",{src:"/assets/layout-txt-right-1-1.jpg"})})}),(0,a.jsx)("li",{children:(0,a.jsx)("a",{className:"layout-button "+(h&&"txt-right-2-1"==h?"active":""),onClick:()=>x(t,"txt-right-2-1"),children:(0,a.jsx)("img",{src:"/assets/layout-txt-right-2-1.jpg"})})}),(0,a.jsx)("li",{children:(0,a.jsx)("a",{className:"layout-button "+(h&&"txt-right-1-2"==h?"active":""),onClick:()=>x(t,"txt-right-1-2"),children:(0,a.jsx)("img",{src:"/assets/layout-txt-right-1-2.jpg"})})}),(0,a.jsx)("li",{children:(0,a.jsx)("a",{className:"layout-button "+(h&&"txt-left"==h?"active":""),onClick:()=>x(t,"txt-left"),children:(0,a.jsx)("img",{src:"/assets/layout-txt-left-1-1.jpg"})})}),(0,a.jsx)("li",{children:(0,a.jsx)("a",{className:"layout-button "+(h&&"txt-left-2-1"==h?"active":""),onClick:()=>x(t,"txt-left-2-1"),children:(0,a.jsx)("img",{src:"/assets/layout-txt-left-2-1.jpg"})})}),(0,a.jsx)("li",{children:(0,a.jsx)("a",{className:"layout-button "+(h&&"txt-left-1-2"==h?"active":""),onClick:()=>x(t,"txt-left-1-2"),children:(0,a.jsx)("img",{src:"/assets/layout-txt-left-1-2.jpg"})})}),(0,a.jsx)("li",{children:(0,a.jsx)("a",{className:"layout-button "+(h&&"txt-overlay"==h?"active":""),onClick:()=>x(t,"txt-overlay"),children:(0,a.jsx)("img",{src:"/assets/layout-txt-overlay.jpg"})})})]}),h&&"txt-overlay"==h&&r&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(p.A,{label:n}),(0,a.jsxs)("ul",{className:"card-layout-picker",children:[(0,a.jsx)("li",{children:(0,a.jsx)("a",{className:"layout-button "+(j&&"start"==j?"active":""),onClick:()=>x(r,"start"),children:(0,a.jsx)("img",{src:"/assets/layout-txt-align-top.jpg"})})}),(0,a.jsx)("li",{children:(0,a.jsx)("a",{className:"layout-button "+(j&&"center"==j?"active":""),onClick:()=>x(r,"center"),children:(0,a.jsx)("img",{src:"/assets/layout-txt-align-middle.jpg"})})}),(0,a.jsx)("li",{children:(0,a.jsx)("a",{className:"layout-button "+(j&&"end"==j?"active":""),onClick:()=>x(r,"end"),children:(0,a.jsx)("img",{src:"/assets/layout-txt-align-bottom.jpg"})})})]})]})]});case"ImageWidget":return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(p.A,{label:l}),(0,a.jsxs)("ul",{className:"card-layout-picker big",children:[(0,a.jsx)("li",{children:(0,a.jsx)("a",{className:"layout-button "+(h&&"full"==h?"active":""),onClick:()=>x(t,"full"),children:(0,a.jsx)("img",{src:"/assets/admin/admin-image-apect-ratio.jpg"})})}),(0,a.jsx)("li",{children:(0,a.jsx)("a",{className:"layout-button "+(h&&"responsive"==h?"active":""),onClick:()=>x(t,"responsive"),children:(0,a.jsx)("img",{src:"/assets/admin/admin-image-responsive-fixed-height.jpg"})})})]})]});
1case"ContentOffering":return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(p.A,{label:l}),(0,a.jsxs)("ul",{className:"card-layout-picker",children:[(0,a.jsx)("li",{children:(0,a.jsx)("a",{className:"layout-button "+(h&&"cards"==h?"active":""),onClick:()=>x(t,"cards"),children:(0,a.jsx)("img",{src:"/assets/layout-cards.jpg"})})}),(0,a.jsx)("li",{children:(0,a.jsx)("a",{className:"layout-button "+(h&&"slider"==h?"active":""),onClick:()=>x(t,"slider"),children:(0,a.jsx)("img",{src:"/assets/layout-slider.jpg"})})}),(0,a.jsx)("li",{children:(0,a.jsx)("a",{className:"layout-button "+(h&&"box-slider"==h?"active":""),onClick:()=>x(t,"box-slider"),children:(0,a.jsx)("img",{src:"/assets/layout-box-slider.jpg"})})})]})]});default:return(0,a.jsxs)("p",{className:"text-warning",children:[(0,a.jsx)("strong",{children:"Error: "}),'No "context" defined for the "LayoutPicker"-Component']})}};var G=l(67488);let K=function(e){return(0,a.jsxs)(P,{...e,children:[(0,a.jsx)("option",{value:"0",children:"00"}),(0,a.jsx)("option",{value:"15",children:"15"}),(0,a.jsx)("option",{value:"30",children:"30"}),(0,a.jsx)("option",{value:"45",children:"45"})]})};var H=l(86110),X=l(30641),J=l(65117),Y=l(82722);l(77715);let Q={},Z=function(e){let{name:t,label:l,hint:r,config:n=Q,fetchUrl:d,labelKey:u="name",placeholder:m,formatOption:x,showAddButton:h,btnLabel:j="Add",ItemModal:f,postUrl:g,disabled:b}=e,y=(0,Y.A)(),{control:N}=(0,i.xW)(),{data:A,mutate:C,isLoading:w}=(0,o.useFetch)(d),{field:{onChange:k,onBlur:F,value:S,ref:_},fieldState:{invalid:E,error:q}}=(0,i.as)({name:t,control:N,rules:n,defaultValue:[]}),[L,W]=(0,s.useState)(!1),I=(0,s.useMemo)(()=>A?S?A.filter(e=>!S.find(t=>t.id===e.id)):A:[],[A,S]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(p.A,{label:l,required:n.required}),(0,a.jsxs)(X.A,{children:[(0,a.jsx)(H.iF,{id:"typeahead-"+t,multiple:!0,labelKey:u,isInvalid:E,onChange:k,onBlur:F,options:I,isLoading:w,placeholder:m,selected:S||[],renderMenuItemChildren:x,disabled:b,ref:_}),h&&(0,a.jsxs)(J.default,{variant:"secondary",className:"ms-2 my-0 py-1",onClick:()=>W(!0),children:[(0,a.jsx)("i",{className:"fal fa-plus"})," ",j]}),L&&f&&(0,a.jsx)(f,{isOpen:L,onToggle:()=>W(!1),data:{},onSave:e=>{if(!g)return void console.error('Missing "postUrl" for creating new item.');(0,o.request)(g,e,{method:"POST"}).then(()=>{y({type:"success",message:"Item created successfully"})}).catch(()=>{y({type:"error",message:"Failed to create item"})}).finally(()=>{W(!1),C()})}})]}),(0,a.jsx)(v.A,{error:q}),(0,a.jsx)(c.A,{hint:r})]})},$={},ee=function(e){let{name:t,hint:l,colors:n,label:o,onChange:d,config:u=$}=e,{register:m,watch:x,setValue:h}=(0,i.xW)(),j=x(t);(0,s.useEffect)(()=>{m(t,u)},[m,t,u]),(0,s.useEffect)(()=>{d&&d(j)},[j,d]);let f=1,p=[];return p=n.map(e=>"break"!==e?(0,a.jsx)("li",{children:(0,a.jsx)("a",{className:"color-button "+e+" "+(j&&j==e?"active":""),onClick:()=>h(t,e),children:e})},e):(0,a.jsx)("li",{className:"break"},e+f++)),(0,a.jsxs)(a.Fragment,{children:[o&&""!=o&&(0,a.jsx)(r.A.Label,{children:o}),(0,a.jsx)("ul",{className:"pi-color-picker",children:p}),(0,a.jsx)(c.A,{hint:l,className:"mt-2"})]})};var et=l(52822);let el={},ea=function(e){let{name:t,label:l,hint:n,config:o=el}=e,{register:c,watch:d,setValue:u}=(0,i.xW)(),m=d(t);return(0,s.useEffect)(()=>{c(t,o)},[c,t,o]),(0,a.jsxs)(a.Fragment,{children:[l&&""!=l&&(0,a.jsx)(r.A.Label,{children:l}),(0,a.jsxs)("div",{className:"pi-focus-matrix",children:[(0,a.jsxs)("div",{className:"row g-0",children:[(0,a.jsx)("div",{className:"col-4 ratio ratio-1x1"+(m&&"0-0"==m?" active":""),onClick:()=>u(t,"0-0"),children:"0-0"}),(0,a.jsx)("div",{className:"col-4 ratio ratio-1x1"+(m&&"0-50"==m?" active":""),onClick:()=>u(t,"0-50"),children:"0-50"}),(0,a.jsx)("div",{className:"col-4 ratio ratio-1x1"+(m&&"0-100"==m?" active":""),onClick:()=>u(t,"0-100"),children:"0-100"})]}),(0,a.jsxs)("div",{className:"row g-0",children:[(0,a.jsx)("div",{className:"col-4 ratio ratio-1x1"+(m&&"50-0"==m?" active":""),onClick:()=>u(t,"50-0"),children:"50-0"}),(0,a.jsx)("div",{className:"col-4 ratio ratio-1x1"+(m&&"50-50"==m?" active":""),onClick:()=>u(t,"50-50"),children:"50-50"}),(0,a.jsx)("div",{className:"col-4 ratio ratio-1x1"+(m&&"50-100"==m?" active":""),onClick:()=>u(t,"50-100"),children:"50-100"})]}),(0,a.jsxs)("div",{className:"row g-0",children:[(0,a.jsx)("div",{className:"col-4 ratio ratio-1x1"+(m&&"100-0"==m?" active":""),onClick:()=>u(t,"100-0"),children:"100-0"}),(0,a.jsx)("div",{className:"col-4 ratio ratio-1x1"+(m&&"100-50"==m?" active":""),onClick:()=>u(t,"100-50"),children:"100-50"}),(0,a.jsx)("div",{className:"col-4 ratio ratio-1x1"+(m&&"100-100"==m?" active":""),onClick:()=>u(t,"100-100"),children:"100-100"})]})]}),n&&(0,a.jsx)("small",{className:"pi-e-hint text-muted mt-2",children:n})]})},es={},ei=function(e){let{name:t,hint:l,label:o,config:c=es,onChange:d}=e,{register:u,watch:m,setValue:x}=(0,i.xW)(),h=m(t);return(0,s.useEffect)(()=>{u(t,c)},[u,t,c]),(0,s.useEffect)(()=>{d&&d(h)},[h,d]),(0,a.jsxs)(a.Fragment,{children:[o&&""!=o&&(0,a.jsx)(r.A.Label,{children:o}),(0,a.jsx)("div",{className:"pi-shadow-picker",children:(0,a.jsxs)(n.default,{className:"g
1-4",children:[(0,a.jsx)(N.default,{className:"col",xs:12,sm:6,md:3,children:(0,a.jsx)("div",{className:"pi-box-shadow-1"+("pi-box-shadow-1"===h?" active":""),onClick:()=>x(t,"pi-box-shadow-1")})}),(0,a.jsx)(N.default,{className:"col",xs:12,sm:6,md:3,children:(0,a.jsx)("div",{className:"pi-box-shadow-2"+("pi-box-shadow-2"===h?" active":""),onClick:()=>x(t,"pi-box-shadow-2")})}),(0,a.jsx)(N.default,{className:"col",xs:12,sm:6,md:3,children:(0,a.jsx)("div",{className:"pi-box-shadow-3"+("pi-box-shadow-3"===h?" active":""),onClick:()=>x(t,"pi-box-shadow-3")})}),(0,a.jsx)(N.default,{className:"col",xs:12,sm:6,md:3,children:(0,a.jsx)("div",{className:"pi-box-shadow-4"+("pi-box-shadow-4"===h?" active":""),onClick:()=>x(t,"pi-box-shadow-4")})})]})}),l&&(0,a.jsx)("small",{className:"pi-e-hint text-muted mt-2",children:l})]})},er=e=>{let{name:t,label:l,items:n,hint:o,onChange:d,disabled:u,config:m={},className:x,classNameLabel:h,displayStacked:j}=e,{register:f,watch:g,formState:{errors:b}}=(0,i.xW)(),y=g(t);(0,s.useEffect)(()=>{d&&d(y)},[y,d]);let N=n.map(e=>{let l=e.bold?(0,a.jsx)("strong",{children:e.label}):e.label;return(0,a.jsx)(r.A.Check,{inline:!j,id:"opt-"+e.val,type:"radio",label:l,value:e.val,disabled:u,...f(t,m)},e.val)});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(p.A,{label:l,required:null==m?void 0:m.required,className:h||x}),(0,a.jsx)("div",{children:N}),(0,a.jsx)(v.A,{error:b[t]}),(0,a.jsx)(c.A,{hint:o})]})},en={},eo=function(e){let{name:t,label:l,hint:n,min:o=0,max:d=10,step:u=1,translate:m,disabled:x,config:h=en,classNameLabel:j,onChange:f}=e,{register:v,watch:g}=(0,i.xW)(),b=g(t),y={...h,valueAsNumber:!0};(0,s.useEffect)(()=>{f&&f(b)},[b,f]);let N=(m?["none","minimal","medium","large","xlarge","xxlarge"][b]:b)||0;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(p.A,{label:l,required:y.required,
1className:j}),(0,a.jsxs)("div",{className:"d-flex",children:[(0,a.jsx)(r.A.Range,{className:"mt-1",min:o,max:d,step:u,disabled:x,...v(t,y)}),(0,a.jsx)("div",{className:"ms-3 labelize",style:{width:m?"80px":"35px"},children:(0,a.jsx)(r.A.Control,{style:{width:m?"60px":"20px"},className:"range-indicator",value:N,disabled:x,size:"sm",readOnly:!0})})]}),(0,a.jsx)(c.A,{hint:n})]})};var ec=l(1137);let ed=function(e){return(0,a.jsxs)(P,{...e,children:[(0,a.jsx)("option",{}),Object.entries(A.kJ).map(e=>{let[t,l]=e;return(0,a.jsx)("option",{value:t,children:l},t)})]})},eu={},em={},ex=e=>{let{name:t,label:l,hint:r,placeholder:n="Choose or add tags...",tagsType:d,filters:u=eu,allowNew:m=!0,selectValue:x="object",config:h=em}=e,{data:j,isLoading:f}=(0,o.useFetch)("/tags",{...u,type:d}),{register:g,unregister:b,watch:y,setValue:N,formState:{errors:A}}=(0,i.xW)(),C=y(t),[w,k]=(0,s.useState)([]),[F,S]=(0,s.useState)(!1);return(0,s.useEffect)(()=>(g(t,h),()=>{b(t)}),[g,b,t,h]),(0,s.useEffect)(()=>{if(F)return void S(!1);j&&(!C||Array.isArray(C)&&0===C.length?k([]):Array.isArray(C)&&k(C.map(e=>(e=>"object"==typeof e?e:"id"===x?(null==j?void 0:j.find(t=>t.id===e))||{id:e,name:String(e),type:d}:"name"===x?(null==j?void 0:j.find(t=>t.name===e))||{id:e,name:e,type:d}:void 0)(e)).filter(e=>void 0!==e)))},[C,j,F]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(p.A,{label:l,required:h.required}),(0,a.jsx)(H.iF,{id:"tag-selector-"+t,isInvalid:!!A[t],isLoading:f,allowNew:m,options:j||[],multiple:!0,labelKey:"name",onChange:e=>{k(e.map(e=>(e.type||(e.type=d),e))),S(!0),N(t,e.map(e=>(e=>"id"===x?e.id:"name"===x?e.name:e)(e)))},placeholder:n,newSelectionPrefix:"Add new tag: ",selected:w||[]}),(0,a.jsx)(v.A,{error:A[t]}),(0,a.jsx)(c.A,{hint:r,className:"narrow-line-height"})]})},eh={},ej=function(e){let{name:t,label:l,hint:n,config:o=eh,onChange:d,height:u,disabled:m,placeholder:x,maxLength:h,maxWords:j,className:f,classNameLabel:g,hintClass:b}=e,{register:y,watch:N,formState:{errors:A}}=(0,i.xW)(),C=N(t),w={...o};j&&!w.validate&&(w={...w,validate:e=>!e||e.split(/\s+/).length<=j||"Maximum word count is ".concat(j)}),(0,s.useEffect)(()=>{d&&d(C)},[C,d]);let k=(0,s.useMemo)(()=>j&&(null==C?void 0:C.length)?C.split(/\s+/).length:0,[C,j]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(p.A,{label:l,required:w.required,
1className:g}),(0,a.jsx)(r.A.Control,{as:"textarea",placeholder:x,isInvalid:!!A[t],disabled:m,style:{height:u||"120px"},maxLength:h,className:f,...y(t,w)}),(0,a.jsx)(v.A,{error:A[t]}),(0,a.jsx)(c.A,{hint:n,className:b}),j&&(0,a.jsxs)(r.A.Text,{children:[" (word count: ",k,")"]})]})};l(75523);let ef=e=>e.toLowerCase().replace(/[_/]/g," ");function ep(e){let{value:t,onChange:l,id:i="timezone-picker",ariaLabel:r="Timezone",placeholder:n="Start typing a city or region…",size:c,isInvalid:d,disabled:u,autoFocus:m,clearButton:x=!1,className:h}=e,{data:j,isLoading:f}=(0,o.useFetch)("/timezones"),[p,v]=(0,s.useState)(!1);return(0,a.jsx)(H.iF,{id:i,className:h,options:j||[],selected:p||!t?[]:[t],isLoading:f,isInvalid:d,disabled:u,autoFocus:m,clearButton:x,size:c,placeholder:n,inputProps:{"aria-label":r,autoComplete:"off"},filterBy:(e,t)=>((e,t)=>{let l=ef(e);return ef(t).split(" ").filter(Boolean).every(e=>l.includes(e))})(String(e),t.text),emptyLabel:"No timezone matches that.",onChange:e=>{let t="string"==typeof e[0]?e[0]:"";v(!t),(t||x)&&l(t)},onBlur:()=>v(!1)})}let ev={},eg=function(e){let{name:t,type:l="switch",label:n,hint:o,onChange:d,onClick:u,config:m=ev,className:x,classNameLabel:h,disabled:j}=e,{register:f,watch:p,formState:{errors:g}}=(0,i.xW)(),b=p(t);return(0,s.useEffect)(()=>{null!=b&&(d?d(b):u&&u(b))},[b,d,u]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(r.A.Check,{type:l,id:"el-form-"+t,className:x||h,label:n,disabled:j,isInvalid:!!g[t],...f(t,m)}),(0,a.jsx)(v.A,{error:g[t]}),(0,a.jsx)(c.A,{hint:o,className:x})]})};var eb=l(79694);function ey(e){let{name:t,config:l,...s}=e,{setValue:r}=(0,i.xW)();return(0,a.jsx)(M,{name:t,onBlur:e=>{let l=e.target.value,a=(0,x._m)(l);null!==a&&a!==l&&r(t,a,{shouldValidate:!0,shouldDirty:!0})},config:{...l,validate:e=>null!==(0,x._m)(e)||"Please enter a full web address, for example https://www.example.com"},...s})}var eN=l(6017),eA=l(71269);let eC={},ew="",ek=0,eF=0,eS=e=>{let{name:t,label:l,hint:r,placeholder:n="Select users...",multiple:d=!0,fetchUrl:u="/members/search",autoFocus:m,requireDirectMessages:x,config:h=eC,classNameLabel:j,disabled:f}=e,{isAdmin:g}=(0,eA.Ay)(),b=(0,Y.A)(),[y,N]=(0,s.useState)(!1),[A,C]=(0,s.useState)([]),{register:w,setValue:k,watch:F,formState:{errors:S}}=(0,i.xW)(),_=F(t)||[];(0,s.useEffect)(()=>{w(t,h)},[w,t,h]);let E=async e=>{let t={q:e,_start:eF,_limit:30},l=Object.keys(t).map(e=>e+"="+t[e]).join("&"),a=u.includes("?")?"&":"?";return(0,o.request)("".concat(u).concat(a).concat(l)).then(e=>(ek=e.totalCount,x)?e.data.map(e=>({...e,disabled:!1===e.directMessages})):e.data).catch(()=>(ek=0,N(!1),b({type:"error",message:"Failed to fetch users"}),[]))};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(p.A,{label:l,required:h.required,className:j}),(0,a.jsx)(H.EX,{id:"user-selector-"+t,isInvalid:!!S[t],isLoading:y,options:A,filterBy:()=>!0,multiple:d,disabled:f,labelKey:"full_name",maxResults:29,minLength:2,onInputChange:e=>{ew=e},onPaginate:(e,t)=>{A.length>t||A.length>=ek||(N(!0),eF+=30,E(ew).then(e=>{let t=A.concat(e);N(!1),C(t)}))},onSearch:e=>{N(!0),eF=0,E(e).then(e=>{N(!1),C(e)})},onChange:e=>{k(t,e)},paginate:!0,placeholder:n,selected:_,useCache:!1,autoFocus:m,renderMenuItemChildren:e=>(0,a.jsxs)("div",{className:"d-flex align-items-center",children:[(0,a.jsx)("div",{className:"rounded-circle position-relative overflow-hidden",style:{width:"24px",height:"24px"},children:(0,a.jsx)(eN.A,{image:e.profile,preferredSize:"thumbnail",fallback:"profile",fill:!0,alt:""})}),(0,a.jsxs)("span",{className:"mx-2",children:[e.full_name,g?" (".concat(e.email,")"):""]}),e.disabled&&(0,a.jsx)("span",{className:"text-muted small",children:"doesn’t accept messages"})]},e.id)}),(0,a.jsx)(v.A,{error:S[t]}),(0,a.jsx)(c.A,{hint:r})]})},e_=function(e){let t,{name:l,validate:s,asAlert:n=!0,className:o}=e,{register:c,getValues:d,formState:{errors:u}}=(0,i.xW)(),m="vf_"+l,h=(0,x.Jt)(u,m),j=s?{validate:()=>s(d)}:{};return(null==h?void 0:h.message)&&(t=n?(0,a.jsx)("div",{className:"alert alert-danger",role:"alert",children:h.message}):(0,a.jsx)("div",{className:"text-danger",children:h.message})),(0,a.jsxs)("div",{className:o,children:[(0,a.jsx)(r.A.Control,{type:"hidden",disabled:!0,...c(m,j)}),t]})}},67488:(e,t,l)=>{l.d(t,{A:()=>v});var a=l(95155),s=l(12115),i=l(22544),r=l(86110),n=l(33599),o=l(63365),c=l(82722),d=l(76282),u=l(55060),m=l(15345),x=l(84980),h=l(78542),j=l(93470);l(77715);let f={};async function p(e,t){let l,a=(0,h.mR)({singleLine:e}),s=!1,i=setTimeout(()=>{s=!0,t.abort()},8e3);try{l=await fetch("".concat("https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/findAddressCandidates?f=json&outFields=Match_addr,Addr_type,address,Postal,City,StAddr,Region,RegionAbbr,Country","&").concat(a),{signal:t.signal})}catch(e){if(t.signal.aborted&&!s)return{ok:!1,superseded:!0};return{ok:!1,unreachable:!0,error:s?Error("Geocoding request timed out after ".concat(8e3,"ms")):e}}finally{clearTimeout(i)}try{if(!l.ok)throw Error("Geocoding service responded with status ".concat(l.status));let e=await l.json();if(!Array.isArray(null==e?void 0:e.candidates)){var r;let t=Error("Geocoding service returned no candidate list");throw r=null==e?void 0:e.error,t.serviceFault={service_code:"number"==typeof(null==r?void 0:r.code)?r.code:null,service_message:(null==r?void 0:r.message)?String(r.message).slice(0,200):null},t}return{ok:!0,candidates:e.candidates}}catch(e){return{ok:!1,unreachable:!1,error:e}}}let v=function(e){let{name:t,namePrefix:l="",label:h,hint:v,config:g=f,classNameLabel:b,showSelected:y=!0,showState:N=!1,showStreet:A=!0,showZip:C,autoFocus:w,disabled:k}
1=e,F=(0,c.A)(),[S,_]=(0,s.useState)(!1),[E,q]=(0,s.useState)([]),[L,W]=(0,s.useState)(!1),I=(0,s.useRef)(!1),P=(0,s.useRef)(0),R=(0,s.useRef)(null),{register:z,unregister:M,setValue:T,getValues:O,watch:B,formState:{errors:V}}=(0,i.xW)(),{data:U}=(0,d.useFetch)("/countries"),D=(0,s.useCallback)(e=>l?"".concat(l).concat(e):e,[l]),G=B(t),K=B(D("street")),H=B(D("city")),X=B(D("state")),J=B(D("country")),Y=B(D("zip_code")),Q=(0,s.useMemo)(()=>{let e=U?Object.values(U):[];return J&&!e.includes(J)&&e.push(J),e.sort((e,t)=>e.localeCompare(t))},[U,J]);(0,s.useEffect)(()=>(z(t,g),z(D("geo_longitude")),z(D("geo_latitude")),z(D("street")),z(D("city")),z(D("state")),z(D("country")),z(D("zip_code")),()=>{M(t),M(D("geo_longitude")),M(D("geo_latitude")),M(D("street")),M(D("city")),M(D("state")),M(D("country")),M(D("zip_code"))}),[z,M,t,g,D]);let Z=async e=>{var t;null==(t=R.current)||t.abort();let l=new AbortController;R.current=l,_(!0);let a=await p(e,l);if(R.current!==l)return;if(_(!1),a.ok){P.current=0,q(function(e){let t,l={};return e.forEach((e,a)=>{if("POI"!=e.attributes.Addr_type){t=[e.attributes.Match_addr],e.attributes.Country&&U&&U[e.attributes.Country]&&t.push(U[e.attributes.Country]);let s=t.join(", ");l[s]||(l[s]={id:"loc-"+a,address:e.address,city:e.attributes.City,state:e.attributes.RegionAbbr,country:e.attributes.Country,street:e.attributes.StAddr,location:e.location,zip_code:e.attributes.Postal,display:s})}}),Object.values(l)}(a.candidates));return}if("superseded"in a)return;q([]),a.unreachable||(P.current+=1);let s=a.unreachable||P.current>=2;s&&W(!0),I.current||(I.current=!0,F({type:"error",message:s?"We could not reach the location service. Please enter your city and country instead.":"The location service did not answer. Please try again."}),(0,j.vV)(a.error,a.unreachable?{subtype:"geo_service_unreachable",level:3,props:{query:e}}:{subtype:"geo_service_error",level:2,props:{query:e,...a.error.serviceFault}}))},$=(e,l)=>{let a={city:H,country:J,[e]:l};for(let t of(T(D(e),l||null,{shouldDirty:!0}),["street","state","zip_code","geo_longitude","geo_latitude"])){let e=D(t);null!=O(e)&&T(e,null,{shouldDirty:!0})}T(t,[a.city,a.country].filter(Boolean).join(", ")||null,{shouldDirty:!0,shouldValidate:!!V[t]})};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(u.A,{label:h,required:g.required,className:b}),L?(0,a.jsxs)("div",{className:"border rounded p-3 bg-light",children:[(0,a.jsxs)("p",{className:"text-muted",children:[(0,a.jsx)("i",{className:"fal fa-info-circle me-1"}),"We could not reach the location search service from your network. Please enter your city and country directly."]}),(0,a.jsxs)(n.default,{children:[(0,a.jsxs)(o.default,{md:6,children:[(0,a.jsx)("input",{id:"loc-manual-city-".concat(t),name:D("city"),className:"form-control",value:H||"",placeholder:"Your city",disabled:k,onChange:e=>$("city",e.target.value)}),(0,a.jsx)("label",{htmlFor:"loc-manual-city-".concat(t),className:"ms-1 mb-0 text-muted",children:"City"})]}),(0,a.jsxs)(o.default,{md:6,className:"mt-3 mt-md-0",children:[(0,a.jsxs)("select",{id:"loc-manual-country-".concat(t),name:D("country"),className:"form-select",value:J||"",disabled:k,onChange:e=>$("country",e.target.value),children:[(0,a.jsx)("option",{value:"",children:"Choose country..."}),Q.map(e=>(0,a.jsx)("option",{value:e,children:e},e))]}),(0,a.jsx)("label",{htmlFor:"loc-manual-country-".concat(t),className:"ms-1 mb-0 text-muted",children:"Country"})]})]}),(0,a.jsx)("button",{type:"button",className:"btn btn-link btn-sm ps-0 mt-2",onClick:()=>{W(!1),I.current=!1,P.current=0},children:"Search for my location instead"})]}
1):(0,a.jsx)(r.EX,{id:"loc-selector-"+t,autoFocus:w,filterBy:()=>!0,caseSensitive:!1,isInvalid:!!V[t],isLoading:S,options:E,labelKey:"address",minLength:2,onSearch:Z,onChange:e=>{let l=e.length?e[0]:{};T(t,l.address||null),T(D("geo_longitude"),l.location?l.location.x.toFixed(4):null),T(D("geo_latitude"),l.location?l.location.y.toFixed(4):null),T(D("street"),l.street||null),T(D("state"),l.state||null),T(D("city"),l.city||null),T(D("zip_code"),l.zip_code||null);let a=l.country&&U&&U[l.country]||l.country||null;T(D("country"),a)},placeholder:"Choose location...",selected:G?[G]:[],disabled:k,renderMenuItemChildren:e=>(0,a.jsx)("div",{className:"d-flex align-items-center",children:(0,a.jsx)("span",{className:"mx-2",children:e.display})},e.id)}),(0,a.jsx)(x.A,{error:V[t]}),(0,a.jsx)(m.A,{hint:v}),y&&!L&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("p",{className:"mt-3 mb-1 sublabel",children:"Currently selected location:"}),(0,a.jsxs)(n.default,{children:[A&&(0,a.jsx)(o.default,{children:(0,a.jsx)("input",{name:D("street"),className:"form-control",value:K||"",placeholder:"No street defined",disabled:!0})}),C&&(0,a.jsx)(o.default,{children:(0,a.jsx)("input",{name:D("zip_code"),className:"form-control",value:Y||"",placeholder:"No zip code defined",disabled:!0})}),(0,a.jsxs)(o.default,{children:[(0,a.jsx)("input",{name:D("city"),className:"form-control",value:H||"",placeholder:"-",disabled:!0}),(0,a.jsx)("p",{className:"ms-1 mb-0 text-muted",children:"City"})]}),N&&(0,a.jsxs)(o.default,{children:[(0,a.jsx)("input",{name:D("state"),className:"form-control",value:X||"",placeholder:"-",disabled:!0}),(0,a.jsx)("p",{className:"ms-1 mb-0 text-muted",children:"State / Region"})]}),(0,a.jsxs)(o.default,{children:[(0,a.jsx)("input",{name:D("country"),className:"form-control",value:J||"",placeholder:"-",disabled:!0}),(0,a.jsx)("p",{className:"ms-1 mb-0 text-muted",children:"Country"})]})]})]})]})}},77203:(e,t,l)=>{l.d(t,{A:()=>h});var a=l(95155),s=l(12115),i=l(22544),r=l(65117),n=l(1950),o=l(6017),c=l(55060),d=l(15345),u=l(84980),m=l(78542);let x={},h=function(e){let{name:t,label:l,btnLabel:h="Upload a File",btnLabelRemove:j="Remove File",hint:f,multiple:p,config:v=x,allowedTypes:g=["images"],disabled:b,classNameLabel:y,onChange:N,emptyPlaceholder:A,customClass:C,enableDownload:w=!1}=e,{register:k,watch:F,setValue:S,formState:{errors:_}}=(0,i.xW)(),E=F(t),q=s.useRef(null),L=(0,m.Jt)(_,t);(0,s.useEffect)(()=>{k(t,v)},[k,t,v]);let W=[];g.includes("images")&&(W=W.concat(["image/*"])),g.includes("videos")&&(W=W.concat(["video/*"])),g.includes("audio")&&(W=W.concat(["audio/*"])),g.includes("files")&&(W=W.concat([".pdf",".doc",".docx",".ppt",".pptx",".xls",".xlsx"])),g.includes("pdf")&&(W=W.concat([".pdf"])),g.includes("csv")&&(W=W.concat([".csv"]));let I=(null==E?void 0:E.id)?[E]:E,P=I&&I.length,R=[];if(P){let e=100/I.length;for(let t=0;t<I.length;t++){var z,M;let l=(null==(z=I[t])?void 0:z.mime)||(null==(M=I[t])?void 0:M.type)||"",s=l.startsWith("image/")||l.startsWith("video/")||w;R.push((0,a.jsx)("div",{className:"position-relative"+(s?"":" no-zoom"),style:{width:e+"%"},children:(0,a.jsx)(n.A,{file:I[t],minimalPreview:"chat"===C,enableLightbox:!0,enableDownload:w,withPadding:!0})},"img-"+t))}}return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(c.A,{label:l,required:null==v?void 0:v.required,className:y}),(0,a.jsx)("div",{children:P?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:("chat"!=C?"mb-2 ":"mb-1 ")+"d-flex position-relative bg-white file-upload "+(p?"multiple ":"")+(C||""),style:"chat"!=C?{height:"100px"}:{height:"50px",width:"50px",marginTop:"4px",border:"1px solid #a2b0b5 "},children:R}),!b&&(0,a.jsxs)("button",{className:"chat"!=C?"btn btn-red-gradient":"chat-file-button",onClick:e=>{e.preventDefault(),S(t,!1),N&&N(!1)},disabled:b,children:[(0,a.jsx)("i",{className:"chat"!=C?"fal fa-trash":"fal fa-times"})," ",j||(p?"Remove files":"Remove File")]})]}):(0,a.jsxs)(a.Fragment,{children:[A&&(0,a.jsx)("div",{className:"position-relative bg-white file-upload text-center mb-2 "+(C||""),style:{height:"100px"},children:(0,a.jsx)(o.A,{preferredSize:"small",fallback:A,alt:"placeholder"})}),(0,a.jsxs)(r.default,{className:C&&"chat"==C?"chat-inline-file-button":"",variant:"secondary",onClick:e=>{var t;e.preventDefault(),null==(t=q.current)||t.click()},disabled:b,children:[(0,a.jsx)("i",{className:"fal "+(C&&"chat"==C?"fa-file-plus":"fa-arrow-to-top")}
1)," ",h||(p?"Upload files":"Upload a File")]}),(0,a.jsx)("input",{type:"file",multiple:p,ref:q,accept:W.join(","),onChange:e=>{S(t,e.target.files),N&&N(e.target.files||!1)},style:{display:"none"}})]})}),(0,a.jsx)(u.A,{error:L}),(0,a.jsx)(d.A,{hint:f})]})}},79694:(e,t,l)=>{l.d(t,{A:()=>m});var a=l(95155),s=l(12115),i=l(22544),r=l(86110),n=l(55060),o=l(15345),c=l(84980),d=l(76282);l(77715),l(75523);let u={},m=function(e){let{name:t,label:l,hint:m,placeholder:x="Start typing here...",fetchUrl:h,labelBuilder:j,allowNew:f=!1,config:p=u,classNameLabel:v,onChange:g}=e,{data:b,isLoading:y}=(0,d.useFetch)(h),{register:N,watch:A,setValue:C,formState:{errors:w}}=(0,i.xW)(),k=A(t);(0,s.useEffect)(()=>{N(t,p)},[N,t,p]);let F=(0,s.useMemo)(()=>{if(b&&null!=k&&""!==k){let e=b.find(e=>String(e.id)===String(k));if(e)return[e]}return[]},[b,k]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.A,{label:l,required:p.required,className:v}),(0,a.jsx)(r.iF,{id:"typeahead-selector-"+t,isInvalid:!!w[t],isLoading:y,allowNew:f,options:b||[],multiple:!1,labelKey:j||"title",onChange:e=>{var l;C(t,null==e||null==(l=e[0])?void 0:l.id),g&&g(null==e?void 0:e[0])},placeholder:x,selected:F||[],clearButton:!0}),(0,a.jsx)(c.A,{error:w[t]}),(0,a.jsx)(o.A,{hint:m})]})}},84980:(e,t,l)=>{l.d(t,{A:()=>i});var a=l(95155);l(12115);var s=l(78542);let i=function(e){let{error:t}=e,l=t?(0,s.Kt)(t):"";return l?(0,a.jsx)("div",{className:"invalid-feedback is-invalid",children:l}):null}}}]);

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.