@lanaco/lnc-react-ui 4.0.112 → 4.0.113
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Accordion.cjs +1 -1
- package/dist/Accordion.js +1 -1
- package/dist/AccordionDetails.cjs +1 -1
- package/dist/AccordionDetails.js +1 -1
- package/dist/AccordionSummary.cjs +1 -1
- package/dist/AccordionSummary.js +1 -1
- package/dist/ActionsToolbar.cjs +1 -1
- package/dist/ActionsToolbar.js +1 -1
- package/dist/Alert.cjs +1 -1
- package/dist/Alert.js +1 -1
- package/dist/Avatar.cjs +1 -1
- package/dist/Avatar.js +1 -1
- package/dist/Badge.cjs +1 -1
- package/dist/Badge.js +1 -1
- package/dist/BannerSectionCarousel.cjs +1 -1
- package/dist/BannerSectionCarousel.js +3 -3
- package/dist/BlogCardsSponsoredSection.cjs +25 -14
- package/dist/BlogCardsSponsoredSection.js +58 -47
- package/dist/BlogListSection.cjs +37 -9
- package/dist/BlogListSection.js +127 -70
- package/dist/BlogsSectionDetailed.cjs +7 -2
- package/dist/BlogsSectionDetailed.js +6 -1
- package/dist/BlogsSectionSimpleCentered.cjs +3 -2
- package/dist/BlogsSectionSimpleCentered.js +1 -0
- package/dist/BlogsSectionWithFilters.cjs +1 -1
- package/dist/BlogsSectionWithFilters.js +1 -1
- package/dist/BrandHitsSection.cjs +11 -11
- package/dist/BrandHitsSection.js +40 -38
- package/dist/Breadcrumbs.cjs +1 -1
- package/dist/Breadcrumbs.js +1 -1
- package/dist/Button.cjs +1 -1
- package/dist/Button.js +2 -2
- package/dist/ButtonGroup.cjs +1 -1
- package/dist/ButtonGroup.js +1 -1
- package/dist/CalorieCalculatorSection.cjs +1 -1
- package/dist/CalorieCalculatorSection.js +1 -1
- package/dist/CheckBoxInput.cjs +1 -1
- package/dist/CheckBoxInput.js +1 -1
- package/dist/Chip.cjs +1 -1
- package/dist/Chip.js +1 -1
- package/dist/ColorInput.cjs +1 -1
- package/dist/ColorInput.js +2 -2
- package/dist/ConfirmationForm.cjs +1 -1
- package/dist/ConfirmationForm.js +1 -1
- package/dist/ContactSection.cjs +303 -0
- package/dist/ContactSection.js +1614 -0
- package/dist/Content.cjs +1 -1
- package/dist/Content.js +1 -1
- package/dist/{CustomStyles-DtKDPOdk.cjs → CustomStyles-D3JePSNK.cjs} +1 -1
- package/dist/{CustomStyles-Dd8IsVV6.js → CustomStyles-DpKzWczC.js} +2 -2
- package/dist/DailyMotion-CUHIuSln.js +136 -0
- package/dist/DailyMotion-D46sLmkS.cjs +1 -0
- package/dist/DataView.cjs +1 -1
- package/dist/DataView.js +1 -1
- package/dist/DateInput.cjs +4 -4
- package/dist/DateInput.js +496 -552
- package/dist/DecimalInput.cjs +1 -1
- package/dist/DecimalInput.js +2 -2
- package/dist/DecimalInputV2.cjs +1 -1
- package/dist/DecimalInputV2.js +1 -1
- package/dist/DetailedProductsSection.cjs +1 -1
- package/dist/DetailedProductsSection.js +1 -1
- package/dist/DetailsView.cjs +1 -1
- package/dist/DetailsView.js +1 -1
- package/dist/DoubleRangeSlider.cjs +1 -1
- package/dist/DoubleRangeSlider.js +1 -1
- package/dist/DragAndDropFile.cjs +1 -1
- package/dist/DragAndDropFile.js +1 -1
- package/dist/DragDropFiles.cjs +1 -1
- package/dist/DragDropFiles.js +1 -1
- package/dist/Drawer.cjs +1 -1
- package/dist/Drawer.js +2 -2
- package/dist/Dropdown.cjs +1 -1
- package/dist/Dropdown.js +5 -5
- package/dist/DropdownItem.cjs +1 -1
- package/dist/DropdownItem.js +1 -1
- package/dist/DropdownLookup.cjs +1 -1
- package/dist/DropdownLookup.js +4 -4
- package/dist/DropdownMenu.cjs +1 -1
- package/dist/DropdownMenu.js +1 -1
- package/dist/EditableTable.cjs +1 -1
- package/dist/EditableTable.js +1 -1
- package/dist/Facebook-R53Rry9l.cjs +1 -0
- package/dist/Facebook-aEQQxj-r.js +121 -0
- package/dist/FaqSection.cjs +219 -0
- package/dist/FaqSection.js +481 -0
- package/dist/FeedbackSection.cjs +1 -1
- package/dist/FeedbackSection.js +1 -1
- package/dist/FileInput.cjs +1 -1
- package/dist/FileInput.js +1 -1
- package/dist/FilePlayer-9FdL9kM0.js +202 -0
- package/dist/FilePlayer-D9up8eWZ.cjs +1 -0
- package/dist/FlexBox.cjs +1 -1
- package/dist/FlexBox.js +1 -1
- package/dist/FlexGrid.cjs +1 -1
- package/dist/FlexGrid.js +1 -1
- package/dist/FlexGridItem.cjs +1 -1
- package/dist/FlexGridItem.js +1 -1
- package/dist/Footer.cjs +1 -1
- package/dist/Footer.js +1 -1
- package/dist/FormField.cjs +1 -1
- package/dist/FormField.js +1 -1
- package/dist/FormView.cjs +1 -1
- package/dist/FormView.js +1 -1
- package/dist/Grid.cjs +1 -1
- package/dist/Grid.js +1 -1
- package/dist/GridItem.cjs +1 -1
- package/dist/GridItem.js +1 -1
- package/dist/Header.cjs +1 -1
- package/dist/Header.js +1 -1
- package/dist/HelpBannerSection.cjs +62 -0
- package/dist/HelpBannerSection.js +81 -0
- package/dist/Icon.cjs +1 -1
- package/dist/Icon.js +1 -1
- package/dist/IconButton.cjs +1 -1
- package/dist/IconButton.js +1 -1
- package/dist/Kaltura-C170sgeD.cjs +1 -0
- package/dist/Kaltura-Dziqci9-.js +121 -0
- package/dist/Kanban.cjs +1 -1
- package/dist/Kanban.js +5 -5
- package/dist/KanbanActionsToolbar.cjs +1 -1
- package/dist/KanbanActionsToolbar.js +1 -1
- package/dist/{KanbanCard-CXRQQu4S.cjs → KanbanCard-CP60mpJO.cjs} +1 -1
- package/dist/{KanbanCard-CIscpYlR.js → KanbanCard-Crf-cTxA.js} +2 -2
- package/dist/KanbanCard.cjs +1 -1
- package/dist/KanbanCard.js +2 -2
- package/dist/KanbanFooter.cjs +1 -1
- package/dist/KanbanFooter.js +1 -1
- package/dist/KanbanHeader.cjs +1 -1
- package/dist/KanbanHeader.js +1 -1
- package/dist/KanbanView.cjs +1 -1
- package/dist/KanbanView.js +2 -2
- package/dist/Link.cjs +1 -1
- package/dist/Link.js +1 -1
- package/dist/LocationSearchSection.cjs +1 -1
- package/dist/LocationSearchSection.js +1 -1
- package/dist/MenuItem.cjs +1 -1
- package/dist/MenuItem.js +1 -1
- package/dist/Mixcloud-Cfn28kqf.js +113 -0
- package/dist/Mixcloud-Towpm_ct.cjs +1 -0
- package/dist/Modal.cjs +1 -1
- package/dist/Modal.js +2 -2
- package/dist/MultiSelectDropdown.cjs +1 -1
- package/dist/MultiSelectDropdown.js +3 -3
- package/dist/MultiSelectDropdownLookup.cjs +1 -1
- package/dist/MultiSelectDropdownLookup.js +3 -3
- package/dist/Mux-D0MPDKkM.js +165 -0
- package/dist/Mux-yqNOmuss.cjs +1 -0
- package/dist/NestedDropdownItem.cjs +1 -1
- package/dist/NestedDropdownItem.js +1 -1
- package/dist/NestedMenuItem.cjs +1 -1
- package/dist/NestedMenuItem.js +1 -1
- package/dist/Notification.cjs +1 -1
- package/dist/Notification.js +1 -1
- package/dist/NotificationContainer.cjs +1 -1
- package/dist/NotificationContainer.js +2 -2
- package/dist/NotificationMessage.cjs +1 -1
- package/dist/NotificationMessage.js +1 -1
- package/dist/NumberInput.cjs +1 -1
- package/dist/NumberInput.js +2 -2
- package/dist/PageLayout.cjs +1 -1
- package/dist/PageLayout.js +1 -1
- package/dist/Pagination.cjs +1 -1
- package/dist/Pagination.js +1 -1
- package/dist/PasswordInput.cjs +1 -1
- package/dist/PasswordInput.js +2 -2
- package/dist/Popover.cjs +1 -1
- package/dist/Popover.js +1 -1
- package/dist/PopoverContent.cjs +1 -1
- package/dist/PopoverContent.js +2 -2
- package/dist/PopoverDescription.cjs +1 -1
- package/dist/PopoverDescription.js +1 -1
- package/dist/PopoverHeading.cjs +1 -1
- package/dist/PopoverHeading.js +1 -1
- package/dist/PopoverTrigger.cjs +1 -1
- package/dist/PopoverTrigger.js +2 -2
- package/dist/Preview-B8HyPnfR.cjs +1 -0
- package/dist/Preview-CO6WSP5f.js +127 -0
- package/dist/ProgressBar.cjs +1 -1
- package/dist/ProgressBar.js +1 -1
- package/dist/QuattroCardsSection.cjs +1 -1
- package/dist/QuattroCardsSection.js +1 -1
- package/dist/RadioGroup.cjs +1 -1
- package/dist/RadioGroup.js +1 -1
- package/dist/RadioInput.cjs +1 -1
- package/dist/RadioInput.js +1 -1
- package/dist/RangeSlider.cjs +1 -1
- package/dist/RangeSlider.js +1 -1
- package/dist/ReviewsSection.cjs +1 -1
- package/dist/ReviewsSection.js +1 -1
- package/dist/SalesCampaignsSection.cjs +1 -1
- package/dist/SalesCampaignsSection.js +1 -1
- package/dist/SearchBar.cjs +1 -1
- package/dist/SearchBar.js +3 -3
- package/dist/SearchSection-BUD-hnQA.cjs +161 -0
- package/dist/SearchSection-xe0nvARV.js +1214 -0
- package/dist/SearchSection.cjs +1 -0
- package/dist/SearchSection.js +9 -0
- package/dist/Separator.cjs +1 -1
- package/dist/Separator.js +1 -1
- package/dist/Sidebar.cjs +1 -1
- package/dist/Sidebar.js +1 -1
- package/dist/SoundCloud-D85Da68L.js +123 -0
- package/dist/SoundCloud-YZlcPffr.cjs +1 -0
- package/dist/Spinner.cjs +1 -1
- package/dist/Spinner.js +2 -2
- package/dist/StatsSection.cjs +117 -0
- package/dist/StatsSection.js +154 -0
- package/dist/Streamable-CJQf8evZ.cjs +1 -0
- package/dist/Streamable-Zj4FOeBP.js +115 -0
- package/dist/Surface.cjs +1 -1
- package/dist/Surface.js +1 -1
- package/dist/SwipeableDrawer.cjs +1 -1
- package/dist/SwipeableDrawer.js +1 -1
- package/dist/TabItem.cjs +1 -1
- package/dist/TabItem.js +1 -1
- package/dist/Table.cjs +1 -1
- package/dist/Table.js +3 -3
- package/dist/TableView.cjs +1 -1
- package/dist/TableView.js +1 -1
- package/dist/Tabs.cjs +1 -1
- package/dist/Tabs.js +1 -1
- package/dist/TextAreaInput.cjs +1 -1
- package/dist/TextAreaInput.js +2 -2
- package/dist/TextInput.cjs +1 -1
- package/dist/TextInput.js +2 -2
- package/dist/ThemeProvider.cjs +1 -1
- package/dist/ThemeProvider.js +2 -2
- package/dist/TimeInput.cjs +1 -1
- package/dist/TimeInput.js +2 -2
- package/dist/Toggle.cjs +1 -1
- package/dist/Toggle.js +1 -1
- package/dist/TreeMenu.cjs +1 -1
- package/dist/TreeMenu.js +1 -1
- package/dist/TreeMenuSeparator.cjs +1 -1
- package/dist/TreeMenuSeparator.js +1 -1
- package/dist/Twitch-Ba2O5gTX.cjs +1 -0
- package/dist/Twitch-DC97YrR8.js +117 -0
- package/dist/UploadedFile.cjs +1 -1
- package/dist/UploadedFile.js +1 -1
- package/dist/Vidyard-BdNB5Wka.cjs +1 -0
- package/dist/Vidyard-D9vYqvNv.js +113 -0
- package/dist/Vimeo-23LnW4uS.js +146 -0
- package/dist/Vimeo-DatJiKS5.cjs +1 -0
- package/dist/Wistia-D--UDN6c.cjs +1 -0
- package/dist/Wistia-d2TQ3m-s.js +124 -0
- package/dist/YouTube-BEkcZxN7.cjs +1 -0
- package/dist/YouTube-x5-hc3s6.js +176 -0
- package/dist/_commonjsHelpers-BkfeUUK-.js +28 -0
- package/dist/_commonjsHelpers-DwTZ_eVU.cjs +1 -0
- package/dist/{emotion-react.browser.esm-1R69UXoj.cjs → emotion-react.browser.esm-Cvnp-zmB.cjs} +1 -1
- package/dist/{emotion-react.browser.esm-C6iWxXPG.js → emotion-react.browser.esm-DUVZ5oEL.js} +1 -1
- package/dist/{floating-ui.react.esm-h3qa3pb9.js → floating-ui.react.esm-CfpRzwmn.js} +1 -1
- package/dist/{floating-ui.react.esm-Bb1ww976.cjs → floating-ui.react.esm-CiYofNnh.cjs} +1 -1
- package/dist/{hoist-non-react-statics.cjs-Dr-ytKVG.cjs → hoist-non-react-statics.cjs-DGqlkKoS.cjs} +1 -1
- package/dist/{hoist-non-react-statics.cjs-CAHiRNzQ.js → hoist-non-react-statics.cjs-NQME298B.js} +1 -1
- package/dist/{index-EeoArxOx.cjs → index-41nUb2kP.cjs} +1 -1
- package/dist/{index-BlxaTV-D.js → index-6RFrSPs_.js} +1 -1
- package/dist/{index-64mXPFBC.js → index-B1vKwsDE.js} +1 -1
- package/dist/{index-Bq3leL2e.js → index-BXrmgzsU.js} +1 -1
- package/dist/{index-gY9e_8LL.cjs → index-BZnmT78f.cjs} +1 -1
- package/dist/{index-CQLF61YV.js → index-BgRyIsRu.js} +1 -1
- package/dist/{index-BPVoEhTF.cjs → index-BpbMKBf_.cjs} +1 -1
- package/dist/index-CDGmG-qk.cjs +1 -0
- package/dist/{index-S5Cd7WrG.js → index-CblbdqjE.js} +1 -1
- package/dist/{index-DaiUAQVF.cjs → index-Cp66dWMi.cjs} +1 -1
- package/dist/{index-DAOBjHnD.cjs → index-DA7SIHV1.cjs} +1 -1
- package/dist/{index-C1DkD2ug.cjs → index-DCFJmN23.cjs} +1 -1
- package/dist/{index-CkWvbrVT.js → index-Dt62UGku.js} +1 -1
- package/dist/index-wlx30R-h.js +62 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +60 -50
- package/dist/{react-toastify.esm--2awuizG.js → react-toastify.esm-BLQznunb.js} +1 -1
- package/dist/{react-toastify.esm-Dq1k28O7.cjs → react-toastify.esm-BoMuFZcq.cjs} +1 -1
- package/dist/{styled-components.browser.esm-CMTEDJ_5.cjs → styled-components.browser.esm-CvykQBGY.cjs} +1 -1
- package/dist/{styled-components.browser.esm-C9FYANiy.js → styled-components.browser.esm-D-n22PJk.js} +1 -1
- package/dist/usePopover.cjs +1 -1
- package/dist/usePopover.js +1 -1
- package/package.json +8 -2
- package/vite.config.js +14 -0
- package/dist/_commonjsHelpers-DKOUU3wS.cjs +0 -1
- package/dist/_commonjsHelpers-DaMA6jEr.js +0 -8
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
"use strict";const v=require("react/jsx-runtime"),F=require("react"),U=require("./index-BpbMKBf_.cjs"),Pt=require("./CheckBoxInput.cjs"),Ne=require("./TextInput.cjs"),jt=require("./TextAreaInput.cjs"),Ze=require("./Icon.cjs"),Ot=require("./Button.cjs"),Lt=require("./emotion-styled.browser.esm-BtEseadx.cjs"),Rt=require("./consts-goSZX3xP.cjs");function Mt(e){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(s,t,a.get?a:{enumerable:!0,get:()=>e[t]})}}return s.default=e,Object.freeze(s)}const Je=Mt(F);var he=e=>e.type==="checkbox",ne=e=>e instanceof Date,B=e=>e==null;const ct=e=>typeof e=="object";var P=e=>!B(e)&&!Array.isArray(e)&&ct(e)&&!ne(e),dt=e=>P(e)&&e.target?he(e.target)?e.target.checked:e.target.value:e,Ut=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,ft=(e,s)=>e.has(Ut(s)),It=e=>{const s=e.constructor&&e.constructor.prototype;return P(s)&&s.hasOwnProperty("isPrototypeOf")},je=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function R(e){let s;const t=Array.isArray(e),a=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)s=new Date(e);else if(e instanceof Set)s=new Set(e);else if(!(je&&(e instanceof Blob||a))&&(t||P(e)))if(s=t?[]:{},!t&&!It(e))s=e;else for(const l in e)e.hasOwnProperty(l)&&(s[l]=R(e[l]));else return e;return s}var Fe=e=>/^\w*$/.test(e),N=e=>e===void 0,Oe=e=>Array.isArray(e)?e.filter(Boolean):[],Le=e=>Oe(e.replace(/["|']|\]/g,"").split(/\.|\[/)),y=(e,s,t)=>{if(!s||!P(e))return t;const a=(Fe(s)?[s]:Le(s)).reduce((l,n)=>B(l)?l:l[n],e);return N(a)||a===e?N(e[s])?t:e[s]:a},H=e=>typeof e=="boolean",k=(e,s,t)=>{let a=-1;const l=Fe(s)?[s]:Le(s),n=l.length,c=n-1;for(;++a<n;){const d=l[a];let x=t;if(a!==c){const j=e[d];x=P(j)||Array.isArray(j)?j:isNaN(+l[a+1])?{}:[]}if(d==="__proto__"||d==="constructor"||d==="prototype")return;e[d]=x,e=e[d]}};const be={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},X={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},te={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},yt=F.createContext(null);yt.displayName="HookFormContext";const Re=()=>F.useContext(yt);var gt=(e,s,t,a=!0)=>{const l={defaultValues:s._defaultValues};for(const n in e)Object.defineProperty(l,n,{get:()=>{const c=n;return s._proxyFormState[c]!==X.all&&(s._proxyFormState[c]=!a||X.all),t&&(t[c]=!0),e[c]}});return l};const Me=typeof window<"u"?Je.useLayoutEffect:Je.useEffect;function Bt(e){const s=Re(),{control:t=s.control,disabled:a,name:l,exact:n}=e||{},[c,d]=F.useState(t._formState),x=F.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Me(()=>t._subscribe({name:l,formState:x.current,exact:n,callback:j=>{!a&&d({...t._formState,...j})}}),[l,a,n]),F.useEffect(()=>{x.current.isValid&&t._setValid(!0)},[t]),F.useMemo(()=>gt(c,t,x.current,!1),[c,t])}var ee=e=>typeof e=="string",mt=(e,s,t,a,l)=>ee(e)?(a&&s.watch.add(e),y(t,e,l)):Array.isArray(e)?e.map(n=>(a&&s.watch.add(n),y(t,n))):(a&&(s.watchAll=!0),t);function qt(e){const s=Re(),{control:t=s.control,name:a,defaultValue:l,disabled:n,exact:c}=e||{},d=F.useRef(l),[x,j]=F.useState(t._getWatch(a,d.current));return Me(()=>t._subscribe({name:a,formState:{values:!0},exact:c,callback:w=>!n&&j(mt(a,t._names,w.values||t._formValues,!1,d.current))}),[a,t,n,c]),F.useEffect(()=>t._removeUnmounted()),x}function zt(e){const s=Re(),{name:t,disabled:a,control:l=s.control,shouldUnregister:n}=e,c=ft(l._names.array,t),d=qt({control:l,name:t,defaultValue:y(l._formValues,t,y(l._defaultValues,t,e.defaultValue)),exact:!0}),x=Bt({control:l,name:t,exact:!0}),j=F.useRef(e),w=F.useRef(l.register(t,{...e.rules,value:d,...H(e.disabled)?{disabled:e.disabled}:{}})),S=F.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!y(x.errors,t)},isDirty:{enumerable:!0,get:()=>!!y(x.dirtyFields,t)},isTouched:{enumerable:!0,get:()=>!!y(x.touchedFields,t)},isValidating:{enumerable:!0,get:()=>!!y(x.validatingFields,t)},error:{enumerable:!0,get:()=>y(x.errors,t)}}),[x,t]),h=F.useCallback(E=>w.current.onChange({target:{value:dt(E),name:t},type:be.CHANGE}),[t]),Z=F.useCallback(()=>w.current.onBlur({target:{value:y(l._formValues,t),name:t},type:be.BLUR}),[t,l._formValues]),W=F.useCallback(E=>{const K=y(l._fields,t);K&&E&&(K._f.ref={focus:()=>E.focus&&E.focus(),select:()=>E.select&&E.select(),setCustomValidity:_=>E.setCustomValidity(_),reportValidity:()=>E.reportValidity()})},[l._fields,t]),T=F.useMemo(()=>({name:t,value:d,...H(a)||x.disabled?{disabled:x.disabled||a}:{},onChange:h,onBlur:Z,ref:W}),[t,a,x.disabled,h,Z,W,d]);return F.useEffect(()=>{const E=l._options.shouldUnregister||n;l.register(t,{...j.current.rules,...H(j.current.disabled)?{disabled:j.current.disabled}:{}});const K=(_,M)=>{const L=y(l._fields,_);L&&L._f&&(L._f.mount=M)};if(K(t,!0),E){const _=R(y(l._options.defaultValues,t));k(l._defaultValues,t,_),N(y(l._formValues,t))&&k(l._formValues,t,_)}return!c&&l.register(t),()=>{(c?E&&!l._state.action:E)?l.unregister(t):K(t,!1)}},[t,l,c,n]),F.useEffect(()=>{l._setDisabledField({disabled:a,name:t})},[a,t,l]),F.useMemo(()=>({field:T,formState:x,fieldState:S}),[T,x,S])}const de=e=>e.render(zt(e));var Wt=(e,s,t,a,l)=>s?{...t[e],types:{...t[e]&&t[e].types?t[e].types:{},[a]:l||!0}}:{},ge=e=>Array.isArray(e)?e:[e],Qe=()=>{let e=[];return{get observers(){return e},next:l=>{for(const n of e)n.next&&n.next(l)},subscribe:l=>(e.push(l),{unsubscribe:()=>{e=e.filter(n=>n!==l)}}),unsubscribe:()=>{e=[]}}},Pe=e=>B(e)||!ct(e);function ae(e,s,t=new WeakSet){if(Pe(e)||Pe(s))return e===s;if(ne(e)&&ne(s))return e.getTime()===s.getTime();const a=Object.keys(e),l=Object.keys(s);if(a.length!==l.length)return!1;if(t.has(e)||t.has(s))return!0;t.add(e),t.add(s);for(const n of a){const c=e[n];if(!l.includes(n))return!1;if(n!=="ref"){const d=s[n];if(ne(c)&&ne(d)||P(c)&&P(d)||Array.isArray(c)&&Array.isArray(d)?!ae(c,d,t):c!==d)return!1}}return!0}var z=e=>P(e)&&!Object.keys(e).length,Ue=e=>e.type==="file",Y=e=>typeof e=="function",Ve=e=>{if(!je)return!1;const s=e?e.ownerDocument:0;return e instanceof(s&&s.defaultView?s.defaultView.HTMLElement:HTMLElement)},ht=e=>e.type==="select-multiple",Ie=e=>e.type==="radio",Ht=e=>Ie(e)||he(e),Ce=e=>Ve(e)&&e.isConnected;function $t(e,s){const t=s.slice(0,-1).length;let a=0;for(;a<t;)e=N(e)?a++:e[s[a++]];return e}function Kt(e){for(const s in e)if(e.hasOwnProperty(s)&&!N(e[s]))return!1;return!0}function O(e,s){const t=Array.isArray(s)?s:Fe(s)?[s]:Le(s),a=t.length===1?e:$t(e,t),l=t.length-1,n=t[l];return a&&delete a[n],l!==0&&(P(a)&&z(a)||Array.isArray(a)&&Kt(a))&&O(e,t.slice(0,-1)),e}var _t=e=>{for(const s in e)if(Y(e[s]))return!0;return!1};function pe(e,s={}){const t=Array.isArray(e);if(P(e)||t)for(const a in e)Array.isArray(e[a])||P(e[a])&&!_t(e[a])?(s[a]=Array.isArray(e[a])?[]:{},pe(e[a],s[a])):B(e[a])||(s[a]=!0);return s}function vt(e,s,t){const a=Array.isArray(e);if(P(e)||a)for(const l in e)Array.isArray(e[l])||P(e[l])&&!_t(e[l])?N(s)||Pe(t[l])?t[l]=Array.isArray(e[l])?pe(e[l],[]):{...pe(e[l])}:vt(e[l],B(s)?{}:s[l],t[l]):t[l]=!ae(e[l],s[l]);return t}var fe=(e,s)=>vt(e,s,pe(s));const et={value:!1,isValid:!1},tt={value:!0,isValid:!0};var xt=e=>{if(Array.isArray(e)){if(e.length>1){const s=e.filter(t=>t&&t.checked&&!t.disabled).map(t=>t.value);return{value:s,isValid:!!s.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!N(e[0].attributes.value)?N(e[0].value)||e[0].value===""?tt:{value:e[0].value,isValid:!0}:tt:et}return et},bt=(e,{valueAsNumber:s,valueAsDate:t,setValueAs:a})=>N(e)?e:s?e===""?NaN:e&&+e:t&&ee(e)?new Date(e):a?a(e):e;const rt={isValid:!1,value:null};var Vt=e=>Array.isArray(e)?e.reduce((s,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:s,rt):rt;function st(e){const s=e.ref;return Ue(s)?s.files:Ie(s)?Vt(e.refs).value:ht(s)?[...s.selectedOptions].map(({value:t})=>t):he(s)?xt(e.refs).value:bt(N(s.value)?e.ref.value:s.value,e)}var Gt=(e,s,t,a)=>{const l={};for(const n of e){const c=y(s,n);c&&k(l,n,c._f)}return{criteriaMode:t,names:[...e],fields:l,shouldUseNativeValidation:a}},we=e=>e instanceof RegExp,ye=e=>N(e)?e:we(e)?e.source:P(e)?we(e.value)?e.value.source:e.value:e,it=e=>({isOnSubmit:!e||e===X.onSubmit,isOnBlur:e===X.onBlur,isOnChange:e===X.onChange,isOnAll:e===X.all,isOnTouch:e===X.onTouched});const at="AsyncFunction";var Xt=e=>!!e&&!!e.validate&&!!(Y(e.validate)&&e.validate.constructor.name===at||P(e.validate)&&Object.values(e.validate).find(s=>s.constructor.name===at)),Yt=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),lt=(e,s,t)=>!t&&(s.watchAll||s.watch.has(e)||[...s.watch].some(a=>e.startsWith(a)&&/^\.\w+/.test(e.slice(a.length))));const me=(e,s,t,a)=>{for(const l of t||Object.keys(e)){const n=y(e,l);if(n){const{_f:c,...d}=n;if(c){if(c.refs&&c.refs[0]&&s(c.refs[0],l)&&!a)return!0;if(c.ref&&s(c.ref,c.name)&&!a)return!0;if(me(d,s))break}else if(P(d)&&me(d,s))break}}};function nt(e,s,t){const a=y(e,t);if(a||Fe(t))return{error:a,name:t};const l=t.split(".");for(;l.length;){const n=l.join("."),c=y(s,n),d=y(e,n);if(c&&!Array.isArray(c)&&t!==n)return{name:t};if(d&&d.type)return{name:n,error:d};if(d&&d.root&&d.root.type)return{name:`${n}.root`,error:d.root};l.pop()}return{name:t}}var Zt=(e,s,t,a)=>{t(e);const{name:l,...n}=e;return z(n)||Object.keys(n).length>=Object.keys(s).length||Object.keys(n).find(c=>s[c]===(!a||X.all))},Jt=(e,s,t)=>!e||!s||e===s||ge(e).some(a=>a&&(t?a===s:a.startsWith(s)||s.startsWith(a))),Qt=(e,s,t,a,l)=>l.isOnAll?!1:!t&&l.isOnTouch?!(s||e):(t?a.isOnBlur:l.isOnBlur)?!e:(t?a.isOnChange:l.isOnChange)?e:!0,er=(e,s)=>!Oe(y(e,s)).length&&O(e,s),tr=(e,s,t)=>{const a=ge(y(e,t));return k(a,"root",s[t]),k(e,t,a),e},xe=e=>ee(e);function ot(e,s,t="validate"){if(xe(e)||Array.isArray(e)&&e.every(xe)||H(e)&&!e)return{type:t,message:xe(e)?e:"",ref:s}}var ue=e=>P(e)&&!we(e)?e:{value:e,message:""},ut=async(e,s,t,a,l,n)=>{const{ref:c,refs:d,required:x,maxLength:j,minLength:w,min:S,max:h,pattern:Z,validate:W,name:T,valueAsNumber:E,mount:K}=e._f,_=y(t,T);if(!K||s.has(T))return{};const M=d?d[0]:c,L=V=>{l&&M.reportValidity&&(M.setCustomValidity(H(V)?"":V||""),M.reportValidity())},b={},re=Ie(c),se=he(c),Ae=re||se,G=(E||Ue(c))&&N(c.value)&&N(_)||Ve(c)&&c.value===""||_===""||Array.isArray(_)&&!_.length,le=Wt.bind(null,T,a,b),J=(V,A,C,I=te.maxLength,q=te.minLength)=>{const Q=V?A:C;b[T]={type:V?I:q,message:Q,ref:c,...le(V?I:q,Q)}};if(n?!Array.isArray(_)||!_.length:x&&(!Ae&&(G||B(_))||H(_)&&!_||se&&!xt(d).isValid||re&&!Vt(d).isValid)){const{value:V,message:A}=xe(x)?{value:!!x,message:x}:ue(x);if(V&&(b[T]={type:te.required,message:A,ref:M,...le(te.required,A)},!a))return L(A),b}if(!G&&(!B(S)||!B(h))){let V,A;const C=ue(h),I=ue(S);if(!B(_)&&!isNaN(_)){const q=c.valueAsNumber||_&&+_;B(C.value)||(V=q>C.value),B(I.value)||(A=q<I.value)}else{const q=c.valueAsDate||new Date(_),Q=_e=>new Date(new Date().toDateString()+" "+_e),ce=c.type=="time",oe=c.type=="week";ee(C.value)&&_&&(V=ce?Q(_)>Q(C.value):oe?_>C.value:q>new Date(C.value)),ee(I.value)&&_&&(A=ce?Q(_)<Q(I.value):oe?_<I.value:q<new Date(I.value))}if((V||A)&&(J(!!V,C.message,I.message,te.max,te.min),!a))return L(b[T].message),b}if((j||w)&&!G&&(ee(_)||n&&Array.isArray(_))){const V=ue(j),A=ue(w),C=!B(V.value)&&_.length>+V.value,I=!B(A.value)&&_.length<+A.value;if((C||I)&&(J(C,V.message,A.message),!a))return L(b[T].message),b}if(Z&&!G&&ee(_)){const{value:V,message:A}=ue(Z);if(we(V)&&!_.match(V)&&(b[T]={type:te.pattern,message:A,ref:c,...le(te.pattern,A)},!a))return L(A),b}if(W){if(Y(W)){const V=await W(_,t),A=ot(V,M);if(A&&(b[T]={...A,...le(te.validate,A.message)},!a))return L(A.message),b}else if(P(W)){let V={};for(const A in W){if(!z(V)&&!a)break;const C=ot(await W[A](_,t),M,A);C&&(V={...C,...le(A,C.message)},L(C.message),a&&(b[T]=V))}if(!z(V)&&(b[T]={ref:M,...V},!a))return b}}return L(!0),b};const rr={mode:X.onSubmit,reValidateMode:X.onChange,shouldFocusError:!0};function sr(e={}){let s={...rr,...e},t={submitCount:0,isDirty:!1,isReady:!1,isLoading:Y(s.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:s.errors||{},disabled:s.disabled||!1};const a={};let l=P(s.defaultValues)||P(s.values)?R(s.defaultValues||s.values)||{}:{},n=s.shouldUnregister?{}:R(l),c={action:!1,mount:!1,watch:!1},d={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},x,j=0;const w={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let S={...w};const h={array:Qe(),state:Qe()},Z=s.criteriaMode===X.all,W=r=>i=>{clearTimeout(j),j=setTimeout(r,i)},T=async r=>{if(!s.disabled&&(w.isValid||S.isValid||r)){const i=s.resolver?z((await se()).errors):await G(a,!0);i!==t.isValid&&h.state.next({isValid:i})}},E=(r,i)=>{!s.disabled&&(w.isValidating||w.validatingFields||S.isValidating||S.validatingFields)&&((r||Array.from(d.mount)).forEach(o=>{o&&(i?k(t.validatingFields,o,i):O(t.validatingFields,o))}),h.state.next({validatingFields:t.validatingFields,isValidating:!z(t.validatingFields)}))},K=(r,i=[],o,g,f=!0,u=!0)=>{if(g&&o&&!s.disabled){if(c.action=!0,u&&Array.isArray(y(a,r))){const m=o(y(a,r),g.argA,g.argB);f&&k(a,r,m)}if(u&&Array.isArray(y(t.errors,r))){const m=o(y(t.errors,r),g.argA,g.argB);f&&k(t.errors,r,m),er(t.errors,r)}if((w.touchedFields||S.touchedFields)&&u&&Array.isArray(y(t.touchedFields,r))){const m=o(y(t.touchedFields,r),g.argA,g.argB);f&&k(t.touchedFields,r,m)}(w.dirtyFields||S.dirtyFields)&&(t.dirtyFields=fe(l,n)),h.state.next({name:r,isDirty:J(r,i),dirtyFields:t.dirtyFields,errors:t.errors,isValid:t.isValid})}else k(n,r,i)},_=(r,i)=>{k(t.errors,r,i),h.state.next({errors:t.errors})},M=r=>{t.errors=r,h.state.next({errors:t.errors,isValid:!1})},L=(r,i,o,g)=>{const f=y(a,r);if(f){const u=y(n,r,N(o)?y(l,r):o);N(u)||g&&g.defaultChecked||i?k(n,r,i?u:st(f._f)):C(r,u),c.mount&&T()}},b=(r,i,o,g,f)=>{let u=!1,m=!1;const p={name:r};if(!s.disabled){if(!o||g){(w.isDirty||S.isDirty)&&(m=t.isDirty,t.isDirty=p.isDirty=J(),u=m!==p.isDirty);const D=ae(y(l,r),i);m=!!y(t.dirtyFields,r),D?O(t.dirtyFields,r):k(t.dirtyFields,r,!0),p.dirtyFields=t.dirtyFields,u=u||(w.dirtyFields||S.dirtyFields)&&m!==!D}if(o){const D=y(t.touchedFields,r);D||(k(t.touchedFields,r,o),p.touchedFields=t.touchedFields,u=u||(w.touchedFields||S.touchedFields)&&D!==o)}u&&f&&h.state.next(p)}return u?p:{}},re=(r,i,o,g)=>{const f=y(t.errors,r),u=(w.isValid||S.isValid)&&H(i)&&t.isValid!==i;if(s.delayError&&o?(x=W(()=>_(r,o)),x(s.delayError)):(clearTimeout(j),x=null,o?k(t.errors,r,o):O(t.errors,r)),(o?!ae(f,o):f)||!z(g)||u){const m={...g,...u&&H(i)?{isValid:i}:{},errors:t.errors,name:r};t={...t,...m},h.state.next(m)}},se=async r=>{E(r,!0);const i=await s.resolver(n,s.context,Gt(r||d.mount,a,s.criteriaMode,s.shouldUseNativeValidation));return E(r),i},Ae=async r=>{const{errors:i}=await se(r);if(r)for(const o of r){const g=y(i,o);g?k(t.errors,o,g):O(t.errors,o)}else t.errors=i;return i},G=async(r,i,o={valid:!0})=>{for(const g in r){const f=r[g];if(f){const{_f:u,...m}=f;if(u){const p=d.array.has(u.name),D=f._f&&Xt(f._f);D&&w.validatingFields&&E([g],!0);const $=await ut(f,d.disabled,n,Z,s.shouldUseNativeValidation&&!i,p);if(D&&w.validatingFields&&E([g]),$[u.name]&&(o.valid=!1,i))break;!i&&(y($,u.name)?p?tr(t.errors,$,u.name):k(t.errors,u.name,$[u.name]):O(t.errors,u.name))}!z(m)&&await G(m,i,o)}}return o.valid},le=()=>{for(const r of d.unMount){const i=y(a,r);i&&(i._f.refs?i._f.refs.every(o=>!Ce(o)):!Ce(i._f.ref))&&ke(r)}d.unMount=new Set},J=(r,i)=>!s.disabled&&(r&&i&&k(n,r,i),!ae(_e(),l)),V=(r,i,o)=>mt(r,d,{...c.mount?n:N(i)?l:ee(r)?{[r]:i}:i},o,i),A=r=>Oe(y(c.mount?n:l,r,s.shouldUnregister?y(l,r,[]):[])),C=(r,i,o={})=>{const g=y(a,r);let f=i;if(g){const u=g._f;u&&(!u.disabled&&k(n,r,bt(i,u)),f=Ve(u.ref)&&B(i)?"":i,ht(u.ref)?[...u.ref.options].forEach(m=>m.selected=f.includes(m.value)):u.refs?he(u.ref)?u.refs.forEach(m=>{(!m.defaultChecked||!m.disabled)&&(Array.isArray(f)?m.checked=!!f.find(p=>p===m.value):m.checked=f===m.value||!!f)}):u.refs.forEach(m=>m.checked=m.value===f):Ue(u.ref)?u.ref.value="":(u.ref.value=f,u.ref.type||h.state.next({name:r,values:R(n)})))}(o.shouldDirty||o.shouldTouch)&&b(r,f,o.shouldTouch,o.shouldDirty,!0),o.shouldValidate&&oe(r)},I=(r,i,o)=>{for(const g in i){if(!i.hasOwnProperty(g))return;const f=i[g],u=r+"."+g,m=y(a,u);(d.array.has(r)||P(f)||m&&!m._f)&&!ne(f)?I(u,f,o):C(u,f,o)}},q=(r,i,o={})=>{const g=y(a,r),f=d.array.has(r),u=R(i);k(n,r,u),f?(h.array.next({name:r,values:R(n)}),(w.isDirty||w.dirtyFields||S.isDirty||S.dirtyFields)&&o.shouldDirty&&h.state.next({name:r,dirtyFields:fe(l,n),isDirty:J(r,u)})):g&&!g._f&&!B(u)?I(r,u,o):C(r,u,o),lt(r,d)&&h.state.next({...t}),h.state.next({name:c.mount?r:void 0,values:R(n)})},Q=async r=>{c.mount=!0;const i=r.target;let o=i.name,g=!0;const f=y(a,o),u=D=>{g=Number.isNaN(D)||ne(D)&&isNaN(D.getTime())||ae(D,y(n,o,D))},m=it(s.mode),p=it(s.reValidateMode);if(f){let D,$;const ve=i.type?st(f._f):dt(r),ie=r.type===be.BLUR||r.type===be.FOCUS_OUT,Et=!Yt(f._f)&&!s.resolver&&!y(t.errors,o)&&!f._f.deps||Qt(ie,y(t.touchedFields,o),t.isSubmitted,p,m),Te=lt(o,d,ie);k(n,o,ve),ie?(f._f.onBlur&&f._f.onBlur(r),x&&x(0)):f._f.onChange&&f._f.onChange(r);const Ee=b(o,ve,ie),Nt=!z(Ee)||Te;if(!ie&&h.state.next({name:o,type:r.type,values:R(n)}),Et)return(w.isValid||S.isValid)&&(s.mode==="onBlur"?ie&&T():ie||T()),Nt&&h.state.next({name:o,...Te?{}:Ee});if(!ie&&Te&&h.state.next({...t}),s.resolver){const{errors:Xe}=await se([o]);if(u(ve),g){const Ct=nt(t.errors,a,o),Ye=nt(Xe,a,Ct.name||o);D=Ye.error,o=Ye.name,$=z(Xe)}}else E([o],!0),D=(await ut(f,d.disabled,n,Z,s.shouldUseNativeValidation))[o],E([o]),u(ve),g&&(D?$=!1:(w.isValid||S.isValid)&&($=await G(a,!0)));g&&(f._f.deps&&oe(f._f.deps),re(o,$,D,Ee))}},ce=(r,i)=>{if(y(t.errors,i)&&r.focus)return r.focus(),1},oe=async(r,i={})=>{let o,g;const f=ge(r);if(s.resolver){const u=await Ae(N(r)?r:f);o=z(u),g=r?!f.some(m=>y(u,m)):o}else r?(g=(await Promise.all(f.map(async u=>{const m=y(a,u);return await G(m&&m._f?{[u]:m}:m)}))).every(Boolean),!(!g&&!t.isValid)&&T()):g=o=await G(a);return h.state.next({...!ee(r)||(w.isValid||S.isValid)&&o!==t.isValid?{}:{name:r},...s.resolver||!r?{isValid:o}:{},errors:t.errors}),i.shouldFocus&&!g&&me(a,ce,r?f:d.mount),g},_e=r=>{const i={...c.mount?n:l};return N(r)?i:ee(r)?y(i,r):r.map(o=>y(i,o))},Be=(r,i)=>({invalid:!!y((i||t).errors,r),isDirty:!!y((i||t).dirtyFields,r),error:y((i||t).errors,r),isValidating:!!y(t.validatingFields,r),isTouched:!!y((i||t).touchedFields,r)}),wt=r=>{r&&ge(r).forEach(i=>O(t.errors,i)),h.state.next({errors:r?t.errors:{}})},qe=(r,i,o)=>{const g=(y(a,r,{_f:{}})._f||{}).ref,f=y(t.errors,r)||{},{ref:u,message:m,type:p,...D}=f;k(t.errors,r,{...D,...i,ref:g}),h.state.next({name:r,errors:t.errors,isValid:!1}),o&&o.shouldFocus&&g&&g.focus&&g.focus()},Ft=(r,i)=>Y(r)?h.state.subscribe({next:o=>r(V(void 0,i),o)}):V(r,i,!0),ze=r=>h.state.subscribe({next:i=>{Jt(r.name,i.name,r.exact)&&Zt(i,r.formState||w,Tt,r.reRenderRoot)&&r.callback({values:{...n},...t,...i})}}).unsubscribe,At=r=>(c.mount=!0,S={...S,...r.formState},ze({...r,formState:S})),ke=(r,i={})=>{for(const o of r?ge(r):d.mount)d.mount.delete(o),d.array.delete(o),i.keepValue||(O(a,o),O(n,o)),!i.keepError&&O(t.errors,o),!i.keepDirty&&O(t.dirtyFields,o),!i.keepTouched&&O(t.touchedFields,o),!i.keepIsValidating&&O(t.validatingFields,o),!s.shouldUnregister&&!i.keepDefaultValue&&O(l,o);h.state.next({values:R(n)}),h.state.next({...t,...i.keepDirty?{isDirty:J()}:{}}),!i.keepIsValid&&T()},We=({disabled:r,name:i})=>{(H(r)&&c.mount||r||d.disabled.has(i))&&(r?d.disabled.add(i):d.disabled.delete(i))},Se=(r,i={})=>{let o=y(a,r);const g=H(i.disabled)||H(s.disabled);return k(a,r,{...o||{},_f:{...o&&o._f?o._f:{ref:{name:r}},name:r,mount:!0,...i}}),d.mount.add(r),o?We({disabled:H(i.disabled)?i.disabled:s.disabled,name:r}):L(r,!0,i.value),{...g?{disabled:i.disabled||s.disabled}:{},...s.progressive?{required:!!i.required,min:ye(i.min),max:ye(i.max),minLength:ye(i.minLength),maxLength:ye(i.maxLength),pattern:ye(i.pattern)}:{},name:r,onChange:Q,onBlur:Q,ref:f=>{if(f){Se(r,i),o=y(a,r);const u=N(f.value)&&f.querySelectorAll&&f.querySelectorAll("input,select,textarea")[0]||f,m=Ht(u),p=o._f.refs||[];if(m?p.find(D=>D===u):u===o._f.ref)return;k(a,r,{_f:{...o._f,...m?{refs:[...p.filter(Ce),u,...Array.isArray(y(l,r))?[{}]:[]],ref:{type:u.type,name:r}}:{ref:u}}}),L(r,!1,void 0,u)}else o=y(a,r,{}),o._f&&(o._f.mount=!1),(s.shouldUnregister||i.shouldUnregister)&&!(ft(d.array,r)&&c.action)&&d.unMount.add(r)}}},De=()=>s.shouldFocusError&&me(a,ce,d.mount),kt=r=>{H(r)&&(h.state.next({disabled:r}),me(a,(i,o)=>{const g=y(a,o);g&&(i.disabled=g._f.disabled||r,Array.isArray(g._f.refs)&&g._f.refs.forEach(f=>{f.disabled=g._f.disabled||r}))},0,!1))},He=(r,i)=>async o=>{let g;o&&(o.preventDefault&&o.preventDefault(),o.persist&&o.persist());let f=R(n);if(h.state.next({isSubmitting:!0}),s.resolver){const{errors:u,values:m}=await se();t.errors=u,f=R(m)}else await G(a);if(d.disabled.size)for(const u of d.disabled)O(f,u);if(O(t.errors,"root"),z(t.errors)){h.state.next({errors:{}});try{await r(f,o)}catch(u){g=u}}else i&&await i({...t.errors},o),De(),setTimeout(De);if(h.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:z(t.errors)&&!g,submitCount:t.submitCount+1,errors:t.errors}),g)throw g},St=(r,i={})=>{y(a,r)&&(N(i.defaultValue)?q(r,R(y(l,r))):(q(r,i.defaultValue),k(l,r,R(i.defaultValue))),i.keepTouched||O(t.touchedFields,r),i.keepDirty||(O(t.dirtyFields,r),t.isDirty=i.defaultValue?J(r,R(y(l,r))):J()),i.keepError||(O(t.errors,r),w.isValid&&T()),h.state.next({...t}))},$e=(r,i={})=>{const o=r?R(r):l,g=R(o),f=z(r),u=f?l:g;if(i.keepDefaultValues||(l=o),!i.keepValues){if(i.keepDirtyValues){const m=new Set([...d.mount,...Object.keys(fe(l,n))]);for(const p of Array.from(m))y(t.dirtyFields,p)?k(u,p,y(n,p)):q(p,y(u,p))}else{if(je&&N(r))for(const m of d.mount){const p=y(a,m);if(p&&p._f){const D=Array.isArray(p._f.refs)?p._f.refs[0]:p._f.ref;if(Ve(D)){const $=D.closest("form");if($){$.reset();break}}}}for(const m of d.mount){const p=y(u,m,y(l,m));N(p)||(k(u,m,p),q(m,y(u,m)))}}n=R(u),h.array.next({values:{...u}}),h.state.next({values:{...u}})}d={mount:i.keepDirtyValues?d.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},c.mount=!w.isValid||!!i.keepIsValid||!!i.keepDirtyValues,c.watch=!!s.shouldUnregister,h.state.next({submitCount:i.keepSubmitCount?t.submitCount:0,isDirty:f?!1:i.keepDirty?t.isDirty:!!(i.keepDefaultValues&&!ae(r,l)),isSubmitted:i.keepIsSubmitted?t.isSubmitted:!1,dirtyFields:f?{}:i.keepDirtyValues?i.keepDefaultValues&&n?fe(l,n):t.dirtyFields:i.keepDefaultValues&&r?fe(l,r):i.keepDirty?t.dirtyFields:{},touchedFields:i.keepTouched?t.touchedFields:{},errors:i.keepErrors?t.errors:{},isSubmitSuccessful:i.keepIsSubmitSuccessful?t.isSubmitSuccessful:!1,isSubmitting:!1})},Ke=(r,i)=>$e(Y(r)?r(n):r,i),Dt=(r,i={})=>{const o=y(a,r),g=o&&o._f;if(g){const f=g.refs?g.refs[0]:g.ref;f.focus&&(f.focus(),i.shouldSelect&&Y(f.select)&&f.select())}},Tt=r=>{t={...t,...r}},Ge={control:{register:Se,unregister:ke,getFieldState:Be,handleSubmit:He,setError:qe,_subscribe:ze,_runSchema:se,_focusError:De,_getWatch:V,_getDirty:J,_setValid:T,_setFieldArray:K,_setDisabledField:We,_setErrors:M,_getFieldArray:A,_reset:$e,_resetDefaultValues:()=>Y(s.defaultValues)&&s.defaultValues().then(r=>{Ke(r,s.resetOptions),h.state.next({isLoading:!1})}),_removeUnmounted:le,_disableForm:kt,_subjects:h,_proxyFormState:w,get _fields(){return a},get _formValues(){return n},get _state(){return c},set _state(r){c=r},get _defaultValues(){return l},get _names(){return d},set _names(r){d=r},get _formState(){return t},get _options(){return s},set _options(r){s={...s,...r}}},subscribe:At,trigger:oe,register:Se,handleSubmit:He,watch:Ft,setValue:q,getValues:_e,reset:Ke,resetField:St,clearErrors:wt,unregister:ke,setError:qe,setFocus:Dt,getFieldState:Be};return{...Ge,formControl:Ge}}function ir(e={}){const s=F.useRef(void 0),t=F.useRef(void 0),[a,l]=F.useState({isDirty:!1,isValidating:!1,isLoading:Y(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:Y(e.defaultValues)?void 0:e.defaultValues});if(!s.current)if(e.formControl)s.current={...e.formControl,formState:a},e.defaultValues&&!Y(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:c,...d}=sr(e);s.current={...d,formState:a}}const n=s.current.control;return n._options=e,Me(()=>{const c=n._subscribe({formState:n._proxyFormState,callback:()=>l({...n._formState}),reRenderRoot:!0});return l(d=>({...d,isReady:!0})),n._formState.isReady=!0,c},[n]),F.useEffect(()=>n._disableForm(e.disabled),[n,e.disabled]),F.useEffect(()=>{e.mode&&(n._options.mode=e.mode),e.reValidateMode&&(n._options.reValidateMode=e.reValidateMode)},[n,e.mode,e.reValidateMode]),F.useEffect(()=>{e.errors&&(n._setErrors(e.errors),n._focusError())},[n,e.errors]),F.useEffect(()=>{e.shouldUnregister&&n._subjects.state.next({values:n._getWatch()})},[n,e.shouldUnregister]),F.useEffect(()=>{if(n._proxyFormState.isDirty){const c=n._getDirty();c!==a.isDirty&&n._subjects.state.next({isDirty:c})}},[n,a.isDirty]),F.useEffect(()=>{e.values&&!ae(e.values,t.current)?(n._reset(e.values,n._options.resetOptions),t.current=e.values,l(c=>({...c}))):n._resetDefaultValues()},[n,e.values]),F.useEffect(()=>{n._state.mount||(n._setValid(),n._state.mount=!0),n._state.watch&&(n._state.watch=!1,n._subjects.state.next({...n._formState})),n._removeUnmounted()}),s.current.formState=gt(a,n),s.current}const ar=Lt.styled.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: flex-start;
|
|
4
|
+
gap: 2.5rem;
|
|
5
|
+
|
|
6
|
+
& .section__card {
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
align-items: flex-start;
|
|
10
|
+
border-radius: 0.75rem;
|
|
11
|
+
border: 1px solid var(--gray-200, #e4e9f0);
|
|
12
|
+
background: var(--white, #fff);
|
|
13
|
+
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
|
|
14
|
+
|
|
15
|
+
& .card__image {
|
|
16
|
+
border-top-left-radius: 0.75rem;
|
|
17
|
+
border-top-right-radius: 0.75rem;
|
|
18
|
+
max-width: 23.5rem;
|
|
19
|
+
max-height: 18rem;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
& .card__content {
|
|
23
|
+
display: flex;
|
|
24
|
+
padding: 2rem 1.25rem;
|
|
25
|
+
flex-direction: column;
|
|
26
|
+
align-items: flex-start;
|
|
27
|
+
gap: 1.5rem;
|
|
28
|
+
|
|
29
|
+
& .card__tile {
|
|
30
|
+
display: flex;
|
|
31
|
+
align-items: flex-start;
|
|
32
|
+
gap: 1rem;
|
|
33
|
+
|
|
34
|
+
& .tile__image {
|
|
35
|
+
display: flex;
|
|
36
|
+
width: 2.5rem;
|
|
37
|
+
height: 2.5rem;
|
|
38
|
+
padding: 0.5rem;
|
|
39
|
+
align-items: center;
|
|
40
|
+
aspect-ratio: 1 / 1;
|
|
41
|
+
border-radius: 999px;
|
|
42
|
+
background: var(--primary-100, #dcf4f9);
|
|
43
|
+
color: var(--primary-400, #27b4be);
|
|
44
|
+
|
|
45
|
+
& i {
|
|
46
|
+
&::before {
|
|
47
|
+
margin-left: 0.1rem;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
& .tile__content {
|
|
53
|
+
display: flex;
|
|
54
|
+
flex-direction: column;
|
|
55
|
+
align-items: flex-start;
|
|
56
|
+
gap: 0.25rem;
|
|
57
|
+
|
|
58
|
+
& .tile__title {
|
|
59
|
+
color: var(--gray-900, #0c1520);
|
|
60
|
+
font-size: 1rem;
|
|
61
|
+
font-style: normal;
|
|
62
|
+
font-weight: 500;
|
|
63
|
+
line-height: 1.5rem;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
& .tile__items {
|
|
67
|
+
display: flex;
|
|
68
|
+
flex-direction: column;
|
|
69
|
+
align-items: flex-start;
|
|
70
|
+
gap: 0.5rem;
|
|
71
|
+
|
|
72
|
+
& .tile__item {
|
|
73
|
+
color: var(--gray-900, #0c1520);
|
|
74
|
+
font-size: 0.875rem;
|
|
75
|
+
font-style: normal;
|
|
76
|
+
font-weight: 400;
|
|
77
|
+
line-height: 1.25rem;
|
|
78
|
+
letter-spacing: 0.0156rem;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
& .section__form {
|
|
87
|
+
display: flex;
|
|
88
|
+
flex-direction: column;
|
|
89
|
+
gap: 2rem;
|
|
90
|
+
|
|
91
|
+
& .form__title {
|
|
92
|
+
color: var(--gray-900, #0c1520);
|
|
93
|
+
font-size: 1.5rem;
|
|
94
|
+
font-style: normal;
|
|
95
|
+
font-weight: 600;
|
|
96
|
+
line-height: 2rem;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
& .form__description {
|
|
100
|
+
color: var(--gray-500, #7a8594);
|
|
101
|
+
font-size: 1rem;
|
|
102
|
+
font-style: normal;
|
|
103
|
+
font-weight: 500;
|
|
104
|
+
line-height: 1.5rem;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
& .form__fields {
|
|
108
|
+
display: flex;
|
|
109
|
+
flex-direction: column;
|
|
110
|
+
align-items: flex-start;
|
|
111
|
+
gap: 1.25rem;
|
|
112
|
+
|
|
113
|
+
& .form__field {
|
|
114
|
+
display: flex;
|
|
115
|
+
align-items: center;
|
|
116
|
+
gap: 0.75rem;
|
|
117
|
+
width: 100%;
|
|
118
|
+
|
|
119
|
+
&.right {
|
|
120
|
+
justify-content: flex-end;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
& .field__wrapper {
|
|
124
|
+
display: flex;
|
|
125
|
+
flex-direction: column;
|
|
126
|
+
width: 100%;
|
|
127
|
+
|
|
128
|
+
& .field__hint {
|
|
129
|
+
color: var(--gray-400, #96a2b2);
|
|
130
|
+
font-size: 0.75rem;
|
|
131
|
+
font-style: normal;
|
|
132
|
+
font-weight: 400;
|
|
133
|
+
line-height: 1rem;
|
|
134
|
+
letter-spacing: 0.01px;
|
|
135
|
+
align-self: flex-end;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
& .field__checkbox-input {
|
|
139
|
+
& input {
|
|
140
|
+
&:focus ~ .checkmark {
|
|
141
|
+
outline: none;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
&:checked ~ .checkmark {
|
|
145
|
+
background: var(--primary-500, #ff7621);
|
|
146
|
+
border: 1px solid var(--primary-400, #ff914d);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
& .checkbox-label {
|
|
151
|
+
color: var(--gray-900, #0c1520);
|
|
152
|
+
font-size: 0.875rem;
|
|
153
|
+
font-style: normal;
|
|
154
|
+
font-weight: 400;
|
|
155
|
+
line-height: 1.25rem;
|
|
156
|
+
letter-spacing: -0.09px;
|
|
157
|
+
|
|
158
|
+
& a {
|
|
159
|
+
font-weight: 500;
|
|
160
|
+
color: var(--gray-900, #0c1520);
|
|
161
|
+
|
|
162
|
+
&:hover {
|
|
163
|
+
color: var(--gray-900, #0c1520);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
& .field__text-input {
|
|
171
|
+
height: 2.75rem;
|
|
172
|
+
min-height: 2.75rem;
|
|
173
|
+
border-radius: 0.75rem;
|
|
174
|
+
border: 1px solid var(--gray-200, #e4e9f0);
|
|
175
|
+
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
|
|
176
|
+
width: 100%;
|
|
177
|
+
outline: none;
|
|
178
|
+
|
|
179
|
+
&.text-area {
|
|
180
|
+
height: 100%;
|
|
181
|
+
min-height: 100%;
|
|
182
|
+
border: none;
|
|
183
|
+
box-shadow: none;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
& input::placeholder {
|
|
187
|
+
color: var(--gray-500, #7a8594);
|
|
188
|
+
font-size: 0.875rem;
|
|
189
|
+
font-style: normal;
|
|
190
|
+
font-weight: 400;
|
|
191
|
+
line-height: 1.25rem;
|
|
192
|
+
letter-spacing: 0.0156rem;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
& textarea {
|
|
196
|
+
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
|
|
197
|
+
|
|
198
|
+
&::placeholder {
|
|
199
|
+
color: var(--gray-500, #7a8594);
|
|
200
|
+
font-size: 0.875rem;
|
|
201
|
+
font-style: normal;
|
|
202
|
+
font-weight: 400;
|
|
203
|
+
line-height: 1.25rem;
|
|
204
|
+
letter-spacing: 0.0156rem;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
&:focus {
|
|
208
|
+
outline: none;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
& button {
|
|
214
|
+
min-width: 9rem;
|
|
215
|
+
padding: 0.5rem;
|
|
216
|
+
color: var(--white, #fff);
|
|
217
|
+
font-size: 0.875rem;
|
|
218
|
+
font-style: normal;
|
|
219
|
+
font-weight: 600;
|
|
220
|
+
line-height: 1.25rem;
|
|
221
|
+
letter-spacing: 0.1px;
|
|
222
|
+
|
|
223
|
+
background: var(
|
|
224
|
+
--Linear-button,
|
|
225
|
+
linear-gradient(0deg, #ff7621 0%, #ff9706 100%)
|
|
226
|
+
);
|
|
227
|
+
|
|
228
|
+
&:hover {
|
|
229
|
+
background: var(
|
|
230
|
+
--Linear-button-switched,
|
|
231
|
+
linear-gradient(0deg, #ff9706 0%, #ff7621 100%)
|
|
232
|
+
);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
&:focus {
|
|
236
|
+
outline: none;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
& .section__divider {
|
|
244
|
+
width: 100%;
|
|
245
|
+
height: 1px;
|
|
246
|
+
background: var(--gray-200, #e4e9f0);
|
|
247
|
+
display: none;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
@media (max-width: ${Rt.MOBILE_SIZE_PX+"px"}) {
|
|
251
|
+
flex-direction: column;
|
|
252
|
+
|
|
253
|
+
& .section__divider {
|
|
254
|
+
order: 1;
|
|
255
|
+
display: block;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
& .section__card {
|
|
259
|
+
width: 100%;
|
|
260
|
+
border: none;
|
|
261
|
+
background: transparent;
|
|
262
|
+
box-shadow: none;
|
|
263
|
+
order: 2;
|
|
264
|
+
|
|
265
|
+
& .card__image {
|
|
266
|
+
display: none;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
& .card__content {
|
|
270
|
+
padding: 0;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
& .section__form {
|
|
275
|
+
order: 0;
|
|
276
|
+
|
|
277
|
+
& .form__title {
|
|
278
|
+
font-size: 1rem;
|
|
279
|
+
font-style: normal;
|
|
280
|
+
font-weight: 500;
|
|
281
|
+
line-height: 1.5rem;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
& .form__description {
|
|
285
|
+
color: var(--gray-500, #7a8594);
|
|
286
|
+
font-size: 0.875rem;
|
|
287
|
+
font-style: normal;
|
|
288
|
+
font-weight: 400;
|
|
289
|
+
line-height: 1.25rem;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
& .form__fields {
|
|
293
|
+
& .form__field {
|
|
294
|
+
flex-direction: column;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
& button {
|
|
298
|
+
width: 100%;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
`,pt=F.forwardRef(({title:e,description:s,image:t,phoneText:a,phones:l=[],emailText:n,emails:c=[],fullNamePlaceholderText:d="Name Surname",emailPlaceholderText:x="E-mail",subjectPlaceholderText:j="Subject",messagePlaceholderText:w="Message",messageMaxLength:S=250,hasAgrement:h=!1,agrementText:Z="I agree with Privacy policy.",submitText:W="Submit",onSubmit:T=()=>{}},E)=>{const{watch:K,handleSubmit:_,control:M}=ir(),L=K("message");return v.jsxs(ar,{ref:E,children:[v.jsxs("div",{className:"section__card",children:[v.jsx("img",{src:t,alt:"Contact",className:"card__image"}),v.jsxs("div",{className:"card__content",children:[(l==null?void 0:l.length)>0&&v.jsxs("div",{className:"card__tile",children:[v.jsx(Ze,{icon:" mng-lnc-phone--filled",sizeInUnits:"1.25rem",className:"tile__image"}),v.jsxs("div",{className:"tile__content",children:[v.jsx("div",{className:"tile__title",children:a}),v.jsx("div",{className:"tile__items",children:l==null?void 0:l.map((b,re)=>v.jsx("div",{className:"tile__item",children:b},`contanct-section-phone__${re}`))})]})]}),(c==null?void 0:c.length)>0&&v.jsxs("div",{className:"card__tile",children:[v.jsx(Ze,{icon:" mng-lnc-email-filled",sizeInUnits:"1.25rem",className:"tile__image"}),v.jsxs("div",{className:"tile__content",children:[v.jsx("div",{className:"tile__title",children:n}),v.jsx("div",{className:"tile__items",children:c==null?void 0:c.map((b,re)=>v.jsx("div",{className:"tile__item",children:b},`contanct-section-email__${re}`))})]})]})]})]}),v.jsx("div",{className:"section__divider"}),v.jsxs("div",{className:"section__form",children:[v.jsxs("div",{children:[e&&v.jsx("div",{className:"form__title",children:e}),s&&v.jsx("div",{className:"form__description",children:s})]}),v.jsx("div",{children:v.jsxs("div",{className:"form__fields",children:[v.jsxs("div",{className:"form__field",children:[v.jsx(de,{control:M,name:"fullName",render:({field:b})=>v.jsx(Ne,{...b,className:"field__text-input",color:"neutral",placeholder:d,debounceTime:200})}),v.jsx(de,{control:M,name:"email",render:({field:b})=>v.jsx(Ne,{...b,className:"field__text-input",color:"neutral",placeholder:x,debounceTime:200})})]}),v.jsx("div",{className:"form__field",children:v.jsx(de,{control:M,name:"subject",render:({field:b})=>v.jsx(Ne,{...b,className:"field__text-input",color:"neutral",placeholder:j,debounceTime:200})})}),v.jsx("div",{className:"form__field",children:v.jsxs("div",{className:"field__wrapper",children:[v.jsx(de,{control:M,name:"message",render:({field:b})=>v.jsx(jt,{...b,className:"field__text-input text-area",color:"neutral",placeholder:w,debounceTime:200,minRows:7,maxLength:S})}),v.jsx("div",{className:"field__hint",children:`${(L==null?void 0:L.length)||0}/${S}`}),h&&v.jsx(de,{control:M,name:"agrement",render:({field:b})=>v.jsx(Pt,{...b,label:Z,size:"medium",className:"field__checkbox-input"})})]})}),v.jsx("div",{className:"form__field right",children:v.jsx(Ot,{text:W,onClick:_(T)})})]})})]})]})});pt.propTypes={title:U.PropTypes.string,description:U.PropTypes.string,image:U.PropTypes.string,phoneText:U.PropTypes.string,phones:U.PropTypes.array,emailText:U.PropTypes.string,emails:U.PropTypes.array,fullNamePlaceholderText:U.PropTypes.string,emailPlaceholderText:U.PropTypes.string,subjectPlaceholderText:U.PropTypes.string,messagePlaceholderText:U.PropTypes.string,messageMaxLength:U.PropTypes.number,hasAgrement:U.PropTypes.bool,agrementText:U.PropTypes.string,submitText:U.PropTypes.string,onSubmit:U.PropTypes.func};module.exports=pt;
|