1/*! stellantis_d2_core 1.44.4 202605050651 */ 2"use strict";(self.webpackChunkstellantis_d2_library=self.webpackChunkstellantis_d2_library||[]).push([["OffersStore"],{5758:(t,e,n)=>{n.r(e),n.d(e,{default:()=>g});var r=n(3059),o=n(3861),i=n(7746),a=n(5015);function c(t){return c="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},c(t)}var u=function(t,e){var n=[],r=function(t,o){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(Array.isArray(o)&&(o=o.join(",")),"object"===c(o)&&null!==o){var a=i?"".concat(i).concat(":").concat(t):t;Object.keys(o).sort().forEach(function(t){r(t,o[t],a)})}else{var u=function(t,e,n,r,o){return!o||void 0!==e&&""!==e?(n&&(t=encodeURIComponent(t),e=void 0===e?"":encodeURIComponent(e)),"".concat(r?"":"&").concat(t,"=").concat(e)):""}(i?"".concat(i).concat(":").concat(t):t,o,!0,0===n.length,e);u&&n.push(u)}};return Object.keys(t).forEach(function(e){r(e,t[e])}),n.join("")};var l=n(4647),f={},s=function(t){var e=t.ccode,n=t.llp,r=t.modelYearCode,o=t.trim,i=t.zip,a="";return o&&e&&(r=void 0),!o&&e&&r&&(e=void 0),i&&(r||o&&e)&&(a=function(t,e,n){var r=window.location,o=r.protocol+"//"+r.hostname+(r.port?":"+r.port:"");o=/^http(s)?:\/\//i.test(e)?"":o;var i=u(t,n);return i?(e&&(o+=(o?"/":"")+e),o+=".json?"+i):""}({ccode:e,llp:n,modelYearCode:r,trim:o,zip:i},"hostd/incentives/getoffers",!1)),a};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 d(t){return function(t){if(Array.isArray(t))return p(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return p(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(t,e):void 0}}(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 p(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function m(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,h(r.key),r)}}function v(t,e,n){return e&&m(t.prototype,e),n&&m(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function b(t,e,n){return(e=h(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function h(t){var e=function(t,e){if("object"!=y(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=y(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==y(e)?e:e+""}var S=new(v(function t(){var e=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),b(this,"metadata",{}),b(this,"setMetaData",function(){e.metadata=d(document.getElementsByTagName("meta")).reduce(function(t,e){return e.content&&(t[e.name]=e.content),t},{})}),b(this,"getMetaData",function(){return e.metadata})}));S.setMetaData();const g=function(){var t=(0,o.A)().zipcode;(0,r.useEffect)(function(){if(t){var e=(n=t,r=S.getMetaData(),o=r.year,c=r.vehicle,(u=VehicleHelpers.getModelYearCode({vehicle:c,year:o}))?{zip:n,modelYearCode:u}:null);e?i.A.dispatch(function(t){var e=s(t),n=f[e];return n?{type:"LOAD_OFFERS",payload:{offers:n}}:function(){(0,l.MJ)(),(0,a.h)(e,{},12e3).then(function(t){var n,r,o;if(null===(o=t="SUCCESS"===(null===(n=t)||void 0===n||null===(n=n.result)||void 0===n?void 0:n.result)&&(null===(r=t.result.data)||void 0===r?void 0:r.offerTypes))||void 0===o||!o.length)throw(0,l.UQ)([]),new Error("No Offers found.");f[e]=t,(0,l.UQ)(t)}
2).catch(function(t){return console.log(t)}).finally(function(){return(0,l.Ls)()})}}(e)):(0,l.Ls)()}var n,r,o,c,u},[t])}}}]);
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.