PageSourceSearch

https://www.sleekev.com/static/js/1432.2cca8c2d.chunk.js

js sleekev.com collected 2026-10-05 08:30:24 UTC 17,830 bytes, 2 lines download raw bytes

1/*! For license information please see 1432.2cca8c2d.chunk.js.LICENSE.txt */
2"use strict";(self.webpackChunkweb=self.webpackChunkweb||[]).push([[1432],{96863:function(e,t,r){r(63517),r(74413),r(62285),r(20779),r(57637);var n=r(27378),a=r(56148),o=r(74857),i=r(32246),l=r(6936);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function c(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 u(e,t,r){return(t=function(e){var t=function(e){if("object"!=s(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==s(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}t.Z=function(e){var t=e.defaultValues,r=e.isLoading,s=e.onSubmit,d=(0,o.useForm)({defaultValues:t}),m=a.ZP.map((function(e,t){return{id:"".concat(t+1),label:"+".concat(e.countryCodes[0]," (").concat(e.country,")"),value:"+".concat(e.countryCodes[0])}}));return(0,n.useEffect)((function(){d.reset(t)}),[t]),n.createElement(o.Form,{formMethods:d,onSubmit:function(e){s(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?c(Object(r),!0).forEach((function(t){u(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},e),d.reset)}},n.createElement("div",{className:"flex flex-col gap-3 md:gap-8 xl:gap-3"},n.createElement("div",{className:"flex gap-x-3"},n.createElement("div",{className:"flex-1"},n.createElement(o.TextField,{name:"firstName",className:"w-full border-b border-primary bg-white py-2 text-sm placeholder-primary outline-none md:text-lg xl:text-sm",placeholder:"First Name",validation:{required:"First Name is required"}}),n.createElement(o.FieldError,{name:"firstName",className:"text-xs text-red-500 md:text-base xl:text-xs"})),n.createElement("div",{className:"flex-1"},n.createElement(o.TextField,{name:"lastName",className:"w-full border-b border-primary bg-white py-2 text-sm placeholder-primary outline-none md:text-lg xl:text-sm",placeholder:"Last Name",validation:{required:"Last Name is required"}}),n.createElement(o.FieldError,{name:"lastName",className:"text-xs text-red-500 md:text-base xl:text-xs"}))),n.createElement("div",null,n.createElement(o.EmailField,{name:"email",className:"w-full border-b border-primary bg-white py-2 text-sm placeholder-primary outline-none md:text-lg xl:text-sm",placeholder:"Email Address",validation:{pattern:{value:/[^@]+@[^.]+\..{2,}/,message:"Email Address format is invalid"}}}),n.createElement(o.FieldError,{name:"email",className:"text-xs text-red-500 md:text-base xl:text-xs"})),n.createElement("div",{className:"flex gap-x-3"},n.createElement("div",{className:"flex-1"},n.createElement(l.Z,{className:"w-full border-b border-primary bg-white py-2 text-sm placeholder-primary outline-none md:text-lg xl:text-sm",name:"callingCode",defaultValue:null==t?void 0:t.callingCode,placeholder:"Calling Code",items:m}),n.createElement(o.FieldError,{name:"callingCode",className:"text-xs text-red-500 md:text-base xl:text-xs"})),n.createElement("div",{className:"flex-1"},n.createElement(i.Z,{name:"phone",className:"w-full border-b border-primary bg-white py-2 text-sm placeholder-primary outline-none md:text-lg xl:text-sm",placeholder:"Mobile Number"}),n.createElement(o.FieldError,{name:"phone",className:"text-xs text-red-500 md:text-base xl:text-xs"}))),n.createElement("div",null,n.createElement(o.TextField,{name:"name",className:"w-full border-b border-primary bg-white py-2 text-sm placeholder-primary outline-none md:text-lg xl:text-sm",placeholder:"Company Name",validation:{required:"Company Name is required"}}),n.createElement(o.FieldError,{name:"name",className:"text-xs text-red-500 md:text-base xl:text-xs"})),n.createElement("div",null,n.createElement(o.TextField,{name:"address",className:"w-full border-b border-primary bg-white py-2 text-sm placeholder-primary outline-none md:text-lg xl:text-sm",placeholder:"Company Address",validation:{required:"Company Address is required"}}),n.createElement(o.FieldError,{name:"address",className:"text-xs text-red-500 md:text-base xl:text-xs"})),n.createElement("div",null,n.createElement(o.TextField,{name:"storeName",className:"w-full border-b border-primary bg-white py-2 text-sm placeholder-primary outline-none md:text-lg xl:text-sm",placeholder:"Store Name",validation:{required:"Store Name is required"}}),n.createElement(o.FieldError,{name:"storeName",className:"text-xs text-red-500 md:text-base xl:text-xs"})),n.createElement("div",null,n.createElement(o.TextField,{name:"storeAddress",className:"w-full border-b border-primary bg-white py-2 text-sm placeholder-primary outline-none md:text-lg xl:text-sm",placeholder:"Store Address",validation:{required:"Store Address is required"}}),n.createElement(o.FieldError,{name:"storeAddress",className:"text-xs text-red-500 md:text-base xl:text-xs"})),!!t&&n.createElement("div",null,n.createElement(o.SelectField,{name:"isApproved",className:"w-full border-b border-primary bg-white py-2 text-sm placeholder-primary outline-none md:text-lg xl:text-sm",defaultValue:0,validation:{valueAsNumber:!0}},n.createElement("option",{value:0},"Not Approved"),n.createElement("option",{value:1},"Approved"))),n.createElement(o.Submit,{className:"mt-8 h-8 w-[128px] self-center rounded-full bg-dark-gray px-4 text-sm font-semibold text-white transition-all duration-200 hover:bg-primary xl:self-end 2xl:h-10 2xl:px-8 2xl:text-base",disabled:r},"Submit")))}},51432:function(e,t,r){r.r(t),r.d(t,{default:function(){return S}}),r(63517),r(74413),r(20779);
vendor: 6,214 bytes, line 2
2var n,a,o,i,l=r(94621),s=r(27378),c=r(65852),u=r(99197),d=r.n(u),m=r(98889),p=r(31786),f=r(96863),h=(0,l.ZP)(n||(a=["\n  query FindDealershipQuery($dealershipId: Int!) {\n    dealership(id: $dealershipId) {\n      firstName\n      lastName\n      name\n      phone\n      email\n      address\n      storeName\n      storeAddress\n      isApproved\n    }\n  }\n"],o||(o=a.slice(0)),n=Object.freeze(Object.defineProperties(a,{raw:{value:Object.freeze(o)}})))),y=(0,p.createCell)({QUERY:h,beforeQuery:function(e){return{variables:{dealershipId:e.dealershipId}}},Loading:function(){return s.createElement("div",null,"Loading...")},Empty:function(){return s.createElement("div",null,"Empty")},Failure:function(e){var t=e.error;return s.createElement("div",{style:{color:"red"}},"Error: ",t.message)},Success:function(e){var t=e.dealership,r=(e.dealershipId,e.isLoading),n=e.onSubmit,a=e.refetch,o=function(){if(!t.phone)return{callingCode:null,phone:null};var e=t.phone.split(" ");return 1===e.length?{callingCode:null,phone:t.phone}:{callingCode:e[0],phone:e[1]}}(),i=o.callingCode,l=o.phone;return s.createElement(f.Z,{defaultValues:{firstName:t.firstName,lastName:t.lastName,name:t.name,phone:l,callingCode:i,email:t.email,address:t.address,storeName:t.storeName,storeAddress:t.storeAddress,isApproved:Number(t.isApproved)},isLoading:r,onSubmit:function(e){return null==n?void 0:n(e,a)}})},displayName:"UpdateDealerShipCell"}),x=r(24234);function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}function b(){b=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",l=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof x?t:x,i=Object.create(o.prototype),l=new k(n||[]);return a(i,"_invoke",{value:F(e,r,l)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var m="suspendedStart",p="suspendedYield",f="executing",h="completed",y={};function x(){}function g(){}function E(){}var w={};c(w,i,(function(){return this}));var N=Object.getPrototypeOf,S=N&&N(N(I([])));S&&S!==r&&n.call(S,i)&&(w=S);var O=E.prototype=x.prototype=Object.create(w);function j(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function L(e,t){function r(a,o,i,l){var s=d(e[a],e,o);if("throw"!==s.type){var c=s.arg,u=c.value;return u&&"object"==v(u)&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,l)}),(function(e){r("throw",e,i,l)})):t.resolve(u).then((function(e){c.value=e,i(c)}),(function(e){return r("throw",e,i,l)}))}l(s.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t((function(t,a){r(e,n,t,a)}))}return o=o?o.then(a,a):a()}})}function F(t,r,n){var a=m;return function(o,i){if(a===f)throw Error("Generator is already running");if(a===h){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var l=n.delegate;if(l){var s=A(l,n);if(s){if(s===y)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===m)throw a=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=f;var c=d(t,r,n);if("normal"===c.type){if(a=n.done?h:p,c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(a=h,n.method="throw",n.arg=c.arg)}}}function A(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,A(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var o=d(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,y;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(v(t)+" is not iterable")}return g.prototype=E,a(O,"constructor",{value:E,configurable:!0}),a(E,"constructor",{value:g,configurable:!0}),g.displayName=c(E,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,E):(e.__proto__=E,c(e,s,"GeneratorFunction")),e.prototype=Object.create(O),e},t.awrap=function(e){return{__await:e}},j(L.prototype),c(L.prototype,l,(function(){return this})),t.AsyncIterator=L,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new L(u(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},j(O),c(O,s,"Generator"),c(O,i,(function(){return this})),c(O,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEac
2h(P),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function a(n,a){return l.type="throw",l.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],l=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(s&&c){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,y):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),P(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;P(r)}return a}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}function g(e,t,r,n,a,o,i){try{var l=e[o](i),s=l.value}catch(e){return void r(e)}l.done?t(s):Promise.resolve(s).then(n,a)}function E(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){var n,a,o,i,l=[],s=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,a=e}finally{try{if(!s&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(c)throw a}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return w(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?w(e,t):void 0}}(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 w(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var N=(0,l.ZP)(i||(i=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n  mutation UpdateDealershipMutation($id: Int!, $input: UpdateDealershipInput!) {\n    updateDealership(id: $id, input: $input) {\n      id\n    }\n  }\n"]))),S=function(){var e=E((0,p.useMutation)(N),2),t=e[0],r=e[1].loading,n=(0,m.useParams)(),a=E((0,s.useState)(!1),2),o=a[0],i=a[1],l=E((0,s.useState)({title:"",body:"",type:"success"}),2),u=l[0],f=l[1],h=function(){var e,r=(e=b().mark((function e(r,a){var o;return b().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,o=r.callingCode&&r.phone?"".concat(r.callingCode," ").concat(r.phone):null,e.next=4,t({variables:{id:parseInt(n.id,10),input:{firstName:r.firstName,lastName:r.lastName,name:r.name,phone:o,email:r.email,address:r.address,storeName:r.storeName,storeAddress:r.storeAddress,isApproved:Boolean(r.isApproved)}}});case 4:a(),f({title:"Success",body:"Dealership successfully updated.",type:"success"}),i(!0),e.next=14;break;case 9:e.prev=9,e.t0=e.catch(0),console.log(e.t0),f({title:"Failed",body:"Dealership failed to update.",type:"failed"}),i(!0);case 14:case"end":return e.stop()}}),e,null,[[0,9]])})),function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){g(o,n,a,i,l,"next",e)}function l(e){g(o,n,a,i,l,"throw",e)}i(void 0)}))});return function(e,t){return r.apply(this,arguments)}}();return s.createElement(s.Fragment,null,s.createElement(p.MetaTags,{title:"Update Dealership",description:"Update Dealership page"}),s.createElement("div",{className:"p-6"},s.createElement("div",{className:"mb-6 flex flex-col items-center justify-between gap-y-6 md:flex-row"},s.createElement("div",null,s.createElement(m.Link,{className:"mb-8 flex w-fit items-center text-primary hover:text-secondary",to:m.routes.dealerShips()},s.createElement(c.CF5,null),s.createElement("p",null,"Back")),s.createElement("h1",{className:"text-2xl"},"Update Dealership"))),s.createElement("div",{className:"mb-16 xl:w-1/2"},!r&&s.createElement(y,{dealershipId:n.id,onSubmit:h,isLoading:r}),r&&s.createElement("div",{className:"flex h-full w-full items-center justify-center"},s.createElement(d(),{color:"#D6001C"})))),s.createElement(x.Z,{title:u.title,body:u.body,type:u.type,isOpen:o,onRequestClose:function(){return i(!1)}}))}}}]);

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.