@sikka/hawa 0.0.29 → 0.0.32

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.
Files changed (37) hide show
  1. package/es/index.es.js +1 -1
  2. package/lib/index.js +1 -1
  3. package/package.json +1 -1
  4. package/src/blocks/Account/UserProfileForm.js +5 -0
  5. package/src/blocks/AuthForms/NewPasswordForm.js +22 -1
  6. package/src/blocks/AuthForms/ResetPasswordForm.js +16 -3
  7. package/src/blocks/AuthForms/SignInForm.js +19 -1
  8. package/src/blocks/AuthForms/SignUpForm.js +31 -9
  9. package/src/blocks/Payment/ChargeWalletForm.js +21 -8
  10. package/src/blocks/Payment/CheckoutForm.js +17 -1
  11. package/src/blocks/Payment/Confirmation.js +27 -1
  12. package/src/blocks/Payment/CreditCardForm.js +0 -23
  13. package/src/blocks/Payment/{PaymentMethod.js → Form/PaymentMethod.js} +0 -10
  14. package/src/blocks/Pricing/PricingPlans.js +18 -1
  15. package/src/elements/HawaAccordian.js +28 -0
  16. package/src/elements/HawaAlert.js +10 -1
  17. package/src/elements/HawaColorPicker.js +1 -0
  18. package/src/elements/HawaLogoButton.js +18 -1
  19. package/src/elements/HawaPopMenu.js +7 -1
  20. package/src/elements/HawaPricingCard.js +18 -1
  21. package/src/elements/HawaRadio.js +6 -1
  22. package/src/elements/HawaRange.js +31 -0
  23. package/src/elements/HawaSearchBar.js +17 -0
  24. package/src/elements/HawaSettingsRow.js +12 -4
  25. package/src/elements/{OfflineBanner.js → HawaSnackbar.js} +3 -8
  26. package/src/elements/HawaTable.js +65 -20
  27. package/src/elements/HawaTextField.js +6 -2
  28. package/src/elements/index.js +4 -1
  29. package/src/layout/HawaAppLayout.js +33 -61
  30. package/storybook-static/iframe.html +1 -1
  31. package/storybook-static/main.c86d0451.iframe.bundle.js +1 -0
  32. package/storybook-static/vendors~main.924b4d3c.iframe.bundle.js +76 -0
  33. package/storybook-static/{vendors~main.b026595c.iframe.bundle.js.LICENSE.txt → vendors~main.924b4d3c.iframe.bundle.js.LICENSE.txt} +0 -0
  34. package/storybook-static/vendors~main.924b4d3c.iframe.bundle.js.map +1 -0
  35. package/storybook-static/main.c6115a9b.iframe.bundle.js +0 -1
  36. package/storybook-static/vendors~main.b026595c.iframe.bundle.js +0 -76
  37. package/storybook-static/vendors~main.b026595c.iframe.bundle.js.map +0 -1
package/es/index.es.js CHANGED
@@ -1 +1 @@
1
- import*as e from"react";import t,{useState as r}from"react";import n from"@mui/material/Button";import i from"@mui/material/Tooltip";import a from"prop-types";import{jsxs as l,jsx as o,Fragment as d}from"react/jsx-runtime";import s from"@mui/material/Snackbar";import c from"@mui/material/AlertTitle";import u from"@mui/material/Alert";import p from"@mui/material/FormControlLabel";import m from"@mui/material/Checkbox";import h from"@mui/material/Container";import f from"@mui/material/Typography";import v from"@mui/icons-material/CheckCircleOutlined";import g from"@mui/material/Input";import x from"@mui/material/InputLabel";import b from"@mui/material/Switch";import y from"@emotion/styled";import w from"@mui/icons-material/GitHub";import T from"@mui/icons-material/Twitter";import C from"@mui/icons-material/AccountBalanceWallet";import k from"@mui/material/Select";import P from"@mui/material/Table";import S from"@mui/material/TableBody";import W from"@mui/material/TableCell";import O from"@mui/material/TableContainer";import L from"@mui/material/TableHead";import I from"@mui/material/TableRow";import{useForm as N,FormProvider as A,Controller as j}from"react-hook-form";import q from"@mui/material/InputAdornment";import R from"@mui/icons-material/HttpsOutlined";import z from"@mui/icons-material/MailOutline";import E from"@mui/icons-material/PermIdentityOutlined";import B from"@mui/material/Divider";import{styled as D,useTheme as M}from"@mui/material/styles";import G from"@mui/material/Box";import $ from"@mui/material/Drawer";import U from"@mui/material/AppBar";import _ from"@mui/material/Toolbar";import V from"@mui/material/List";import F from"@mui/material/IconButton";import Z from"@mui/icons-material/Menu";import H from"@mui/icons-material/ChevronLeft";import X from"@mui/icons-material/ChevronRight";import Y from"@mui/material/ListItemButton";import J from"@mui/material/ListItemText";import K from"@mui/material/Menu";import Q from"@mui/material/Avatar";import ee from"@mui/material/MenuItem";import te from"@mui/icons-material/Close";import re from"@mui/material/Dialog";import ne from"@mui/material/DialogActions";import ie from"@mui/material/DialogContent";import ae from"@mui/material/DialogTitle";import{useTheme as le,Menu as oe,MenuItem as de,Typography as se}from"@mui/material";function ce(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ue(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ce(Object(r),!0).forEach((function(t){pe(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ce(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function pe(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function me(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function he(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function fe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,i,a=[],l=!0,o=!1;try{for(r=r.call(e);!(l=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);l=!0);}catch(e){o=!0,i=e}finally{try{l||null==r.return||r.return()}finally{if(o)throw i}}return a}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ve(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ve(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ve(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var ge=function(e){return e.showText?l(n,{variant:"adaptive-dark",onClick:e.onClick,children:[e.icon,o("div",{style:{width:10}}),e.buttonText]}):o(i,{title:e.buttonText,placement:"top",children:o(n,{variant:"adaptive-dark",onClick:e.onClick,children:e.icon})})};ge.propTypes={buttonText:a.string,onClick:a.func,showText:a.bool};var xe=function(e){return o(n,ue(ue({},e),{},{children:e.text}))},be=function(e){return o(s,{variant:"danger",open:e.open,onClose:e.handleClose,children:l(u,{icon:!1,severity:"error",variant:"offline",children:[e.title&&o(c,{children:e.title}),e.text]})})},ye=function(e){return console.log("props : ",e),o(t.Fragment,{children:o(p,{label:e.label,control:o(m,{style:{color:e.color||null},defaultChecked:e.defaultValue})})})},we=function(e){var t=fe(r(e.defaultValue),2),i=t[0],a=t[1];return o(h,{variant:e.location||"panelTabs",children:e.options.map((function(t,r){var l;return o(n,{onClick:function(){e.handleChange(t.value),a(t.value)},fullWidth:!0,variant:(null==i?void 0:i.toLowerCase())===(null===(l=t.value)||void 0===l?void 0:l.toLowerCase())?"selected":"unselected",children:t.label},r)}))})};we.propTypes={lang:a.string,options:a.array,defaultValue:a.string,handleChange:a.func,location:a.string};var Te=function(e){var t="ar"===e.lang;return l(h,{onClick:function(t){t.stopPropagation(),e.onCardClick()},maxWidth:"xs",variant:"card-container",dataValue:"parent",style:{direction:t?"rtl":"ltr"},children:[e.header&&l(h,{style:{zIndex:20},variant:"card-header",children:[e.headerActions&&o("div",{style:{margin:0,marginRight:-20,marginLeft:-20,marginBottom:-20,display:"flex",paddingTop:5,paddingLeft:5,paddingRight:5,justifyContent:"flex-end"},children:e.headerActions}),e.header]}),e.content&&o(h,{style:{zIndex:20},variant:"card-content",children:e.content}),e.actions&&o(h,{style:{zIndex:20},variant:"card-actions",children:e.actions})]})};Te.propTypes={lang:a.string,onCardClick:a.func};var Ce=function(e){var t,r,i="ar"===e.lang,a={monthly:"شهرياً","3-months":"كل 3 أشهر","6-months":"كل 6 أشهر",annually:"سنوياً"},d={monthly:"Monthly","3-months":"3 Months","6-months":"6 Months",annually:"Annually"},s={usd:i?"دولار":"$",sar:i?"ريال":"SAR"},c=i?e.features_ar:e.features;return l(h,{maxWidth:"xs",variant:e.selectedPlan?"selected-plan-card":"plan-card",style:{direction:i?"rtl":"ltr"},children:[l(h,{variant:"plan-header",children:[o(f,{variant:"h3",fontWeight:500,children:i?e.title_ar:e.title}),o(f,{variant:"caption",children:i?e.subtitle_ar:e.subtitle}),o("br",{}),o(f,{variant:"h4",fontWeight:500,style:{display:"flex",alignItems:"center"},children:"ar"===e.lang?l("div",{style:{width:"100%",display:"flex",flexDirection:"column",justifyContent:"center"},children:[l("div",{style:{display:"flex",flexDirection:"row"},children:[e.price,o("div",{style:{width:5}}),o(f,{children:s[null===(t=e.currency)||void 0===t?void 0:t.toLowerCase()]})]}),o(f,{style:{fontSize:14,margin:5},children:i?a[e.cycleText]:d[e.cycleText]})]}):l("div",{style:{width:"100%",display:"flex",flexDirection:"column",justifyContent:"center"},children:[l("div",{style:{display:"flex",flexDirection:"row"},children:[o(f,{children:s[null===(r=e.currency)||void 0===r?void 0:r.toLowerCase()]}),o("div",{style:{width:5}}),e.price]}),o(f,{style:{fontSize:14,margin:5},children:"ar"===e.lang?a[e.cycleText]:d[e.cycleText]})]})})]}),o("div",{style:{padding:20,color:e.selectedPlan?"white":"black"},children:null==c?void 0:c.map((function(e){return l("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start",marginTop:10,width:"100%"},children:[o("div",{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",width:"10%"},children:o(v,{fontSize:"small"})}),o("div",{style:{width:10}}),o(f,{variant:"subtitle2",children:e})]})}))}),o(n,{onClick:e.selectPlan,variant:e.selectedPlan?"outlined":"contained",style:{margin:20},children:e.buttonText})]})};Ce.propTypes={lang:a.string,buttonText:a.string,selectedPlan:a.string,title:a.string,title_ar:a.string,subtitle:a.string,subtitle_ar:a.string,features:a.array,features_ar:a.array};var ke=function(e){return o(f,ue(ue({},e),{},{children:e.children}))},Pe=function(e){return o("div",{style:e.inForm&&{width:"100%"},children:l("div",{style:{width:e.fullWidth?"100%":"fit-content"},children:[l("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[e.label&&o(x,{children:e.label}),e.helperText&&o(f,{variant:"validation",children:e.helperText})]}),o(g,ue({disableUnderline:!0},e))]})})},Se=function(e){return o(b,ue({},e))};var We="production"!==process.env.NODE_ENV?a.oneOfType([a.number,a.string,a.object,a.array]):{};function Oe(){return Oe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Oe.apply(this,arguments)}function Le(e){return null!==e&&"object"==typeof e&&e.constructor===Object}function Ie(e,t,r={clone:!0}){const n=r.clone?Oe({},e):e;return Le(e)&&Le(t)&&Object.keys(t).forEach((i=>{"__proto__"!==i&&(Le(t[i])&&i in e&&Le(e[i])?n[i]=Ie(e[i],t[i],r):n[i]=t[i])})),n}const Ne=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Ae=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],je=[...Ne,...Ae];function qe(e){return function(e,t,r,n){const i=(a=e,((l=t)&&"string"==typeof l?l.split(".").reduce(((e,t)=>e&&e[t]?e[t]:null),a):null)||r);var a,l;return"number"==typeof i?e=>"string"==typeof e?e:("production"!==process.env.NODE_ENV&&"number"!=typeof e&&console.error(`MUI: Expected ${n} argument to be a number or a string, got ${e}.`),i*e):Array.isArray(i)?e=>"string"==typeof e?e:("production"!==process.env.NODE_ENV&&(Number.isInteger(e)?e>i.length-1&&console.error([`MUI: The value provided (${e}) overflows.`,`The supported values are: ${JSON.stringify(i)}.`,`${e} > ${i.length-1}, you need to add the missing values.`].join("\n")):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join("\n"))),i[e]):"function"==typeof i?i:("production"!==process.env.NODE_ENV&&console.error([`MUI: The \`theme.${t}\` value (${i}) is invalid.`,"It should be a number, an array or a function."].join("\n")),()=>{})}(e,"spacing",8,"spacing")}function Re(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}"production"===process.env.NODE_ENV||Ne.reduce(((e,t)=>(e[t]=We,e)),{}),"production"===process.env.NODE_ENV||Ae.reduce(((e,t)=>(e[t]=We,e)),{}),"production"===process.env.NODE_ENV||je.reduce(((e,t)=>(e[t]=We,e)),{});const ze=["values","unit","step"];function Ee(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5}=e,i=Re(e,ze),a=(e=>{const t=Object.keys(e).map((t=>({key:t,val:e[t]})))||[];return t.sort(((e,t)=>e.val-t.val)),t.reduce(((e,t)=>Oe({},e,{[t.key]:t.val})),{})})(t),l=Object.keys(a);function o(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${r})`}function d(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-n/100}${r})`}function s(e,i){const a=l.indexOf(i);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${r}) and (max-width:${(-1!==a&&"number"==typeof t[l[a]]?t[l[a]]:i)-n/100}${r})`}return Oe({keys:l,values:a,up:o,down:d,between:s,only:function(e){return l.indexOf(e)+1<l.length?s(e,l[l.indexOf(e)+1]):o(e)},not:function(e){const t=l.indexOf(e);return 0===t?o(l[1]):t===l.length-1?d(l[t]):s(e,l[l.indexOf(e)+1]).replace("@media","@media not all and")},unit:r},i)}var Be={borderRadius:4};const De=["breakpoints","palette","spacing","shape"];const Me=e.createContext(null);"production"!==process.env.NODE_ENV&&(Me.displayName="ThemeContext");var Ge=Me;function $e(t=null){const r=function(){const t=e.useContext(Ge);return"production"!==process.env.NODE_ENV&&e.useDebugValue(t),t}();return r&&(n=r,0!==Object.keys(n).length)?r:t;var n}const Ue=function(e={},...t){const{breakpoints:r={},palette:n={},spacing:i,shape:a={}}=e,l=Re(e,De),o=Ee(r),d=function(e=8){if(e.mui)return e;const t=qe({spacing:e}),r=(...e)=>("production"!==process.env.NODE_ENV&&(e.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${e.length}`)),(0===e.length?[1]:e).map((e=>{const r=t(e);return"number"==typeof r?`${r}px`:r})).join(" "));return r.mui=!0,r}(i);let s=Ie({breakpoints:o,direction:"ltr",components:{},palette:Oe({mode:"light"},n),spacing:d,shape:Oe({},Be,a)},l);return s=t.reduce(((e,t)=>Ie(e,t)),s),s}();function _e(e=Ue){return $e(e)}var Ve,Fe,Ze=y.input(Ve||(Ve=he(["\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n border: none;\n cursor: pointer;\n height: 35px;\n border-radius: ","px;\n background-color: ",";\n &::-webkit-color-swatch {\n border: none;\n }\n &::-moz-color-swatch {\n border: none;\n }\n"])),(function(e){return e.borderRadius}),(function(e){return e.value})),He=y.input(Fe||(Fe=he(["\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n border: none;\n // height: 30px;\n padding: 10px;\n border-radius: ","px;\n &::-webkit-color-swatch {\n border: none;\n }\n &::-moz-color-swatch {\n border: none;\n }\n"])),(function(e){return e.borderRadius})),Xe=function(e){var t=_e();return l("div",{style:{display:"flex",flexDirection:"row"},children:[o(He,{type:"text",value:e.color,borderRadius:t.allBorderRadius,onChange:e.handleChange}),o("div",{style:{width:10}}),o(Ze,{type:"color",value:e.color,onChange:e.handleChange,borderRadius:t.allBorderRadius})]})};Xe.propTypes={color:a.string,handleChange:a.func};var Ye=function(e){return l(h,{variant:"settingsRow",children:[o(ke,{children:e.settingsLabel}),"checkbox"===e.settingsType&&o(m,ue({},e)),"text"===e.settingsType&&o(Pe,ue({},e)),"radio"===e.settingsType&&o(we,ue({location:"inSettings"},e)),"boolean"===e.settingsType&&o(Se,ue({},e)),"color"===e.settingsType&&o(Xe,ue({},e))]})};Ye.propTypes={type:a.oneOf(["checkbox","text","radio","boolean","color"]),helperText:a.string};var Je=function(e){var t,r="ar"===e.lang,i="";switch(null===(t=e.logo)||void 0===t?void 0:t.toLowerCase()){case"google":i=o("img",{src:"https://upload.wikimedia.org/wikipedia/commons/5/53/Google_%22G%22_Logo.svg"});break;case"github":i=o(w,{});break;case"twitter":i=o(T,{});break;case"mada":i=o("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/mada.png",height:20});break;case"stcpay":i=o("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/stc-pay.png",height:20});break;case"visa/master":i=o("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/visa-master.png",height:30});break;case"paypal":i=o("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/paypal.png",height:25});break;case"googlepay":i=o("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/google-pay.png",height:20});break;case"applepay":i=o("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/apple-pay.png",height:40});break;case"wallet":i=o(C,{})}return l(n,ue(ue({style:{direction:r?"rtl":"ltr"}},e),{},{variant:"withLogo",children:[i,o("div",{style:{width:10}}),o(f,{style:{color:"black",fontSize:14,textAlign:"center",letterSpacing:.4,fontFamily:"Roboto",fontWeight:500},children:e.buttonText})]}))};Je.propTypes={lang:a.string,logo:a.string,buttonText:a.string};var Ke=function(e){return o(n,ue(ue({},e),{},{children:e.children}))},Qe=function(e){return l("div",{style:{width:"100%"},children:[l("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[o(x,{children:e.label}),e.helperText&&o(f,{variant:"validation",children:e.helperText})]}),o(k,ue(ue({},e),{},{children:e.children}))]})},et=function(e){var t=_e();return console.log("theme is ",t),o("label",{children:o("textarea",{style:{color:"black",backgroundColor:e.bgColor||"white",borderBottom:"none",border:"none",width:"100%",padding:0,margin:0,marginBottom:0,resize:e.resize||"vertical"}})})},tt=function(e){return o(x,{children:o("div",{style:{fontSize:15},children:e.label})})},rt=function(e){return l(u,{severity:e.severity,icon:e.hideIcon,children:[e.title&&o(c,{children:e.title}),e.text]})};rt.propTypes={severity:a.string,title:a.string,text:a.string,hideIcon:a.bool};var nt=function(e){var t="ar"===e.lang;return o(O,{style:{direction:t?"rtl":"ltr"},children:l(P,{"aria-label":"a dense table",children:[o(L,{children:o(I,{children:e.columns.map((function(e,r){return o(W,{align:t?"right":"left",style:{fontWeight:700},variant:r>0?t?"borderedRight":"borderedLeft":"body",children:e},r)}))})}),o(S,{children:e.rows.map((function(e,r){return o(I,{children:e.map((function(e,r){return o(W,{align:t?"right":"left",component:"th",scope:"row",variant:r>0?t?"borderedRight":"borderedLeft":"body",children:e},r)}))},r)}))}),e.end&&o(I,{children:e.end.map((function(e,r){return o(W,{align:t?"right":"left",style:{fontWeight:700},component:"th",scope:"row",variant:r>0?t?"borderedRight":"borderedLeft":"body",children:e},r)}))})]})})},it=function(e){var t=N(),r=t.formState.errors,i=t.handleSubmit,a=t.control;return o(h,{maxWidth:"sm",children:o(A,ue(ue({},t),{},{children:l("form",{onSubmit:i(e.handleUpdateProfile),children:[o(j,{control:a,name:"fullName",render:function(t){var n,i,a=t.field;return o(Pe,ue({fullWidth:!0,type:"text",value:null!==(n=a.value)&&void 0!==n?n:"",label:e.texts.fullNameLabel,placeholder:e.texts.fullNamePlaceholder,helperText:null===(i=r.fullName)||void 0===i?void 0:i.message},a))}}),o(j,{control:a,name:"phoneNumber",render:function(e){var t=e.field;return o(Pe,ue({fullWidth:!0,type:"tel",label:"Phone Number",placeholder:"+966"},t))}}),o(j,{control:a,name:"email",render:function(t){var n,i,a=t.field;return o(Pe,ue({fullWidth:!0,type:"text",value:null!==(n=a.value)&&void 0!==n?n:"",label:e.texts.emailLabel,helperText:null===(i=r.email)||void 0===i?void 0:i.message,placeholder:e.texts.emailPlaceholder},a))},rules:{required:e.texts.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:e.texts.emailInvalidText}}}),o(j,{control:a,name:"password",render:function(t){var n,i,a=t.field;return o(Pe,ue({fullWidth:!0,type:"password",value:null!==(n=a.value)&&void 0!==n?n:"",label:e.texts.passwordLabel,placeholder:e.texts.passwordPlaceholder,helperText:null===(i=r.password)||void 0===i?void 0:i.message},a))},rules:{required:e.texts.passwordRequiredText}}),o(j,{control:a,name:"confirmPassword",render:function(t){var n,i,a=t.field;return o(Pe,ue({fullWidth:!0,type:"password",value:null!==(n=a.value)&&void 0!==n?n:"",label:e.texts.confirmPasswordLabel,placeholder:e.texts.confirmPasswordPlaceholder,helperText:null===(i=r.confirmPassword)||void 0===i?void 0:i.message},a))},rules:{required:e.texts.confirmPasswordRequiredText}}),o(n,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.updateProfile})]})}))})},at=function(e){return l(h,{maxWidth:"sm",children:[e.children,o(n,{type:"submit",fullWidth:!0,variant:"last",onClick:e.handleSaveSettings,children:e.saveSettingsText})]})},lt=function(e){var t=fe(r(!1),2),i=t[0],a=t[1],d=N(),s=d.formState.errors,c=d.handleSubmit,u=d.control;return l(h,{maxWidth:"xs",variant:"auth",children:[i&&o(rt,{text:e.texts.passwordMatchError,severity:"error"}),e.passwordChanged?o(ke,{style:{textAlign:"center",margin:5},children:e.texts.passwordChanged}):o(A,ue(ue({},d),{},{children:l("form",{onSubmit:c((function(t){console.log("handling subb",t),t.password===t.confirmPassword?e.handleNewPassword():a(!0)})),children:[o(j,{control:u,name:"password",render:function(t){var r,n,i=t.field;return o(Pe,ue({fullWidth:!0,type:"password",value:null!==(r=i.value)&&void 0!==r?r:"",label:e.texts.passwordLabel,placeholder:e.texts.passwordPlaceholder,helperText:null===(n=s.password)||void 0===n?void 0:n.message,startAdornment:o(q,{position:"start",children:o(R,{})})},i))},rules:{required:e.texts.passwordRequiredText}}),o(j,{control:u,name:"confirmPassword",render:function(t){var r,n,i=t.field;return o(Pe,ue({fullWidth:!0,type:"password",value:null!==(r=i.value)&&void 0!==r?r:"",label:e.texts.confirmPasswordLabel,placeholder:e.texts.confirmPasswordPlaceholder,helperText:null===(n=s.confirmPassword)||void 0===n?void 0:n.message,startAdornment:o(q,{position:"start",children:o(R,{})})},i))},rules:{required:e.texts.confirmPasswordRequiredText}}),o(n,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.updatePassword})]})}))]})};lt.propTypes={texts:a.object,handleNewPassword:a.func};var ot=function(e){var t=N(),r=t.formState.errors,i=t.handleSubmit;t.register;var a=t.control;return o(h,{maxWidth:"xs",variant:"auth",children:e.sent?o(ke,{style:{textAlign:"center",margin:5},children:e.emailSentText}):l("form",{onSubmit:i(e.handleResetPassword),children:[o(j,{control:a,name:"email",render:function(t){var n,i,a=t.field;return o(Pe,ue({fullWidth:!0,type:"text",value:null!==(n=a.value)&&void 0!==n?n:"",label:e.texts.emailLabel,helperText:null===(i=r.email)||void 0===i?void 0:i.message,placeholder:e.texts.emailPlaceholder,startAdornment:o(q,{position:"start",children:o(z,{})})},a))},rules:{required:e.texts.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:e.texts.emailInvalidText}}}),o(n,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.resetPassword})]})})};ot.propTypes={texts:a.object,emailSentText:a.string,handleResetPassword:a.func};var dt=function(e){var t=N(),r=t.formState.errors,i=t.handleSubmit,a=t.control;return l(h,{maxWidth:"xs",variant:"auth",style:{direction:"ar"===e.lang?"rtl":"ltr"},children:[e.error&&l(u,{severity:"error",variant:"inContainer",children:[e.errorTitle&&o(c,{children:e.errorTitle}),e.errorText]}),o(A,ue(ue({},t),{},{children:l("form",{onSubmit:i(e.handleSignUp),children:[o(j,{control:a,name:"fullName",render:function(t){var n,i,a=t.field;return o(Pe,{fullWidth:!0,type:"text",value:null!==(n=a.value)&&void 0!==n?n:"",label:e.texts.fullNameLabel,placeholder:e.texts.fullNamePlaceholder,helperText:null===(i=r.fullName)||void 0===i?void 0:i.message,startAdornment:o(q,{position:"start",children:o(E,{})})})},rules:{required:e.texts.fullNameRequiredText}}),o(j,{control:a,name:"email",render:function(t){var n,i,a=t.field;return o(Pe,{fullWidth:!0,type:"text",value:null!==(n=a.value)&&void 0!==n?n:"",label:e.texts.emailLabel,helperText:null===(i=r.email)||void 0===i?void 0:i.message,placeholder:e.texts.emailPlaceholder,startAdornment:o(q,{position:"start",children:o(z,{})})})},rules:{required:e.texts.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:e.texts.emailInvalidText}}}),o(j,{control:a,name:"password",render:function(t){var n,i,a,l=t.field;return o(Pe,ue({fullWidth:!0,type:"password",defaultValue:null!==(n=l.value)&&void 0!==n?n:"",value:null!==(i=l.value)&&void 0!==i?i:"",label:e.texts.passwordLabel,placeholder:e.texts.passwordPlaceholder,helperText:null===(a=r.password)||void 0===a?void 0:a.message,startAdornment:o(q,{position:"start",children:o(R,{})})},l))},rules:{required:e.texts.passwordRequiredText}}),o(n,{fullWidth:!0,variant:"last",type:"submit",children:e.texts.signUpText})]})})),l(f,{variant:"subtitle2",style:{marginTop:5,textAlign:"center",padding:5},children:[e.texts.existingUserText," ",o("span",{onClick:e.handleRouteToSignIn,style:{cursor:"pointer",color:"blue",textAlign:"center"},children:e.texts.signInText})]}),o(B,{}),l("div",{style:{display:"flex",flexDirection:"column"},children:[e.viaGoogle&&o(Je,{logo:"google",buttonText:e.texts.googleButtonLabel,onClick:e.handleGoogleSignUp}),e.viaGithub&&o(Je,{logo:"github",buttonText:e.texts.githubButtonLabel,onClick:e.handleGithubSignUp}),e.viaTwitter&&o(Je,{logo:"twitter",buttonText:e.texts.twitterButtonLabel,onClick:e.handleTwitterSignUp})]})]})};dt.propTypes={texts:a.object,viaGoogle:a.bool,viaGithub:a.bool,viaTwitter:a.bool,handleSignUp:a.func,handleRouteToSignIn:a.func,handleGoogleSignUp:a.func,handleGithubSignUp:a.func,handleTwitterSignUp:a.func};var st=function(e){var t=N(),r=t.formState.errors,i=t.handleSubmit,a=t.control;return l(h,{maxWidth:"xs",variant:"auth",style:{direction:"ar"===e.lang?"rtl":"ltr"},children:[e.showError&&o(rt,{title:e.errorTitle,text:e.errorText,severity:"error"}),l("form",{onSubmit:i(e.handleSignIn),children:[o(j,{control:a,name:"email",render:function(t){var n,i,a=t.field;return o(Pe,ue({fullWidth:!0,type:"text",value:null!==(n=a.value)&&void 0!==n?n:"",label:e.texts.emailLabel,helperText:null===(i=r.email)||void 0===i?void 0:i.message,placeholder:e.texts.emailPlaceholder,startAdornment:o(q,{position:"start",children:o(z,{})})},a))},rules:{required:e.texts.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:e.texts.emailInvalidText}}}),o(j,{control:a,name:"password",render:function(t){var n,i,a,l=t.field;return o(Pe,ue({fullWidth:!0,type:"password",defaultValue:null!==(n=l.value)&&void 0!==n?n:"",value:null!==(i=l.value)&&void 0!==i?i:"",label:e.texts.passwordLabel,placeholder:e.texts.passwordPlaceholder,helperText:null===(a=r.password)||void 0===a?void 0:a.message,startAdornment:o(q,{position:"start",children:o(R,{})})},l))},rules:{required:e.texts.passwordRequiredText}}),o(f,{style:{cursor:"pointer",marginTop:5,width:"max-content",fontSize:15,padding:5},onClick:e.handleForgotPassword,children:e.texts.forgotPasswordText}),o(n,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.signInText})]}),l(f,{variant:"subtitle2",style:{marginTop:5,textAlign:"center",padding:5},children:[e.texts.newUserText," ",o("span",{onClick:e.handleRouteToSignUp,style:{cursor:"pointer",color:"blue",textAlign:"center"},children:e.texts.signUpText})]}),o(B,{}),l("div",{style:{display:"flex",flexDirection:"column"},children:[e.viaGoogle&&o(Je,{logo:"google",buttonText:e.texts.googleButtonLabel,onClick:e.handleGoogleSignIn}),e.viaGithub&&o(Je,{logo:"github",buttonText:e.texts.githubButtonLabel,onClick:e.handleGithubSignIn}),e.viaTwitter&&o(Je,{logo:"twitter",buttonText:e.texts.twitterButtonLabel,onClick:e.handleTwitterSignIn})]})]})};st.propTypes={texts:a.object,viaGoogle:a.bool,viaGithub:a.bool,viaTwitter:a.bool,handleSignIn:a.func,handleRouteToSignUp:a.func,handleGoogleSignIn:a.func,handleGithubSignIn:a.func,handleTwitterSignIn:a.func};var ct=function(e){return l(h,{maxWidth:"xs",children:[o(ke,{align:"center",children:"Choose Payment Method"}),e.viaWallet&&o(Je,{logo:"wallet",buttonText:e.walletLabel,onClick:e.handleWallet}),e.viaCreditCard&&o(Je,{logo:"visa/master",buttonText:e.visaMasterLabel,onClick:e.handleCreditCard}),e.viaMada&&o(Je,{logo:"mada",buttonText:e.madaLabel,onClick:e.handleMada}),e.viaSTCPay&&o(Je,{logo:"stcpay",buttonText:e.stcPayLabel,onClick:e.handleSTCPay}),e.viaPayPal&&o(Je,{logo:"paypal",buttonText:e.paypalLabel,onClick:e.handlePayPal}),e.viaGooglePay&&o(Je,{logo:"googlepay",buttonText:e.googlePayLabel,onClick:e.handleGooglePay}),e.viaApplePay&&o(Je,{logo:"applepay",buttonText:e.applePayLabel,onClick:e.handleApplePay})]})};ct.propTypes={viaMada:a.bool,viaWallet:a.bool,viaSTCPay:a.bool,viaPayPal:a.bool,viaApplePay:a.bool,viaCreditCard:a.bool,madaLabel:a.string,stcPayLabel:a.string,paypalLabel:a.string,walletLabel:a.string,applePayLabel:a.string,visaMasterLabel:a.string,handleMada:a.func,handleWallet:a.func,handleSTCPay:a.func,handlePayPal:a.func,handleApplePay:a.func,handleCreditCard:a.func};var ut=function(e){var t,r=N(),i=r.formState.errors,a=r.handleSubmit,d=r.control;return o(h,{maxWidth:"xs",children:l("form",{onSubmit:a(e.handle),children:[o(Pe,{fullWidth:!0,name:"password",placeholder:"Enter password",type:"tel",label:"Card Number",rules:{required:"Password is rquired"},helperText:null===(t=i.password)||void 0===t?void 0:t.message}),o(j,{control:d,name:"cardName",render:function(e){var t;return e.field,o(Pe,{fullWidth:!0,name:"password",placeholder:"Enter password",type:"password",label:"Name On Card",rules:{required:"Password is rquired"},helperText:null===(t=i.password)||void 0===t?void 0:t.message})}}),o(j,{control:d,name:"cardName",render:function(e){var t;return e.field,o(Pe,{fullWidth:!0,name:"password",placeholder:"Enter password",type:"password",label:"Expiry Date",rules:{required:"Password is rquired"},helperText:null===(t=i.password)||void 0===t?void 0:t.message})}}),o(j,{control:d,name:"cardName",render:function(e){var t;return e.field,o(Pe,{fullWidth:!0,name:"password",placeholder:"Enter password",type:"password",label:"CCV",rules:{required:"Password is rquired"},helperText:null===(t=i.password)||void 0===t?void 0:t.message})}}),o(n,{type:"submit",fullWidth:!0,variant:"last",onClick:e.handlePayWithCreditCard,children:"Pay with Credit Card"})]})})},pt=function(e){var t=fe(r(0),2),i=t[0],a=t[1],d=N();d.formState.errors;var s=d.handleSubmit,c=d.control;return l(h,{maxWidth:"xs",children:[l(f,{align:"center",variant:"h2",fontWeight:500,style:{marginBottom:20},children:[Number(i).toLocaleString("en")||"0",o(f,{children:e.currency||"SAR"})]}),o(A,ue(ue({},d),{},{children:l("form",{onSubmit:s(e.handleChargeWallet),children:[o(j,{control:c,name:"amount",render:function(t){var r,n=t.field;return o(Pe,ue(ue({fullWidth:!0,placeholder:e.texts.amountLabel,type:"number",value:null!==(r=n.value)&&void 0!==r?r:""},n),{},{inputProps:{inputMode:"numeric",min:"1",max:"9999999",step:"0.01"},onChange:function(e){n.onChange(parseFloat(e.target.value)),a(e.target.value)}}))}}),o(n,{type:"submit",fullWidth:!0,variant:"last",onClick:e.handleSignIn,children:e.texts.chargeWallet})]})}))]})};pt.propTypes={texts:a.object,handleChargeWallet:a.func};var mt=function(e){return l(h,{maxWidth:"xs",children:[o(f,{align:"center",children:"Wallet Balance"}),l(f,{align:"center",variant:"h1",children:[e.walletBalance||"0",o(f,{children:e.currency||"SAR"})]}),o(n,{type:"submit",fullWidth:!0,variant:"last",onClick:e.handlePayWithWallet,children:"Pay Now"})]})},ht=function(e){var t,r,i,a,d,s,c,u,p,m,v="ar"===e.lang,g=N(),x=g.formState.errors,b=g.handleSubmit;g.register;var y=g.control,w={display:"flex",padding:0,paddingRight:"0px !important",paddingLeft:"0px !important",flexDirection:{xs:"column",sm:"row",md:"row",lg:"row",xl:"row"}};return l(h,{maxWidth:"sm",style:{direction:v?"rtl":"ltr"},children:[o(f,{align:"center",variant:"h5",fontWeight:500,style:{marginBottom:10},children:e.texts.orderDetails}),o(nt,{lang:e.lang,columns:["Product","Price"],rows:e.products,end:["Total",e.total]}),o(B,{variant:"middle"}),o(f,{align:"center",variant:"h5",fontWeight:500,style:{marginBottom:10},children:e.texts.billingAddress}),o(A,ue(ue({},g),{},{children:l("form",{onSubmit:b(e.handlePayNow),children:[l(h,{sx:w,children:[o(j,{control:y,name:"firstName",rules:{required:null===(t=e.texts)||void 0===t?void 0:t.required},render:function(t){var r,n,i,a=t.field;return o(Pe,ue({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=a.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.firstNameLabel)+" *",helperText:null===(i=x.firstName)||void 0===i?void 0:i.message},a))}}),o("div",{style:{width:20}}),o(j,{control:y,name:"lastName",rules:{required:null===(r=e.texts)||void 0===r?void 0:r.required},render:function(t){var r,n,i,a=t.field;return o(Pe,ue({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=a.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.lastNameLabel)+" *",helperText:null===(i=x.lastName)||void 0===i?void 0:i.message},a))}})]}),o(j,{control:y,name:"email",render:function(t){var r,n,i,a=t.field;return o(Pe,ue({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=a.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.emailLabel)+" *",helperText:null===(i=x.email)||void 0===i?void 0:i.message},a))},rules:{required:null===(i=e.texts)||void 0===i?void 0:i.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:null===(a=e.texts)||void 0===a?void 0:a.emailInvalidText}}}),l(h,{sx:w,children:[o(j,{control:y,name:"streetAddress",rules:{required:null===(d=e.texts)||void 0===d?void 0:d.required},render:function(t){var r,n,i,a=t.field;return o(Pe,ue({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=a.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.streetAddressLabel)+" *",helperText:null===(i=x.streetAddress)||void 0===i?void 0:i.message},a))}}),o("div",{style:{width:20}}),o(j,{control:y,name:"buildingNumber",rules:{required:null===(s=e.texts)||void 0===s?void 0:s.required},render:function(t){var r,n,i,a=t.field;return o(Pe,ue({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=a.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.buildingNumberLabel)+" *",helperText:null===(i=x.buildingNumber)||void 0===i?void 0:i.message},a))}})]}),l(h,{sx:w,children:[o(j,{control:y,name:"province",rules:{required:null===(c=e.texts)||void 0===c?void 0:c.required},render:function(t){var r,n,i,a=t.field;return o(Pe,ue({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=a.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.stateLabel)+" *",helperText:null===(i=x.province)||void 0===i?void 0:i.message},a))}}),o("div",{style:{width:20}}),o(j,{control:y,name:"city",rules:{required:null===(u=e.texts)||void 0===u?void 0:u.required},render:function(t){var r,n,i,a=t.field;return o(Pe,ue({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=a.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.cityLabel)+" *",helperText:null===(i=x.city)||void 0===i?void 0:i.message},a))}})]}),l(h,{sx:w,children:[o(j,{control:y,name:"zipCode",rules:{required:null===(p=e.texts)||void 0===p?void 0:p.required},render:function(t){var r,n,i,a=t.field;return o(Pe,ue({inForm:!0,fullWidth:!0,type:"number",variant:"unscrollable",value:null!==(r=a.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.zipCodeLabel)+" *",helperText:null===(i=x.zipCode)||void 0===i?void 0:i.message},a))}}),o("div",{style:{width:20}}),o(j,{control:y,name:"country",rules:{required:null===(m=e.texts)||void 0===m?void 0:m.required},render:function(t){var r,n,i,a=t.field;return l(Qe,ue(ue({fullWidth:!0,native:!0,label:(null===(r=e.texts)||void 0===r?void 0:r.countryLabel)+" *",variant:"standard",value:null!==(n=a.value)&&void 0!==n?n:"",helperText:null===(i=x.country)||void 0===i?void 0:i.message,displayEmpty:!0,disableUnderline:!0,validators:["required"]},a),{},{children:[o("option",{}),e.countriesList.map((function(e,t){return o("option",{children:e},t)}))]}))}})]}),o(n,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.payNow})]})}))]})};ht.propTypes={texts:a.object,lang:a.string,countriesList:a.array,products:a.array,total:a.string,handlePayNow:a.func};var ft=function(e){var t="ar"===e.lang;return l("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[l(h,{maxWidth:"sm",style:{direction:t?"rtl":"ltr"},children:[o(f,{align:"center",variant:"h3",fontWeight:400,style:{marginBottom:10},children:e.confirmationTitle}),o(B,{variant:"middle"}),l(f,{align:"center",variant:"body1",style:{marginBottom:10},children:[e.texts.successMessage," ",o("strong",{children:e.userEmail})]}),o(f,{align:"center",variant:"body1",children:e.texts.yourOrderNumber}),o(f,{align:"center",variant:"body1",fontWeight:700,style:{marginBottom:10},children:e.orderNumber}),o(B,{variant:"middle"}),e.products&&l(d,{children:[o(f,{align:"center",variant:"h5",fontWeight:500,style:{marginBottom:10},children:e.texts.orderDetails}),o(nt,{lang:e.lang,columns:["Product","Price"],rows:e.products,end:["Total",e.total]}),o(B,{variant:"middle"})]}),o(n,{onClick:e.handlePrint,variant:"contained",children:e.texts.print}),o(n,{onClick:e.handleHistory,variant:"last",children:e.texts.history}),o(n,{onClick:e.handleHome,variant:"last",children:e.texts.homePage}),o(f,{align:"center",variant:"body2",style:{marginTop:10},children:e.texts.fasterPaymentNote})]}),o("a",{style:{marginTop:10,paddingTop:10,padding:5,cursor:"pointer"},onClick:e.handleRefundPolicyLink,children:o(f,{align:"center",variant:"caption",fontWeight:500,children:e.texts.refundPolicy})})]})};ft.propTypes={texts:a.object,products:a.array,countriesList:a.array,lang:a.string,total:a.string,userEmail:a.string,orderNumber:a.string,confirmationTitle:a.string,handleHome:a.func,handlePrint:a.func,handleHistory:a.func,handleRefundPolicyLink:a.func};var vt=function(e){return o("div",{children:e.children})},gt=function(e){return{width:240,transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),overflowX:"hidden"}},xt=function(e){return pe({transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),overflowX:"hidden",width:"calc(".concat(e.spacing(7)," + 1px)")},e.breakpoints.up("sm"),{width:"calc(".concat(e.spacing(8)," + 1px)")})},bt=D("div")((function(e){var t=e.theme;return ue({display:"flex",alignItems:"center",justifyContent:"flex-end",padding:t.spacing(0,1)},t.mixins.toolbar)})),yt=D(U,{shouldForwardProp:function(e){return"open"!==e}})((function(e){var t=e.theme,r=e.open;return ue({zIndex:t.zIndex.drawer+1,transition:t.transitions.create(["width","margin"],{easing:t.transitions.easing.sharp,duration:t.transitions.duration.leavingScreen})},r&&{marginLeft:240,width:"calc(100% - ".concat(240,"px)"),transition:t.transitions.create(["width","margin"],{easing:t.transitions.easing.sharp,duration:t.transitions.duration.enteringScreen})})})),wt=D($,{shouldForwardProp:function(e){return"open"!==e}})((function(e){var t=e.theme,r=e.open;return ue(ue({width:240,flexShrink:0,whiteSpace:"nowrap",boxSizing:"border-box"},r&&ue(ue({},gt(t)),{},{"& .MuiDrawer-paper":gt(t)})),!r&&ue(ue({},xt(t)),{},{"& .MuiDrawer-paper":xt(t)}))}));function Tt(e){var r=M(),n=fe(t.useState(!0),2),a=n[0],d=n[1],s=fe(t.useState(null),2);s[0],s[1];var c=fe(t.useState(null),2),u=c[0],p=c[1];return l(G,{sx:{display:"flex"},children:[o(yt,{variant:"appbar",position:"fixed",open:a,children:l(_,{variant:"appbar",children:[o(F,{color:"inherit","aria-label":"open drawer",onClick:function(){d(!0)},edge:"start",sx:ue({marginRight:5},a&&{display:"none"}),children:o(Z,{})}),l("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",width:"100%",margin:0},children:[o(f,{variant:"h6",noWrap:!0,component:"div",children:e.pageTitle}),l(G,{children:[o(i,{title:"Open settings",children:o(F,{onClick:function(e){p(e.currentTarget)},sx:{p:0},children:o(Q,{alt:"Remy Sharp",src:"/static/images/avatar/2.jpg"})})}),o(K,{sx:{mt:"45px"},id:"menu-appbar",anchorEl:u,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(u),onClose:function(){p(null)},variant:"themed",PaperProps:{style:{boxShadow:"none",borderRadius:r.allBorderRadius,border:"1px solid ".concat(r.primaryActionColor)}},children:e.accountMenu.map((function(e){return l(ee,{onClick:e.action,children:[e.icon&&o(e.icon,{}),o(f,{textAlign:"center",children:e.label})]},e.label)}))})]})]})]})}),l(wt,{variant:"permanent",open:a,children:[l(bt,{children:[e.logo,o(F,{onClick:function(){d(!1)},children:"rtl"===r.direction?o(X,{}):o(H,{})})]}),o(B,{}),o(V,{children:e.pages.map((function(t,r){var n,d;return o(i,{title:t.text,placement:"right",arrow:!0,PopperProps:{style:{opacity:a?0:1}},children:l(Y,{variant:(null===(n=e.pageName)||void 0===n?void 0:n.toLowerCase())===(null===(d=t.slug)||void 0===d?void 0:d.toLowerCase())&&"clicked",onClick:t.action,sx:{minHeight:48,justifyContent:a?"initial":"center",px:2.5},children:[o(t.icon,{}),o("div",{style:{width:20}}),o(J,{primary:t.text,sx:{opacity:a?1:0}})]},t.text)},r)}))})]}),l(G,{sx:{flexGrow:1,p:3},children:[o(bt,{}),e.children]})]})}var Ct=["children","onClose","hideClose"],kt=function(e){var t=e.children,r=e.onClose,n=e.hideClose,i=me(e,Ct);return l(ae,ue(ue({sx:{m:0,p:2}},i),{},{children:[t,n?null:o(F,{"aria-label":"close",onClick:r,sx:{position:"absolute",right:8,top:8,color:function(e){return e.palette.grey[500]}},children:o(te,{})})]}))};function Pt(e){var t=fe(r(!1),2);return t[0],t[1],l(re,ue(ue({},e),{},{variant:"main",children:[o(kt,{onClose:e.onClose,hideClose:e.hideClose,children:e.title}),o(ie,{children:e.children}),o(ne,{children:e.actions})]}))}var St=function(e){var t=le();return o(oe,{sx:{mt:"45px"},id:"menu-appbar",anchorEl:e.anchor,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(e.anchor),onClose:e.handleClose,variant:"themed",PaperProps:{style:{boxShadow:"none",borderRadius:t.allBorderRadius,border:"1px solid ".concat(t.primaryActionColor)}},children:e.menuItems.map((function(e){return l(de,{onClick:e.action,children:[e.icon&&o(e.icon,{}),o("div",{style:{width:10}}),o(se,{textAlign:"center",children:e.label})]},e.label)}))})};St.propTypes={handleClose:a.func,menuItems:a.array};var Wt=["Products","Pricing","Blog"],Ot=function(e){var r=le(),a=fe(t.useState(null),2),d=a[0],s=a[1],c=fe(t.useState(null),2),u=c[0],p=c[1],m=function(){s(null)};return console.log("theme is ",r),o(U,{position:"static",variant:"appbar",children:o(h,{maxWidth:"xl",variant:"appbar",children:l(_,{disableGutters:!0,children:[o(f,{variant:"h6",noWrap:!0,component:"div",sx:{mr:2,display:{xs:"none",md:"flex"}},children:"LOGO"}),l(G,{sx:{flexGrow:1,display:{xs:"flex",md:"none"}},children:[o(F,{size:"large","aria-label":"account of current user","aria-controls":"menu-appbar","aria-haspopup":"true",onClick:e.handleOpenSideMenu,color:"inherit",children:o(Z,{})}),o(K,{id:"menu-appbar",anchorEl:d,anchorOrigin:{vertical:"bottom",horizontal:"left"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"left"},open:Boolean(d),onClose:m,sx:{display:{xs:"block",md:"none"}},children:Wt.map((function(e){return o(ee,{onClick:m,children:o(f,{textAlign:"center",children:e})},e)}))})]}),o(f,{variant:"h6",noWrap:!0,component:"div",sx:{flexGrow:1,display:{xs:"flex",md:"none"}},children:"LOGO"}),o(G,{sx:{flexGrow:1,display:{xs:"none",md:"flex"}},children:Wt.map((function(e){return o(n,{onClick:m,sx:{my:2,display:"block"},children:e},e)}))}),l(G,{sx:{flexGrow:0},children:[o(i,{title:"Open settings",children:o(F,{onClick:function(e){p(e.currentTarget)},sx:{p:0},children:o(Q,{alt:"Remy Sharp",src:"/static/images/avatar/2.jpg"})})}),o(St,{anchor:u,handleClose:function(e){return p(null)},menuItems:e.accountMenu})]})]})})})};export{xe as ActionButton,ge as AdaptiveButton,vt as Box,pt as ChargeWalletForm,ht as CheckoutForm,ft as ConfirmationPage,ut as CreditCardForm,rt as HawaAlert,Ot as HawaAppBar,Tt as HawaAppLayout,Ke as HawaButton,ye as HawaCheckbox,Xe as HawaColorPicker,Pt as HawaDialog,tt as HawaInputLabel,Te as HawaItemCard,Je as HawaLogoButton,Ce as HawaPricingCard,we as HawaRadio,Qe as HawaSelect,Ye as HawaSettingsRow,nt as HawaTable,et as HawaTextArea,Pe as HawaTextField,ke as HawaTypography,lt as NewPasswordForm,be as OfflineBanner,mt as PayWithWallet,ot as ResetPasswordForm,ct as SelectPayment,st as SignInForm,dt as SignUpForm,it as UserProfileForm,at as UserSettingsForm};
1
+ import*as e from"react";import t,{useState as r}from"react";import n from"@mui/material/Button";import i from"@mui/material/Tooltip";import a from"prop-types";import{jsxs as l,jsx as o,Fragment as s}from"react/jsx-runtime";import d from"@mui/material/Snackbar";import c from"@mui/material/AlertTitle";import u from"@mui/material/Alert";import m from"@mui/material/FormControlLabel";import p from"@mui/material/Checkbox";import h from"@mui/material/Container";import g from"@mui/material/Typography";import f from"@mui/icons-material/CheckCircleOutlined";import v from"@mui/material/Chip";import x from"@mui/material/Input";import b from"@mui/material/InputLabel";import y from"@mui/material/Switch";import w from"@emotion/styled";import T from"@mui/material/Slider";import C from"@mui/material/Stack";import P from"@mui/icons-material/GitHub";import k from"@mui/icons-material/Twitter";import L from"@mui/icons-material/AccountBalanceWallet";import S from"@mui/material/Select";import W from"@mui/material/Table";import O from"@mui/material/TableBody";import N from"@mui/material/TableCell";import I from"@mui/material/TableContainer";import A from"@mui/material/TableHead";import q from"@mui/material/TableRow";import{Button as R,InputAdornment as j,useTheme as E,Menu as z,MenuItem as B,Typography as D,BottomNavigation as M,BottomNavigationAction as G}from"@mui/material";import{Search as U,RestoreOutlined as $}from"@mui/icons-material";import _ from"@mui/icons-material/ExpandMore";import V from"@mui/material/Accordion";import F from"@mui/material/AccordionSummary";import Z from"@mui/material/AccordionDetails";import{useForm as H,FormProvider as X,Controller as Y}from"react-hook-form";import J from"@mui/material/InputAdornment";import Q from"@mui/icons-material/HttpsOutlined";import K from"@mui/icons-material/MailOutline";import ee from"@mui/icons-material/PermIdentityOutlined";import te from"@mui/material/Divider";import{styled as re,useTheme as ne}from"@mui/material/styles";import ie from"@mui/material/Box";import ae from"@mui/material/Drawer";import le from"@mui/material/AppBar";import oe from"@mui/material/Toolbar";import se from"@mui/material/List";import de from"@mui/material/IconButton";import ce from"@mui/icons-material/Menu";import ue from"@mui/icons-material/ChevronLeft";import me from"@mui/icons-material/ChevronRight";import pe from"@mui/material/ListItemButton";import he from"@mui/material/ListItemText";import ge from"@mui/material/Avatar";import fe from"@mui/material/useMediaQuery";import ve from"@mui/icons-material/Close";import xe from"@mui/material/Dialog";import be from"@mui/material/DialogActions";import ye from"@mui/material/DialogContent";import we from"@mui/material/DialogTitle";import Te from"@mui/material/Menu";import Ce from"@mui/material/MenuItem";function Pe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ke(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Pe(Object(r),!0).forEach((function(t){Le(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Le(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Se(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function We(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Oe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,i,a=[],l=!0,o=!1;try{for(r=r.call(e);!(l=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);l=!0);}catch(e){o=!0,i=e}finally{try{l||null==r.return||r.return()}finally{if(o)throw i}}return a}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ne(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ne(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ne(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Ie=function(e){return e.showText?l(n,{variant:"adaptive-dark",onClick:e.onClick,children:[e.icon,o("div",{style:{width:10}}),e.buttonText]}):o(i,{title:e.buttonText,placement:"top",children:o(n,{variant:"adaptive-dark",onClick:e.onClick,children:e.icon})})};Ie.propTypes={buttonText:a.string,onClick:a.func,showText:a.bool};var Ae=function(e){return o(n,ke(ke({},e),{},{children:e.text}))},qe=function(e){return o(d,{open:e.open,onClose:e.handleClose,children:l(u,{icon:!1,severity:e.severity,children:[e.title&&o(c,{children:e.title}),e.text]})})},Re=function(e){return console.log("props : ",e),o(t.Fragment,{children:o(m,{label:e.label,control:o(p,{style:{color:e.color||null},defaultChecked:e.defaultValue})})})},je=function(e){var t=Oe(r(e.defaultValue),2),i=t[0],a=t[1];return o(h,{variant:e.location||"panelTabs",children:e.options.map((function(t,r){var l;return o(n,{onClick:function(){e.handleChange(t.value),a(t.value)},fullWidth:!0,variant:(null==i?void 0:i.toLowerCase())===(null===(l=t.value)||void 0===l?void 0:l.toLowerCase())?"selected":"unselected",children:t.label},r)}))})};je.propTypes={lang:a.string,options:a.arrayOf(a.shape({label:a.string,value:a.string})),defaultValue:a.string,handleChange:a.func,location:a.string};var Ee=function(e){var t="ar"===e.lang;return l(h,{onClick:function(t){t.stopPropagation(),e.onCardClick()},maxWidth:"xs",variant:"card-container",dataValue:"parent",style:{direction:t?"rtl":"ltr"},children:[e.header&&l(h,{style:{zIndex:20},variant:"card-header",children:[e.headerActions&&o("div",{style:{margin:0,marginRight:-20,marginLeft:-20,marginBottom:-20,display:"flex",paddingTop:5,paddingLeft:5,paddingRight:5,justifyContent:"flex-end"},children:e.headerActions}),e.header]}),e.content&&o(h,{style:{zIndex:20},variant:"card-content",children:e.content}),e.actions&&o(h,{style:{zIndex:20},variant:"card-actions",children:e.actions})]})};Ee.propTypes={lang:a.string,onCardClick:a.func};var ze=function(e){var t,r,i="ar"===e.lang,a={monthly:"شهرياً","3-months":"كل 3 أشهر","6-months":"كل 6 أشهر",annually:"سنوياً"},s={monthly:"Monthly","3-months":"3 Months","6-months":"6 Months",annually:"Annually"},d={usd:i?"دولار":"$",sar:i?"ريال":"SAR"},c=i?e.features_ar:e.features,u=i?{left:10}:{right:10};return l(h,{maxWidth:"xs",variant:e.selectedPlan?"selected-plan-card":"plan-card",style:{direction:i?"rtl":"ltr"},children:[l(h,{variant:"plan-header",children:[e.discount&&o(v,{label:e.discount,variant:"standard",style:ke({maxWidth:"fit-content",position:"absolute",bottom:10},u),color:"success"}),o(g,{variant:"h3",fontWeight:500,children:i?e.title_ar:e.title}),o(g,{variant:"caption",children:i?e.subtitle_ar:e.subtitle}),o("br",{}),o(g,{variant:"h4",fontWeight:500,style:{display:"flex",alignItems:"center"},children:"ar"===e.lang?l("div",{style:{width:"100%",display:"flex",flexDirection:"column",justifyContent:"center"},children:[l("div",{style:{display:"flex",flexDirection:"row"},children:[e.price,o("div",{style:{width:5}}),o(g,{children:d[null===(t=e.currency)||void 0===t?void 0:t.toLowerCase()]})]}),o(g,{style:{fontSize:14,margin:5},children:i?a[e.cycleText]:s[e.cycleText]})]}):l("div",{style:{width:"100%",display:"flex",flexDirection:"column",justifyContent:"center"},children:[l("div",{style:{display:"flex",flexDirection:"row"},children:[o(g,{children:d[null===(r=e.currency)||void 0===r?void 0:r.toLowerCase()]}),o("div",{style:{width:5}}),e.price]}),o(g,{style:{fontSize:14,margin:5},children:"ar"===e.lang?a[e.cycleText]:s[e.cycleText]})]})})]}),o("div",{style:{padding:20,color:e.selectedPlan?"white":"black"},children:null==c?void 0:c.map((function(e){return l("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start",marginTop:10,width:"100%"},children:[o("div",{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",width:"10%"},children:o(f,{fontSize:"small"})}),o("div",{style:{width:10}}),o(g,{variant:"subtitle2",children:e})]})}))}),o(n,{onClick:e.selectPlan,variant:e.selectedPlan?"outlined":"contained",style:{margin:20},children:e.buttonText})]})};ze.propTypes={lang:a.string,buttonText:a.string,selectedPlan:a.string,title:a.string,title_ar:a.string,subtitle:a.string,subtitle_ar:a.string,features:a.array,features_ar:a.array,currency:a.oneOf(["sar","usd"]),cycleText:a.oneOf(["monthly","3-months","6-months","annually"])};var Be=function(e){return o(g,ke(ke({},e),{},{children:e.children}))},De=function(e){return o("div",{style:e.inForm&&{width:"100%"},children:l("div",{style:{width:e.fullWidth?"100%":"fit-content"},children:[l("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[e.label&&o(b,{children:e.label}),e.helperText&&o(g,{style:{marginBottom:!e.label&&10},variant:"validation",children:e.helperText})]}),o(x,ke({disableUnderline:!0},e))]})})},Me=function(e){return o(y,ke({},e))};var Ge="production"!==process.env.NODE_ENV?a.oneOfType([a.number,a.string,a.object,a.array]):{};function Ue(){return Ue=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ue.apply(this,arguments)}function $e(e){return null!==e&&"object"==typeof e&&e.constructor===Object}function _e(e,t,r={clone:!0}){const n=r.clone?Ue({},e):e;return $e(e)&&$e(t)&&Object.keys(t).forEach((i=>{"__proto__"!==i&&($e(t[i])&&i in e&&$e(e[i])?n[i]=_e(e[i],t[i],r):n[i]=t[i])})),n}const Ve=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Fe=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Ze=[...Ve,...Fe];function He(e){return function(e,t,r,n){const i=(a=e,((l=t)&&"string"==typeof l?l.split(".").reduce(((e,t)=>e&&e[t]?e[t]:null),a):null)||r);var a,l;return"number"==typeof i?e=>"string"==typeof e?e:("production"!==process.env.NODE_ENV&&"number"!=typeof e&&console.error(`MUI: Expected ${n} argument to be a number or a string, got ${e}.`),i*e):Array.isArray(i)?e=>"string"==typeof e?e:("production"!==process.env.NODE_ENV&&(Number.isInteger(e)?e>i.length-1&&console.error([`MUI: The value provided (${e}) overflows.`,`The supported values are: ${JSON.stringify(i)}.`,`${e} > ${i.length-1}, you need to add the missing values.`].join("\n")):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join("\n"))),i[e]):"function"==typeof i?i:("production"!==process.env.NODE_ENV&&console.error([`MUI: The \`theme.${t}\` value (${i}) is invalid.`,"It should be a number, an array or a function."].join("\n")),()=>{})}(e,"spacing",8,"spacing")}function Xe(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}"production"===process.env.NODE_ENV||Ve.reduce(((e,t)=>(e[t]=Ge,e)),{}),"production"===process.env.NODE_ENV||Fe.reduce(((e,t)=>(e[t]=Ge,e)),{}),"production"===process.env.NODE_ENV||Ze.reduce(((e,t)=>(e[t]=Ge,e)),{});const Ye=["values","unit","step"];function Je(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5}=e,i=Xe(e,Ye),a=(e=>{const t=Object.keys(e).map((t=>({key:t,val:e[t]})))||[];return t.sort(((e,t)=>e.val-t.val)),t.reduce(((e,t)=>Ue({},e,{[t.key]:t.val})),{})})(t),l=Object.keys(a);function o(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${r})`}function s(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-n/100}${r})`}function d(e,i){const a=l.indexOf(i);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${r}) and (max-width:${(-1!==a&&"number"==typeof t[l[a]]?t[l[a]]:i)-n/100}${r})`}return Ue({keys:l,values:a,up:o,down:s,between:d,only:function(e){return l.indexOf(e)+1<l.length?d(e,l[l.indexOf(e)+1]):o(e)},not:function(e){const t=l.indexOf(e);return 0===t?o(l[1]):t===l.length-1?s(l[t]):d(e,l[l.indexOf(e)+1]).replace("@media","@media not all and")},unit:r},i)}var Qe={borderRadius:4};const Ke=["breakpoints","palette","spacing","shape"];const et=e.createContext(null);"production"!==process.env.NODE_ENV&&(et.displayName="ThemeContext");var tt=et;function rt(t=null){const r=function(){const t=e.useContext(tt);return"production"!==process.env.NODE_ENV&&e.useDebugValue(t),t}();return r&&(n=r,0!==Object.keys(n).length)?r:t;var n}const nt=function(e={},...t){const{breakpoints:r={},palette:n={},spacing:i,shape:a={}}=e,l=Xe(e,Ke),o=Je(r),s=function(e=8){if(e.mui)return e;const t=He({spacing:e}),r=(...e)=>("production"!==process.env.NODE_ENV&&(e.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${e.length}`)),(0===e.length?[1]:e).map((e=>{const r=t(e);return"number"==typeof r?`${r}px`:r})).join(" "));return r.mui=!0,r}(i);let d=_e({breakpoints:o,direction:"ltr",components:{},palette:Ue({mode:"light"},n),spacing:s,shape:Ue({},Qe,a)},l);return d=t.reduce(((e,t)=>_e(e,t)),d),d}();function it(e=nt){return rt(e)}var at,lt,ot=w.input(at||(at=We(["\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n border: none;\n cursor: pointer;\n height: 35px;\n border-radius: ","px;\n background-color: ",";\n &::-webkit-color-swatch {\n border: none;\n }\n &::-moz-color-swatch {\n border: none;\n }\n"])),(function(e){return e.borderRadius}),(function(e){return e.value})),st=w.input(lt||(lt=We(["\n max-width: 70px;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n border: none;\n // height: 30px;\n padding: 10px;\n border-radius: ","px;\n &::-webkit-color-swatch {\n border: none;\n }\n &::-moz-color-swatch {\n border: none;\n }\n"])),(function(e){return e.borderRadius})),dt=function(e){var t=it();return l("div",{style:{display:"flex",flexDirection:"row"},children:[o(st,{type:"text",value:e.color,borderRadius:t.allBorderRadius,onChange:e.handleChange}),o("div",{style:{width:10}}),o(ot,{type:"color",value:e.color,onChange:e.handleChange,borderRadius:t.allBorderRadius})]})};dt.propTypes={color:a.string,handleChange:a.func};var ct=function(e){return l(C,{spacing:2,direction:"row",alignItems:"center",style:e.style,children:[e.startElement,o(T,{size:"small","aria-label":"Volume",value:e.value,onChange:e.handleChange}),e.endElement]})};ct.propTypes={startElement:a.element,endElement:a.element,handleChange:a.func};var ut=function(e){return l(h,{variant:"settingsRow",children:[o(Be,{children:e.settingsLabel}),"checkbox"===e.settingsType&&o(p,ke({},e)),"text"===e.settingsType&&o(De,ke({},e)),"boolean"===e.settingsType&&o(Me,ke({},e)),"range"===e.settingsType&&o(ct,ke({},e)),"color"===e.settingsType&&o(dt,ke({},e)),"radio"===e.settingsType&&o(je,ke({location:"inSettings"},e))]})};ut.propTypes={settingsLabel:a.string,settingsType:a.oneOf(["checkbox","text","radio","boolean","color"])};var mt=function(e){var t,r="ar"===e.lang,i="";switch(null===(t=e.logo)||void 0===t?void 0:t.toLowerCase()){case"google":i=o("img",{src:"https://upload.wikimedia.org/wikipedia/commons/5/53/Google_%22G%22_Logo.svg"});break;case"github":i=o(P,{});break;case"twitter":i=o(k,{});break;case"mada":i=o("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/mada.png",height:20});break;case"stcpay":i=o("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/stc-pay.png",height:20});break;case"visa/master":i=o("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/visa-master.png",height:30});break;case"paypal":i=o("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/paypal.png",height:25});break;case"googlepay":i=o("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/google-pay.png",height:20});break;case"applepay":i=o("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/apple-pay.png",height:40});break;case"wallet":i=o(L,{})}return l(n,ke(ke({style:{direction:r?"rtl":"ltr"}},e),{},{variant:"withLogo",children:[i,o("div",{style:{width:10}}),o(g,{style:{color:"black",fontSize:14,textAlign:"center",letterSpacing:.4,fontFamily:"Roboto",fontWeight:500},children:e.buttonText})]}))};mt.propTypes={lang:a.string,logo:a.oneOf(["google","github","twitter","wallet","googlepay","applepay","stcpay","visa/master","paypal","mada"]),buttonText:a.string};var pt=function(e){return o(n,ke(ke({},e),{},{children:e.children}))},ht=function(e){return l("div",{style:{width:"100%"},children:[l("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[o(b,{children:e.label}),e.helperText&&o(g,{variant:"validation",children:e.helperText})]}),o(S,ke(ke({},e),{},{children:e.children}))]})},gt=function(e){var t=it();return console.log("theme is ",t),o("label",{children:o("textarea",{style:{color:"black",backgroundColor:e.bgColor||"white",borderBottom:"none",border:"none",width:"100%",padding:0,margin:0,marginBottom:0,resize:e.resize||"vertical"}})})},ft=function(e){return o(b,{children:o("div",{style:{fontSize:15},children:e.label})})},vt=function(e){return l(u,{severity:e.severity,icon:e.hideIcon,children:[e.title&&o(c,{children:e.title}),e.text]})};vt.propTypes={severity:a.oneOf(["error","info","success","warning"]),title:a.string,text:a.string,hideIcon:a.bool};var xt=function(e){var t="ar"===e.lang;return o(I,{style:{direction:t?"rtl":"ltr"},children:l(W,{"aria-label":"a dense table",children:[o(A,{children:l(q,{children:[e.columns.map((function(e,r){return o(N,{align:t?"right":"left",style:{fontWeight:700},variant:r>0?t?"borderedRight":"borderedLeft":"body",children:e},r)})),e.actions&&o(N,{align:t?"right":"left",style:{fontWeight:700},variant:t?"borderedRight":"borderedLeft",children:"Actions"})]})}),o(O,{children:e.rows?e.rows.map((function(r,n){return l(q,{children:[r.map((function(e,r){return o(N,{align:t?"right":"left",component:"th",scope:"row",variant:r>0?t?"borderedRight":"borderedLeft":"body",children:e},r)})),e.actions&&o(N,{align:t?"right":"left",style:{fontWeight:700},variant:t?"borderedRight":"borderedLeft",children:e.actions.map((function(t){return o(R,{style:{margin:2},variant:"outlined",size:"small",onClick:function(){return e.handleActionClick(r)},children:t})}))})]},n)})):o(q,{align:"center",children:o(N,{align:"center",component:"th",colSpan:6,children:e.noDataText})})}),e.end&&o(q,{children:e.end.map((function(e,r){return o(N,{align:t?"right":"left",style:{fontWeight:700},component:"th",scope:"row",variant:r>0?t?"borderedRight":"borderedLeft":"body",children:e},r)}))})]})})};xt.propTypes={handleActionClick:a.func,noDataText:a.string,lang:a.string,columns:a.array,rows:a.array,end:a.array};var bt=function(e){return o(De,ke({endAdornment:o(j,{position:"start",children:o(U,{})})},e))},yt=function(e){return l(V,{elevation:0,children:[o(F,{expandIcon:o(_,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:o(g,{children:e.title})}),o(Z,{children:l(g,{children:[e.content," "]})})]})};yt.propTypes={title:a.string,content:a.string};var wt=function(e){var t=H(),r=t.formState.errors,i=t.handleSubmit,a=t.control;return o(h,{maxWidth:"sm",children:o(X,ke(ke({},t),{},{children:l("form",{onSubmit:i(e.handleUpdateProfile),children:[o(Y,{control:a,name:"fullName",render:function(t){var n,i,a=t.field;return o(De,ke({fullWidth:!0,type:"text",value:null!==(n=a.value)&&void 0!==n?n:"",label:e.texts.fullNameLabel,placeholder:e.texts.fullNamePlaceholder,helperText:null===(i=r.fullName)||void 0===i?void 0:i.message},a))}}),o(Y,{control:a,name:"phoneNumber",render:function(e){var t=e.field;return o(De,ke({fullWidth:!0,type:"tel",label:"Phone Number",placeholder:"+966"},t))}}),o(Y,{control:a,name:"email",render:function(t){var n,i,a=t.field;return o(De,ke({fullWidth:!0,type:"text",value:null!==(n=a.value)&&void 0!==n?n:"",label:e.texts.emailLabel,helperText:null===(i=r.email)||void 0===i?void 0:i.message,placeholder:e.texts.emailPlaceholder},a))},rules:{required:e.texts.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:e.texts.emailInvalidText}}}),o(Y,{control:a,name:"password",render:function(t){var n,i,a=t.field;return o(De,ke({fullWidth:!0,type:"password",value:null!==(n=a.value)&&void 0!==n?n:"",label:e.texts.passwordLabel,placeholder:e.texts.passwordPlaceholder,helperText:null===(i=r.password)||void 0===i?void 0:i.message},a))},rules:{required:e.texts.passwordRequiredText}}),o(Y,{control:a,name:"confirmPassword",render:function(t){var n,i,a=t.field;return o(De,ke({fullWidth:!0,type:"password",value:null!==(n=a.value)&&void 0!==n?n:"",label:e.texts.confirmPasswordLabel,placeholder:e.texts.confirmPasswordPlaceholder,helperText:null===(i=r.confirmPassword)||void 0===i?void 0:i.message},a))},rules:{required:e.texts.confirmPasswordRequiredText}}),o(n,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.updateProfile})]})}))})},Tt=function(e){return l(h,{maxWidth:"sm",children:[e.children,o(n,{type:"submit",fullWidth:!0,variant:"last",onClick:e.handleSaveSettings,children:e.saveSettingsText})]})},Ct=function(e){var t=Oe(r(!1),2),i=t[0],a=t[1],s=H(),d=s.formState.errors,c=s.handleSubmit,u=s.control;return l(h,{maxWidth:"xs",variant:"auth",children:[i&&o(vt,{text:e.texts.passwordMatchError,severity:"error"}),e.passwordChanged?o(Be,{style:{textAlign:"center",margin:5},children:e.texts.passwordChanged}):o(X,ke(ke({},s),{},{children:l("form",{onSubmit:c((function(t){console.log("handling subb",t),t.password===t.confirmPassword?e.handleNewPassword():a(!0)})),children:[o(Y,{control:u,name:"password",render:function(t){var r,n,i=t.field;return o(De,ke({fullWidth:!0,type:"password",value:null!==(r=i.value)&&void 0!==r?r:"",label:e.texts.passwordLabel,placeholder:e.texts.passwordPlaceholder,helperText:null===(n=d.password)||void 0===n?void 0:n.message,startAdornment:o(J,{position:"start",children:o(Q,{})})},i))},rules:{required:e.texts.passwordRequiredText}}),o(Y,{control:u,name:"confirmPassword",render:function(t){var r,n,i=t.field;return o(De,ke({fullWidth:!0,type:"password",value:null!==(r=i.value)&&void 0!==r?r:"",label:e.texts.confirmPasswordLabel,placeholder:e.texts.confirmPasswordPlaceholder,helperText:null===(n=d.confirmPassword)||void 0===n?void 0:n.message,startAdornment:o(J,{position:"start",children:o(Q,{})})},i))},rules:{required:e.texts.confirmPasswordRequiredText}}),o(n,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.updatePassword})]})}))]})};Ct.propTypes={texts:a.shape({emailLabel:a.string,emailPlaceholder:a.string,emailRequiredText:a.string,passwordPlaceholder:a.string,updatePassword:a.string,passwordRequiredText:a.string,passwordLabel:a.string,confirmPasswordPlaceholder:a.string,confirmPasswordLabel:a.string,confirmPasswordRequiredText:a.string,passwordMatchError:a.string,forgotPasswordText:a.string,passwordChanged:a.string}),passwordChanged:a.bool,handleNewPassword:a.func};var Pt=function(e){var t=H(),r=t.formState.errors,i=t.handleSubmit;t.register;var a=t.control;return o(h,{maxWidth:"xs",variant:"auth",children:e.sent?o(Be,{style:{textAlign:"center",margin:5},children:e.texts.emailSentText}):l("form",{onSubmit:i(e.handleResetPassword),children:[o(Y,{control:a,name:"email",render:function(t){var n,i,a=t.field;return o(De,ke({fullWidth:!0,type:"text",value:null!==(n=a.value)&&void 0!==n?n:"",label:e.texts.emailLabel,helperText:null===(i=r.email)||void 0===i?void 0:i.message,placeholder:e.texts.emailPlaceholder,startAdornment:o(J,{position:"start",children:o(K,{})})},a))},rules:{required:e.texts.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:e.texts.emailInvalidText}}}),o(n,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.resetPassword})]})})};Pt.propTypes={texts:a.shape({emailLabel:a.string,emailPlaceholder:a.string,emailRequiredText:a.string,emailInvalidText:a.string,emailSentText:a.string,resetPassword:a.string}),sent:a.bool,handleResetPassword:a.func};var kt=function(e){var t=H(),r=t.formState.errors,i=t.handleSubmit,a=t.control;return l(h,{maxWidth:"xs",variant:"auth",style:{direction:"ar"===e.lang?"rtl":"ltr"},children:[e.showError&&o(vt,{title:e.errorTitle,text:e.errorText,severity:"error"}),o(X,ke(ke({},t),{},{children:l("form",{onSubmit:i(e.handleSignUp),children:[o(Y,{control:a,name:"fullName",render:function(t){var n,i,a=t.field;return o(De,{fullWidth:!0,type:"text",value:null!==(n=a.value)&&void 0!==n?n:"",label:e.texts.fullNameLabel,placeholder:e.texts.fullNamePlaceholder,helperText:null===(i=r.fullName)||void 0===i?void 0:i.message,startAdornment:o(J,{position:"start",children:o(ee,{})})})},rules:{required:e.texts.fullNameRequiredText}}),o(Y,{control:a,name:"email",render:function(t){var n,i,a=t.field;return o(De,{fullWidth:!0,type:"text",value:null!==(n=a.value)&&void 0!==n?n:"",label:e.texts.emailLabel,helperText:null===(i=r.email)||void 0===i?void 0:i.message,placeholder:e.texts.emailPlaceholder,startAdornment:o(J,{position:"start",children:o(K,{})})})},rules:{required:e.texts.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:e.texts.emailInvalidText}}}),o(Y,{control:a,name:"password",render:function(t){var n,i,a,l=t.field;return o(De,ke({fullWidth:!0,type:"password",defaultValue:null!==(n=l.value)&&void 0!==n?n:"",value:null!==(i=l.value)&&void 0!==i?i:"",label:e.texts.passwordLabel,placeholder:e.texts.passwordPlaceholder,helperText:null===(a=r.password)||void 0===a?void 0:a.message,startAdornment:o(J,{position:"start",children:o(Q,{})})},l))},rules:{required:e.texts.passwordRequiredText}}),o(n,{fullWidth:!0,variant:"last",type:"submit",children:e.texts.signUpText})]})})),l(g,{variant:"subtitle2",style:{marginTop:5,textAlign:"center",padding:5},children:[e.texts.existingUserText," ",o("span",{onClick:e.handleRouteToSignIn,style:{cursor:"pointer",color:"blue",textAlign:"center"},children:e.texts.signInText})]}),o(te,{}),l("div",{style:{display:"flex",flexDirection:"column"},children:[e.viaGoogle&&o(mt,{logo:"google",buttonText:e.texts.googleButtonLabel,onClick:e.handleGoogleSignUp}),e.viaGithub&&o(mt,{logo:"github",buttonText:e.texts.githubButtonLabel,onClick:e.handleGithubSignUp}),e.viaTwitter&&o(mt,{logo:"twitter",buttonText:e.texts.twitterButtonLabel,onClick:e.handleTwitterSignUp})]})]})};kt.propTypes={texts:a.shape({fullNameLabel:a.string,fullNamePlaceholder:a.string,fullNameRequiredText:a.string,emailLabel:a.string,emailPlaceholder:a.string,emailRequiredText:a.string,emailInvalidText:a.string,passwordLabel:a.string,passwordPlaceholder:a.string,passwordRequiredText:a.string,passwordTooShortText:a.string,forgotPasswordText:a.string,newUserText:a.string,signUpText:a.string,signInText:a.string,existingUserText:a.string,googleButtonLabel:a.string,githubButtonLabel:a.string,twitterButtonLabel:a.string}),viaGoogle:a.bool,viaGithub:a.bool,viaTwitter:a.bool,handleSignUp:a.func,handleRouteToSignIn:a.func,handleGoogleSignUp:a.func,handleGithubSignUp:a.func,handleTwitterSignUp:a.func};var Lt=function(e){var t=H(),r=t.formState.errors,i=t.handleSubmit,a=t.control;return l(h,{maxWidth:"xs",variant:"auth",style:{direction:"ar"===e.lang?"rtl":"ltr"},children:[e.showError&&o(vt,{title:e.errorTitle,text:e.errorText,severity:"error"}),l("form",{onSubmit:i(e.handleSignIn),children:[o(Y,{control:a,name:"email",render:function(t){var n,i,a=t.field;return o(De,ke({fullWidth:!0,type:"text",value:null!==(n=a.value)&&void 0!==n?n:"",label:e.texts.emailLabel,helperText:null===(i=r.email)||void 0===i?void 0:i.message,placeholder:e.texts.emailPlaceholder,startAdornment:o(J,{position:"start",children:o(K,{})})},a))},rules:{required:e.texts.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:e.texts.emailInvalidText}}}),o(Y,{control:a,name:"password",render:function(t){var n,i,a,l=t.field;return o(De,ke({fullWidth:!0,type:"password",defaultValue:null!==(n=l.value)&&void 0!==n?n:"",value:null!==(i=l.value)&&void 0!==i?i:"",label:e.texts.passwordLabel,placeholder:e.texts.passwordPlaceholder,helperText:null===(a=r.password)||void 0===a?void 0:a.message,startAdornment:o(J,{position:"start",children:o(Q,{})})},l))},rules:{required:e.texts.passwordRequiredText}}),o(g,{style:{cursor:"pointer",marginTop:5,width:"max-content",fontSize:15,padding:5},onClick:e.handleForgotPassword,children:e.texts.forgotPasswordText}),o(n,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.signInText})]}),l(g,{variant:"subtitle2",style:{marginTop:5,textAlign:"center",padding:5},children:[e.texts.newUserText," ",o("span",{onClick:e.handleRouteToSignUp,style:{cursor:"pointer",color:"blue",textAlign:"center"},children:e.texts.signUpText})]}),o(te,{}),l("div",{style:{display:"flex",flexDirection:"column"},children:[e.viaGoogle&&o(mt,{logo:"google",buttonText:e.texts.googleButtonLabel,onClick:e.handleGoogleSignIn}),e.viaGithub&&o(mt,{logo:"github",buttonText:e.texts.githubButtonLabel,onClick:e.handleGithubSignIn}),e.viaTwitter&&o(mt,{logo:"twitter",buttonText:e.texts.twitterButtonLabel,onClick:e.handleTwitterSignIn})]})]})};Lt.propTypes={texts:a.shape({emailLabel:a.string,emailPlaceholder:a.string,emailRequiredText:a.string,emailInvalidText:a.string,passwordLabel:a.string,passwordPlaceholder:a.string,passwordRequiredText:a.string,forgotPasswordText:a.string,newUserText:a.string,signUpText:a.string,signInText:a.string,googleButtonLabel:a.string,githubButtonLabel:a.string,twitterButtonLabel:a.string}),viaGoogle:a.bool,viaGithub:a.bool,viaTwitter:a.bool,handleSignIn:a.func,handleRouteToSignUp:a.func,handleGoogleSignIn:a.func,handleGithubSignIn:a.func,handleTwitterSignIn:a.func};var St=function(e){return l(h,{maxWidth:"xs",children:[o(Be,{align:"center",children:"Choose Payment Method"}),e.viaWallet&&o(mt,{logo:"wallet",buttonText:e.walletLabel,onClick:e.handleWallet}),e.viaCreditCard&&o(mt,{logo:"visa/master",buttonText:e.visaMasterLabel,onClick:e.handleCreditCard}),e.viaMada&&o(mt,{logo:"mada",buttonText:e.madaLabel,onClick:e.handleMada}),e.viaSTCPay&&o(mt,{logo:"stcpay",buttonText:e.stcPayLabel,onClick:e.handleSTCPay}),e.viaPayPal&&o(mt,{logo:"paypal",buttonText:e.paypalLabel,onClick:e.handlePayPal}),e.viaGooglePay&&o(mt,{logo:"googlepay",buttonText:e.googlePayLabel,onClick:e.handleGooglePay}),e.viaApplePay&&o(mt,{logo:"applepay",buttonText:e.applePayLabel,onClick:e.handleApplePay})]})};St.propTypes={viaMada:a.bool,viaWallet:a.bool,viaSTCPay:a.bool,viaPayPal:a.bool,viaApplePay:a.bool,viaCreditCard:a.bool,madaLabel:a.string,stcPayLabel:a.string,paypalLabel:a.string,walletLabel:a.string,applePayLabel:a.string,visaMasterLabel:a.string,handleMada:a.func,handleWallet:a.func,handleSTCPay:a.func,handlePayPal:a.func,handleApplePay:a.func,handleCreditCard:a.func};var Wt=function(e){var t,r=H(),i=r.formState.errors,a=r.handleSubmit,s=r.control;return o(h,{maxWidth:"xs",children:l("form",{onSubmit:a(e.handle),children:[o(De,{fullWidth:!0,name:"password",placeholder:"Enter password",type:"tel",label:"Card Number",rules:{required:"Password is rquired"},helperText:null===(t=i.password)||void 0===t?void 0:t.message}),o(Y,{control:s,name:"cardName",render:function(e){var t;return e.field,o(De,{fullWidth:!0,name:"password",placeholder:"Enter password",type:"password",label:"Name On Card",rules:{required:"Password is rquired"},helperText:null===(t=i.password)||void 0===t?void 0:t.message})}}),o(Y,{control:s,name:"cardName",render:function(e){var t;return e.field,o(De,{fullWidth:!0,name:"password",placeholder:"Enter password",type:"password",label:"Expiry Date",rules:{required:"Password is rquired"},helperText:null===(t=i.password)||void 0===t?void 0:t.message})}}),o(Y,{control:s,name:"cardName",render:function(e){var t;return e.field,o(De,{fullWidth:!0,name:"password",placeholder:"Enter password",type:"password",label:"CCV",rules:{required:"Password is rquired"},helperText:null===(t=i.password)||void 0===t?void 0:t.message})}}),o(n,{type:"submit",fullWidth:!0,variant:"last",onClick:e.handlePayWithCreditCard,children:"Pay with Credit Card"})]})})},Ot=function(e){var t=Oe(r(0),2),i=t[0],a=t[1],s=H(),d=s.formState.errors,c=s.handleSubmit,u=s.control;return l(h,{maxWidth:"xs",children:[l(g,{align:"center",variant:"h2",fontWeight:500,style:{marginBottom:20},children:[Number(i).toLocaleString("en")||"0",o(g,{children:e.currency||"SAR"})]}),o(X,ke(ke({},s),{},{children:l("form",{onSubmit:c(e.handleChargeWallet),children:[o(Y,{control:u,name:"amount",render:function(t){var r,n,i=t.field;return o(De,ke(ke({fullWidth:!0,placeholder:e.texts.amountLabel,type:"number",value:null!==(r=i.value)&&void 0!==r?r:""},i),{},{inputProps:{inputMode:"numeric",min:"1",max:"9999999",step:"0.01"},onChange:function(e){i.onChange(parseFloat(e.target.value)),a(e.target.value)},helperText:null===(n=d.amount)||void 0===n?void 0:n.message}))},rules:{required:e.texts.amountRequired}}),o(n,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.chargeWallet})]})}))]})};Ot.propTypes={texts:a.shape({amountLabel:a.string,chargeWallet:a.string,amountRequired:a.string}),handleChargeWallet:a.func,currency:a.string};var Nt=function(e){return l(h,{maxWidth:"xs",children:[o(g,{align:"center",children:"Wallet Balance"}),l(g,{align:"center",variant:"h1",children:[e.walletBalance||"0",o(g,{children:e.currency||"SAR"})]}),o(n,{type:"submit",fullWidth:!0,variant:"last",onClick:e.handlePayWithWallet,children:"Pay Now"})]})},It=function(e){var t,r,i,a,s,d,c,u,m,p,f="ar"===e.lang,v=H(),x=v.formState.errors,b=v.handleSubmit;v.register;var y=v.control,w={display:"flex",padding:0,paddingRight:"0px !important",paddingLeft:"0px !important",flexDirection:{xs:"column",sm:"row",md:"row",lg:"row",xl:"row"}};return l(h,{maxWidth:"sm",style:{direction:f?"rtl":"ltr"},children:[o(g,{align:"center",variant:"h5",fontWeight:500,style:{marginBottom:10},children:e.texts.orderDetails}),o(xt,{lang:e.lang,columns:["Product","Price"],rows:e.products,end:["Total",e.total]}),o(te,{variant:"middle"}),o(g,{align:"center",variant:"h5",fontWeight:500,style:{marginBottom:10},children:e.texts.billingAddress}),o(X,ke(ke({},v),{},{children:l("form",{onSubmit:b(e.handlePayNow),children:[l(h,{sx:w,children:[o(Y,{control:y,name:"firstName",rules:{required:null===(t=e.texts)||void 0===t?void 0:t.required},render:function(t){var r,n,i,a=t.field;return o(De,ke({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=a.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.firstNameLabel)+" *",helperText:null===(i=x.firstName)||void 0===i?void 0:i.message},a))}}),o("div",{style:{width:20}}),o(Y,{control:y,name:"lastName",rules:{required:null===(r=e.texts)||void 0===r?void 0:r.required},render:function(t){var r,n,i,a=t.field;return o(De,ke({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=a.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.lastNameLabel)+" *",helperText:null===(i=x.lastName)||void 0===i?void 0:i.message},a))}})]}),o(Y,{control:y,name:"email",render:function(t){var r,n,i,a=t.field;return o(De,ke({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=a.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.emailLabel)+" *",helperText:null===(i=x.email)||void 0===i?void 0:i.message},a))},rules:{required:null===(i=e.texts)||void 0===i?void 0:i.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:null===(a=e.texts)||void 0===a?void 0:a.emailInvalidText}}}),l(h,{sx:w,children:[o(Y,{control:y,name:"streetAddress",rules:{required:null===(s=e.texts)||void 0===s?void 0:s.required},render:function(t){var r,n,i,a=t.field;return o(De,ke({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=a.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.streetAddressLabel)+" *",helperText:null===(i=x.streetAddress)||void 0===i?void 0:i.message},a))}}),o("div",{style:{width:20}}),o(Y,{control:y,name:"buildingNumber",rules:{required:null===(d=e.texts)||void 0===d?void 0:d.required},render:function(t){var r,n,i,a=t.field;return o(De,ke({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=a.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.buildingNumberLabel)+" *",helperText:null===(i=x.buildingNumber)||void 0===i?void 0:i.message},a))}})]}),l(h,{sx:w,children:[o(Y,{control:y,name:"province",rules:{required:null===(c=e.texts)||void 0===c?void 0:c.required},render:function(t){var r,n,i,a=t.field;return o(De,ke({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=a.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.stateLabel)+" *",helperText:null===(i=x.province)||void 0===i?void 0:i.message},a))}}),o("div",{style:{width:20}}),o(Y,{control:y,name:"city",rules:{required:null===(u=e.texts)||void 0===u?void 0:u.required},render:function(t){var r,n,i,a=t.field;return o(De,ke({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=a.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.cityLabel)+" *",helperText:null===(i=x.city)||void 0===i?void 0:i.message},a))}})]}),l(h,{sx:w,children:[o(Y,{control:y,name:"zipCode",rules:{required:null===(m=e.texts)||void 0===m?void 0:m.required},render:function(t){var r,n,i,a=t.field;return o(De,ke({inForm:!0,fullWidth:!0,type:"number",variant:"unscrollable",value:null!==(r=a.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.zipCodeLabel)+" *",helperText:null===(i=x.zipCode)||void 0===i?void 0:i.message},a))}}),o("div",{style:{width:20}}),o(Y,{control:y,name:"country",rules:{required:null===(p=e.texts)||void 0===p?void 0:p.required},render:function(t){var r,n,i,a=t.field;return l(ht,ke(ke({fullWidth:!0,native:!0,label:(null===(r=e.texts)||void 0===r?void 0:r.countryLabel)+" *",variant:"standard",value:null!==(n=a.value)&&void 0!==n?n:"",helperText:null===(i=x.country)||void 0===i?void 0:i.message,displayEmpty:!0,disableUnderline:!0,validators:["required"]},a),{},{children:[o("option",{}),e.countriesList.map((function(e,t){return o("option",{children:e},t)}))]}))}})]}),o(n,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.payNow})]})}))]})};It.propTypes={texts:a.shape({orderDetails:a.string,billingAddress:a.string,payNow:a.string,emailLabel:a.string,emailRequiredText:a.string,emailInvalidText:a.string,firstNameLabel:a.string,required:a.string,lastNameLabel:a.string,streetAddressLabel:a.string,buildingNumberLabel:a.string,cityLabel:a.string,stateLabel:a.string,countryLabel:a.string,zipCodeLabel:a.string}),lang:a.string,countriesList:a.array,products:a.array,total:a.string,handlePayNow:a.func};var At=function(e){var t="ar"===e.lang;return l("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[l(h,{maxWidth:"sm",style:{direction:t?"rtl":"ltr"},children:[o(g,{align:"center",variant:"h3",fontWeight:400,style:{marginBottom:10},children:e.confirmationTitle}),o(te,{variant:"middle"}),l(g,{align:"center",variant:"body1",style:{marginBottom:10},children:[e.texts.successMessage," ",o("strong",{children:e.userEmail})]}),o(g,{align:"center",variant:"body1",children:e.texts.yourOrderNumber}),o(g,{align:"center",variant:"body1",fontWeight:700,style:{marginBottom:10},children:e.orderNumber}),o(te,{variant:"middle"}),e.products&&l(s,{children:[o(g,{align:"center",variant:"h5",fontWeight:500,style:{marginBottom:10},children:e.texts.orderDetails}),o(xt,{lang:e.lang,columns:["Product","Price"],rows:e.products,end:["Total",e.total]}),o(te,{variant:"middle"})]}),o(n,{onClick:e.handlePrint,variant:"contained",children:e.texts.print}),o(n,{onClick:e.handleHistory,variant:"last",children:e.texts.history}),o(n,{onClick:e.handleHome,variant:"last",children:e.texts.homePage}),o(g,{align:"center",variant:"body2",style:{marginTop:10},children:e.texts.fasterPaymentNote})]}),o("a",{style:{marginTop:10,paddingTop:10,padding:5,cursor:"pointer"},onClick:e.handleRefundPolicyLink,children:o(g,{align:"center",variant:"caption",fontWeight:500,children:e.texts.refundPolicy})})]})};At.propTypes={texts:a.shape({print:a.string,history:a.string,homePage:a.string,successMessage:a.string,orderDetails:a.string,fasterPaymentNote:a.string,billingAddress:a.string,payNow:a.string,yourOrderNumber:a.string,emailLabel:a.string,emailRequiredText:a.string,emailInvalidText:a.string,firstNameLabel:a.string,required:a.string,lastNameLabel:a.string,streetAddressLabel:a.string,buildingNumberLabel:a.string,cityLabel:a.string,stateLabel:a.string,countryLabel:a.string,zipCodeLabel:a.string,refundPolicy:a.string}),products:a.array,countriesList:a.array,lang:a.string,total:a.string,userEmail:a.string,orderNumber:a.string,confirmationTitle:a.string,handleHome:a.func,handlePrint:a.func,handleHistory:a.func,handleRefundPolicyLink:a.func};var qt=function(e){return o("div",{children:e.children})},Rt=function(e){var t=E();return o(z,{sx:{mt:"45px"},id:"menu-appbar",anchorEl:e.anchor,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(e.anchor),onClose:e.handleClose,variant:"themed",PaperProps:{style:{boxShadow:"none",borderRadius:t.allBorderRadius,border:"1px solid ".concat(t.primaryActionColor)}},children:e.menuItems.map((function(e){return l(B,{onClick:e.action,children:[e.icon&&o(e.icon,{}),o("div",{style:{width:10}}),o(D,{textAlign:"center",children:e.label})]},e.label)}))})};Rt.propTypes={handleClose:a.func,menuItems:a.arrayOf(a.shape({icon:a.element,label:a.string,action:a.func}))};var jt=function(e){return{width:240,transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),overflowX:"hidden"}},Et=function(e){return Le({transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),overflowX:"hidden",width:"calc(".concat(e.spacing(8)," + 1px)")},e.breakpoints.up("sm"),{width:"calc(".concat(e.spacing(8)," + 1px)")})},zt=re("div")((function(e){var t=e.theme;return ke({display:"flex",alignItems:"center",justifyContent:"flex-end",padding:t.spacing(0,1)},t.mixins.toolbar)})),Bt=re(le,{shouldForwardProp:function(e){return"open"!==e}})((function(e){var t=e.theme,r=e.open;return ke({zIndex:t.zIndex.drawer+1,transition:t.transitions.create(["width","margin"],{easing:t.transitions.easing.sharp,duration:t.transitions.duration.leavingScreen})},r&&{marginLeft:240,width:"calc(100% - ".concat(240,"px)"),transition:t.transitions.create(["width","margin"],{easing:t.transitions.easing.sharp,duration:t.transitions.duration.enteringScreen})})})),Dt=re(ae,{shouldForwardProp:function(e){return"open"!==e}})((function(e){var t=e.theme,r=e.open;return ke(ke({width:240,flexShrink:0,whiteSpace:"nowrap",boxSizing:"border-box"},r&&ke(ke({},jt(t)),{},{"& .MuiDrawer-paper":jt(t)})),!r&&ke(ke({},Et(t)),{},{"& .MuiDrawer-paper":Et(t)}))}));function Mt(e){var r=ne(),n=Oe(t.useState(!0),2),a=n[0],s=n[1],d=fe("(max-width:600px)"),c=Oe(t.useState(null),2);c[0],c[1];var u=Oe(t.useState(null),2),m=u[0],p=u[1];console.log("match is ",d);return l(ie,{sx:{display:"flex"},children:[d&&l(M,{showLabels:!0,children:[o(G,{label:"Recents",icon:o($,{})}),o(G,{label:"Favorites",icon:o($,{})}),o(G,{label:"Nearby",icon:o($,{})})]})," ",o(Bt,{variant:"appbar",position:"fixed",open:a,children:l(oe,{variant:"appbar",children:[o(de,{color:"inherit","aria-label":"open drawer",onClick:function(){return s(!0)},edge:"start",sx:ke({marginRight:5},a&&{display:"none"}),children:o(ce,{})}),l("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",width:"100%",margin:0},children:[o(g,{variant:"h6",noWrap:!0,component:"div",children:e.pageTitle}),l(ie,{children:[o(i,{title:"Open settings",children:o(de,{onClick:function(e){return p(e.currentTarget)},sx:{p:0},children:o(ge,{})})}),o(Rt,{menuItems:e.accountMenu,anchor:m,handleClose:function(){return p(null)}})]})]})]})}),l(Dt,{variant:"permanent",open:a,children:[l(zt,{children:[e.logo,o(de,{onClick:function(){return s(!1)},children:"rtl"===r.direction?o(me,{}):o(ue,{})})]}),o(te,{}),o(se,{children:e.pages.map((function(t,r){var n,s;return o(i,{title:t.text,placement:"right",arrow:!0,PopperProps:{style:{opacity:a?0:1}},children:l(pe,{variant:(null===(n=e.pageName)||void 0===n?void 0:n.toLowerCase())===(null===(s=t.slug)||void 0===s?void 0:s.toLowerCase())&&"clicked",onClick:t.action,sx:{minHeight:48,justifyContent:a?"initial":"center",px:2.5},children:[o(t.icon,{}),o("div",{style:{width:20}}),o(he,{primary:t.text,sx:{opacity:a?1:0}})]},t.text)},r)}))})]}),l(ie,{sx:{flexGrow:1,p:3},children:[o(zt,{}),e.children]})]})}var Gt=["children","onClose","hideClose"],Ut=function(e){var t=e.children,r=e.onClose,n=e.hideClose,i=Se(e,Gt);return l(we,ke(ke({sx:{m:0,p:2}},i),{},{children:[t,n?null:o(de,{"aria-label":"close",onClick:r,sx:{position:"absolute",right:8,top:8,color:function(e){return e.palette.grey[500]}},children:o(ve,{})})]}))};function $t(e){var t=Oe(r(!1),2);return t[0],t[1],l(xe,ke(ke({},e),{},{variant:"main",children:[o(Ut,{onClose:e.onClose,hideClose:e.hideClose,children:e.title}),o(ye,{children:e.children}),o(be,{children:e.actions})]}))}var _t=["Products","Pricing","Blog"],Vt=function(e){var r=E(),a=Oe(t.useState(null),2),s=a[0],d=a[1],c=Oe(t.useState(null),2),u=c[0],m=c[1],p=function(){d(null)};return console.log("theme is ",r),o(le,{position:"static",variant:"appbar",children:o(h,{maxWidth:"xl",variant:"appbar",children:l(oe,{disableGutters:!0,children:[o(g,{variant:"h6",noWrap:!0,component:"div",sx:{mr:2,display:{xs:"none",md:"flex"}},children:"LOGO"}),l(ie,{sx:{flexGrow:1,display:{xs:"flex",md:"none"}},children:[o(de,{size:"large","aria-label":"account of current user","aria-controls":"menu-appbar","aria-haspopup":"true",onClick:e.handleOpenSideMenu,color:"inherit",children:o(ce,{})}),o(Te,{id:"menu-appbar",anchorEl:s,anchorOrigin:{vertical:"bottom",horizontal:"left"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"left"},open:Boolean(s),onClose:p,sx:{display:{xs:"block",md:"none"}},children:_t.map((function(e){return o(Ce,{onClick:p,children:o(g,{textAlign:"center",children:e})},e)}))})]}),o(g,{variant:"h6",noWrap:!0,component:"div",sx:{flexGrow:1,display:{xs:"flex",md:"none"}},children:"LOGO"}),o(ie,{sx:{flexGrow:1,display:{xs:"none",md:"flex"}},children:_t.map((function(e){return o(n,{onClick:p,sx:{my:2,display:"block"},children:e},e)}))}),l(ie,{sx:{flexGrow:0},children:[o(i,{title:"Open settings",children:o(de,{onClick:function(e){m(e.currentTarget)},sx:{p:0},children:o(ge,{alt:"Remy Sharp",src:"/static/images/avatar/2.jpg"})})}),o(Rt,{anchor:u,handleClose:function(e){return m(null)},menuItems:e.accountMenu})]})]})})})};export{Ae as ActionButton,Ie as AdaptiveButton,qt as Box,Ot as ChargeWalletForm,It as CheckoutForm,At as ConfirmationPage,Wt as CreditCardForm,yt as HawaAccordian,vt as HawaAlert,Vt as HawaAppBar,Mt as HawaAppLayout,pt as HawaButton,Re as HawaCheckbox,dt as HawaColorPicker,$t as HawaDialog,ft as HawaInputLabel,Ee as HawaItemCard,mt as HawaLogoButton,ze as HawaPricingCard,je as HawaRadio,ct as HawaRange,bt as HawaSearchBar,ht as HawaSelect,ut as HawaSettingsRow,qe as HawaSnackbar,xt as HawaTable,gt as HawaTextArea,De as HawaTextField,Be as HawaTypography,Ct as NewPasswordForm,Nt as PayWithWallet,Pt as ResetPasswordForm,St as SelectPayment,Lt as SignInForm,kt as SignUpForm,wt as UserProfileForm,Tt as UserSettingsForm};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("@mui/material/Button"),r=require("@mui/material/Tooltip"),n=require("prop-types"),l=require("react/jsx-runtime"),a=require("@mui/material/Snackbar"),i=require("@mui/material/AlertTitle"),o=require("@mui/material/Alert"),s=require("@mui/material/FormControlLabel"),d=require("@mui/material/Checkbox"),u=require("@mui/material/Container"),c=require("@mui/material/Typography"),f=require("@mui/icons-material/CheckCircleOutlined"),x=require("@mui/material/Input"),p=require("@mui/material/InputLabel"),h=require("@mui/material/Switch"),m=require("@emotion/styled"),v=require("@mui/icons-material/GitHub"),g=require("@mui/icons-material/Twitter"),j=require("@mui/icons-material/AccountBalanceWallet"),y=require("@mui/material/Select"),b=require("@mui/material/Table"),w=require("@mui/material/TableBody"),C=require("@mui/material/TableCell"),T=require("@mui/material/TableContainer"),P=require("@mui/material/TableHead"),k=require("@mui/material/TableRow"),S=require("react-hook-form"),q=require("@mui/material/InputAdornment"),O=require("@mui/icons-material/HttpsOutlined"),W=require("@mui/icons-material/MailOutline"),L=require("@mui/icons-material/PermIdentityOutlined"),A=require("@mui/material/Divider"),I=require("@mui/material/styles"),N=require("@mui/material/Box"),R=require("@mui/material/Drawer"),B=require("@mui/material/AppBar"),z=require("@mui/material/Toolbar"),E=require("@mui/material/List"),D=require("@mui/material/IconButton"),F=require("@mui/icons-material/Menu"),M=require("@mui/icons-material/ChevronLeft"),G=require("@mui/icons-material/ChevronRight"),$=require("@mui/material/ListItemButton"),H=require("@mui/material/ListItemText"),U=require("@mui/material/Menu"),_=require("@mui/material/Avatar"),V=require("@mui/material/MenuItem"),Z=require("@mui/icons-material/Close"),X=require("@mui/material/Dialog"),Y=require("@mui/material/DialogActions"),J=require("@mui/material/DialogContent"),K=require("@mui/material/DialogTitle"),Q=require("@mui/material");function ee(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function te(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var re=ee(e),ne=te(e),le=ee(t),ae=ee(r),ie=ee(n),oe=ee(a),se=ee(i),de=ee(o),ue=ee(s),ce=ee(d),fe=ee(u),xe=ee(c),pe=ee(f),he=ee(x),me=ee(p),ve=ee(h),ge=ee(m),je=ee(v),ye=ee(g),be=ee(j),we=ee(y),Ce=ee(b),Te=ee(w),Pe=ee(C),ke=ee(T),Se=ee(P),qe=ee(k),Oe=ee(q),We=ee(O),Le=ee(W),Ae=ee(L),Ie=ee(A),Ne=ee(N),Re=ee(R),Be=ee(B),ze=ee(z),Ee=ee(E),De=ee(D),Fe=ee(F),Me=ee(M),Ge=ee(G),$e=ee($),He=ee(H),Ue=ee(U),_e=ee(_),Ve=ee(V),Ze=ee(Z),Xe=ee(X),Ye=ee(Y),Je=ee(J),Ke=ee(K);function Qe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function et(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Qe(Object(r),!0).forEach((function(t){tt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function tt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rt(e,t){if(null==e)return{};var r,n,l=function(e,t){if(null==e)return{};var r,n,l={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(l[r]=e[r]);return l}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(l[r]=e[r])}return l}function nt(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function lt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,l,a=[],i=!0,o=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){o=!0,l=e}finally{try{i||null==r.return||r.return()}finally{if(o)throw l}}return a}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return at(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return at(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function at(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var it=function(e){return e.showText?l.jsxs(le.default,{variant:"adaptive-dark",onClick:e.onClick,children:[e.icon,l.jsx("div",{style:{width:10}}),e.buttonText]}):l.jsx(ae.default,{title:e.buttonText,placement:"top",children:l.jsx(le.default,{variant:"adaptive-dark",onClick:e.onClick,children:e.icon})})};it.propTypes={buttonText:ie.default.string,onClick:ie.default.func,showText:ie.default.bool};var ot=function(t){var r=lt(e.useState(t.defaultValue),2),n=r[0],a=r[1];return l.jsx(fe.default,{variant:t.location||"panelTabs",children:t.options.map((function(e,r){var i;return l.jsx(le.default,{onClick:function(){t.handleChange(e.value),a(e.value)},fullWidth:!0,variant:(null==n?void 0:n.toLowerCase())===(null===(i=e.value)||void 0===i?void 0:i.toLowerCase())?"selected":"unselected",children:e.label},r)}))})};ot.propTypes={lang:ie.default.string,options:ie.default.array,defaultValue:ie.default.string,handleChange:ie.default.func,location:ie.default.string};var st=function(e){var t="ar"===e.lang;return l.jsxs(fe.default,{onClick:function(t){t.stopPropagation(),e.onCardClick()},maxWidth:"xs",variant:"card-container",dataValue:"parent",style:{direction:t?"rtl":"ltr"},children:[e.header&&l.jsxs(fe.default,{style:{zIndex:20},variant:"card-header",children:[e.headerActions&&l.jsx("div",{style:{margin:0,marginRight:-20,marginLeft:-20,marginBottom:-20,display:"flex",paddingTop:5,paddingLeft:5,paddingRight:5,justifyContent:"flex-end"},children:e.headerActions}),e.header]}),e.content&&l.jsx(fe.default,{style:{zIndex:20},variant:"card-content",children:e.content}),e.actions&&l.jsx(fe.default,{style:{zIndex:20},variant:"card-actions",children:e.actions})]})};st.propTypes={lang:ie.default.string,onCardClick:ie.default.func};var dt=function(e){var t,r,n="ar"===e.lang,a={monthly:"شهرياً","3-months":"كل 3 أشهر","6-months":"كل 6 أشهر",annually:"سنوياً"},i={monthly:"Monthly","3-months":"3 Months","6-months":"6 Months",annually:"Annually"},o={usd:n?"دولار":"$",sar:n?"ريال":"SAR"},s=n?e.features_ar:e.features;return l.jsxs(fe.default,{maxWidth:"xs",variant:e.selectedPlan?"selected-plan-card":"plan-card",style:{direction:n?"rtl":"ltr"},children:[l.jsxs(fe.default,{variant:"plan-header",children:[l.jsx(xe.default,{variant:"h3",fontWeight:500,children:n?e.title_ar:e.title}),l.jsx(xe.default,{variant:"caption",children:n?e.subtitle_ar:e.subtitle}),l.jsx("br",{}),l.jsx(xe.default,{variant:"h4",fontWeight:500,style:{display:"flex",alignItems:"center"},children:"ar"===e.lang?l.jsxs("div",{style:{width:"100%",display:"flex",flexDirection:"column",justifyContent:"center"},children:[l.jsxs("div",{style:{display:"flex",flexDirection:"row"},children:[e.price,l.jsx("div",{style:{width:5}}),l.jsx(xe.default,{children:o[null===(t=e.currency)||void 0===t?void 0:t.toLowerCase()]})]}),l.jsx(xe.default,{style:{fontSize:14,margin:5},children:n?a[e.cycleText]:i[e.cycleText]})]}):l.jsxs("div",{style:{width:"100%",display:"flex",flexDirection:"column",justifyContent:"center"},children:[l.jsxs("div",{style:{display:"flex",flexDirection:"row"},children:[l.jsx(xe.default,{children:o[null===(r=e.currency)||void 0===r?void 0:r.toLowerCase()]}),l.jsx("div",{style:{width:5}}),e.price]}),l.jsx(xe.default,{style:{fontSize:14,margin:5},children:"ar"===e.lang?a[e.cycleText]:i[e.cycleText]})]})})]}),l.jsx("div",{style:{padding:20,color:e.selectedPlan?"white":"black"},children:null==s?void 0:s.map((function(e){return l.jsxs("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start",marginTop:10,width:"100%"},children:[l.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",width:"10%"},children:l.jsx(pe.default,{fontSize:"small"})}),l.jsx("div",{style:{width:10}}),l.jsx(xe.default,{variant:"subtitle2",children:e})]})}))}),l.jsx(le.default,{onClick:e.selectPlan,variant:e.selectedPlan?"outlined":"contained",style:{margin:20},children:e.buttonText})]})};dt.propTypes={lang:ie.default.string,buttonText:ie.default.string,selectedPlan:ie.default.string,title:ie.default.string,title_ar:ie.default.string,subtitle:ie.default.string,subtitle_ar:ie.default.string,features:ie.default.array,features_ar:ie.default.array};var ut=function(e){return l.jsx(xe.default,et(et({},e),{},{children:e.children}))},ct=function(e){return l.jsx("div",{style:e.inForm&&{width:"100%"},children:l.jsxs("div",{style:{width:e.fullWidth?"100%":"fit-content"},children:[l.jsxs("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[e.label&&l.jsx(me.default,{children:e.label}),e.helperText&&l.jsx(xe.default,{variant:"validation",children:e.helperText})]}),l.jsx(he.default,et({disableUnderline:!0},e))]})})},ft=function(e){return l.jsx(ve.default,et({},e))};var xt="production"!==process.env.NODE_ENV?ie.default.oneOfType([ie.default.number,ie.default.string,ie.default.object,ie.default.array]):{};function pt(){return pt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},pt.apply(this,arguments)}function ht(e){return null!==e&&"object"==typeof e&&e.constructor===Object}function mt(e,t,r={clone:!0}){const n=r.clone?pt({},e):e;return ht(e)&&ht(t)&&Object.keys(t).forEach((l=>{"__proto__"!==l&&(ht(t[l])&&l in e&&ht(e[l])?n[l]=mt(e[l],t[l],r):n[l]=t[l])})),n}const vt=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],gt=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],jt=[...vt,...gt];function yt(e){return function(e,t,r,n){const l=(a=e,((i=t)&&"string"==typeof i?i.split(".").reduce(((e,t)=>e&&e[t]?e[t]:null),a):null)||r);var a,i;return"number"==typeof l?e=>"string"==typeof e?e:("production"!==process.env.NODE_ENV&&"number"!=typeof e&&console.error(`MUI: Expected ${n} argument to be a number or a string, got ${e}.`),l*e):Array.isArray(l)?e=>"string"==typeof e?e:("production"!==process.env.NODE_ENV&&(Number.isInteger(e)?e>l.length-1&&console.error([`MUI: The value provided (${e}) overflows.`,`The supported values are: ${JSON.stringify(l)}.`,`${e} > ${l.length-1}, you need to add the missing values.`].join("\n")):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join("\n"))),l[e]):"function"==typeof l?l:("production"!==process.env.NODE_ENV&&console.error([`MUI: The \`theme.${t}\` value (${l}) is invalid.`,"It should be a number, an array or a function."].join("\n")),()=>{})}(e,"spacing",8,"spacing")}function bt(e,t){if(null==e)return{};var r,n,l={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(l[r]=e[r]);return l}"production"===process.env.NODE_ENV||vt.reduce(((e,t)=>(e[t]=xt,e)),{}),"production"===process.env.NODE_ENV||gt.reduce(((e,t)=>(e[t]=xt,e)),{}),"production"===process.env.NODE_ENV||jt.reduce(((e,t)=>(e[t]=xt,e)),{});const wt=["values","unit","step"];function Ct(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5}=e,l=bt(e,wt),a=(e=>{const t=Object.keys(e).map((t=>({key:t,val:e[t]})))||[];return t.sort(((e,t)=>e.val-t.val)),t.reduce(((e,t)=>pt({},e,{[t.key]:t.val})),{})})(t),i=Object.keys(a);function o(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${r})`}function s(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-n/100}${r})`}function d(e,l){const a=i.indexOf(l);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${r}) and (max-width:${(-1!==a&&"number"==typeof t[i[a]]?t[i[a]]:l)-n/100}${r})`}return pt({keys:i,values:a,up:o,down:s,between:d,only:function(e){return i.indexOf(e)+1<i.length?d(e,i[i.indexOf(e)+1]):o(e)},not:function(e){const t=i.indexOf(e);return 0===t?o(i[1]):t===i.length-1?s(i[t]):d(e,i[i.indexOf(e)+1]).replace("@media","@media not all and")},unit:r},l)}var Tt={borderRadius:4};const Pt=["breakpoints","palette","spacing","shape"];const kt=ne.createContext(null);"production"!==process.env.NODE_ENV&&(kt.displayName="ThemeContext");var St=kt;function qt(e=null){const t=function(){const e=ne.useContext(St);return"production"!==process.env.NODE_ENV&&ne.useDebugValue(e),e}();return t&&(r=t,0!==Object.keys(r).length)?t:e;var r}const Ot=function(e={},...t){const{breakpoints:r={},palette:n={},spacing:l,shape:a={}}=e,i=bt(e,Pt),o=Ct(r),s=function(e=8){if(e.mui)return e;const t=yt({spacing:e}),r=(...e)=>("production"!==process.env.NODE_ENV&&(e.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${e.length}`)),(0===e.length?[1]:e).map((e=>{const r=t(e);return"number"==typeof r?`${r}px`:r})).join(" "));return r.mui=!0,r}(l);let d=mt({breakpoints:o,direction:"ltr",components:{},palette:pt({mode:"light"},n),spacing:s,shape:pt({},Tt,a)},i);return d=t.reduce(((e,t)=>mt(e,t)),d),d}();function Wt(e=Ot){return qt(e)}var Lt,At,It=ge.default.input(Lt||(Lt=nt(["\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n border: none;\n cursor: pointer;\n height: 35px;\n border-radius: ","px;\n background-color: ",";\n &::-webkit-color-swatch {\n border: none;\n }\n &::-moz-color-swatch {\n border: none;\n }\n"])),(function(e){return e.borderRadius}),(function(e){return e.value})),Nt=ge.default.input(At||(At=nt(["\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n border: none;\n // height: 30px;\n padding: 10px;\n border-radius: ","px;\n &::-webkit-color-swatch {\n border: none;\n }\n &::-moz-color-swatch {\n border: none;\n }\n"])),(function(e){return e.borderRadius})),Rt=function(e){var t=Wt();return l.jsxs("div",{style:{display:"flex",flexDirection:"row"},children:[l.jsx(Nt,{type:"text",value:e.color,borderRadius:t.allBorderRadius,onChange:e.handleChange}),l.jsx("div",{style:{width:10}}),l.jsx(It,{type:"color",value:e.color,onChange:e.handleChange,borderRadius:t.allBorderRadius})]})};Rt.propTypes={color:ie.default.string,handleChange:ie.default.func};var Bt=function(e){return l.jsxs(fe.default,{variant:"settingsRow",children:[l.jsx(ut,{children:e.settingsLabel}),"checkbox"===e.settingsType&&l.jsx(ce.default,et({},e)),"text"===e.settingsType&&l.jsx(ct,et({},e)),"radio"===e.settingsType&&l.jsx(ot,et({location:"inSettings"},e)),"boolean"===e.settingsType&&l.jsx(ft,et({},e)),"color"===e.settingsType&&l.jsx(Rt,et({},e))]})};Bt.propTypes={type:ie.default.oneOf(["checkbox","text","radio","boolean","color"]),helperText:ie.default.string};var zt=function(e){var t,r="ar"===e.lang,n="";switch(null===(t=e.logo)||void 0===t?void 0:t.toLowerCase()){case"google":n=l.jsx("img",{src:"https://upload.wikimedia.org/wikipedia/commons/5/53/Google_%22G%22_Logo.svg"});break;case"github":n=l.jsx(je.default,{});break;case"twitter":n=l.jsx(ye.default,{});break;case"mada":n=l.jsx("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/mada.png",height:20});break;case"stcpay":n=l.jsx("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/stc-pay.png",height:20});break;case"visa/master":n=l.jsx("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/visa-master.png",height:30});break;case"paypal":n=l.jsx("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/paypal.png",height:25});break;case"googlepay":n=l.jsx("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/google-pay.png",height:20});break;case"applepay":n=l.jsx("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/apple-pay.png",height:40});break;case"wallet":n=l.jsx(be.default,{})}return l.jsxs(le.default,et(et({style:{direction:r?"rtl":"ltr"}},e),{},{variant:"withLogo",children:[n,l.jsx("div",{style:{width:10}}),l.jsx(xe.default,{style:{color:"black",fontSize:14,textAlign:"center",letterSpacing:.4,fontFamily:"Roboto",fontWeight:500},children:e.buttonText})]}))};zt.propTypes={lang:ie.default.string,logo:ie.default.string,buttonText:ie.default.string};var Et=function(e){return l.jsxs("div",{style:{width:"100%"},children:[l.jsxs("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[l.jsx(me.default,{children:e.label}),e.helperText&&l.jsx(xe.default,{variant:"validation",children:e.helperText})]}),l.jsx(we.default,et(et({},e),{},{children:e.children}))]})},Dt=function(e){return l.jsxs(de.default,{severity:e.severity,icon:e.hideIcon,children:[e.title&&l.jsx(se.default,{children:e.title}),e.text]})};Dt.propTypes={severity:ie.default.string,title:ie.default.string,text:ie.default.string,hideIcon:ie.default.bool};var Ft=function(e){var t="ar"===e.lang;return l.jsx(ke.default,{style:{direction:t?"rtl":"ltr"},children:l.jsxs(Ce.default,{"aria-label":"a dense table",children:[l.jsx(Se.default,{children:l.jsx(qe.default,{children:e.columns.map((function(e,r){return l.jsx(Pe.default,{align:t?"right":"left",style:{fontWeight:700},variant:r>0?t?"borderedRight":"borderedLeft":"body",children:e},r)}))})}),l.jsx(Te.default,{children:e.rows.map((function(e,r){return l.jsx(qe.default,{children:e.map((function(e,r){return l.jsx(Pe.default,{align:t?"right":"left",component:"th",scope:"row",variant:r>0?t?"borderedRight":"borderedLeft":"body",children:e},r)}))},r)}))}),e.end&&l.jsx(qe.default,{children:e.end.map((function(e,r){return l.jsx(Pe.default,{align:t?"right":"left",style:{fontWeight:700},component:"th",scope:"row",variant:r>0?t?"borderedRight":"borderedLeft":"body",children:e},r)}))})]})})},Mt=function(t){var r=lt(e.useState(!1),2),n=r[0],a=r[1],i=S.useForm(),o=i.formState.errors,s=i.handleSubmit,d=i.control;return l.jsxs(fe.default,{maxWidth:"xs",variant:"auth",children:[n&&l.jsx(Dt,{text:t.texts.passwordMatchError,severity:"error"}),t.passwordChanged?l.jsx(ut,{style:{textAlign:"center",margin:5},children:t.texts.passwordChanged}):l.jsx(S.FormProvider,et(et({},i),{},{children:l.jsxs("form",{onSubmit:s((function(e){console.log("handling subb",e),e.password===e.confirmPassword?t.handleNewPassword():a(!0)})),children:[l.jsx(S.Controller,{control:d,name:"password",render:function(e){var r,n,a=e.field;return l.jsx(ct,et({fullWidth:!0,type:"password",value:null!==(r=a.value)&&void 0!==r?r:"",label:t.texts.passwordLabel,placeholder:t.texts.passwordPlaceholder,helperText:null===(n=o.password)||void 0===n?void 0:n.message,startAdornment:l.jsx(Oe.default,{position:"start",children:l.jsx(We.default,{})})},a))},rules:{required:t.texts.passwordRequiredText}}),l.jsx(S.Controller,{control:d,name:"confirmPassword",render:function(e){var r,n,a=e.field;return l.jsx(ct,et({fullWidth:!0,type:"password",value:null!==(r=a.value)&&void 0!==r?r:"",label:t.texts.confirmPasswordLabel,placeholder:t.texts.confirmPasswordPlaceholder,helperText:null===(n=o.confirmPassword)||void 0===n?void 0:n.message,startAdornment:l.jsx(Oe.default,{position:"start",children:l.jsx(We.default,{})})},a))},rules:{required:t.texts.confirmPasswordRequiredText}}),l.jsx(le.default,{type:"submit",fullWidth:!0,variant:"last",children:t.texts.updatePassword})]})}))]})};Mt.propTypes={texts:ie.default.object,handleNewPassword:ie.default.func};var Gt=function(e){var t=S.useForm(),r=t.formState.errors,n=t.handleSubmit;t.register;var a=t.control;return l.jsx(fe.default,{maxWidth:"xs",variant:"auth",children:e.sent?l.jsx(ut,{style:{textAlign:"center",margin:5},children:e.emailSentText}):l.jsxs("form",{onSubmit:n(e.handleResetPassword),children:[l.jsx(S.Controller,{control:a,name:"email",render:function(t){var n,a,i=t.field;return l.jsx(ct,et({fullWidth:!0,type:"text",value:null!==(n=i.value)&&void 0!==n?n:"",label:e.texts.emailLabel,helperText:null===(a=r.email)||void 0===a?void 0:a.message,placeholder:e.texts.emailPlaceholder,startAdornment:l.jsx(Oe.default,{position:"start",children:l.jsx(Le.default,{})})},i))},rules:{required:e.texts.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:e.texts.emailInvalidText}}}),l.jsx(le.default,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.resetPassword})]})})};Gt.propTypes={texts:ie.default.object,emailSentText:ie.default.string,handleResetPassword:ie.default.func};var $t=function(e){var t=S.useForm(),r=t.formState.errors,n=t.handleSubmit,a=t.control;return l.jsxs(fe.default,{maxWidth:"xs",variant:"auth",style:{direction:"ar"===e.lang?"rtl":"ltr"},children:[e.error&&l.jsxs(de.default,{severity:"error",variant:"inContainer",children:[e.errorTitle&&l.jsx(se.default,{children:e.errorTitle}),e.errorText]}),l.jsx(S.FormProvider,et(et({},t),{},{children:l.jsxs("form",{onSubmit:n(e.handleSignUp),children:[l.jsx(S.Controller,{control:a,name:"fullName",render:function(t){var n,a,i=t.field;return l.jsx(ct,{fullWidth:!0,type:"text",value:null!==(n=i.value)&&void 0!==n?n:"",label:e.texts.fullNameLabel,placeholder:e.texts.fullNamePlaceholder,helperText:null===(a=r.fullName)||void 0===a?void 0:a.message,startAdornment:l.jsx(Oe.default,{position:"start",children:l.jsx(Ae.default,{})})})},rules:{required:e.texts.fullNameRequiredText}}),l.jsx(S.Controller,{control:a,name:"email",render:function(t){var n,a,i=t.field;return l.jsx(ct,{fullWidth:!0,type:"text",value:null!==(n=i.value)&&void 0!==n?n:"",label:e.texts.emailLabel,helperText:null===(a=r.email)||void 0===a?void 0:a.message,placeholder:e.texts.emailPlaceholder,startAdornment:l.jsx(Oe.default,{position:"start",children:l.jsx(Le.default,{})})})},rules:{required:e.texts.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:e.texts.emailInvalidText}}}),l.jsx(S.Controller,{control:a,name:"password",render:function(t){var n,a,i,o=t.field;return l.jsx(ct,et({fullWidth:!0,type:"password",defaultValue:null!==(n=o.value)&&void 0!==n?n:"",value:null!==(a=o.value)&&void 0!==a?a:"",label:e.texts.passwordLabel,placeholder:e.texts.passwordPlaceholder,helperText:null===(i=r.password)||void 0===i?void 0:i.message,startAdornment:l.jsx(Oe.default,{position:"start",children:l.jsx(We.default,{})})},o))},rules:{required:e.texts.passwordRequiredText}}),l.jsx(le.default,{fullWidth:!0,variant:"last",type:"submit",children:e.texts.signUpText})]})})),l.jsxs(xe.default,{variant:"subtitle2",style:{marginTop:5,textAlign:"center",padding:5},children:[e.texts.existingUserText," ",l.jsx("span",{onClick:e.handleRouteToSignIn,style:{cursor:"pointer",color:"blue",textAlign:"center"},children:e.texts.signInText})]}),l.jsx(Ie.default,{}),l.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[e.viaGoogle&&l.jsx(zt,{logo:"google",buttonText:e.texts.googleButtonLabel,onClick:e.handleGoogleSignUp}),e.viaGithub&&l.jsx(zt,{logo:"github",buttonText:e.texts.githubButtonLabel,onClick:e.handleGithubSignUp}),e.viaTwitter&&l.jsx(zt,{logo:"twitter",buttonText:e.texts.twitterButtonLabel,onClick:e.handleTwitterSignUp})]})]})};$t.propTypes={texts:ie.default.object,viaGoogle:ie.default.bool,viaGithub:ie.default.bool,viaTwitter:ie.default.bool,handleSignUp:ie.default.func,handleRouteToSignIn:ie.default.func,handleGoogleSignUp:ie.default.func,handleGithubSignUp:ie.default.func,handleTwitterSignUp:ie.default.func};var Ht=function(e){var t=S.useForm(),r=t.formState.errors,n=t.handleSubmit,a=t.control;return l.jsxs(fe.default,{maxWidth:"xs",variant:"auth",style:{direction:"ar"===e.lang?"rtl":"ltr"},children:[e.showError&&l.jsx(Dt,{title:e.errorTitle,text:e.errorText,severity:"error"}),l.jsxs("form",{onSubmit:n(e.handleSignIn),children:[l.jsx(S.Controller,{control:a,name:"email",render:function(t){var n,a,i=t.field;return l.jsx(ct,et({fullWidth:!0,type:"text",value:null!==(n=i.value)&&void 0!==n?n:"",label:e.texts.emailLabel,helperText:null===(a=r.email)||void 0===a?void 0:a.message,placeholder:e.texts.emailPlaceholder,startAdornment:l.jsx(Oe.default,{position:"start",children:l.jsx(Le.default,{})})},i))},rules:{required:e.texts.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:e.texts.emailInvalidText}}}),l.jsx(S.Controller,{control:a,name:"password",render:function(t){var n,a,i,o=t.field;return l.jsx(ct,et({fullWidth:!0,type:"password",defaultValue:null!==(n=o.value)&&void 0!==n?n:"",value:null!==(a=o.value)&&void 0!==a?a:"",label:e.texts.passwordLabel,placeholder:e.texts.passwordPlaceholder,helperText:null===(i=r.password)||void 0===i?void 0:i.message,startAdornment:l.jsx(Oe.default,{position:"start",children:l.jsx(We.default,{})})},o))},rules:{required:e.texts.passwordRequiredText}}),l.jsx(xe.default,{style:{cursor:"pointer",marginTop:5,width:"max-content",fontSize:15,padding:5},onClick:e.handleForgotPassword,children:e.texts.forgotPasswordText}),l.jsx(le.default,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.signInText})]}),l.jsxs(xe.default,{variant:"subtitle2",style:{marginTop:5,textAlign:"center",padding:5},children:[e.texts.newUserText," ",l.jsx("span",{onClick:e.handleRouteToSignUp,style:{cursor:"pointer",color:"blue",textAlign:"center"},children:e.texts.signUpText})]}),l.jsx(Ie.default,{}),l.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[e.viaGoogle&&l.jsx(zt,{logo:"google",buttonText:e.texts.googleButtonLabel,onClick:e.handleGoogleSignIn}),e.viaGithub&&l.jsx(zt,{logo:"github",buttonText:e.texts.githubButtonLabel,onClick:e.handleGithubSignIn}),e.viaTwitter&&l.jsx(zt,{logo:"twitter",buttonText:e.texts.twitterButtonLabel,onClick:e.handleTwitterSignIn})]})]})};Ht.propTypes={texts:ie.default.object,viaGoogle:ie.default.bool,viaGithub:ie.default.bool,viaTwitter:ie.default.bool,handleSignIn:ie.default.func,handleRouteToSignUp:ie.default.func,handleGoogleSignIn:ie.default.func,handleGithubSignIn:ie.default.func,handleTwitterSignIn:ie.default.func};var Ut=function(e){return l.jsxs(fe.default,{maxWidth:"xs",children:[l.jsx(ut,{align:"center",children:"Choose Payment Method"}),e.viaWallet&&l.jsx(zt,{logo:"wallet",buttonText:e.walletLabel,onClick:e.handleWallet}),e.viaCreditCard&&l.jsx(zt,{logo:"visa/master",buttonText:e.visaMasterLabel,onClick:e.handleCreditCard}),e.viaMada&&l.jsx(zt,{logo:"mada",buttonText:e.madaLabel,onClick:e.handleMada}),e.viaSTCPay&&l.jsx(zt,{logo:"stcpay",buttonText:e.stcPayLabel,onClick:e.handleSTCPay}),e.viaPayPal&&l.jsx(zt,{logo:"paypal",buttonText:e.paypalLabel,onClick:e.handlePayPal}),e.viaGooglePay&&l.jsx(zt,{logo:"googlepay",buttonText:e.googlePayLabel,onClick:e.handleGooglePay}),e.viaApplePay&&l.jsx(zt,{logo:"applepay",buttonText:e.applePayLabel,onClick:e.handleApplePay})]})};Ut.propTypes={viaMada:ie.default.bool,viaWallet:ie.default.bool,viaSTCPay:ie.default.bool,viaPayPal:ie.default.bool,viaApplePay:ie.default.bool,viaCreditCard:ie.default.bool,madaLabel:ie.default.string,stcPayLabel:ie.default.string,paypalLabel:ie.default.string,walletLabel:ie.default.string,applePayLabel:ie.default.string,visaMasterLabel:ie.default.string,handleMada:ie.default.func,handleWallet:ie.default.func,handleSTCPay:ie.default.func,handlePayPal:ie.default.func,handleApplePay:ie.default.func,handleCreditCard:ie.default.func};var _t=function(t){var r=lt(e.useState(0),2),n=r[0],a=r[1],i=S.useForm();i.formState.errors;var o=i.handleSubmit,s=i.control;return l.jsxs(fe.default,{maxWidth:"xs",children:[l.jsxs(xe.default,{align:"center",variant:"h2",fontWeight:500,style:{marginBottom:20},children:[Number(n).toLocaleString("en")||"0",l.jsx(xe.default,{children:t.currency||"SAR"})]}),l.jsx(S.FormProvider,et(et({},i),{},{children:l.jsxs("form",{onSubmit:o(t.handleChargeWallet),children:[l.jsx(S.Controller,{control:s,name:"amount",render:function(e){var r,n=e.field;return l.jsx(ct,et(et({fullWidth:!0,placeholder:t.texts.amountLabel,type:"number",value:null!==(r=n.value)&&void 0!==r?r:""},n),{},{inputProps:{inputMode:"numeric",min:"1",max:"9999999",step:"0.01"},onChange:function(e){n.onChange(parseFloat(e.target.value)),a(e.target.value)}}))}}),l.jsx(le.default,{type:"submit",fullWidth:!0,variant:"last",onClick:t.handleSignIn,children:t.texts.chargeWallet})]})}))]})};_t.propTypes={texts:ie.default.object,handleChargeWallet:ie.default.func};var Vt=function(e){var t,r,n,a,i,o,s,d,u,c,f="ar"===e.lang,x=S.useForm(),p=x.formState.errors,h=x.handleSubmit;x.register;var m=x.control,v={display:"flex",padding:0,paddingRight:"0px !important",paddingLeft:"0px !important",flexDirection:{xs:"column",sm:"row",md:"row",lg:"row",xl:"row"}};return l.jsxs(fe.default,{maxWidth:"sm",style:{direction:f?"rtl":"ltr"},children:[l.jsx(xe.default,{align:"center",variant:"h5",fontWeight:500,style:{marginBottom:10},children:e.texts.orderDetails}),l.jsx(Ft,{lang:e.lang,columns:["Product","Price"],rows:e.products,end:["Total",e.total]}),l.jsx(Ie.default,{variant:"middle"}),l.jsx(xe.default,{align:"center",variant:"h5",fontWeight:500,style:{marginBottom:10},children:e.texts.billingAddress}),l.jsx(S.FormProvider,et(et({},x),{},{children:l.jsxs("form",{onSubmit:h(e.handlePayNow),children:[l.jsxs(fe.default,{sx:v,children:[l.jsx(S.Controller,{control:m,name:"firstName",rules:{required:null===(t=e.texts)||void 0===t?void 0:t.required},render:function(t){var r,n,a,i=t.field;return l.jsx(ct,et({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=i.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.firstNameLabel)+" *",helperText:null===(a=p.firstName)||void 0===a?void 0:a.message},i))}}),l.jsx("div",{style:{width:20}}),l.jsx(S.Controller,{control:m,name:"lastName",rules:{required:null===(r=e.texts)||void 0===r?void 0:r.required},render:function(t){var r,n,a,i=t.field;return l.jsx(ct,et({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=i.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.lastNameLabel)+" *",helperText:null===(a=p.lastName)||void 0===a?void 0:a.message},i))}})]}),l.jsx(S.Controller,{control:m,name:"email",render:function(t){var r,n,a,i=t.field;return l.jsx(ct,et({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=i.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.emailLabel)+" *",helperText:null===(a=p.email)||void 0===a?void 0:a.message},i))},rules:{required:null===(n=e.texts)||void 0===n?void 0:n.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:null===(a=e.texts)||void 0===a?void 0:a.emailInvalidText}}}),l.jsxs(fe.default,{sx:v,children:[l.jsx(S.Controller,{control:m,name:"streetAddress",rules:{required:null===(i=e.texts)||void 0===i?void 0:i.required},render:function(t){var r,n,a,i=t.field;return l.jsx(ct,et({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=i.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.streetAddressLabel)+" *",helperText:null===(a=p.streetAddress)||void 0===a?void 0:a.message},i))}}),l.jsx("div",{style:{width:20}}),l.jsx(S.Controller,{control:m,name:"buildingNumber",rules:{required:null===(o=e.texts)||void 0===o?void 0:o.required},render:function(t){var r,n,a,i=t.field;return l.jsx(ct,et({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=i.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.buildingNumberLabel)+" *",helperText:null===(a=p.buildingNumber)||void 0===a?void 0:a.message},i))}})]}),l.jsxs(fe.default,{sx:v,children:[l.jsx(S.Controller,{control:m,name:"province",rules:{required:null===(s=e.texts)||void 0===s?void 0:s.required},render:function(t){var r,n,a,i=t.field;return l.jsx(ct,et({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=i.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.stateLabel)+" *",helperText:null===(a=p.province)||void 0===a?void 0:a.message},i))}}),l.jsx("div",{style:{width:20}}),l.jsx(S.Controller,{control:m,name:"city",rules:{required:null===(d=e.texts)||void 0===d?void 0:d.required},render:function(t){var r,n,a,i=t.field;return l.jsx(ct,et({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=i.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.cityLabel)+" *",helperText:null===(a=p.city)||void 0===a?void 0:a.message},i))}})]}),l.jsxs(fe.default,{sx:v,children:[l.jsx(S.Controller,{control:m,name:"zipCode",rules:{required:null===(u=e.texts)||void 0===u?void 0:u.required},render:function(t){var r,n,a,i=t.field;return l.jsx(ct,et({inForm:!0,fullWidth:!0,type:"number",variant:"unscrollable",value:null!==(r=i.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.zipCodeLabel)+" *",helperText:null===(a=p.zipCode)||void 0===a?void 0:a.message},i))}}),l.jsx("div",{style:{width:20}}),l.jsx(S.Controller,{control:m,name:"country",rules:{required:null===(c=e.texts)||void 0===c?void 0:c.required},render:function(t){var r,n,a,i=t.field;return l.jsxs(Et,et(et({fullWidth:!0,native:!0,label:(null===(r=e.texts)||void 0===r?void 0:r.countryLabel)+" *",variant:"standard",value:null!==(n=i.value)&&void 0!==n?n:"",helperText:null===(a=p.country)||void 0===a?void 0:a.message,displayEmpty:!0,disableUnderline:!0,validators:["required"]},i),{},{children:[l.jsx("option",{}),e.countriesList.map((function(e,t){return l.jsx("option",{children:e},t)}))]}))}})]}),l.jsx(le.default,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.payNow})]})}))]})};Vt.propTypes={texts:ie.default.object,lang:ie.default.string,countriesList:ie.default.array,products:ie.default.array,total:ie.default.string,handlePayNow:ie.default.func};var Zt=function(e){var t="ar"===e.lang;return l.jsxs("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[l.jsxs(fe.default,{maxWidth:"sm",style:{direction:t?"rtl":"ltr"},children:[l.jsx(xe.default,{align:"center",variant:"h3",fontWeight:400,style:{marginBottom:10},children:e.confirmationTitle}),l.jsx(Ie.default,{variant:"middle"}),l.jsxs(xe.default,{align:"center",variant:"body1",style:{marginBottom:10},children:[e.texts.successMessage," ",l.jsx("strong",{children:e.userEmail})]}),l.jsx(xe.default,{align:"center",variant:"body1",children:e.texts.yourOrderNumber}),l.jsx(xe.default,{align:"center",variant:"body1",fontWeight:700,style:{marginBottom:10},children:e.orderNumber}),l.jsx(Ie.default,{variant:"middle"}),e.products&&l.jsxs(l.Fragment,{children:[l.jsx(xe.default,{align:"center",variant:"h5",fontWeight:500,style:{marginBottom:10},children:e.texts.orderDetails}),l.jsx(Ft,{lang:e.lang,columns:["Product","Price"],rows:e.products,end:["Total",e.total]}),l.jsx(Ie.default,{variant:"middle"})]}),l.jsx(le.default,{onClick:e.handlePrint,variant:"contained",children:e.texts.print}),l.jsx(le.default,{onClick:e.handleHistory,variant:"last",children:e.texts.history}),l.jsx(le.default,{onClick:e.handleHome,variant:"last",children:e.texts.homePage}),l.jsx(xe.default,{align:"center",variant:"body2",style:{marginTop:10},children:e.texts.fasterPaymentNote})]}),l.jsx("a",{style:{marginTop:10,paddingTop:10,padding:5,cursor:"pointer"},onClick:e.handleRefundPolicyLink,children:l.jsx(xe.default,{align:"center",variant:"caption",fontWeight:500,children:e.texts.refundPolicy})})]})};Zt.propTypes={texts:ie.default.object,products:ie.default.array,countriesList:ie.default.array,lang:ie.default.string,total:ie.default.string,userEmail:ie.default.string,orderNumber:ie.default.string,confirmationTitle:ie.default.string,handleHome:ie.default.func,handlePrint:ie.default.func,handleHistory:ie.default.func,handleRefundPolicyLink:ie.default.func};var Xt=function(e){return{width:240,transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),overflowX:"hidden"}},Yt=function(e){return tt({transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),overflowX:"hidden",width:"calc(".concat(e.spacing(7)," + 1px)")},e.breakpoints.up("sm"),{width:"calc(".concat(e.spacing(8)," + 1px)")})},Jt=I.styled("div")((function(e){var t=e.theme;return et({display:"flex",alignItems:"center",justifyContent:"flex-end",padding:t.spacing(0,1)},t.mixins.toolbar)})),Kt=I.styled(Be.default,{shouldForwardProp:function(e){return"open"!==e}})((function(e){var t=e.theme,r=e.open;return et({zIndex:t.zIndex.drawer+1,transition:t.transitions.create(["width","margin"],{easing:t.transitions.easing.sharp,duration:t.transitions.duration.leavingScreen})},r&&{marginLeft:240,width:"calc(100% - ".concat(240,"px)"),transition:t.transitions.create(["width","margin"],{easing:t.transitions.easing.sharp,duration:t.transitions.duration.enteringScreen})})})),Qt=I.styled(Re.default,{shouldForwardProp:function(e){return"open"!==e}})((function(e){var t=e.theme,r=e.open;return et(et({width:240,flexShrink:0,whiteSpace:"nowrap",boxSizing:"border-box"},r&&et(et({},Xt(t)),{},{"& .MuiDrawer-paper":Xt(t)})),!r&&et(et({},Yt(t)),{},{"& .MuiDrawer-paper":Yt(t)}))}));var er=["children","onClose","hideClose"],tr=function(e){var t=e.children,r=e.onClose,n=e.hideClose,a=rt(e,er);return l.jsxs(Ke.default,et(et({sx:{m:0,p:2}},a),{},{children:[t,n?null:l.jsx(De.default,{"aria-label":"close",onClick:r,sx:{position:"absolute",right:8,top:8,color:function(e){return e.palette.grey[500]}},children:l.jsx(Ze.default,{})})]}))};var rr=function(e){var t=Q.useTheme();return l.jsx(Q.Menu,{sx:{mt:"45px"},id:"menu-appbar",anchorEl:e.anchor,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(e.anchor),onClose:e.handleClose,variant:"themed",PaperProps:{style:{boxShadow:"none",borderRadius:t.allBorderRadius,border:"1px solid ".concat(t.primaryActionColor)}},children:e.menuItems.map((function(e){return l.jsxs(Q.MenuItem,{onClick:e.action,children:[e.icon&&l.jsx(e.icon,{}),l.jsx("div",{style:{width:10}}),l.jsx(Q.Typography,{textAlign:"center",children:e.label})]},e.label)}))})};rr.propTypes={handleClose:ie.default.func,menuItems:ie.default.array};var nr=["Products","Pricing","Blog"];exports.ActionButton=function(e){return l.jsx(le.default,et(et({},e),{},{children:e.text}))},exports.AdaptiveButton=it,exports.Box=function(e){return l.jsx("div",{children:e.children})},exports.ChargeWalletForm=_t,exports.CheckoutForm=Vt,exports.ConfirmationPage=Zt,exports.CreditCardForm=function(e){var t,r=S.useForm(),n=r.formState.errors,a=r.handleSubmit,i=r.control;return l.jsx(fe.default,{maxWidth:"xs",children:l.jsxs("form",{onSubmit:a(e.handle),children:[l.jsx(ct,{fullWidth:!0,name:"password",placeholder:"Enter password",type:"tel",label:"Card Number",rules:{required:"Password is rquired"},helperText:null===(t=n.password)||void 0===t?void 0:t.message}),l.jsx(S.Controller,{control:i,name:"cardName",render:function(e){var t;return e.field,l.jsx(ct,{fullWidth:!0,name:"password",placeholder:"Enter password",type:"password",label:"Name On Card",rules:{required:"Password is rquired"},helperText:null===(t=n.password)||void 0===t?void 0:t.message})}}),l.jsx(S.Controller,{control:i,name:"cardName",render:function(e){var t;return e.field,l.jsx(ct,{fullWidth:!0,name:"password",placeholder:"Enter password",type:"password",label:"Expiry Date",rules:{required:"Password is rquired"},helperText:null===(t=n.password)||void 0===t?void 0:t.message})}}),l.jsx(S.Controller,{control:i,name:"cardName",render:function(e){var t;return e.field,l.jsx(ct,{fullWidth:!0,name:"password",placeholder:"Enter password",type:"password",label:"CCV",rules:{required:"Password is rquired"},helperText:null===(t=n.password)||void 0===t?void 0:t.message})}}),l.jsx(le.default,{type:"submit",fullWidth:!0,variant:"last",onClick:e.handlePayWithCreditCard,children:"Pay with Credit Card"})]})})},exports.HawaAlert=Dt,exports.HawaAppBar=function(e){var t=Q.useTheme(),r=lt(re.default.useState(null),2),n=r[0],a=r[1],i=lt(re.default.useState(null),2),o=i[0],s=i[1],d=function(){a(null)};return console.log("theme is ",t),l.jsx(Be.default,{position:"static",variant:"appbar",children:l.jsx(fe.default,{maxWidth:"xl",variant:"appbar",children:l.jsxs(ze.default,{disableGutters:!0,children:[l.jsx(xe.default,{variant:"h6",noWrap:!0,component:"div",sx:{mr:2,display:{xs:"none",md:"flex"}},children:"LOGO"}),l.jsxs(Ne.default,{sx:{flexGrow:1,display:{xs:"flex",md:"none"}},children:[l.jsx(De.default,{size:"large","aria-label":"account of current user","aria-controls":"menu-appbar","aria-haspopup":"true",onClick:e.handleOpenSideMenu,color:"inherit",children:l.jsx(Fe.default,{})}),l.jsx(Ue.default,{id:"menu-appbar",anchorEl:n,anchorOrigin:{vertical:"bottom",horizontal:"left"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"left"},open:Boolean(n),onClose:d,sx:{display:{xs:"block",md:"none"}},children:nr.map((function(e){return l.jsx(Ve.default,{onClick:d,children:l.jsx(xe.default,{textAlign:"center",children:e})},e)}))})]}),l.jsx(xe.default,{variant:"h6",noWrap:!0,component:"div",sx:{flexGrow:1,display:{xs:"flex",md:"none"}},children:"LOGO"}),l.jsx(Ne.default,{sx:{flexGrow:1,display:{xs:"none",md:"flex"}},children:nr.map((function(e){return l.jsx(le.default,{onClick:d,sx:{my:2,display:"block"},children:e},e)}))}),l.jsxs(Ne.default,{sx:{flexGrow:0},children:[l.jsx(ae.default,{title:"Open settings",children:l.jsx(De.default,{onClick:function(e){s(e.currentTarget)},sx:{p:0},children:l.jsx(_e.default,{alt:"Remy Sharp",src:"/static/images/avatar/2.jpg"})})}),l.jsx(rr,{anchor:o,handleClose:function(e){return s(null)},menuItems:e.accountMenu})]})]})})})},exports.HawaAppLayout=function(e){var t=I.useTheme(),r=lt(re.default.useState(!0),2),n=r[0],a=r[1],i=lt(re.default.useState(null),2);i[0],i[1];var o=lt(re.default.useState(null),2),s=o[0],d=o[1];return l.jsxs(Ne.default,{sx:{display:"flex"},children:[l.jsx(Kt,{variant:"appbar",position:"fixed",open:n,children:l.jsxs(ze.default,{variant:"appbar",children:[l.jsx(De.default,{color:"inherit","aria-label":"open drawer",onClick:function(){a(!0)},edge:"start",sx:et({marginRight:5},n&&{display:"none"}),children:l.jsx(Fe.default,{})}),l.jsxs("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",width:"100%",margin:0},children:[l.jsx(xe.default,{variant:"h6",noWrap:!0,component:"div",children:e.pageTitle}),l.jsxs(Ne.default,{children:[l.jsx(ae.default,{title:"Open settings",children:l.jsx(De.default,{onClick:function(e){d(e.currentTarget)},sx:{p:0},children:l.jsx(_e.default,{alt:"Remy Sharp",src:"/static/images/avatar/2.jpg"})})}),l.jsx(Ue.default,{sx:{mt:"45px"},id:"menu-appbar",anchorEl:s,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(s),onClose:function(){d(null)},variant:"themed",PaperProps:{style:{boxShadow:"none",borderRadius:t.allBorderRadius,border:"1px solid ".concat(t.primaryActionColor)}},children:e.accountMenu.map((function(e){return l.jsxs(Ve.default,{onClick:e.action,children:[e.icon&&l.jsx(e.icon,{}),l.jsx(xe.default,{textAlign:"center",children:e.label})]},e.label)}))})]})]})]})}),l.jsxs(Qt,{variant:"permanent",open:n,children:[l.jsxs(Jt,{children:[e.logo,l.jsx(De.default,{onClick:function(){a(!1)},children:"rtl"===t.direction?l.jsx(Ge.default,{}):l.jsx(Me.default,{})})]}),l.jsx(Ie.default,{}),l.jsx(Ee.default,{children:e.pages.map((function(t,r){var a,i;return l.jsx(ae.default,{title:t.text,placement:"right",arrow:!0,PopperProps:{style:{opacity:n?0:1}},children:l.jsxs($e.default,{variant:(null===(a=e.pageName)||void 0===a?void 0:a.toLowerCase())===(null===(i=t.slug)||void 0===i?void 0:i.toLowerCase())&&"clicked",onClick:t.action,sx:{minHeight:48,justifyContent:n?"initial":"center",px:2.5},children:[l.jsx(t.icon,{}),l.jsx("div",{style:{width:20}}),l.jsx(He.default,{primary:t.text,sx:{opacity:n?1:0}})]},t.text)},r)}))})]}),l.jsxs(Ne.default,{sx:{flexGrow:1,p:3},children:[l.jsx(Jt,{}),e.children]})]})},exports.HawaButton=function(e){return l.jsx(le.default,et(et({},e),{},{children:e.children}))},exports.HawaCheckbox=function(e){return console.log("props : ",e),l.jsx(re.default.Fragment,{children:l.jsx(ue.default,{label:e.label,control:l.jsx(ce.default,{style:{color:e.color||null},defaultChecked:e.defaultValue})})})},exports.HawaColorPicker=Rt,exports.HawaDialog=function(t){var r=lt(e.useState(!1),2);return r[0],r[1],l.jsxs(Xe.default,et(et({},t),{},{variant:"main",children:[l.jsx(tr,{onClose:t.onClose,hideClose:t.hideClose,children:t.title}),l.jsx(Je.default,{children:t.children}),l.jsx(Ye.default,{children:t.actions})]}))},exports.HawaInputLabel=function(e){return l.jsx(me.default,{children:l.jsx("div",{style:{fontSize:15},children:e.label})})},exports.HawaItemCard=st,exports.HawaLogoButton=zt,exports.HawaPricingCard=dt,exports.HawaRadio=ot,exports.HawaSelect=Et,exports.HawaSettingsRow=Bt,exports.HawaTable=Ft,exports.HawaTextArea=function(e){var t=Wt();return console.log("theme is ",t),l.jsx("label",{children:l.jsx("textarea",{style:{color:"black",backgroundColor:e.bgColor||"white",borderBottom:"none",border:"none",width:"100%",padding:0,margin:0,marginBottom:0,resize:e.resize||"vertical"}})})},exports.HawaTextField=ct,exports.HawaTypography=ut,exports.NewPasswordForm=Mt,exports.OfflineBanner=function(e){return l.jsx(oe.default,{variant:"danger",open:e.open,onClose:e.handleClose,children:l.jsxs(de.default,{icon:!1,severity:"error",variant:"offline",children:[e.title&&l.jsx(se.default,{children:e.title}),e.text]})})},exports.PayWithWallet=function(e){return l.jsxs(fe.default,{maxWidth:"xs",children:[l.jsx(xe.default,{align:"center",children:"Wallet Balance"}),l.jsxs(xe.default,{align:"center",variant:"h1",children:[e.walletBalance||"0",l.jsx(xe.default,{children:e.currency||"SAR"})]}),l.jsx(le.default,{type:"submit",fullWidth:!0,variant:"last",onClick:e.handlePayWithWallet,children:"Pay Now"})]})},exports.ResetPasswordForm=Gt,exports.SelectPayment=Ut,exports.SignInForm=Ht,exports.SignUpForm=$t,exports.UserProfileForm=function(e){var t=S.useForm(),r=t.formState.errors,n=t.handleSubmit,a=t.control;return l.jsx(fe.default,{maxWidth:"sm",children:l.jsx(S.FormProvider,et(et({},t),{},{children:l.jsxs("form",{onSubmit:n(e.handleUpdateProfile),children:[l.jsx(S.Controller,{control:a,name:"fullName",render:function(t){var n,a,i=t.field;return l.jsx(ct,et({fullWidth:!0,type:"text",value:null!==(n=i.value)&&void 0!==n?n:"",label:e.texts.fullNameLabel,placeholder:e.texts.fullNamePlaceholder,helperText:null===(a=r.fullName)||void 0===a?void 0:a.message},i))}}),l.jsx(S.Controller,{control:a,name:"phoneNumber",render:function(e){var t=e.field;return l.jsx(ct,et({fullWidth:!0,type:"tel",label:"Phone Number",placeholder:"+966"},t))}}),l.jsx(S.Controller,{control:a,name:"email",render:function(t){var n,a,i=t.field;return l.jsx(ct,et({fullWidth:!0,type:"text",value:null!==(n=i.value)&&void 0!==n?n:"",label:e.texts.emailLabel,helperText:null===(a=r.email)||void 0===a?void 0:a.message,placeholder:e.texts.emailPlaceholder},i))},rules:{required:e.texts.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:e.texts.emailInvalidText}}}),l.jsx(S.Controller,{control:a,name:"password",render:function(t){var n,a,i=t.field;return l.jsx(ct,et({fullWidth:!0,type:"password",value:null!==(n=i.value)&&void 0!==n?n:"",label:e.texts.passwordLabel,placeholder:e.texts.passwordPlaceholder,helperText:null===(a=r.password)||void 0===a?void 0:a.message},i))},rules:{required:e.texts.passwordRequiredText}}),l.jsx(S.Controller,{control:a,name:"confirmPassword",render:function(t){var n,a,i=t.field;return l.jsx(ct,et({fullWidth:!0,type:"password",value:null!==(n=i.value)&&void 0!==n?n:"",label:e.texts.confirmPasswordLabel,placeholder:e.texts.confirmPasswordPlaceholder,helperText:null===(a=r.confirmPassword)||void 0===a?void 0:a.message},i))},rules:{required:e.texts.confirmPasswordRequiredText}}),l.jsx(le.default,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.updateProfile})]})}))})},exports.UserSettingsForm=function(e){return l.jsxs(fe.default,{maxWidth:"sm",children:[e.children,l.jsx(le.default,{type:"submit",fullWidth:!0,variant:"last",onClick:e.handleSaveSettings,children:e.saveSettingsText})]})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("@mui/material/Button"),r=require("@mui/material/Tooltip"),a=require("prop-types"),l=require("react/jsx-runtime"),n=require("@mui/material/Snackbar"),i=require("@mui/material/AlertTitle"),o=require("@mui/material/Alert"),s=require("@mui/material/FormControlLabel"),d=require("@mui/material/Checkbox"),u=require("@mui/material/Container"),c=require("@mui/material/Typography"),f=require("@mui/icons-material/CheckCircleOutlined"),x=require("@mui/material/Chip"),p=require("@mui/material/Input"),h=require("@mui/material/InputLabel"),m=require("@mui/material/Switch"),g=require("@emotion/styled"),v=require("@mui/material/Slider"),b=require("@mui/material/Stack"),y=require("@mui/icons-material/GitHub"),j=require("@mui/icons-material/Twitter"),w=require("@mui/icons-material/AccountBalanceWallet"),T=require("@mui/material/Select"),C=require("@mui/material/Table"),P=require("@mui/material/TableBody"),q=require("@mui/material/TableCell"),k=require("@mui/material/TableContainer"),L=require("@mui/material/TableHead"),S=require("@mui/material/TableRow"),O=require("@mui/material"),W=require("@mui/icons-material"),A=require("@mui/icons-material/ExpandMore"),N=require("@mui/material/Accordion"),I=require("@mui/material/AccordionSummary"),R=require("@mui/material/AccordionDetails"),B=require("react-hook-form"),E=require("@mui/material/InputAdornment"),z=require("@mui/icons-material/HttpsOutlined"),D=require("@mui/icons-material/MailOutline"),F=require("@mui/icons-material/PermIdentityOutlined"),M=require("@mui/material/Divider"),U=require("@mui/material/styles"),H=require("@mui/material/Box"),G=require("@mui/material/Drawer"),$=require("@mui/material/AppBar"),_=require("@mui/material/Toolbar"),V=require("@mui/material/List"),Z=require("@mui/material/IconButton"),X=require("@mui/icons-material/Menu"),Y=require("@mui/icons-material/ChevronLeft"),J=require("@mui/icons-material/ChevronRight"),Q=require("@mui/material/ListItemButton"),K=require("@mui/material/ListItemText"),ee=require("@mui/material/Avatar"),te=require("@mui/material/useMediaQuery"),re=require("@mui/icons-material/Close"),ae=require("@mui/material/Dialog"),le=require("@mui/material/DialogActions"),ne=require("@mui/material/DialogContent"),ie=require("@mui/material/DialogTitle"),oe=require("@mui/material/Menu"),se=require("@mui/material/MenuItem");function de(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function ue(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var ce=de(e),fe=ue(e),xe=de(t),pe=de(r),he=de(a),me=de(n),ge=de(i),ve=de(o),be=de(s),ye=de(d),je=de(u),we=de(c),Te=de(f),Ce=de(x),Pe=de(p),qe=de(h),ke=de(m),Le=de(g),Se=de(v),Oe=de(b),We=de(y),Ae=de(j),Ne=de(w),Ie=de(T),Re=de(C),Be=de(P),Ee=de(q),ze=de(k),De=de(L),Fe=de(S),Me=de(A),Ue=de(N),He=de(I),Ge=de(R),$e=de(E),_e=de(z),Ve=de(D),Ze=de(F),Xe=de(M),Ye=de(H),Je=de(G),Qe=de($),Ke=de(_),et=de(V),tt=de(Z),rt=de(X),at=de(Y),lt=de(J),nt=de(Q),it=de(K),ot=de(ee),st=de(te),dt=de(re),ut=de(ae),ct=de(le),ft=de(ne),xt=de(ie),pt=de(oe),ht=de(se);function mt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function gt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?mt(Object(r),!0).forEach((function(t){vt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function vt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function bt(e,t){if(null==e)return{};var r,a,l=function(e,t){if(null==e)return{};var r,a,l={},n=Object.keys(e);for(a=0;a<n.length;a++)r=n[a],t.indexOf(r)>=0||(l[r]=e[r]);return l}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(a=0;a<n.length;a++)r=n[a],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(l[r]=e[r])}return l}function yt(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function jt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var a,l,n=[],i=!0,o=!1;try{for(r=r.call(e);!(i=(a=r.next()).done)&&(n.push(a.value),!t||n.length!==t);i=!0);}catch(e){o=!0,l=e}finally{try{i||null==r.return||r.return()}finally{if(o)throw l}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return wt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return wt(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function wt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}var Tt=function(e){return e.showText?l.jsxs(xe.default,{variant:"adaptive-dark",onClick:e.onClick,children:[e.icon,l.jsx("div",{style:{width:10}}),e.buttonText]}):l.jsx(pe.default,{title:e.buttonText,placement:"top",children:l.jsx(xe.default,{variant:"adaptive-dark",onClick:e.onClick,children:e.icon})})};Tt.propTypes={buttonText:he.default.string,onClick:he.default.func,showText:he.default.bool};var Ct=function(t){var r=jt(e.useState(t.defaultValue),2),a=r[0],n=r[1];return l.jsx(je.default,{variant:t.location||"panelTabs",children:t.options.map((function(e,r){var i;return l.jsx(xe.default,{onClick:function(){t.handleChange(e.value),n(e.value)},fullWidth:!0,variant:(null==a?void 0:a.toLowerCase())===(null===(i=e.value)||void 0===i?void 0:i.toLowerCase())?"selected":"unselected",children:e.label},r)}))})};Ct.propTypes={lang:he.default.string,options:he.default.arrayOf(he.default.shape({label:he.default.string,value:he.default.string})),defaultValue:he.default.string,handleChange:he.default.func,location:he.default.string};var Pt=function(e){var t="ar"===e.lang;return l.jsxs(je.default,{onClick:function(t){t.stopPropagation(),e.onCardClick()},maxWidth:"xs",variant:"card-container",dataValue:"parent",style:{direction:t?"rtl":"ltr"},children:[e.header&&l.jsxs(je.default,{style:{zIndex:20},variant:"card-header",children:[e.headerActions&&l.jsx("div",{style:{margin:0,marginRight:-20,marginLeft:-20,marginBottom:-20,display:"flex",paddingTop:5,paddingLeft:5,paddingRight:5,justifyContent:"flex-end"},children:e.headerActions}),e.header]}),e.content&&l.jsx(je.default,{style:{zIndex:20},variant:"card-content",children:e.content}),e.actions&&l.jsx(je.default,{style:{zIndex:20},variant:"card-actions",children:e.actions})]})};Pt.propTypes={lang:he.default.string,onCardClick:he.default.func};var qt=function(e){var t,r,a="ar"===e.lang,n={monthly:"شهرياً","3-months":"كل 3 أشهر","6-months":"كل 6 أشهر",annually:"سنوياً"},i={monthly:"Monthly","3-months":"3 Months","6-months":"6 Months",annually:"Annually"},o={usd:a?"دولار":"$",sar:a?"ريال":"SAR"},s=a?e.features_ar:e.features,d=a?{left:10}:{right:10};return l.jsxs(je.default,{maxWidth:"xs",variant:e.selectedPlan?"selected-plan-card":"plan-card",style:{direction:a?"rtl":"ltr"},children:[l.jsxs(je.default,{variant:"plan-header",children:[e.discount&&l.jsx(Ce.default,{label:e.discount,variant:"standard",style:gt({maxWidth:"fit-content",position:"absolute",bottom:10},d),color:"success"}),l.jsx(we.default,{variant:"h3",fontWeight:500,children:a?e.title_ar:e.title}),l.jsx(we.default,{variant:"caption",children:a?e.subtitle_ar:e.subtitle}),l.jsx("br",{}),l.jsx(we.default,{variant:"h4",fontWeight:500,style:{display:"flex",alignItems:"center"},children:"ar"===e.lang?l.jsxs("div",{style:{width:"100%",display:"flex",flexDirection:"column",justifyContent:"center"},children:[l.jsxs("div",{style:{display:"flex",flexDirection:"row"},children:[e.price,l.jsx("div",{style:{width:5}}),l.jsx(we.default,{children:o[null===(t=e.currency)||void 0===t?void 0:t.toLowerCase()]})]}),l.jsx(we.default,{style:{fontSize:14,margin:5},children:a?n[e.cycleText]:i[e.cycleText]})]}):l.jsxs("div",{style:{width:"100%",display:"flex",flexDirection:"column",justifyContent:"center"},children:[l.jsxs("div",{style:{display:"flex",flexDirection:"row"},children:[l.jsx(we.default,{children:o[null===(r=e.currency)||void 0===r?void 0:r.toLowerCase()]}),l.jsx("div",{style:{width:5}}),e.price]}),l.jsx(we.default,{style:{fontSize:14,margin:5},children:"ar"===e.lang?n[e.cycleText]:i[e.cycleText]})]})})]}),l.jsx("div",{style:{padding:20,color:e.selectedPlan?"white":"black"},children:null==s?void 0:s.map((function(e){return l.jsxs("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start",marginTop:10,width:"100%"},children:[l.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",width:"10%"},children:l.jsx(Te.default,{fontSize:"small"})}),l.jsx("div",{style:{width:10}}),l.jsx(we.default,{variant:"subtitle2",children:e})]})}))}),l.jsx(xe.default,{onClick:e.selectPlan,variant:e.selectedPlan?"outlined":"contained",style:{margin:20},children:e.buttonText})]})};qt.propTypes={lang:he.default.string,buttonText:he.default.string,selectedPlan:he.default.string,title:he.default.string,title_ar:he.default.string,subtitle:he.default.string,subtitle_ar:he.default.string,features:he.default.array,features_ar:he.default.array,currency:he.default.oneOf(["sar","usd"]),cycleText:he.default.oneOf(["monthly","3-months","6-months","annually"])};var kt=function(e){return l.jsx(we.default,gt(gt({},e),{},{children:e.children}))},Lt=function(e){return l.jsx("div",{style:e.inForm&&{width:"100%"},children:l.jsxs("div",{style:{width:e.fullWidth?"100%":"fit-content"},children:[l.jsxs("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[e.label&&l.jsx(qe.default,{children:e.label}),e.helperText&&l.jsx(we.default,{style:{marginBottom:!e.label&&10},variant:"validation",children:e.helperText})]}),l.jsx(Pe.default,gt({disableUnderline:!0},e))]})})},St=function(e){return l.jsx(ke.default,gt({},e))};var Ot="production"!==process.env.NODE_ENV?he.default.oneOfType([he.default.number,he.default.string,he.default.object,he.default.array]):{};function Wt(){return Wt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},Wt.apply(this,arguments)}function At(e){return null!==e&&"object"==typeof e&&e.constructor===Object}function Nt(e,t,r={clone:!0}){const a=r.clone?Wt({},e):e;return At(e)&&At(t)&&Object.keys(t).forEach((l=>{"__proto__"!==l&&(At(t[l])&&l in e&&At(e[l])?a[l]=Nt(e[l],t[l],r):a[l]=t[l])})),a}const It=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Rt=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Bt=[...It,...Rt];function Et(e){return function(e,t,r,a){const l=(n=e,((i=t)&&"string"==typeof i?i.split(".").reduce(((e,t)=>e&&e[t]?e[t]:null),n):null)||r);var n,i;return"number"==typeof l?e=>"string"==typeof e?e:("production"!==process.env.NODE_ENV&&"number"!=typeof e&&console.error(`MUI: Expected ${a} argument to be a number or a string, got ${e}.`),l*e):Array.isArray(l)?e=>"string"==typeof e?e:("production"!==process.env.NODE_ENV&&(Number.isInteger(e)?e>l.length-1&&console.error([`MUI: The value provided (${e}) overflows.`,`The supported values are: ${JSON.stringify(l)}.`,`${e} > ${l.length-1}, you need to add the missing values.`].join("\n")):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join("\n"))),l[e]):"function"==typeof l?l:("production"!==process.env.NODE_ENV&&console.error([`MUI: The \`theme.${t}\` value (${l}) is invalid.`,"It should be a number, an array or a function."].join("\n")),()=>{})}(e,"spacing",8,"spacing")}function zt(e,t){if(null==e)return{};var r,a,l={},n=Object.keys(e);for(a=0;a<n.length;a++)r=n[a],t.indexOf(r)>=0||(l[r]=e[r]);return l}"production"===process.env.NODE_ENV||It.reduce(((e,t)=>(e[t]=Ot,e)),{}),"production"===process.env.NODE_ENV||Rt.reduce(((e,t)=>(e[t]=Ot,e)),{}),"production"===process.env.NODE_ENV||Bt.reduce(((e,t)=>(e[t]=Ot,e)),{});const Dt=["values","unit","step"];function Ft(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:a=5}=e,l=zt(e,Dt),n=(e=>{const t=Object.keys(e).map((t=>({key:t,val:e[t]})))||[];return t.sort(((e,t)=>e.val-t.val)),t.reduce(((e,t)=>Wt({},e,{[t.key]:t.val})),{})})(t),i=Object.keys(n);function o(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${r})`}function s(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-a/100}${r})`}function d(e,l){const n=i.indexOf(l);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${r}) and (max-width:${(-1!==n&&"number"==typeof t[i[n]]?t[i[n]]:l)-a/100}${r})`}return Wt({keys:i,values:n,up:o,down:s,between:d,only:function(e){return i.indexOf(e)+1<i.length?d(e,i[i.indexOf(e)+1]):o(e)},not:function(e){const t=i.indexOf(e);return 0===t?o(i[1]):t===i.length-1?s(i[t]):d(e,i[i.indexOf(e)+1]).replace("@media","@media not all and")},unit:r},l)}var Mt={borderRadius:4};const Ut=["breakpoints","palette","spacing","shape"];const Ht=fe.createContext(null);"production"!==process.env.NODE_ENV&&(Ht.displayName="ThemeContext");var Gt=Ht;function $t(e=null){const t=function(){const e=fe.useContext(Gt);return"production"!==process.env.NODE_ENV&&fe.useDebugValue(e),e}();return t&&(r=t,0!==Object.keys(r).length)?t:e;var r}const _t=function(e={},...t){const{breakpoints:r={},palette:a={},spacing:l,shape:n={}}=e,i=zt(e,Ut),o=Ft(r),s=function(e=8){if(e.mui)return e;const t=Et({spacing:e}),r=(...e)=>("production"!==process.env.NODE_ENV&&(e.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${e.length}`)),(0===e.length?[1]:e).map((e=>{const r=t(e);return"number"==typeof r?`${r}px`:r})).join(" "));return r.mui=!0,r}(l);let d=Nt({breakpoints:o,direction:"ltr",components:{},palette:Wt({mode:"light"},a),spacing:s,shape:Wt({},Mt,n)},i);return d=t.reduce(((e,t)=>Nt(e,t)),d),d}();function Vt(e=_t){return $t(e)}var Zt,Xt,Yt=Le.default.input(Zt||(Zt=yt(["\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n border: none;\n cursor: pointer;\n height: 35px;\n border-radius: ","px;\n background-color: ",";\n &::-webkit-color-swatch {\n border: none;\n }\n &::-moz-color-swatch {\n border: none;\n }\n"])),(function(e){return e.borderRadius}),(function(e){return e.value})),Jt=Le.default.input(Xt||(Xt=yt(["\n max-width: 70px;\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n border: none;\n // height: 30px;\n padding: 10px;\n border-radius: ","px;\n &::-webkit-color-swatch {\n border: none;\n }\n &::-moz-color-swatch {\n border: none;\n }\n"])),(function(e){return e.borderRadius})),Qt=function(e){var t=Vt();return l.jsxs("div",{style:{display:"flex",flexDirection:"row"},children:[l.jsx(Jt,{type:"text",value:e.color,borderRadius:t.allBorderRadius,onChange:e.handleChange}),l.jsx("div",{style:{width:10}}),l.jsx(Yt,{type:"color",value:e.color,onChange:e.handleChange,borderRadius:t.allBorderRadius})]})};Qt.propTypes={color:he.default.string,handleChange:he.default.func};var Kt=function(e){return l.jsxs(Oe.default,{spacing:2,direction:"row",alignItems:"center",style:e.style,children:[e.startElement,l.jsx(Se.default,{size:"small","aria-label":"Volume",value:e.value,onChange:e.handleChange}),e.endElement]})};Kt.propTypes={startElement:he.default.element,endElement:he.default.element,handleChange:he.default.func};var er=function(e){return l.jsxs(je.default,{variant:"settingsRow",children:[l.jsx(kt,{children:e.settingsLabel}),"checkbox"===e.settingsType&&l.jsx(ye.default,gt({},e)),"text"===e.settingsType&&l.jsx(Lt,gt({},e)),"boolean"===e.settingsType&&l.jsx(St,gt({},e)),"range"===e.settingsType&&l.jsx(Kt,gt({},e)),"color"===e.settingsType&&l.jsx(Qt,gt({},e)),"radio"===e.settingsType&&l.jsx(Ct,gt({location:"inSettings"},e))]})};er.propTypes={settingsLabel:he.default.string,settingsType:he.default.oneOf(["checkbox","text","radio","boolean","color"])};var tr=function(e){var t,r="ar"===e.lang,a="";switch(null===(t=e.logo)||void 0===t?void 0:t.toLowerCase()){case"google":a=l.jsx("img",{src:"https://upload.wikimedia.org/wikipedia/commons/5/53/Google_%22G%22_Logo.svg"});break;case"github":a=l.jsx(We.default,{});break;case"twitter":a=l.jsx(Ae.default,{});break;case"mada":a=l.jsx("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/mada.png",height:20});break;case"stcpay":a=l.jsx("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/stc-pay.png",height:20});break;case"visa/master":a=l.jsx("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/visa-master.png",height:30});break;case"paypal":a=l.jsx("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/paypal.png",height:25});break;case"googlepay":a=l.jsx("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/google-pay.png",height:20});break;case"applepay":a=l.jsx("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/apple-pay.png",height:40});break;case"wallet":a=l.jsx(Ne.default,{})}return l.jsxs(xe.default,gt(gt({style:{direction:r?"rtl":"ltr"}},e),{},{variant:"withLogo",children:[a,l.jsx("div",{style:{width:10}}),l.jsx(we.default,{style:{color:"black",fontSize:14,textAlign:"center",letterSpacing:.4,fontFamily:"Roboto",fontWeight:500},children:e.buttonText})]}))};tr.propTypes={lang:he.default.string,logo:he.default.oneOf(["google","github","twitter","wallet","googlepay","applepay","stcpay","visa/master","paypal","mada"]),buttonText:he.default.string};var rr=function(e){return l.jsxs("div",{style:{width:"100%"},children:[l.jsxs("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[l.jsx(qe.default,{children:e.label}),e.helperText&&l.jsx(we.default,{variant:"validation",children:e.helperText})]}),l.jsx(Ie.default,gt(gt({},e),{},{children:e.children}))]})},ar=function(e){return l.jsxs(ve.default,{severity:e.severity,icon:e.hideIcon,children:[e.title&&l.jsx(ge.default,{children:e.title}),e.text]})};ar.propTypes={severity:he.default.oneOf(["error","info","success","warning"]),title:he.default.string,text:he.default.string,hideIcon:he.default.bool};var lr=function(e){var t="ar"===e.lang;return l.jsx(ze.default,{style:{direction:t?"rtl":"ltr"},children:l.jsxs(Re.default,{"aria-label":"a dense table",children:[l.jsx(De.default,{children:l.jsxs(Fe.default,{children:[e.columns.map((function(e,r){return l.jsx(Ee.default,{align:t?"right":"left",style:{fontWeight:700},variant:r>0?t?"borderedRight":"borderedLeft":"body",children:e},r)})),e.actions&&l.jsx(Ee.default,{align:t?"right":"left",style:{fontWeight:700},variant:t?"borderedRight":"borderedLeft",children:"Actions"})]})}),l.jsx(Be.default,{children:e.rows?e.rows.map((function(r,a){return l.jsxs(Fe.default,{children:[r.map((function(e,r){return l.jsx(Ee.default,{align:t?"right":"left",component:"th",scope:"row",variant:r>0?t?"borderedRight":"borderedLeft":"body",children:e},r)})),e.actions&&l.jsx(Ee.default,{align:t?"right":"left",style:{fontWeight:700},variant:t?"borderedRight":"borderedLeft",children:e.actions.map((function(t){return l.jsx(O.Button,{style:{margin:2},variant:"outlined",size:"small",onClick:function(){return e.handleActionClick(r)},children:t})}))})]},a)})):l.jsx(Fe.default,{align:"center",children:l.jsx(Ee.default,{align:"center",component:"th",colSpan:6,children:e.noDataText})})}),e.end&&l.jsx(Fe.default,{children:e.end.map((function(e,r){return l.jsx(Ee.default,{align:t?"right":"left",style:{fontWeight:700},component:"th",scope:"row",variant:r>0?t?"borderedRight":"borderedLeft":"body",children:e},r)}))})]})})};lr.propTypes={handleActionClick:he.default.func,noDataText:he.default.string,lang:he.default.string,columns:he.default.array,rows:he.default.array,end:he.default.array};var nr=function(e){return l.jsxs(Ue.default,{elevation:0,children:[l.jsx(He.default,{expandIcon:l.jsx(Me.default,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:l.jsx(we.default,{children:e.title})}),l.jsx(Ge.default,{children:l.jsxs(we.default,{children:[e.content," "]})})]})};nr.propTypes={title:he.default.string,content:he.default.string};var ir=function(t){var r=jt(e.useState(!1),2),a=r[0],n=r[1],i=B.useForm(),o=i.formState.errors,s=i.handleSubmit,d=i.control;return l.jsxs(je.default,{maxWidth:"xs",variant:"auth",children:[a&&l.jsx(ar,{text:t.texts.passwordMatchError,severity:"error"}),t.passwordChanged?l.jsx(kt,{style:{textAlign:"center",margin:5},children:t.texts.passwordChanged}):l.jsx(B.FormProvider,gt(gt({},i),{},{children:l.jsxs("form",{onSubmit:s((function(e){console.log("handling subb",e),e.password===e.confirmPassword?t.handleNewPassword():n(!0)})),children:[l.jsx(B.Controller,{control:d,name:"password",render:function(e){var r,a,n=e.field;return l.jsx(Lt,gt({fullWidth:!0,type:"password",value:null!==(r=n.value)&&void 0!==r?r:"",label:t.texts.passwordLabel,placeholder:t.texts.passwordPlaceholder,helperText:null===(a=o.password)||void 0===a?void 0:a.message,startAdornment:l.jsx($e.default,{position:"start",children:l.jsx(_e.default,{})})},n))},rules:{required:t.texts.passwordRequiredText}}),l.jsx(B.Controller,{control:d,name:"confirmPassword",render:function(e){var r,a,n=e.field;return l.jsx(Lt,gt({fullWidth:!0,type:"password",value:null!==(r=n.value)&&void 0!==r?r:"",label:t.texts.confirmPasswordLabel,placeholder:t.texts.confirmPasswordPlaceholder,helperText:null===(a=o.confirmPassword)||void 0===a?void 0:a.message,startAdornment:l.jsx($e.default,{position:"start",children:l.jsx(_e.default,{})})},n))},rules:{required:t.texts.confirmPasswordRequiredText}}),l.jsx(xe.default,{type:"submit",fullWidth:!0,variant:"last",children:t.texts.updatePassword})]})}))]})};ir.propTypes={texts:he.default.shape({emailLabel:he.default.string,emailPlaceholder:he.default.string,emailRequiredText:he.default.string,passwordPlaceholder:he.default.string,updatePassword:he.default.string,passwordRequiredText:he.default.string,passwordLabel:he.default.string,confirmPasswordPlaceholder:he.default.string,confirmPasswordLabel:he.default.string,confirmPasswordRequiredText:he.default.string,passwordMatchError:he.default.string,forgotPasswordText:he.default.string,passwordChanged:he.default.string}),passwordChanged:he.default.bool,handleNewPassword:he.default.func};var or=function(e){var t=B.useForm(),r=t.formState.errors,a=t.handleSubmit;t.register;var n=t.control;return l.jsx(je.default,{maxWidth:"xs",variant:"auth",children:e.sent?l.jsx(kt,{style:{textAlign:"center",margin:5},children:e.texts.emailSentText}):l.jsxs("form",{onSubmit:a(e.handleResetPassword),children:[l.jsx(B.Controller,{control:n,name:"email",render:function(t){var a,n,i=t.field;return l.jsx(Lt,gt({fullWidth:!0,type:"text",value:null!==(a=i.value)&&void 0!==a?a:"",label:e.texts.emailLabel,helperText:null===(n=r.email)||void 0===n?void 0:n.message,placeholder:e.texts.emailPlaceholder,startAdornment:l.jsx($e.default,{position:"start",children:l.jsx(Ve.default,{})})},i))},rules:{required:e.texts.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:e.texts.emailInvalidText}}}),l.jsx(xe.default,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.resetPassword})]})})};or.propTypes={texts:he.default.shape({emailLabel:he.default.string,emailPlaceholder:he.default.string,emailRequiredText:he.default.string,emailInvalidText:he.default.string,emailSentText:he.default.string,resetPassword:he.default.string}),sent:he.default.bool,handleResetPassword:he.default.func};var sr=function(e){var t=B.useForm(),r=t.formState.errors,a=t.handleSubmit,n=t.control;return l.jsxs(je.default,{maxWidth:"xs",variant:"auth",style:{direction:"ar"===e.lang?"rtl":"ltr"},children:[e.showError&&l.jsx(ar,{title:e.errorTitle,text:e.errorText,severity:"error"}),l.jsx(B.FormProvider,gt(gt({},t),{},{children:l.jsxs("form",{onSubmit:a(e.handleSignUp),children:[l.jsx(B.Controller,{control:n,name:"fullName",render:function(t){var a,n,i=t.field;return l.jsx(Lt,{fullWidth:!0,type:"text",value:null!==(a=i.value)&&void 0!==a?a:"",label:e.texts.fullNameLabel,placeholder:e.texts.fullNamePlaceholder,helperText:null===(n=r.fullName)||void 0===n?void 0:n.message,startAdornment:l.jsx($e.default,{position:"start",children:l.jsx(Ze.default,{})})})},rules:{required:e.texts.fullNameRequiredText}}),l.jsx(B.Controller,{control:n,name:"email",render:function(t){var a,n,i=t.field;return l.jsx(Lt,{fullWidth:!0,type:"text",value:null!==(a=i.value)&&void 0!==a?a:"",label:e.texts.emailLabel,helperText:null===(n=r.email)||void 0===n?void 0:n.message,placeholder:e.texts.emailPlaceholder,startAdornment:l.jsx($e.default,{position:"start",children:l.jsx(Ve.default,{})})})},rules:{required:e.texts.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:e.texts.emailInvalidText}}}),l.jsx(B.Controller,{control:n,name:"password",render:function(t){var a,n,i,o=t.field;return l.jsx(Lt,gt({fullWidth:!0,type:"password",defaultValue:null!==(a=o.value)&&void 0!==a?a:"",value:null!==(n=o.value)&&void 0!==n?n:"",label:e.texts.passwordLabel,placeholder:e.texts.passwordPlaceholder,helperText:null===(i=r.password)||void 0===i?void 0:i.message,startAdornment:l.jsx($e.default,{position:"start",children:l.jsx(_e.default,{})})},o))},rules:{required:e.texts.passwordRequiredText}}),l.jsx(xe.default,{fullWidth:!0,variant:"last",type:"submit",children:e.texts.signUpText})]})})),l.jsxs(we.default,{variant:"subtitle2",style:{marginTop:5,textAlign:"center",padding:5},children:[e.texts.existingUserText," ",l.jsx("span",{onClick:e.handleRouteToSignIn,style:{cursor:"pointer",color:"blue",textAlign:"center"},children:e.texts.signInText})]}),l.jsx(Xe.default,{}),l.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[e.viaGoogle&&l.jsx(tr,{logo:"google",buttonText:e.texts.googleButtonLabel,onClick:e.handleGoogleSignUp}),e.viaGithub&&l.jsx(tr,{logo:"github",buttonText:e.texts.githubButtonLabel,onClick:e.handleGithubSignUp}),e.viaTwitter&&l.jsx(tr,{logo:"twitter",buttonText:e.texts.twitterButtonLabel,onClick:e.handleTwitterSignUp})]})]})};sr.propTypes={texts:he.default.shape({fullNameLabel:he.default.string,fullNamePlaceholder:he.default.string,fullNameRequiredText:he.default.string,emailLabel:he.default.string,emailPlaceholder:he.default.string,emailRequiredText:he.default.string,emailInvalidText:he.default.string,passwordLabel:he.default.string,passwordPlaceholder:he.default.string,passwordRequiredText:he.default.string,passwordTooShortText:he.default.string,forgotPasswordText:he.default.string,newUserText:he.default.string,signUpText:he.default.string,signInText:he.default.string,existingUserText:he.default.string,googleButtonLabel:he.default.string,githubButtonLabel:he.default.string,twitterButtonLabel:he.default.string}),viaGoogle:he.default.bool,viaGithub:he.default.bool,viaTwitter:he.default.bool,handleSignUp:he.default.func,handleRouteToSignIn:he.default.func,handleGoogleSignUp:he.default.func,handleGithubSignUp:he.default.func,handleTwitterSignUp:he.default.func};var dr=function(e){var t=B.useForm(),r=t.formState.errors,a=t.handleSubmit,n=t.control;return l.jsxs(je.default,{maxWidth:"xs",variant:"auth",style:{direction:"ar"===e.lang?"rtl":"ltr"},children:[e.showError&&l.jsx(ar,{title:e.errorTitle,text:e.errorText,severity:"error"}),l.jsxs("form",{onSubmit:a(e.handleSignIn),children:[l.jsx(B.Controller,{control:n,name:"email",render:function(t){var a,n,i=t.field;return l.jsx(Lt,gt({fullWidth:!0,type:"text",value:null!==(a=i.value)&&void 0!==a?a:"",label:e.texts.emailLabel,helperText:null===(n=r.email)||void 0===n?void 0:n.message,placeholder:e.texts.emailPlaceholder,startAdornment:l.jsx($e.default,{position:"start",children:l.jsx(Ve.default,{})})},i))},rules:{required:e.texts.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:e.texts.emailInvalidText}}}),l.jsx(B.Controller,{control:n,name:"password",render:function(t){var a,n,i,o=t.field;return l.jsx(Lt,gt({fullWidth:!0,type:"password",defaultValue:null!==(a=o.value)&&void 0!==a?a:"",value:null!==(n=o.value)&&void 0!==n?n:"",label:e.texts.passwordLabel,placeholder:e.texts.passwordPlaceholder,helperText:null===(i=r.password)||void 0===i?void 0:i.message,startAdornment:l.jsx($e.default,{position:"start",children:l.jsx(_e.default,{})})},o))},rules:{required:e.texts.passwordRequiredText}}),l.jsx(we.default,{style:{cursor:"pointer",marginTop:5,width:"max-content",fontSize:15,padding:5},onClick:e.handleForgotPassword,children:e.texts.forgotPasswordText}),l.jsx(xe.default,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.signInText})]}),l.jsxs(we.default,{variant:"subtitle2",style:{marginTop:5,textAlign:"center",padding:5},children:[e.texts.newUserText," ",l.jsx("span",{onClick:e.handleRouteToSignUp,style:{cursor:"pointer",color:"blue",textAlign:"center"},children:e.texts.signUpText})]}),l.jsx(Xe.default,{}),l.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[e.viaGoogle&&l.jsx(tr,{logo:"google",buttonText:e.texts.googleButtonLabel,onClick:e.handleGoogleSignIn}),e.viaGithub&&l.jsx(tr,{logo:"github",buttonText:e.texts.githubButtonLabel,onClick:e.handleGithubSignIn}),e.viaTwitter&&l.jsx(tr,{logo:"twitter",buttonText:e.texts.twitterButtonLabel,onClick:e.handleTwitterSignIn})]})]})};dr.propTypes={texts:he.default.shape({emailLabel:he.default.string,emailPlaceholder:he.default.string,emailRequiredText:he.default.string,emailInvalidText:he.default.string,passwordLabel:he.default.string,passwordPlaceholder:he.default.string,passwordRequiredText:he.default.string,forgotPasswordText:he.default.string,newUserText:he.default.string,signUpText:he.default.string,signInText:he.default.string,googleButtonLabel:he.default.string,githubButtonLabel:he.default.string,twitterButtonLabel:he.default.string}),viaGoogle:he.default.bool,viaGithub:he.default.bool,viaTwitter:he.default.bool,handleSignIn:he.default.func,handleRouteToSignUp:he.default.func,handleGoogleSignIn:he.default.func,handleGithubSignIn:he.default.func,handleTwitterSignIn:he.default.func};var ur=function(e){return l.jsxs(je.default,{maxWidth:"xs",children:[l.jsx(kt,{align:"center",children:"Choose Payment Method"}),e.viaWallet&&l.jsx(tr,{logo:"wallet",buttonText:e.walletLabel,onClick:e.handleWallet}),e.viaCreditCard&&l.jsx(tr,{logo:"visa/master",buttonText:e.visaMasterLabel,onClick:e.handleCreditCard}),e.viaMada&&l.jsx(tr,{logo:"mada",buttonText:e.madaLabel,onClick:e.handleMada}),e.viaSTCPay&&l.jsx(tr,{logo:"stcpay",buttonText:e.stcPayLabel,onClick:e.handleSTCPay}),e.viaPayPal&&l.jsx(tr,{logo:"paypal",buttonText:e.paypalLabel,onClick:e.handlePayPal}),e.viaGooglePay&&l.jsx(tr,{logo:"googlepay",buttonText:e.googlePayLabel,onClick:e.handleGooglePay}),e.viaApplePay&&l.jsx(tr,{logo:"applepay",buttonText:e.applePayLabel,onClick:e.handleApplePay})]})};ur.propTypes={viaMada:he.default.bool,viaWallet:he.default.bool,viaSTCPay:he.default.bool,viaPayPal:he.default.bool,viaApplePay:he.default.bool,viaCreditCard:he.default.bool,madaLabel:he.default.string,stcPayLabel:he.default.string,paypalLabel:he.default.string,walletLabel:he.default.string,applePayLabel:he.default.string,visaMasterLabel:he.default.string,handleMada:he.default.func,handleWallet:he.default.func,handleSTCPay:he.default.func,handlePayPal:he.default.func,handleApplePay:he.default.func,handleCreditCard:he.default.func};var cr=function(t){var r=jt(e.useState(0),2),a=r[0],n=r[1],i=B.useForm(),o=i.formState.errors,s=i.handleSubmit,d=i.control;return l.jsxs(je.default,{maxWidth:"xs",children:[l.jsxs(we.default,{align:"center",variant:"h2",fontWeight:500,style:{marginBottom:20},children:[Number(a).toLocaleString("en")||"0",l.jsx(we.default,{children:t.currency||"SAR"})]}),l.jsx(B.FormProvider,gt(gt({},i),{},{children:l.jsxs("form",{onSubmit:s(t.handleChargeWallet),children:[l.jsx(B.Controller,{control:d,name:"amount",render:function(e){var r,a,i=e.field;return l.jsx(Lt,gt(gt({fullWidth:!0,placeholder:t.texts.amountLabel,type:"number",value:null!==(r=i.value)&&void 0!==r?r:""},i),{},{inputProps:{inputMode:"numeric",min:"1",max:"9999999",step:"0.01"},onChange:function(e){i.onChange(parseFloat(e.target.value)),n(e.target.value)},helperText:null===(a=o.amount)||void 0===a?void 0:a.message}))},rules:{required:t.texts.amountRequired}}),l.jsx(xe.default,{type:"submit",fullWidth:!0,variant:"last",children:t.texts.chargeWallet})]})}))]})};cr.propTypes={texts:he.default.shape({amountLabel:he.default.string,chargeWallet:he.default.string,amountRequired:he.default.string}),handleChargeWallet:he.default.func,currency:he.default.string};var fr=function(e){var t,r,a,n,i,o,s,d,u,c,f="ar"===e.lang,x=B.useForm(),p=x.formState.errors,h=x.handleSubmit;x.register;var m=x.control,g={display:"flex",padding:0,paddingRight:"0px !important",paddingLeft:"0px !important",flexDirection:{xs:"column",sm:"row",md:"row",lg:"row",xl:"row"}};return l.jsxs(je.default,{maxWidth:"sm",style:{direction:f?"rtl":"ltr"},children:[l.jsx(we.default,{align:"center",variant:"h5",fontWeight:500,style:{marginBottom:10},children:e.texts.orderDetails}),l.jsx(lr,{lang:e.lang,columns:["Product","Price"],rows:e.products,end:["Total",e.total]}),l.jsx(Xe.default,{variant:"middle"}),l.jsx(we.default,{align:"center",variant:"h5",fontWeight:500,style:{marginBottom:10},children:e.texts.billingAddress}),l.jsx(B.FormProvider,gt(gt({},x),{},{children:l.jsxs("form",{onSubmit:h(e.handlePayNow),children:[l.jsxs(je.default,{sx:g,children:[l.jsx(B.Controller,{control:m,name:"firstName",rules:{required:null===(t=e.texts)||void 0===t?void 0:t.required},render:function(t){var r,a,n,i=t.field;return l.jsx(Lt,gt({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=i.value)&&void 0!==r?r:"",label:(null===(a=e.texts)||void 0===a?void 0:a.firstNameLabel)+" *",helperText:null===(n=p.firstName)||void 0===n?void 0:n.message},i))}}),l.jsx("div",{style:{width:20}}),l.jsx(B.Controller,{control:m,name:"lastName",rules:{required:null===(r=e.texts)||void 0===r?void 0:r.required},render:function(t){var r,a,n,i=t.field;return l.jsx(Lt,gt({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=i.value)&&void 0!==r?r:"",label:(null===(a=e.texts)||void 0===a?void 0:a.lastNameLabel)+" *",helperText:null===(n=p.lastName)||void 0===n?void 0:n.message},i))}})]}),l.jsx(B.Controller,{control:m,name:"email",render:function(t){var r,a,n,i=t.field;return l.jsx(Lt,gt({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=i.value)&&void 0!==r?r:"",label:(null===(a=e.texts)||void 0===a?void 0:a.emailLabel)+" *",helperText:null===(n=p.email)||void 0===n?void 0:n.message},i))},rules:{required:null===(a=e.texts)||void 0===a?void 0:a.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:null===(n=e.texts)||void 0===n?void 0:n.emailInvalidText}}}),l.jsxs(je.default,{sx:g,children:[l.jsx(B.Controller,{control:m,name:"streetAddress",rules:{required:null===(i=e.texts)||void 0===i?void 0:i.required},render:function(t){var r,a,n,i=t.field;return l.jsx(Lt,gt({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=i.value)&&void 0!==r?r:"",label:(null===(a=e.texts)||void 0===a?void 0:a.streetAddressLabel)+" *",helperText:null===(n=p.streetAddress)||void 0===n?void 0:n.message},i))}}),l.jsx("div",{style:{width:20}}),l.jsx(B.Controller,{control:m,name:"buildingNumber",rules:{required:null===(o=e.texts)||void 0===o?void 0:o.required},render:function(t){var r,a,n,i=t.field;return l.jsx(Lt,gt({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=i.value)&&void 0!==r?r:"",label:(null===(a=e.texts)||void 0===a?void 0:a.buildingNumberLabel)+" *",helperText:null===(n=p.buildingNumber)||void 0===n?void 0:n.message},i))}})]}),l.jsxs(je.default,{sx:g,children:[l.jsx(B.Controller,{control:m,name:"province",rules:{required:null===(s=e.texts)||void 0===s?void 0:s.required},render:function(t){var r,a,n,i=t.field;return l.jsx(Lt,gt({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=i.value)&&void 0!==r?r:"",label:(null===(a=e.texts)||void 0===a?void 0:a.stateLabel)+" *",helperText:null===(n=p.province)||void 0===n?void 0:n.message},i))}}),l.jsx("div",{style:{width:20}}),l.jsx(B.Controller,{control:m,name:"city",rules:{required:null===(d=e.texts)||void 0===d?void 0:d.required},render:function(t){var r,a,n,i=t.field;return l.jsx(Lt,gt({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=i.value)&&void 0!==r?r:"",label:(null===(a=e.texts)||void 0===a?void 0:a.cityLabel)+" *",helperText:null===(n=p.city)||void 0===n?void 0:n.message},i))}})]}),l.jsxs(je.default,{sx:g,children:[l.jsx(B.Controller,{control:m,name:"zipCode",rules:{required:null===(u=e.texts)||void 0===u?void 0:u.required},render:function(t){var r,a,n,i=t.field;return l.jsx(Lt,gt({inForm:!0,fullWidth:!0,type:"number",variant:"unscrollable",value:null!==(r=i.value)&&void 0!==r?r:"",label:(null===(a=e.texts)||void 0===a?void 0:a.zipCodeLabel)+" *",helperText:null===(n=p.zipCode)||void 0===n?void 0:n.message},i))}}),l.jsx("div",{style:{width:20}}),l.jsx(B.Controller,{control:m,name:"country",rules:{required:null===(c=e.texts)||void 0===c?void 0:c.required},render:function(t){var r,a,n,i=t.field;return l.jsxs(rr,gt(gt({fullWidth:!0,native:!0,label:(null===(r=e.texts)||void 0===r?void 0:r.countryLabel)+" *",variant:"standard",value:null!==(a=i.value)&&void 0!==a?a:"",helperText:null===(n=p.country)||void 0===n?void 0:n.message,displayEmpty:!0,disableUnderline:!0,validators:["required"]},i),{},{children:[l.jsx("option",{}),e.countriesList.map((function(e,t){return l.jsx("option",{children:e},t)}))]}))}})]}),l.jsx(xe.default,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.payNow})]})}))]})};fr.propTypes={texts:he.default.shape({orderDetails:he.default.string,billingAddress:he.default.string,payNow:he.default.string,emailLabel:he.default.string,emailRequiredText:he.default.string,emailInvalidText:he.default.string,firstNameLabel:he.default.string,required:he.default.string,lastNameLabel:he.default.string,streetAddressLabel:he.default.string,buildingNumberLabel:he.default.string,cityLabel:he.default.string,stateLabel:he.default.string,countryLabel:he.default.string,zipCodeLabel:he.default.string}),lang:he.default.string,countriesList:he.default.array,products:he.default.array,total:he.default.string,handlePayNow:he.default.func};var xr=function(e){var t="ar"===e.lang;return l.jsxs("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[l.jsxs(je.default,{maxWidth:"sm",style:{direction:t?"rtl":"ltr"},children:[l.jsx(we.default,{align:"center",variant:"h3",fontWeight:400,style:{marginBottom:10},children:e.confirmationTitle}),l.jsx(Xe.default,{variant:"middle"}),l.jsxs(we.default,{align:"center",variant:"body1",style:{marginBottom:10},children:[e.texts.successMessage," ",l.jsx("strong",{children:e.userEmail})]}),l.jsx(we.default,{align:"center",variant:"body1",children:e.texts.yourOrderNumber}),l.jsx(we.default,{align:"center",variant:"body1",fontWeight:700,style:{marginBottom:10},children:e.orderNumber}),l.jsx(Xe.default,{variant:"middle"}),e.products&&l.jsxs(l.Fragment,{children:[l.jsx(we.default,{align:"center",variant:"h5",fontWeight:500,style:{marginBottom:10},children:e.texts.orderDetails}),l.jsx(lr,{lang:e.lang,columns:["Product","Price"],rows:e.products,end:["Total",e.total]}),l.jsx(Xe.default,{variant:"middle"})]}),l.jsx(xe.default,{onClick:e.handlePrint,variant:"contained",children:e.texts.print}),l.jsx(xe.default,{onClick:e.handleHistory,variant:"last",children:e.texts.history}),l.jsx(xe.default,{onClick:e.handleHome,variant:"last",children:e.texts.homePage}),l.jsx(we.default,{align:"center",variant:"body2",style:{marginTop:10},children:e.texts.fasterPaymentNote})]}),l.jsx("a",{style:{marginTop:10,paddingTop:10,padding:5,cursor:"pointer"},onClick:e.handleRefundPolicyLink,children:l.jsx(we.default,{align:"center",variant:"caption",fontWeight:500,children:e.texts.refundPolicy})})]})};xr.propTypes={texts:he.default.shape({print:he.default.string,history:he.default.string,homePage:he.default.string,successMessage:he.default.string,orderDetails:he.default.string,fasterPaymentNote:he.default.string,billingAddress:he.default.string,payNow:he.default.string,yourOrderNumber:he.default.string,emailLabel:he.default.string,emailRequiredText:he.default.string,emailInvalidText:he.default.string,firstNameLabel:he.default.string,required:he.default.string,lastNameLabel:he.default.string,streetAddressLabel:he.default.string,buildingNumberLabel:he.default.string,cityLabel:he.default.string,stateLabel:he.default.string,countryLabel:he.default.string,zipCodeLabel:he.default.string,refundPolicy:he.default.string}),products:he.default.array,countriesList:he.default.array,lang:he.default.string,total:he.default.string,userEmail:he.default.string,orderNumber:he.default.string,confirmationTitle:he.default.string,handleHome:he.default.func,handlePrint:he.default.func,handleHistory:he.default.func,handleRefundPolicyLink:he.default.func};var pr=function(e){var t=O.useTheme();return l.jsx(O.Menu,{sx:{mt:"45px"},id:"menu-appbar",anchorEl:e.anchor,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(e.anchor),onClose:e.handleClose,variant:"themed",PaperProps:{style:{boxShadow:"none",borderRadius:t.allBorderRadius,border:"1px solid ".concat(t.primaryActionColor)}},children:e.menuItems.map((function(e){return l.jsxs(O.MenuItem,{onClick:e.action,children:[e.icon&&l.jsx(e.icon,{}),l.jsx("div",{style:{width:10}}),l.jsx(O.Typography,{textAlign:"center",children:e.label})]},e.label)}))})};pr.propTypes={handleClose:he.default.func,menuItems:he.default.arrayOf(he.default.shape({icon:he.default.element,label:he.default.string,action:he.default.func}))};var hr=function(e){return{width:240,transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),overflowX:"hidden"}},mr=function(e){return vt({transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),overflowX:"hidden",width:"calc(".concat(e.spacing(8)," + 1px)")},e.breakpoints.up("sm"),{width:"calc(".concat(e.spacing(8)," + 1px)")})},gr=U.styled("div")((function(e){var t=e.theme;return gt({display:"flex",alignItems:"center",justifyContent:"flex-end",padding:t.spacing(0,1)},t.mixins.toolbar)})),vr=U.styled(Qe.default,{shouldForwardProp:function(e){return"open"!==e}})((function(e){var t=e.theme,r=e.open;return gt({zIndex:t.zIndex.drawer+1,transition:t.transitions.create(["width","margin"],{easing:t.transitions.easing.sharp,duration:t.transitions.duration.leavingScreen})},r&&{marginLeft:240,width:"calc(100% - ".concat(240,"px)"),transition:t.transitions.create(["width","margin"],{easing:t.transitions.easing.sharp,duration:t.transitions.duration.enteringScreen})})})),br=U.styled(Je.default,{shouldForwardProp:function(e){return"open"!==e}})((function(e){var t=e.theme,r=e.open;return gt(gt({width:240,flexShrink:0,whiteSpace:"nowrap",boxSizing:"border-box"},r&&gt(gt({},hr(t)),{},{"& .MuiDrawer-paper":hr(t)})),!r&&gt(gt({},mr(t)),{},{"& .MuiDrawer-paper":mr(t)}))}));var yr=["children","onClose","hideClose"],jr=function(e){var t=e.children,r=e.onClose,a=e.hideClose,n=bt(e,yr);return l.jsxs(xt.default,gt(gt({sx:{m:0,p:2}},n),{},{children:[t,a?null:l.jsx(tt.default,{"aria-label":"close",onClick:r,sx:{position:"absolute",right:8,top:8,color:function(e){return e.palette.grey[500]}},children:l.jsx(dt.default,{})})]}))};var wr=["Products","Pricing","Blog"];exports.ActionButton=function(e){return l.jsx(xe.default,gt(gt({},e),{},{children:e.text}))},exports.AdaptiveButton=Tt,exports.Box=function(e){return l.jsx("div",{children:e.children})},exports.ChargeWalletForm=cr,exports.CheckoutForm=fr,exports.ConfirmationPage=xr,exports.CreditCardForm=function(e){var t,r=B.useForm(),a=r.formState.errors,n=r.handleSubmit,i=r.control;return l.jsx(je.default,{maxWidth:"xs",children:l.jsxs("form",{onSubmit:n(e.handle),children:[l.jsx(Lt,{fullWidth:!0,name:"password",placeholder:"Enter password",type:"tel",label:"Card Number",rules:{required:"Password is rquired"},helperText:null===(t=a.password)||void 0===t?void 0:t.message}),l.jsx(B.Controller,{control:i,name:"cardName",render:function(e){var t;return e.field,l.jsx(Lt,{fullWidth:!0,name:"password",placeholder:"Enter password",type:"password",label:"Name On Card",rules:{required:"Password is rquired"},helperText:null===(t=a.password)||void 0===t?void 0:t.message})}}),l.jsx(B.Controller,{control:i,name:"cardName",render:function(e){var t;return e.field,l.jsx(Lt,{fullWidth:!0,name:"password",placeholder:"Enter password",type:"password",label:"Expiry Date",rules:{required:"Password is rquired"},helperText:null===(t=a.password)||void 0===t?void 0:t.message})}}),l.jsx(B.Controller,{control:i,name:"cardName",render:function(e){var t;return e.field,l.jsx(Lt,{fullWidth:!0,name:"password",placeholder:"Enter password",type:"password",label:"CCV",rules:{required:"Password is rquired"},helperText:null===(t=a.password)||void 0===t?void 0:t.message})}}),l.jsx(xe.default,{type:"submit",fullWidth:!0,variant:"last",onClick:e.handlePayWithCreditCard,children:"Pay with Credit Card"})]})})},exports.HawaAccordian=nr,exports.HawaAlert=ar,exports.HawaAppBar=function(e){var t=O.useTheme(),r=jt(ce.default.useState(null),2),a=r[0],n=r[1],i=jt(ce.default.useState(null),2),o=i[0],s=i[1],d=function(){n(null)};return console.log("theme is ",t),l.jsx(Qe.default,{position:"static",variant:"appbar",children:l.jsx(je.default,{maxWidth:"xl",variant:"appbar",children:l.jsxs(Ke.default,{disableGutters:!0,children:[l.jsx(we.default,{variant:"h6",noWrap:!0,component:"div",sx:{mr:2,display:{xs:"none",md:"flex"}},children:"LOGO"}),l.jsxs(Ye.default,{sx:{flexGrow:1,display:{xs:"flex",md:"none"}},children:[l.jsx(tt.default,{size:"large","aria-label":"account of current user","aria-controls":"menu-appbar","aria-haspopup":"true",onClick:e.handleOpenSideMenu,color:"inherit",children:l.jsx(rt.default,{})}),l.jsx(pt.default,{id:"menu-appbar",anchorEl:a,anchorOrigin:{vertical:"bottom",horizontal:"left"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"left"},open:Boolean(a),onClose:d,sx:{display:{xs:"block",md:"none"}},children:wr.map((function(e){return l.jsx(ht.default,{onClick:d,children:l.jsx(we.default,{textAlign:"center",children:e})},e)}))})]}),l.jsx(we.default,{variant:"h6",noWrap:!0,component:"div",sx:{flexGrow:1,display:{xs:"flex",md:"none"}},children:"LOGO"}),l.jsx(Ye.default,{sx:{flexGrow:1,display:{xs:"none",md:"flex"}},children:wr.map((function(e){return l.jsx(xe.default,{onClick:d,sx:{my:2,display:"block"},children:e},e)}))}),l.jsxs(Ye.default,{sx:{flexGrow:0},children:[l.jsx(pe.default,{title:"Open settings",children:l.jsx(tt.default,{onClick:function(e){s(e.currentTarget)},sx:{p:0},children:l.jsx(ot.default,{alt:"Remy Sharp",src:"/static/images/avatar/2.jpg"})})}),l.jsx(pr,{anchor:o,handleClose:function(e){return s(null)},menuItems:e.accountMenu})]})]})})})},exports.HawaAppLayout=function(e){var t=U.useTheme(),r=jt(ce.default.useState(!0),2),a=r[0],n=r[1],i=st.default("(max-width:600px)"),o=jt(ce.default.useState(null),2);o[0],o[1];var s=jt(ce.default.useState(null),2),d=s[0],u=s[1];return console.log("match is ",i),l.jsxs(Ye.default,{sx:{display:"flex"},children:[i&&l.jsxs(O.BottomNavigation,{showLabels:!0,children:[l.jsx(O.BottomNavigationAction,{label:"Recents",icon:l.jsx(W.RestoreOutlined,{})}),l.jsx(O.BottomNavigationAction,{label:"Favorites",icon:l.jsx(W.RestoreOutlined,{})}),l.jsx(O.BottomNavigationAction,{label:"Nearby",icon:l.jsx(W.RestoreOutlined,{})})]})," ",l.jsx(vr,{variant:"appbar",position:"fixed",open:a,children:l.jsxs(Ke.default,{variant:"appbar",children:[l.jsx(tt.default,{color:"inherit","aria-label":"open drawer",onClick:function(){return n(!0)},edge:"start",sx:gt({marginRight:5},a&&{display:"none"}),children:l.jsx(rt.default,{})}),l.jsxs("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",width:"100%",margin:0},children:[l.jsx(we.default,{variant:"h6",noWrap:!0,component:"div",children:e.pageTitle}),l.jsxs(Ye.default,{children:[l.jsx(pe.default,{title:"Open settings",children:l.jsx(tt.default,{onClick:function(e){return u(e.currentTarget)},sx:{p:0},children:l.jsx(ot.default,{})})}),l.jsx(pr,{menuItems:e.accountMenu,anchor:d,handleClose:function(){return u(null)}})]})]})]})}),l.jsxs(br,{variant:"permanent",open:a,children:[l.jsxs(gr,{children:[e.logo,l.jsx(tt.default,{onClick:function(){return n(!1)},children:"rtl"===t.direction?l.jsx(lt.default,{}):l.jsx(at.default,{})})]}),l.jsx(Xe.default,{}),l.jsx(et.default,{children:e.pages.map((function(t,r){var n,i;return l.jsx(pe.default,{title:t.text,placement:"right",arrow:!0,PopperProps:{style:{opacity:a?0:1}},children:l.jsxs(nt.default,{variant:(null===(n=e.pageName)||void 0===n?void 0:n.toLowerCase())===(null===(i=t.slug)||void 0===i?void 0:i.toLowerCase())&&"clicked",onClick:t.action,sx:{minHeight:48,justifyContent:a?"initial":"center",px:2.5},children:[l.jsx(t.icon,{}),l.jsx("div",{style:{width:20}}),l.jsx(it.default,{primary:t.text,sx:{opacity:a?1:0}})]},t.text)},r)}))})]}),l.jsxs(Ye.default,{sx:{flexGrow:1,p:3},children:[l.jsx(gr,{}),e.children]})]})},exports.HawaButton=function(e){return l.jsx(xe.default,gt(gt({},e),{},{children:e.children}))},exports.HawaCheckbox=function(e){return console.log("props : ",e),l.jsx(ce.default.Fragment,{children:l.jsx(be.default,{label:e.label,control:l.jsx(ye.default,{style:{color:e.color||null},defaultChecked:e.defaultValue})})})},exports.HawaColorPicker=Qt,exports.HawaDialog=function(t){var r=jt(e.useState(!1),2);return r[0],r[1],l.jsxs(ut.default,gt(gt({},t),{},{variant:"main",children:[l.jsx(jr,{onClose:t.onClose,hideClose:t.hideClose,children:t.title}),l.jsx(ft.default,{children:t.children}),l.jsx(ct.default,{children:t.actions})]}))},exports.HawaInputLabel=function(e){return l.jsx(qe.default,{children:l.jsx("div",{style:{fontSize:15},children:e.label})})},exports.HawaItemCard=Pt,exports.HawaLogoButton=tr,exports.HawaPricingCard=qt,exports.HawaRadio=Ct,exports.HawaRange=Kt,exports.HawaSearchBar=function(e){return l.jsx(Lt,gt({endAdornment:l.jsx(O.InputAdornment,{position:"start",children:l.jsx(W.Search,{})})},e))},exports.HawaSelect=rr,exports.HawaSettingsRow=er,exports.HawaSnackbar=function(e){return l.jsx(me.default,{open:e.open,onClose:e.handleClose,children:l.jsxs(ve.default,{icon:!1,severity:e.severity,children:[e.title&&l.jsx(ge.default,{children:e.title}),e.text]})})},exports.HawaTable=lr,exports.HawaTextArea=function(e){var t=Vt();return console.log("theme is ",t),l.jsx("label",{children:l.jsx("textarea",{style:{color:"black",backgroundColor:e.bgColor||"white",borderBottom:"none",border:"none",width:"100%",padding:0,margin:0,marginBottom:0,resize:e.resize||"vertical"}})})},exports.HawaTextField=Lt,exports.HawaTypography=kt,exports.NewPasswordForm=ir,exports.PayWithWallet=function(e){return l.jsxs(je.default,{maxWidth:"xs",children:[l.jsx(we.default,{align:"center",children:"Wallet Balance"}),l.jsxs(we.default,{align:"center",variant:"h1",children:[e.walletBalance||"0",l.jsx(we.default,{children:e.currency||"SAR"})]}),l.jsx(xe.default,{type:"submit",fullWidth:!0,variant:"last",onClick:e.handlePayWithWallet,children:"Pay Now"})]})},exports.ResetPasswordForm=or,exports.SelectPayment=ur,exports.SignInForm=dr,exports.SignUpForm=sr,exports.UserProfileForm=function(e){var t=B.useForm(),r=t.formState.errors,a=t.handleSubmit,n=t.control;return l.jsx(je.default,{maxWidth:"sm",children:l.jsx(B.FormProvider,gt(gt({},t),{},{children:l.jsxs("form",{onSubmit:a(e.handleUpdateProfile),children:[l.jsx(B.Controller,{control:n,name:"fullName",render:function(t){var a,n,i=t.field;return l.jsx(Lt,gt({fullWidth:!0,type:"text",value:null!==(a=i.value)&&void 0!==a?a:"",label:e.texts.fullNameLabel,placeholder:e.texts.fullNamePlaceholder,helperText:null===(n=r.fullName)||void 0===n?void 0:n.message},i))}}),l.jsx(B.Controller,{control:n,name:"phoneNumber",render:function(e){var t=e.field;return l.jsx(Lt,gt({fullWidth:!0,type:"tel",label:"Phone Number",placeholder:"+966"},t))}}),l.jsx(B.Controller,{control:n,name:"email",render:function(t){var a,n,i=t.field;return l.jsx(Lt,gt({fullWidth:!0,type:"text",value:null!==(a=i.value)&&void 0!==a?a:"",label:e.texts.emailLabel,helperText:null===(n=r.email)||void 0===n?void 0:n.message,placeholder:e.texts.emailPlaceholder},i))},rules:{required:e.texts.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:e.texts.emailInvalidText}}}),l.jsx(B.Controller,{control:n,name:"password",render:function(t){var a,n,i=t.field;return l.jsx(Lt,gt({fullWidth:!0,type:"password",value:null!==(a=i.value)&&void 0!==a?a:"",label:e.texts.passwordLabel,placeholder:e.texts.passwordPlaceholder,helperText:null===(n=r.password)||void 0===n?void 0:n.message},i))},rules:{required:e.texts.passwordRequiredText}}),l.jsx(B.Controller,{control:n,name:"confirmPassword",render:function(t){var a,n,i=t.field;return l.jsx(Lt,gt({fullWidth:!0,type:"password",value:null!==(a=i.value)&&void 0!==a?a:"",label:e.texts.confirmPasswordLabel,placeholder:e.texts.confirmPasswordPlaceholder,helperText:null===(n=r.confirmPassword)||void 0===n?void 0:n.message},i))},rules:{required:e.texts.confirmPasswordRequiredText}}),l.jsx(xe.default,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.updateProfile})]})}))})},exports.UserSettingsForm=function(e){return l.jsxs(je.default,{maxWidth:"sm",children:[e.children,l.jsx(xe.default,{type:"submit",fullWidth:!0,variant:"last",onClick:e.handleSaveSettings,children:e.saveSettingsText})]})};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sikka/hawa",
3
- "version": "0.0.29",
3
+ "version": "0.0.32",
4
4
  "description": "UI Kit",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.es.js",
@@ -111,3 +111,8 @@ export const UserProfileForm = (props) => {
111
111
  </Container>
112
112
  );
113
113
  };
114
+
115
+ // texts: PropTypes.shape({
116
+ // emailLabel: PropTypes.string,
117
+
118
+ // }),
@@ -94,6 +94,27 @@ export const NewPasswordForm = (props) => {
94
94
  );
95
95
  };
96
96
  NewPasswordForm.propTypes = {
97
- texts: PropTypes.object,
97
+ /**
98
+ * An object of all the texts in the blocks
99
+ */
100
+ texts: PropTypes.shape({
101
+ emailLabel: PropTypes.string,
102
+ emailPlaceholder: PropTypes.string,
103
+ emailRequiredText: PropTypes.string,
104
+ passwordPlaceholder: PropTypes.string,
105
+ updatePassword: PropTypes.string,
106
+ passwordRequiredText: PropTypes.string,
107
+ passwordLabel: PropTypes.string,
108
+ confirmPasswordPlaceholder: PropTypes.string,
109
+ confirmPasswordLabel: PropTypes.string,
110
+ confirmPasswordRequiredText: PropTypes.string,
111
+ passwordMatchError: PropTypes.string,
112
+ forgotPasswordText: PropTypes.string,
113
+ passwordChanged: PropTypes.string
114
+ }),
115
+ /**
116
+ * A boolean to replace the form with a success message
117
+ */
118
+ passwordChanged: PropTypes.bool,
98
119
  handleNewPassword: PropTypes.func
99
120
  };