{"version":3,"file":"LocationSummary.js","sources":["requirejs/custom-imprinting/LocationSummary.js"],"sourcesContent":["define([\"require\", \"exports\"], function (require, exports) {\n \"use strict\";\n Object.defineProperty(exports, \"__esModule\", { value: true });\n exports.LocationSummaryViewModel = exports.LocationColorSummaryViewModel = void 0;\n class LocationColorSummaryViewModel {\n constructor(data) {\n this.CharacterLimit = 24;\n this.NormalizeHexValues = (hex) => {\n return hex && hex.indexOf(\"#\") > -1 ? hex.substring(1) : hex;\n };\n this.HideOnExpand = (data, event) => {\n event.target.parentNode.removeChild(event.target);\n };\n data.HexValue = this.NormalizeHexValues(data.HexValue);\n $.extend(this, {\n HexValue: null,\n DisplayValue: null,\n Instructions: null,\n ExpandedInstructions: null\n }, data);\n if (this.Instructions && this.Instructions.length > this.CharacterLimit) {\n this.ExpandedInstructions = this.Instructions.substr(this.CharacterLimit);\n this.Instructions = this.Instructions.substr(0, this.CharacterLimit);\n }\n this.IsMetallic = this.DisplayValue && this.DisplayValue.indexOf('Metallic') > -1;\n this.IsWhite = this.HexValue && this.HexValue.toLowerCase() === 'ffffff';\n }\n }\n exports.LocationColorSummaryViewModel = LocationColorSummaryViewModel;\n class LocationSummaryViewModel {\n constructor(data) {\n data = $.extend({\n Id: 0,\n CustomImprintingType: '',\n CustomImprintingTypeIcon: '',\n ImagePath: null,\n FileType: '',\n Colors: [],\n FooterTemplate: ''\n }, data);\n ko.mapping.fromJS(data, {}, this);\n }\n }\n exports.LocationSummaryViewModel = LocationSummaryViewModel;\n});\n//# sourceMappingURL=LocationSummary.js.map"],"names":["define","require","exports","Object","defineProperty","value","LocationSummaryViewModel","LocationColorSummaryViewModel","constructor","data","this","CharacterLimit","NormalizeHexValues","hex","indexOf","substring","HideOnExpand","event","target","parentNode","removeChild","HexValue","$","extend","DisplayValue","Instructions","ExpandedInstructions","length","substr","IsMetallic","IsWhite","toLowerCase","Id","CustomImprintingType","CustomImprintingTypeIcon","ImagePath","FileType","Colors","FooterTemplate","ko","mapping","fromJS"],"mappings":"AAAAA,OAAO,CAAC,UAAW,WAAY,SAAUC,EAASC,gBAE9CC,OAAOC,eAAeF,EAAS,aAAc,CAAEG,OAAO,IACtDH,EAAQI,yBAA2BJ,EAAQK,mCAAgC,EAyB3EL,EAAQK,oCAvBJC,YAAYC,GACRC,KAAKC,eAAiB,GACtBD,KAAKE,mBAAqB,GACfC,IAA2B,EAApBA,EAAIC,QAAQ,KAAYD,EAAIE,UAAU,GAAKF,EAE7DH,KAAKM,aAAe,CAACP,EAAMQ,KACvBA,EAAMC,OAAOC,WAAWC,YAAYH,EAAMC,SAE9CT,EAAKY,SAAWX,KAAKE,mBAAmBH,EAAKY,UAC7CC,EAAEC,OAAOb,KAAM,CACXW,SAAU,KACVG,aAAc,KACdC,aAAc,KACdC,qBAAsB,MACvBjB,GACCC,KAAKe,cAAgBf,KAAKe,aAAaE,OAASjB,KAAKC,iBACrDD,KAAKgB,qBAAuBhB,KAAKe,aAAaG,OAAOlB,KAAKC,gBAC1DD,KAAKe,aAAef,KAAKe,aAAaG,OAAO,EAAGlB,KAAKC,iBAEzDD,KAAKmB,WAAanB,KAAKc,eAAyD,EAAzCd,KAAKc,aAAaV,QAAQ,YACjEJ,KAAKoB,QAAUpB,KAAKW,UAA4C,WAAhCX,KAAKW,SAASU,gBAkBtD7B,EAAQI,+BAbJE,YAAYC,GACRA,EAAOa,EAAEC,OAAO,CACZS,GAAI,EACJC,qBAAsB,GACtBC,yBAA0B,GAC1BC,UAAW,KACXC,SAAU,GACVC,OAAQ,GACRC,eAAgB,IACjB7B,GACH8B,GAAGC,QAAQC,OAAOhC,EAAM,GAAIC"}