PageSourceSearch

https://ae.partner.talabat.com/_ssu/8987.283aea94.chunk.js

js talabat.com collected 2026-09-24 08:27:07 UTC 17,393 bytes, 2 lines download raw bytes

1/*! For license information please see 8987.283aea94.chunk.js.LICENSE.txt */
2"use strict";(self.webpackChunk_deliveryhero_ssu_app=self.webpackChunk_deliveryhero_ssu_app||[]).push([[8987],{12645:(t,e,r)=>{r.r(e),r.d(e,{default:()=>i});var n=r(72796);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}const i=function(t,e){if("object"!==o(t)||"object"!==o(e))return!1;var r=(0,n.default)(t),i=(0,n.default)(e),a=Object.keys(r),u=Object.keys(i);if(a.length!==u.length)return!1;for(var l=0,c=u;l<c.length;l++){var s=c[l];if((null==r?void 0:r[s])!==(null==i?void 0:i[s]))return!1}return!0}},72796:(t,e,r)=>{function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==n(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,e||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===n(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}r.r(e),r.d(e,{default:()=>a});const a=function(t){return function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?o(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({city:"",latitude:"",longitude:"",state:"",district:"",street:"",streetNumber:"",zipcode:"",additionalAddressDetails:"",area:"",placeName:""},t)}},68987:(t,e,r)=>{r.r(e),r.d(e,{default:()=>P});var n,o=r(52322),i=r(63144),a=r.n(i),u=r(70363),l=r(68588),c=r(31545),s=r(59689),d=r(41809),f=r(10586),p=r(72796),h=r(12645);function y(t){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},y(t)}function v(){v=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function c(t,e,r,o){var i=e&&e.prototype instanceof f?e:f,a=Object.create(i.prototype),u=new I(o||[]);return n(a,"_invoke",{value:S(t,r,u)}),a}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var d={};function f(){}function p(){}function h(){}var m={};l(m,i,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(L([])));b&&b!==e&&r.call(b,i)&&(m=b);var j=h.prototype=f.prototype=Object.create(m);function w(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function o(n,i,a,u){var l=s(t[n],t,i);if("throw"!==l.type){var c=l.arg,d=c.value;return d&&"object"==y(d)&&r.call(d,"__await")?e.resolve(d.__await).then((function(t){o("next",t,a,u)}),(function(t){o("throw",t,a,u)})):e.resolve(d).then((function(t){c.value=t,a(c)}),(function(t){return o("throw",t,a,u)}))}u(l.arg)}var i;n(this,"_invoke",{value:function(t,r){function n(){return new e((function(e,n){o(t,r,e,n)}))}return i=i?i.then(n,n):n()}})}function S(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=O(a,r);if(u){if(u===d)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var l=s(t,e,r);
vendor: 5,397 bytes, line 2
2if("normal"===l.type){if(n=r.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(n="completed",r.method="throw",r.arg=l.arg)}}}function O(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,O(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var o=s(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,d;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function L(t){if(t||""===t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}throw new TypeError(y(t)+" is not iterable")}return p.prototype=h,n(j,"constructor",{value:h,configurable:!0}),n(h,"constructor",{value:p,configurable:!0}),p.displayName=l(h,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,h):(t.__proto__=h,l(t,u,"GeneratorFunction")),t.prototype=Object.create(j),t},t.awrap=function(t){return{__await:t}},w(x.prototype),l(x.prototype,a,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new x(c(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(j),l(j,u,"Generator"),l(j,i,(function(){return this})),l(j,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=L,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),l=r.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:L(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function m(t){return function(t){if(Array.isArray(t))return O(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||S(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(t,e,r,n,o,i,a){try{var u=t[i](a),l=u.value}catch(t){return void r(t)}u.done?e(l):Promise.resolve(l).then(n,o)}function b(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function j(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};
2e%2?b(Object(r),!0).forEach((function(e){w(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):b(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function w(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==y(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==y(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===y(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function x(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,u=[],l=!0,c=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);l=!0);}catch(t){c=!0,o=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return u}}(t,e)||S(t,e)||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 S(t,e){if(t){if("string"==typeof t)return O(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?O(t,e):void 0}}function O(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}!function(t){t.RESTAURANT="restaurant",t.BILLING="billing",t.SHIPPING="shipping"}(n||(n={}));const P=function(){var t,e=f.default.component,r=(0,u.useTheme)(),y=(0,l.useTranslation)().t,b=(0,d.useIsMobile)(),w=(0,c.default)(),S=w.field,O=w.fieldName,P=w.formContext,E=x((0,i.useState)(!1),2),I=E[0],L=E[1],N=x((0,i.useState)(n.RESTAURANT),2),T=N[0],A=N[1],k=x((0,i.useState)(null),2),G=k[0],_=k[1],R=x((0,i.useState)([]),2),C=R[0],D=R[1],B=(0,s.useLead)().lead;(0,i.useEffect)((function(){if(!C.length){var t,e,r,o,i,a,u,l,c=null!==(t=B.data)&&void 0!==t&&null!==(t=t.address)&&void 0!==t&&t.restaurant?j(j({},null===(e=B.data)||void 0===e||null===(e=e.address)||void 0===e?void 0:e.restaurant),{},{type:n.RESTAURANT}):null,s=null!==(r=B.data)&&void 0!==r&&null!==(r=r.address)&&void 0!==r&&r.billing?j(j({},null===(o=B.data)||void 0===o||null===(o=o.address)||void 0===o?void 0:o.billing),{},{type:n.BILLING}):null,d=null!==(i=B.data)&&void 0!==i&&null!==(i=i.address)&&void 0!==i&&i.shipping?j(j({},null===(a=B.data)||void 0===a||null===(a=a.address)||void 0===a?void 0:a.shipping),{},{type:n.SHIPPING}):null,f=(0,h.default)(null===(u=B.data)||void 0===u||null===(u=u.address)||void 0===u?void 0:u.restaurant,null===(l=B.data)||void 0===l||null===(l=l.address)||void 0===l?void 0:l.billing);d&&(_(d),A(n.SHIPPING));D((f?[c,d]:[c,s,d]).filter((function(t){return null!==t})))}}),[null===(t=B.data)||void 0===t?void 0:t.address]),(0,i.useEffect)((function(){!function(t){var e=function(t){P.setValue(O,j(j({},P.getValues(O)),(0,p.default)(t)))};switch(t){case n.RESTAURANT:S.properties.copyAddresses[n.RESTAURANT]&&e(P.getValues(S.properties.copyAddresses[n.RESTAURANT].fromField));break;case n.BILLING:S.properties.copyAddresses[n.BILLING]&&e(P.getValues(S.properties.copyAddresses[n.BILLING].fromField));break;case n.SHIPPING:G&&e(G)}}(T)}),[T]);var H=function(){var t,e=(t=v().mark((function t(){var e,r;return v().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=["address","additionalAddressDetails","street","streetNumber","zipCode","state","city"].map((function(t){return"".concat(O,".").concat(t)})),t.next=3,P.trigger(e,{shouldFocus:!0});case 3:t.sent&&(L(!1),r=j({type:n.SHIPPING},P.getValues().address.shipping),_(r),D([].concat(m(C),[r])),A(n.SHIPPING));case 5:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){g(i,n,o,a,u,"next",t)}function u(t){g(i,n,o,a,u,"throw",t)}a(void 0)}))});return function(){return e.apply(this,arguments)}}();return(0,o.jsxs)(u.Stack,{mt:4,children:[(0,o.jsx)(u.Typography,{variant:"heading4-700",mb:2,children:(0,o.jsx)(l.Trans,{i18nKey:"shipping-address.device.title",defaults:"Where do you want to ship your PO
2S device?",parent:""})}),(0,o.jsx)(u.Typography,{mb:2,children:(0,o.jsx)(l.Trans,{i18nKey:"shipping-address.device.description",defaults:"Please choose an address and preferred delivery time for your POS device.",parent:""})}),(0,o.jsxs)(u.Card,{sx:{boxShadow:"none",border:"1px solid ".concat((0,d.getNeutralColor)("gray-10"))},children:[(0,o.jsx)(u.RadioGroup,{name:"shipping-address",value:T,onChange:function(t,e){return function(t){A(t)}(e)},children:C.map((function(t,e){return(0,o.jsxs)(a().Fragment,{children:[(0,o.jsxs)(u.Stack,{sx:{p:3,display:"flex",flexDirection:"row",gap:2},children:[(0,o.jsx)(u.Radio,{value:null==t?void 0:t.type,sx:{height:"fit-content",p:0}}),(0,o.jsxs)(u.Stack,{children:[(0,o.jsx)(u.Typography,{mb:1,variant:"paragraph-600",children:y("shipping-address.options.".concat(null==t?void 0:t.type,".title"),"My ".concat(null==t?void 0:t.type," address"))}),(0,o.jsxs)(u.Typography,{variant:"secondary-500",children:[[null==t?void 0:t.street,null==t?void 0:t.streetNumber,null==t?void 0:t.city].filter(Boolean).join(", "),(0,o.jsx)("br",{}),[null==t?void 0:t.zipcode,null==t?void 0:t.state].filter(Boolean).join(", ")]}),t.type===n.SHIPPING&&(0,o.jsx)(u.Tooltip,{title:T!==n.SHIPPING?y("shipping-address.edit.tooltip","Please select shipping address to enable"):"",children:(0,o.jsx)("span",{children:(0,o.jsx)(u.Button,{sx:{mt:2,width:"fit-content"},disabled:T!==n.SHIPPING,variant:"outlined",onClick:function(){return D(C.filter((function(t){return t.type!==n.SHIPPING}))),void L(!0)},children:y("shipping-address.button.edit","Edit Address")})})})]})]}),e<C.length&&(0,o.jsx)(u.Divider,{variant:"fullWidth"})]},t.type)}))}),(0,o.jsxs)(u.Grid,{item:!0,xs:12,children:[!G&&!I&&(0,o.jsxs)(u.Stack,{flexDirection:"row",sx:{p:3,cursor:"pointer"},onClick:function(){return L(!0)},children:[(0,o.jsx)(u.Icon,{sx:{color:r.palette.primary.main,marginRight:"16px"},children:"add_circle"}),(0,o.jsx)(u.Typography,{variant:"paragraph-500",color:r.palette.primary.main,children:(0,o.jsx)(l.Trans,{i18nKey:"shipping-address.form.title",defaults:"Add a different address",parent:""})})]}),I&&(0,o.jsxs)(u.Stack,{sx:{p:3,pl:b?3:7},children:[(0,o.jsx)(u.Typography,{mb:1,variant:"paragraph-600",children:(0,o.jsx)(l.Trans,{i18nKey:"shipping-address.form.title",defaults:"Add a different address",parent:""})}),(0,o.jsxs)(u.Grid,{children:[(0,o.jsx)(e,{}),(0,o.jsxs)(u.Stack,{direction:b?"column":"row",sx:{mt:3,ml:"auto",flex:b?"auto":"unset",justifyContent:"end"},spacing:2,children:[(0,o.jsx)(u.Button,{style:{minWidth:"150px"},variant:"outlined",onClick:function(){return L(!1),void(G&&D([].concat(m(C),[G])))},children:y("shipping-address.button.cancel","Cancel")}),(0,o.jsx)(u.Button,{style:{minWidth:"150px"},variant:"contained",onClick:function(){return H()},children:y("shipping-address.button.save","Save")})]})]})]})]})]})]})}}}]);

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