/*! For license information please see vendors~signup_forms.ffb16c5d33241b7ebc9d.js.LICENSE.txt */ (self.webpackChunk_klaviyo_onsite_modules=self.webpackChunk_klaviyo_onsite_modules||[]).push([[1885,4928],{51311:function(t,e,n){var r,o,i,u,a,c,s,f,h,p,l,y,d,m,v,g;i=function(t,e,n){if(!h(e)||l(e)||y(e)||d(e)||f(e))return e;var r,o=0,u=0;if(p(e))for(r=[],u=e.length;o1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(u(this,t),!e||"string"!=typeof e)throw new Error("Expected a string key for Entity, but found "+e+".");var o=r.idAttribute,i=void 0===o?"id":o,a=r.mergeStrategy,s=void 0===a?function(t,e){return c({},t,e)}:a,f=r.processStrategy,p=void 0===f?function(t){return c({},t)}:f;this._key=e,this._getId="function"==typeof i?i:h(i),this._idAttribute=i,this._mergeStrategy=s,this._processStrategy=p,this.define(n)}return t.prototype.define=function(t){this.schema=Object.keys(t).reduce((function(e,n){var r,o=t[n];return c({},e,((r={})[n]=o,r))}),this.schema||{})},t.prototype.getId=function(t,e,n){return this._getId(t,e,n)},t.prototype.merge=function(t,e){return this._mergeStrategy(t,e)},t.prototype.normalize=function(t,e,n,r,o){var u=this,a=this._processStrategy(t,e,n);return Object.keys(this.schema).forEach((function(t){if(a.hasOwnProperty(t)&&"object"===i(a[t])){var e=u.schema[t];a[t]=r(a[t],a,t,e,o)}})),o(this,a,t,e,n),this.getId(t,e,n)},t.prototype.denormalize=function(t,e){var n=this;return r(t)?o(this.schema,t,e):(Object.keys(this.schema).forEach((function(r){if(t.hasOwnProperty(r)){var o=n.schema[r];t[r]=e(t[r],o)}})),t)},a(t,[{key:"key",get:function(){return this._key}},{key:"idAttribute",get:function(){return this._idAttribute}}]),t}(),l=function(){function t(e,n){u(this,t),n&&(this._schemaAttribute="string"==typeof n?function(t){return t[n]}:n),this.define(e)}return t.prototype.define=function(t){this.schema=t},t.prototype.getSchemaAttribute=function(t,e,n){return!this.isSingleSchema&&this._schemaAttribute(t,e,n)},t.prototype.inferSchema=function(t,e,n){if(this.isSingleSchema)return this.schema;var r=this.getSchemaAttribute(t,e,n);return this.schema[r]},t.prototype.normalizeValue=function(t,e,n,r,o){var i=this.inferSchema(t,e,n);if(!i)return t;var u=r(t,e,n,i,o);return this.isSingleSchema||null==u?u:{id:u,schema:this.getSchemaAttribute(t,e,n)}},t.prototype.denormalizeValue=function(t,e){var n=r(t)?t.get("schema"):t.schema;return this.isSingleSchema||n?e((r(t)?t.get("id"):t.id)||t,this.isSingleSchema?this.schema:this.schema[n]):t},a(t,[{key:"isSingleSchema",get:function(){return!this._schemaAttribute}}]),t}(),y=function(t){function e(n,r){if(u(this,e),!r)throw new Error('Expected option "schemaAttribute" not found on UnionSchema.');return f(this,t.call(this,n,r))}return s(e,t),e.prototype.normalize=function(t,e,n,r,o){return this.normalizeValue(t,e,n,r,o)},e.prototype.denormalize=function(t,e){return this.denormalizeValue(t,e)},e}(l),d=function(t){function e(){return u(this,e),f(this,t.apply(this,arguments))}return s(e,t),e.prototype.normalize=function(t,e,n,r,o){var i=this;return Object.keys(t).reduce((function(e,n,u){var a,s=t[n];return null!=s?c({},e,((a={})[n]=i.normalizeValue(s,t,n,r,o),a)):e}),{})},e.prototype.denormalize=function(t,e){var n=this;return Object.keys(t).reduce((function(r,o){var i,u=t[o];return c({},r,((i={})[o]=n.denormalizeValue(u,e),i))}),{})},e}(l),m=function(t){if(Array.isArray(t)&&t.length>1)throw new Error("Expected schema definition to be a single schema, but found "+t.length+".");return t[0]},v=function(t){return Array.isArray(t)?t:Object.keys(t).map((function(e){return t[e]}))},g=function(t,e,n,r,o,i){return t=m(t),v(e).map((function(e,u){return o(e,n,r,t,i)}))},b=function(t){function e(){return u(this,e),f(this,t.apply(this,arguments))}return s(e,t),e.prototype.normalize=function(t,e,n,r,o){var i=this;return v(t).map((function(t,u){return i.normalizeValue(t,e,n,r,o)})).filter((function(t){return null!=t}))},e.prototype.denormalize=function(t,e){var n=this;return t&&t.map?t.map((function(t){return n.denormalizeValue(t,e)})):t},e}(l),S=function(t,e,n,r,o,i){var u=c({},e);return Object.keys(t).forEach((function(n){var r=t[n],a=o(e[n],e,n,r,i);null==a?delete u[n]:u[n]=a})),u},_=function(t,e,n){if(r(e))return o(t,e,n);var i=c({},e);return Object.keys(t).forEach((function(e){i[e]&&(i[e]=n(i[e],t[e]))})),i},w=function(){function t(e){u(this,t),this.define(e)}return t.prototype.define=function(t){this.schema=Object.keys(t).reduce((function(e,n){var r,o=t[n];return c({},e,((r={})[n]=o,r))}),this.schema||{})},t.prototype.normalize=function(){for(var t=arguments.length,e=Array(t),n=0;n