@wayke-se/ecom-web 1.7.0-beta.8 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import{config as _d}from"@wayke-se/ecom";var Yo={name:"@wayke-se/ecom-web",version:"1.7.0-beta.8",description:"Wayke Ecom Web",module:"dist/index.mjs",main:"dist/index.js",types:"dist/index.d.ts",homepage:"https://github.com/wayke-se/wayke-ecom-web",scripts:{start:"node ./esbuild/start.js",clip:"node ./esbuild/clip-ui.js && node ./clip-ui/start.js",build:"npm run clean && node ./esbuild/lib.js && node ./esbuild/cdn.js",clean:"rimraf build && rimraf dist && rimraf dist-cdn",test:"npm run lint && npm run typecheck",typecheck:"tsc -noEmit","typecheck:watch":"tsc -noEmit -watch",lint:"eslint --ext .ts,.js src","lint:fix":"eslint --ext .ts,.js 'src' --fix",stylelint:"stylelint '**/*.scss'",prepare:"husky install"},author:"Wayke",license:"ISC",devDependencies:{"@ourstudio/clip-ui":"^0.0.11","@types/marked":"^4.3.0","@types/node":"^17.0.18","@types/object-path":"^0.11.1","@types/sanitize-html":"^2.6.2","@typescript-eslint/eslint-plugin":"^5.12.0","@typescript-eslint/parser":"^5.12.0",esbuild:"^0.15.10","esbuild-sass-plugin":"2.3.3",eslint:"^8.9.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0",husky:"^8.0.1","npm-dts":"^1.3.11",prettier:"^2.5.1",rimraf:"^5.0.1",stylelint:"^15.2.0","stylelint-config-prettier-scss":"^1.0.0","stylelint-config-standard-scss":"^9.0.0",typescript:"^5.1.3"},dependencies:{"@wayke-se/ecom":"^4.5.0",marked:"^4.3.0","object-path":"^0.11.8",redux:"^4.1.2","sanitize-html":"^2.7.0"},files:["dist"]};import{createStore as Qc}from"redux";import{DrivingDistance as Yc,PaymentType as pi}from"@wayke-se/ecom";var nt=(s,i)=>s!==void 0&&i!==void 0?JSON.stringify(s).localeCompare(JSON.stringify(i))===0:s===i;var Ne=s=>({costs:s.getCosts(),fees:s.getFees(),interests:s.getInterests(),durationSpec:s.getDurationSpec(),downPaymentSpec:s.getDownPaymentSpec(),residualValueSpec:s.getResidualValueSpec(),totalResidualValue:s.getTotalResidualValue(),publicURL:s.getPublicURL(),shouldUseCreditScoring:s.shouldUseCreditScoring(),financialProductCode:s.getFinancialProductCode(),price:s.getPrice(),creditAmount:s.getCreditAmount(),hasPrivacyPolicy:s.hasPrivacyPolicy(),privacyPolicyUrl:s.getPrivacyPolicyUrl(),moneyLaunderingInformationURL:s.getMoneyLaunderingInformationURL(),financialOptionId:s.getFinancialOptionId()}),Ko=s=>({status:s.getStatus(),hasPendingSigning:s.hasPendingSigning(),hintCode:s.getHintCode(),signingMessage:s.getSigningMessage(),shouldRenewSigning:s.shouldRenewSigning(),isSigned:s.isSigned(),address:void 0,pendingScoring:s.hasPendingScoring(),isScored:s.isScored(),hasScoringError:s.hasScoringError(),scoringId:s.getScoringId(),recommendation:s.getRecommendation(),decision:s.getDecision(),isAccepted:s.isAccepted()}),xe=s=>({orderVehicle:s.getOrderVehicle(),accessories:s.getAccessories(),requiresDealerSelection:s.requiresDealerSelection(),dealerSites:s.getDealerSites(),paymentOptions:s.getPaymentOptions().map(e=>({...e,loanDetails:e.loanDetails?Ne(e.loanDetails):void 0})),deliveryOptions:s.getDeliveryOptions(),insuranceOption:s.getInsuranceOption(),orderConditions:s.getOrderConditions(),orderReturnConditions:s.getOrderReturnConditions(),conditionsPdfUri:s.getConditionsPdfUri(),contactInformation:s.getContactInformation(),allowsTradeIn:s.allowsTradeIn(),isUnavailable:s.isUnavailable(),isPaymentRequired:s.isPaymentRequired()}),jo=s=>({vehicle:s.getVehicle()});var at="RESET",Qo=s=>i=>i({type:at,id:s}),rt="SET_ORDER",Pe=(s,i)=>e=>e({type:rt,order:s,vehicle:i}),ct="SET_ID",zo=s=>i=>i({type:ct,id:s}),lt="SET_CONTACT_EMAIL_AND_PHONE",Jo=s=>i=>i({type:lt,value:s}),dt="SET_SOCIAL_ID_AND_ADDRESS",Xo=(s,i,e)=>t=>t({type:dt,socialId:s,address:i,lastStage:e}),mt="SET_HOME_DELIVERY",Zo=(s,i)=>e=>e({type:mt,homeDelivery:s,lastStage:i}),pt="SET_DEALER",ei=(s,i)=>e=>e({type:pt,dealer:s,lastStage:i}),ut="INIT_TRADE_IN",ti=s=>i=>i({type:ut,lastStage:s}),ht="SET_TRADE_IN",Te=(s,i,e)=>t=>t({type:ht,lastStage:s,tradeIn:i,tradeInVehicle:e}),kt="SET_FINANCIAL",si=(s,i)=>e=>e({type:kt,paymentType:s,lastStage:i}),yt="SET_PAYMENT_LOOKUP_RESPONSE",oi=s=>i=>i({type:yt,paymentLookupResponse:Ne(s)}),vt="RESET_PAYMENT_LOOKUP_RESPONSE",ii=()=>s=>s({type:vt}),Et="SET_DRIVING_DISTANCE",ni=s=>i=>i({type:Et,drivingDistance:s}),It="COMPLETE_STAGE",J=s=>i=>i({type:It,lastStage:s}),ft="SET_OR_REMOVE_INSURANCE",pe=s=>i=>i({type:ft,insurance:s}),gt="SET_OR_REMOVE_INSURANCE_ADDONS",ai=(s,i)=>e=>e({type:gt,insurance:s,insuranceAddons:i}),_t="SET_OR_REMOVE_FREE_INSURANCE",ri=s=>i=>i({type:_t,freeInsurance:s}),St="SET_OR_REMOVE_ACCESSORY",ci=s=>i=>i({type:St,accessory:s}),wt="GO_TO",L=(s,i,e)=>t=>t({type:wt,view:s,index:i,subStage:e}),Nt="SET_STAGES",li=s=>i=>i({type:Nt,stages:s}),Tt="SET_CREATED_ORDER_ID",di=(s,i)=>e=>e({type:Tt,id:s,payment:i}),At="SET_CREDIT_ASSESSMENT_RESPONSE",ue=(s,i)=>e=>e({type:At,caseId:s,creditAssessmentResponse:i}),Ct="SET_STATE",mi=s=>i=>i({type:Ct,state:s});var Kc={};var ui={view:"preview",stage:1,subStage:1},hi={id:"",topNavigation:{...ui},navigation:{...ui},customer:{email:"",phone:"",givenName:"",surname:"",socialId:""},homeDelivery:!1,accessories:[],drivingDistance:Yc.Between0And1000,...Kc},re=(s,i)=>i?{view:"summary",stage:1,subStage:1}:{view:"main",stage:s+1,subStage:1},ce=(s,i)=>i.view==="main"?s.stage<i.stage?i:E.topNavigation:{...s,stage:s.stage+1},Dt=s=>s&&s?.length===1&&s?.[0].type===pi.Cash?pi.Cash:void 0,E,bt,jc=(s=hi,i)=>{let e,t;switch(E={...s},i.type){case at:return{...hi,id:i.id};case Nt:return{...E,stages:i.stages};case ct:return{...E,id:i.id};case rt:return{...s,order:i.order,paymentType:Dt(i.order?.paymentOptions),vehicle:{...i.order.orderVehicle,...i.vehicle||{}}};case lt:let o={...E,customer:{...s.customer,email:i.value.email,phone:i.value.phone},navigation:{view:"main",stage:s.navigation.stage,subStage:2}};return delete o.wantTradeIn,delete o.tradeIn,delete o.tradeInVehicle,o.paymentType=Dt(s.order?.paymentOptions),delete o.paymentLookupResponse,delete o.insurance,delete o.insuranceAddOns,delete o.freeInsurance,delete o.dealer,o.accessories=[],o;case dt:return e=re(E.navigation.stage,i.lastStage),t=ce(E.topNavigation,e),E={...s,navigation:e,topNavigation:t,address:i.address,customer:{...s.customer,socialId:i.socialId}},E;case pt:return e=re(s.navigation.stage,i.lastStage),t={...e},E={...s,navigation:e,topNavigation:t,dealer:i.dealer},delete E.wantTradeIn,delete E.tradeIn,delete E.tradeInVehicle,E.paymentType=Dt(s.order?.paymentOptions),delete E.paymentLookupResponse,delete E.insurance,delete E.insuranceAddOns,delete E.freeInsurance,E.accessories=[],E;case mt:return e=re(s.navigation.stage,i.lastStage),t=ce(E.topNavigation,e),E={...s,navigation:e,topNavigation:t,homeDelivery:i.homeDelivery},E;case ut:return e={view:"main",stage:s.navigation.stage,subStage:1},t=ce(E.topNavigation,e),E={...s,navigation:e,wantTradeIn:!0,topNavigation:t,tradeIn:s.tradeIn||{registrationNumber:"",mileage:"",description:""}},E;case ht:return e=re(s.navigation.stage,i.lastStage),t=ce(E.topNavigation,e),E={...s,navigation:e,topNavigation:t,wantTradeIn:!!i.tradeIn,tradeIn:i.tradeIn,tradeInVehicle:i.tradeInVehicle},E;case kt:return e=re(s.navigation.stage,i.lastStage),t=ce(E.topNavigation,e),{...E,navigation:e,topNavigation:t,paymentType:i.paymentType};case vt:return{...E,paymentLookupResponse:void 0};case yt:return{...E,paymentLookupResponse:i.paymentLookupResponse};case Et:return{...E,drivingDistance:i.drivingDistance};case It:return e=re(s.navigation.stage,i.lastStage),t=ce(E.topNavigation,e),E={...s,navigation:e,topNavigation:t},E;case gt:return E.insurance=i.insurance,E.insuranceAddOns={insurance:i.insurance.name,addOns:i.insuranceAddons},E;case ft:return nt(E.insurance,i.insurance)?E.insurance=void 0:E.insurance=i.insurance,E.insuranceAddOns?.insurance&&(E.insuranceAddOns=void 0),E;case _t:return nt(E.freeInsurance,i.freeInsurance)?E.freeInsurance=void 0:E.freeInsurance=i.freeInsurance,E;case St:return bt=E.accessories.findIndex(n=>n.id===i.accessory.id),E.accessories=[...E.accessories],bt>-1?E.accessories.splice(bt,1):E.accessories.push(i.accessory),{...E,accessories:[...E.accessories]};case wt:return{...s,navigation:{view:i.view,stage:i.index||1,subStage:i.subStage||1}};case Tt:return i.payment?e={view:"main",stage:s.navigation.stage,subStage:2}:e=re(s.navigation.stage,!0),t=ce(E.topNavigation,e),E={...s,navigation:e,topNavigation:t,createdOrderId:i.id,payment:i.payment},E;case At:return{...E,caseId:i.caseId,creditAssessmentResponse:i.creditAssessmentResponse};case Ct:return{...i.state};default:return s}},ki=jc;var yi=()=>Qc(ki);var $e=(s,i)=>{if(!i)return s;let e=new URL(s);return`${i}${e.pathname}`};var zc=s=>s.toString().replace(/\s/g,""),Jc=(s,i)=>{if(!i)return s;let e=Math.pow(10,i);return(Math.round(s*e)/e).toFixed(i)},y=(s,i)=>{if(s===void 0)return"???";let e=Jc(s,i?.decimals!==void 0?i.decimals:0);return`${i?.prefix?`${i.prefix}`:""}${zc(e).replace(/\B(?=(\d{3})+(?!\d))/g," ")}${i?.postfix?` ${i.postfix}`:""}`},Xc=(s,i)=>{let e=s.split(" "),t=i.split(" ").map(o=>o.toLowerCase());return e.filter(o=>!t.includes(o.toLowerCase())).join(" ")},he=s=>{if(!!s)return Xc(s.shortDescription||"",s.title||"")};var Zc=({vehicle:s,order:i,meta:e,cdnMedia:t})=>{let o=s?.imageUrls,n=s?.title,a=y(s?.price||NaN),c=i?.contactInformation?.name;return`
1
+ import{config as _d}from"@wayke-se/ecom";var Yo={name:"@wayke-se/ecom-web",version:"1.7.0",description:"Wayke Ecom Web",module:"dist/index.mjs",main:"dist/index.js",types:"dist/index.d.ts",homepage:"https://github.com/wayke-se/wayke-ecom-web",scripts:{start:"node ./esbuild/start.js",clip:"node ./esbuild/clip-ui.js && node ./clip-ui/start.js",build:"npm run clean && node ./esbuild/lib.js && node ./esbuild/cdn.js",clean:"rimraf build && rimraf dist && rimraf dist-cdn",test:"npm run lint && npm run typecheck",typecheck:"tsc -noEmit","typecheck:watch":"tsc -noEmit -watch",lint:"eslint --ext .ts,.js src","lint:fix":"eslint --ext .ts,.js 'src' --fix",stylelint:"stylelint '**/*.scss'",prepare:"husky install"},author:"Wayke",license:"ISC",devDependencies:{"@ourstudio/clip-ui":"^0.0.11","@types/marked":"^4.3.0","@types/node":"^17.0.18","@types/object-path":"^0.11.1","@types/sanitize-html":"^2.6.2","@typescript-eslint/eslint-plugin":"^5.12.0","@typescript-eslint/parser":"^5.12.0",esbuild:"^0.15.10","esbuild-sass-plugin":"2.3.3",eslint:"^8.9.0","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^4.0.0",husky:"^8.0.1","npm-dts":"^1.3.11",prettier:"^2.5.1",rimraf:"^5.0.1",stylelint:"^15.2.0","stylelint-config-prettier-scss":"^1.0.0","stylelint-config-standard-scss":"^9.0.0",typescript:"^5.1.3"},dependencies:{"@wayke-se/ecom":"^4.5.0",marked:"^4.3.0","object-path":"^0.11.8",redux:"^4.1.2","sanitize-html":"^2.7.0"},files:["dist"]};import{createStore as Qc}from"redux";import{DrivingDistance as Yc,PaymentType as pi}from"@wayke-se/ecom";var nt=(s,i)=>s!==void 0&&i!==void 0?JSON.stringify(s).localeCompare(JSON.stringify(i))===0:s===i;var Ne=s=>({costs:s.getCosts(),fees:s.getFees(),interests:s.getInterests(),durationSpec:s.getDurationSpec(),downPaymentSpec:s.getDownPaymentSpec(),residualValueSpec:s.getResidualValueSpec(),totalResidualValue:s.getTotalResidualValue(),publicURL:s.getPublicURL(),shouldUseCreditScoring:s.shouldUseCreditScoring(),financialProductCode:s.getFinancialProductCode(),price:s.getPrice(),creditAmount:s.getCreditAmount(),hasPrivacyPolicy:s.hasPrivacyPolicy(),privacyPolicyUrl:s.getPrivacyPolicyUrl(),moneyLaunderingInformationURL:s.getMoneyLaunderingInformationURL(),financialOptionId:s.getFinancialOptionId()}),Ko=s=>({status:s.getStatus(),hasPendingSigning:s.hasPendingSigning(),hintCode:s.getHintCode(),signingMessage:s.getSigningMessage(),shouldRenewSigning:s.shouldRenewSigning(),isSigned:s.isSigned(),address:void 0,pendingScoring:s.hasPendingScoring(),isScored:s.isScored(),hasScoringError:s.hasScoringError(),scoringId:s.getScoringId(),recommendation:s.getRecommendation(),decision:s.getDecision(),isAccepted:s.isAccepted()}),xe=s=>({orderVehicle:s.getOrderVehicle(),accessories:s.getAccessories(),requiresDealerSelection:s.requiresDealerSelection(),dealerSites:s.getDealerSites(),paymentOptions:s.getPaymentOptions().map(e=>({...e,loanDetails:e.loanDetails?Ne(e.loanDetails):void 0})),deliveryOptions:s.getDeliveryOptions(),insuranceOption:s.getInsuranceOption(),orderConditions:s.getOrderConditions(),orderReturnConditions:s.getOrderReturnConditions(),conditionsPdfUri:s.getConditionsPdfUri(),contactInformation:s.getContactInformation(),allowsTradeIn:s.allowsTradeIn(),isUnavailable:s.isUnavailable(),isPaymentRequired:s.isPaymentRequired()}),jo=s=>({vehicle:s.getVehicle()});var at="RESET",Qo=s=>i=>i({type:at,id:s}),rt="SET_ORDER",Pe=(s,i)=>e=>e({type:rt,order:s,vehicle:i}),ct="SET_ID",zo=s=>i=>i({type:ct,id:s}),lt="SET_CONTACT_EMAIL_AND_PHONE",Jo=s=>i=>i({type:lt,value:s}),dt="SET_SOCIAL_ID_AND_ADDRESS",Xo=(s,i,e)=>t=>t({type:dt,socialId:s,address:i,lastStage:e}),mt="SET_HOME_DELIVERY",Zo=(s,i)=>e=>e({type:mt,homeDelivery:s,lastStage:i}),pt="SET_DEALER",ei=(s,i)=>e=>e({type:pt,dealer:s,lastStage:i}),ut="INIT_TRADE_IN",ti=s=>i=>i({type:ut,lastStage:s}),ht="SET_TRADE_IN",Te=(s,i,e)=>t=>t({type:ht,lastStage:s,tradeIn:i,tradeInVehicle:e}),kt="SET_FINANCIAL",si=(s,i)=>e=>e({type:kt,paymentType:s,lastStage:i}),yt="SET_PAYMENT_LOOKUP_RESPONSE",oi=s=>i=>i({type:yt,paymentLookupResponse:Ne(s)}),vt="RESET_PAYMENT_LOOKUP_RESPONSE",ii=()=>s=>s({type:vt}),Et="SET_DRIVING_DISTANCE",ni=s=>i=>i({type:Et,drivingDistance:s}),It="COMPLETE_STAGE",J=s=>i=>i({type:It,lastStage:s}),ft="SET_OR_REMOVE_INSURANCE",pe=s=>i=>i({type:ft,insurance:s}),gt="SET_OR_REMOVE_INSURANCE_ADDONS",ai=(s,i)=>e=>e({type:gt,insurance:s,insuranceAddons:i}),_t="SET_OR_REMOVE_FREE_INSURANCE",ri=s=>i=>i({type:_t,freeInsurance:s}),St="SET_OR_REMOVE_ACCESSORY",ci=s=>i=>i({type:St,accessory:s}),wt="GO_TO",L=(s,i,e)=>t=>t({type:wt,view:s,index:i,subStage:e}),Nt="SET_STAGES",li=s=>i=>i({type:Nt,stages:s}),Tt="SET_CREATED_ORDER_ID",di=(s,i)=>e=>e({type:Tt,id:s,payment:i}),At="SET_CREDIT_ASSESSMENT_RESPONSE",ue=(s,i)=>e=>e({type:At,caseId:s,creditAssessmentResponse:i}),Ct="SET_STATE",mi=s=>i=>i({type:Ct,state:s});var Kc={};var ui={view:"preview",stage:1,subStage:1},hi={id:"",topNavigation:{...ui},navigation:{...ui},customer:{email:"",phone:"",givenName:"",surname:"",socialId:""},homeDelivery:!1,accessories:[],drivingDistance:Yc.Between0And1000,...Kc},re=(s,i)=>i?{view:"summary",stage:1,subStage:1}:{view:"main",stage:s+1,subStage:1},ce=(s,i)=>i.view==="main"?s.stage<i.stage?i:E.topNavigation:{...s,stage:s.stage+1},Dt=s=>s&&s?.length===1&&s?.[0].type===pi.Cash?pi.Cash:void 0,E,bt,jc=(s=hi,i)=>{let e,t;switch(E={...s},i.type){case at:return{...hi,id:i.id};case Nt:return{...E,stages:i.stages};case ct:return{...E,id:i.id};case rt:return{...s,order:i.order,paymentType:Dt(i.order?.paymentOptions),vehicle:{...i.order.orderVehicle,...i.vehicle||{}}};case lt:let o={...E,customer:{...s.customer,email:i.value.email,phone:i.value.phone},navigation:{view:"main",stage:s.navigation.stage,subStage:2}};return delete o.wantTradeIn,delete o.tradeIn,delete o.tradeInVehicle,o.paymentType=Dt(s.order?.paymentOptions),delete o.paymentLookupResponse,delete o.insurance,delete o.insuranceAddOns,delete o.freeInsurance,delete o.dealer,o.accessories=[],o;case dt:return e=re(E.navigation.stage,i.lastStage),t=ce(E.topNavigation,e),E={...s,navigation:e,topNavigation:t,address:i.address,customer:{...s.customer,socialId:i.socialId}},E;case pt:return e=re(s.navigation.stage,i.lastStage),t={...e},E={...s,navigation:e,topNavigation:t,dealer:i.dealer},delete E.wantTradeIn,delete E.tradeIn,delete E.tradeInVehicle,E.paymentType=Dt(s.order?.paymentOptions),delete E.paymentLookupResponse,delete E.insurance,delete E.insuranceAddOns,delete E.freeInsurance,E.accessories=[],E;case mt:return e=re(s.navigation.stage,i.lastStage),t=ce(E.topNavigation,e),E={...s,navigation:e,topNavigation:t,homeDelivery:i.homeDelivery},E;case ut:return e={view:"main",stage:s.navigation.stage,subStage:1},t=ce(E.topNavigation,e),E={...s,navigation:e,wantTradeIn:!0,topNavigation:t,tradeIn:s.tradeIn||{registrationNumber:"",mileage:"",description:""}},E;case ht:return e=re(s.navigation.stage,i.lastStage),t=ce(E.topNavigation,e),E={...s,navigation:e,topNavigation:t,wantTradeIn:!!i.tradeIn,tradeIn:i.tradeIn,tradeInVehicle:i.tradeInVehicle},E;case kt:return e=re(s.navigation.stage,i.lastStage),t=ce(E.topNavigation,e),{...E,navigation:e,topNavigation:t,paymentType:i.paymentType};case vt:return{...E,paymentLookupResponse:void 0};case yt:return{...E,paymentLookupResponse:i.paymentLookupResponse};case Et:return{...E,drivingDistance:i.drivingDistance};case It:return e=re(s.navigation.stage,i.lastStage),t=ce(E.topNavigation,e),E={...s,navigation:e,topNavigation:t},E;case gt:return E.insurance=i.insurance,E.insuranceAddOns={insurance:i.insurance.name,addOns:i.insuranceAddons},E;case ft:return nt(E.insurance,i.insurance)?E.insurance=void 0:E.insurance=i.insurance,E.insuranceAddOns?.insurance&&(E.insuranceAddOns=void 0),E;case _t:return nt(E.freeInsurance,i.freeInsurance)?E.freeInsurance=void 0:E.freeInsurance=i.freeInsurance,E;case St:return bt=E.accessories.findIndex(n=>n.id===i.accessory.id),E.accessories=[...E.accessories],bt>-1?E.accessories.splice(bt,1):E.accessories.push(i.accessory),{...E,accessories:[...E.accessories]};case wt:return{...s,navigation:{view:i.view,stage:i.index||1,subStage:i.subStage||1}};case Tt:return i.payment?e={view:"main",stage:s.navigation.stage,subStage:2}:e=re(s.navigation.stage,!0),t=ce(E.topNavigation,e),E={...s,navigation:e,topNavigation:t,createdOrderId:i.id,payment:i.payment},E;case At:return{...E,caseId:i.caseId,creditAssessmentResponse:i.creditAssessmentResponse};case Ct:return{...i.state};default:return s}},ki=jc;var yi=()=>Qc(ki);var $e=(s,i)=>{if(!i)return s;let e=new URL(s);return`${i}${e.pathname}`};var zc=s=>s.toString().replace(/\s/g,""),Jc=(s,i)=>{if(!i)return s;let e=Math.pow(10,i);return(Math.round(s*e)/e).toFixed(i)},y=(s,i)=>{if(s===void 0)return"???";let e=Jc(s,i?.decimals!==void 0?i.decimals:0);return`${i?.prefix?`${i.prefix}`:""}${zc(e).replace(/\B(?=(\d{3})+(?!\d))/g," ")}${i?.postfix?` ${i.postfix}`:""}`},Xc=(s,i)=>{let e=s.split(" "),t=i.split(" ").map(o=>o.toLowerCase());return e.filter(o=>!t.includes(o.toLowerCase())).join(" ")},he=s=>{if(!!s)return Xc(s.shortDescription||"",s.title||"")};var Zc=({vehicle:s,order:i,meta:e,cdnMedia:t})=>{let o=s?.imageUrls,n=s?.title,a=y(s?.price||NaN),c=i?.contactInformation?.name;return`
2
2
  <div class="waykeecom-product-card">
3
3
  ${o?.length?`
4
4
  <div class="waykeecom-product-card__media">