{"version":3,"sources":["vendd.globalHelpers.js","postMessages.js","functions.js","localstorage.js","scriptsActivator.js","vendd.service.js","recipe.library.js","callbacks.js","init.js"],"names":["venddSetCookie","cname","cvalue","exdays","d","Date","setTime","getTime","expires","toUTCString","document","cookie","venddGetCookie","name","ca","split","i","length","c","charAt","substring","indexOf","toArrayBuffer","buf","ab","ArrayBuffer","view","Uint8Array","decodeEntities","element","createElement","str","replace","innerHTML","textContent","allowOnlyNumbersInput","$container","$","keyup","value","this","stringToNumber","returnValue","currency","decimal","val","LhApp","Context","Currency","Symbol","DecimalSeparator","trim","parseFloat","toFixed","numberToString","addCurrency","clearZeros","fractional","RegExp","test","PostMessages","intervalId","lastHash","attachedCallback","window","receiveMessage","callback","sourceOrigin","e","origin","Object","prototype","toString","call","clearInterval","setInterval","hash","location","re","data","message","Action","Vendd","MessageBus","publishAsync","UserSelect","Messages","SubmitSetInterfaceUserInlineAdmin","LoginName","UserEmail","RedirectToAccount","OrderId","InLineAdminEndpoint","Function","Url","QueryString","String","Tracking","ga","canTrack","InitGoogleAnalytics","apply","arguments","cookieType","Consents","ConsentsManager","CheckoutConsentsManager","undefined","cookiesStatus","IsConsentsEnabled","getTrackingModel","trackingModel","TrackingData","IsTrackingEnabled","JSON","parse","stringify","getTracker","trackerCode","tracker","Trackers","toLowerCase","Properties","getFeedItemId","product","datasource","FeedCodes","FeedCodeField","productId","colorId","sizeId","dim3Id","dim4Id","dim5Id","dim6Id","merchantId","ParentProductId","colors","Dimensions","find","IsColor","sizes","IsSize","dim3s","IsDim3","dim4s","IsDim4","dim5s","IsDim5","dim6s","IsDim6","merchants","IsMerchant","color","Versions","ProductId","SelectedProductId","size","dim3","dim4","dim5","dim6","merchant","VersionId","ColorId","SizeId","Dim3Id","Dim4Id","Dim5Id","Dim6Id","MerchantId","parseInt","SplitFeedBySize","SplitFeedByDim3","SplitFeedByDim4","SplitFeedByDim5","SplitFeedByDim6","SplitFeedByMerchant","InitGoogleTagManager","tagManagerCode","GoogleTagManagerCode","googleTagManagerInitialized","w","s","l","push","gtm.start","event","f","getElementsByTagName","j","async","src","parentNode","insertBefore","consentsCookie","Cookies","getJSON","dataLayer","functionalityCookiesEnabled","functionalityCookies","marketingCookiesEnabled","marketingCookies","statisticCookiesEnabled","statisticCookies","analyticsCode","GoogleAnalyticsCode","googleAnalyticsInitialized","o","r","q","a","m","getServiceEndpoint","url","rewritedUrl","Request","BaseUrl","unescape","FriendlyUrl","queryString","initialQueryString","iid","getValueOf","RawUrl","Item","Id","domainUrl","qsrt","qArray","qparts","qpart","qparams","parts","pName","decodeURIComponent","pValue","parameterKey","parameterValue","href","parameters","pair","setParameterValue","setParameterValueOnUrl","hasQueryString","join","removeParameter","parameterKeys","removeParametersFromUrl","removeParameterFromUrl","removeParameters","newUrl","each","index","splice","getText","key","Text","match","resource","getTranslatableTextFromServer","result","ajax","type","dataType","contentType","ContentType","success","response","isEmail","text","isAlphaNumeric","initVisitorState","cookieValue","get","checkAndUpdateVisitorState","Service","onSuccess","res","oldUrl","cookieValueAsUrl","removeClass","removeAttr","oldLanguageCode","newLanguageCode","set","secure","IsSecure","samesite","oldCountryCode","newCountryCode","oldCurrencyCode","newCurrencyCode","hideExpandables","wrapper","item","$expandable","bindUndropables","$wrapper","on","preventDefault","bindExpandables","click","stopPropagation","triggerValue","$expandableContainer","$triggers","unbind","wItem","wItemContainer","hasClass","addClass","EventManager","trigger","isButtonDisabled","buttonWrapper","isDisabled","tagName","is","$internalButton","bindHrefButtons","bindScrollable","$this","time","offset","animate","scrollTop","height","top","bindLazyLoadableImages","innerWrapper","$innerWrapper","$lazyLoadOptions","opts","defOptions","effect","extend","$images","fn","lazyload","remove","inArray","events","bind","PageTrackingRequest","dataItem","querystring","query","cookies","Name","Value","Expires","Path","MailChimpEcommerce360Tracking","oId","cId","eId","orderId","campaignId","emailId","applyExchangeRate","price","applyExchangeRateExtended","ExchangeRate","rate","showProductWishlists","MultipleWishlistsEnabled","$wishlistsWrapper","model","UserWishlist","GetClientModel","Product","html","Handlebars","bindProductWishlists","show","closest","$wrper","qs","id","skuId","path","qty","listId","currentListId","Wishlist","Add","Widget","OpenWidget","WishlistWidget","hideAllProductWishlists","el","hide","RenderPrice","renderPriceExtended","RenderPriceExtended","isShopDefaultCurrency","separatorSymbol","prefixSymbol","suffixSymbol","renderPrice","symbol","numberOfDigits","NumberOfDigits","symbolShownFirst","SymbolShownFirst","doShowSymbol","DoShowSymbol","ShopDefaultCurrency","formatedPrice","RenderPointsPrice","pointsPrice","renderPointsPriceExtended","RenderPointsPriceExtended","commaSymbol","innerSuffixSymbol","validateClientModel","LangCode","Language","ReplacePrices","obj","itemId","attr","itemData","filter","DeletedPrice","Price","TotalPointsPrice","TotalPointsGain","PointsPrice","PointsGain","ReplaceAvailabilities","cartEnabled","CanBuy","CanBuyWithPoints","CanAddToList","validateTaxIdentifier","isInvoice","countryCode","taxIdentifier","isNaN","arrTaxId","map","Math","pow","pauseScroll","init","scroll","disqus_config","page","identifier","replaceIframe","idFrame","originalFrame","getElementById","newFrame","getAttribute","width","style","display","replaceChild","convertToGreek","toUpperCase","newstr","len","convertCharacters","character","localStorage","setItem","removeItem","Storage","_setItem","ready","ScriptsActivator","funcLoaded","markLoaded","statLoaded","loadScripts","scripts","keys","skey","ss","loadFunctionalityScripts","funcFn","loadMarketingScripts","markFn","loadStatisticsScripts","statFn","loadAllScripts","func","mark","stat","removeScriptsElements","script","_recipes","returnResponse","recipeId","statusCode","errorCode","status","ErrorCode","getRecipe","recipeModel","testModel","recipe","_","isArray","first","x","RecipeId","TotalCount","getTotalQuantity","ingredientId","items","RecipeItems","IngredientId","reduce","memo","Quantity","getGroupQuantity","group","GroupId","RecipeLibrary","DeclareState","isValid","GetModel","InitRecipe","force","AFirstInclusion","Ingredients","Groups","Categories","indexCategory","category","indexGroup","VisualGroups","visualgroup","groupItems","vg","sum","IsMultiSelect","MinQuantity","MaxQuantity","DefaultQuantities","sampleOptionItemNone","CanRemove","Category","DefaultQuantity","DeletedPriceText","PriceText","PriceWithoutVat","PriceWithoutVatText","Weight","OrderNumber","Quanta","QuantaText","RecipeGroupId","RecipeGroupName","Stock","TaxClassId","VariantId","IsNullable","Items","unshift","indexItem","HasValidDefaultValues","IsMandatory","Disabled","Checked","IsDefault","ingredient","CategoryCode","ManufacturerProductCode","ProductItemCode","RecipeItemCode","ProductItemId","RecipeItemId","TotalPrice","TotalPriceWithoutVat","IsStandard","SubRecipeId","SubRecipeCode","SubRecipe","HashCode","getRecipeItemsHashCode","getItem","ResetRecipe","AddIngredient","quantity","isTotal","g","isCompatible","CheckIncompatibles","responsePrerequisites","CheckPrerequisites","successPrerequisites","BothPrerequisite","recipeIngredient","CheckPrerequisitesAnyOfSet","totalIngredientQuantity","round","priceWithoutVat","ParentRecipeId","parentModel","ParentRecipeItemId","parentIngredient","max","RemoveIngredient","recursive","ingredientsToBeRemoved","Prerequisites","some","ChangeIngredient","ingredientIdFrom","ingredientIdTo","groupFrom","ingredientFrom","GetFullRecipeItems","recipeItems","concat","GetRecipeItems","GetOneDealerData","ManufacturerName","ProductCode","ManufacturerCode","Series","Guid","Prices","OptionalTotalPrice","FixJSFloatBug","OptionalTotalPriceWithoutVat","StandardTotalPrice","StandardTotalPriceWithoutVat","InitialPrice","InitialPriceWithoutVat","ModelImageAbsoluteUrl","ProductImageUrl","cartTypeCode","Attributes","Code","CarTypeCode","fuelTypeCode","FuelTypeCode","attributes","AttributeCode","Type","ValueType","ItemCode","IsPackage","ParentPackageCode","OptionType","SetRecipeItems","GetCheckedRecipeItems","forceOptional","checkedRecipeItems","optionalTotalPrice","optionalTotalItems","standardTotalPrice","standardTotalItems","optionalTotalPriceWithoutVat","standardTotalPriceWithoutVat","indexInArray","groupQuantity","isChecked","selectedItems","isStandard","totalPrice","totalPriceWithoutVat","ImageUrl","subCheckedRecipeItems","CheckedRecipeItems","uncheckedRecipeItems","reject","checked","CheckedItemsOptionalTotal","CheckedItemsStandardTotal","UncheckedRecipeItems","UnitPrice","UnitPriceWithoutVat","GetPrices","prices","ri","defaultQuantity","initialPrice","initialPriceWithoutVat","optionalQuantity","subPrices","GetWeight","weightObj","InitialWeight","OptionalTotalWeight","GetEnabledItems","EnabledItems","DisableItems","GroupErrors","Errors","totalQuantity","extraQuantity","ExtraQuantity","disableAllGroup","indexVisualGroup","visualGroup","canAdd","canRemove","checkIncompatibles","isEnabledIncompatible","BothSelected","checkPrerequisites","isEnabledPrerequisites","checkPrerequisitesAnyOfSet","CanAdd","Incompatibles","MissingPrerequisites","MissingAnyOfPrerequisites","groupErrorCode","CategoryName","incompatibles","missingPrerequisites","bothPrerequisite","hasMissingAnyOfPrerequisites","RequiresAnyOfSet","requiredSetItems","RequiresAnyOfItems","missingAnyOfPrerequisites","IsValid","IngredientsErrors","errorCodes","ErrorCodes","CompareModels","savedModel","ingedientsSavedModel","sortBy","ingedientsSavedModelHashCode","ingedientsModel","ingedientsModelHashCode","groupsSavedModel","savedGroupsModelHashCode","groupsModel","groupsModelHashCode","savedModelHashCode","MaxFreeQuantity","MaxReplaceQuantity","modelHashCode","IngredientsWarnings","savedIngredient","validatedModel","GenerateGlobalId","config","_def","Deferred","defaultConfiguration","Force","FriendlyName","Vin","PartnerId","serviceurl","GlobalId","SavedGlobalIdToLocal","SaveGlobalIdToLocal","SaveRecipeItemsToLocal","resolve","onError","currentHashCode","savedHashCode","GetLocalStorageRecipeItemsHashCode","HtmlData","Body","jsonData","ConvertToSavedModel","requestData","ConfigurationJson","ProductIdentifier","IsShare","error","promise","AssignConfigurationToUser","LoadFromGlobalId","Html","Pdf","compareResult","subrecipeCompareResults","SubRecipes","subrecipeData","globalId","dataLocalStorage","LoadFromLocalRecipeItems","Recipe","ClearLocalStorage","converModelToSaveDataModel","converGroupsToSaveDataModel","converIngedientToSaveDataModel","groups","ingredients","Tests","0","console","log","1","2","options","defOpts","serviceUrl","onErrorInternal","method","rawdata","servicenamespace","onFailure","err","onUnauthenticated","Error","protocol","host","locationQueryParams","serviceQueryParams","_query","_data","param","ex","responseJSON","ExceptionType","pop","Message","failure","recaptchaLoaded","recaptchaMessagePublished","callback_recaptcha","checkAsyncLoad","googleMapsLoaded","googleMapsMessagePublished","callback_googlemaps","venddLoaded","callback_vendd","Plugins","RecaptcaLoaded","GoogleMapsLoaded","checkout_callback_googlemaps","angular","scope","Control","SetMap","Scripts"],"mappings":"AAAA,SAAAA,eAAAC,MAAAC,OAAAC,QACA,IAAAC,EAAA,IAAAC,KACAD,EAAAE,QAAAF,EAAAG,UAAA,GAAAJ,OAAA,GAAA,GAAA,KACA,IAAAK,QAAA,WAAAJ,EAAAK,cACAC,SAAAC,OAAAV,MAAA,IAAAC,OAAA,KAAAM,QAAA,WAGA,SAAAI,eAAAX,OAGA,IAFA,IAAAY,KAAAZ,MAAA,IACAa,GAAAJ,SAAAC,OAAAI,MAAA,KACAC,EAAA,EAAAA,EAAAF,GAAAG,OAAAD,IAAA,CAEA,IADA,IAAAE,EAAAJ,GAAAE,GACA,KAAAE,EAAAC,OAAA,IAAAD,EAAAA,EAAAE,UAAA,GACA,GAAA,GAAAF,EAAAG,QAAAR,MAAA,OAAAK,EAAAE,UAAAP,KAAAI,OAAAC,EAAAD,QAEA,MAAA,GAGA,SAAAK,cAAAC,KAGA,IAFA,IAAAC,GAAA,IAAAC,YAAAF,IAAAN,QACAS,KAAA,IAAAC,WAAAH,IACAR,EAAA,EAAAA,EAAAO,IAAAN,SAAAD,EACAU,KAAAV,GAAAO,IAAAP,GAEA,OAAAQ,GAGA,IAAAI,eAAA,WACA,IAAAC,QAAAnB,SAAAoB,cAAA,OAcA,OAZA,SAAAC,KASA,OARAA,KAAA,iBAAAA,MAEAA,KADAA,IAAAA,IAAAC,QAAA,uCAAA,KACAA,QAAA,wCAAA,IACAH,QAAAI,UAAAF,IACAA,IAAAF,QAAAK,YACAL,QAAAK,YAAA,IAGAH,KAZA,GAkBA,SAAAI,sBAAAC,cAEAA,YAAAA,WAAAnB,OAAA,KAAAmB,WAAAC,EAAA,SAEAA,EAAA,8BAAA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A,SAAAC,UAEA,IAAAwJ,IAAAxJ,SAEAA,SAAAxQ,IACAga,IAAAxJ,SAAAxQ,IAEA,iBAAAga,KAAAA,eAAApU,UACAoU,IAAAlT,KAAAC,MAAAiT,MAEA,mBAAAvF,KAAA,WACAA,KAAAxD,UAAA+I,MAGAkZ,QAAA,SAAAL,IACAf,gBAAAe,KAEA5C,MAAA,SAAA4C,IACAf,gBAAAe,QAKA7hB,SAIAlM,MAtIA,CAwIAA,OAAA,MCi/CA,IAEAqa,UAAA,GC3nDAgU,iBAAA,EACAC,2BAAA,EACAC,mBAAA,WACAF,iBAAA,EACAG,kBAGAC,kBAAA,EACAC,4BAAA,EACAC,oBAAA,WACAF,kBAAA,EACAD,kBAGAI,aAAA,EACAC,eAAA,WACAD,aAAA,EACAJ,kBAGAA,eAAA,WACAI,cAGAP,kBAAAC,4BACAtuB,MAAAC,WAAAC,aAAA,iBAAA,IAAAF,MAAA8uB,QAAA1uB,SAAA2uB,gBACAT,2BAAA,GAGAG,mBAAAC,6BACA1uB,MAAAC,WAAAC,aAAA,iBAAA,IAAAF,MAAA8uB,QAAA1uB,SAAA4uB,kBACAN,4BAAA,KAKA,SAAAO,+BAEAC,QAAAvyB,QAAA,oBAAA2b,MAAA,WACAnb,EAAA,oBAAAgyB,SAAAhyB,EAAA,oBAAAgyB,QAAAC,SAAA,mBAAAjyB,EAAA,oBAAAgyB,QAAAC,QAAA,QACAjyB,EAAA,oBAAAgyB,QAAAC,QAAAC,QAAA,KCxCAlyB,EAAA3B,UAAA8c,MAAA,WAEAtY,OAAAA,MAAAsvB,SAAA,mBAAAtvB,MAAAsvB,QAAA1Y,OAEA5W,MAAAsvB,QAAA1Y,OAEAhZ,OAAAA,MAAAgZ,MAAA,mBAAAhZ,MAAAgZ,MACAhZ,MAAAgZ","file":"vendd.global.min.js","sourcesContent":["function venddSetCookie(cname, cvalue, exdays) {\n var d = new Date();\n d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));\n var expires = \"expires=\" + d.toUTCString();\n document.cookie = cname + \"=\" + cvalue + \"; \" + expires + \"; \" + \"path=/\";\n}\n\nfunction venddGetCookie(cname) {\n var name = cname + \"=\";\n var ca = document.cookie.split(';');\n for (var i = 0; i < ca.length; i++) {\n var c = ca[i];\n while (c.charAt(0) == ' ') c = c.substring(1);\n if (c.indexOf(name) == 0) return c.substring(name.length, c.length);\n }\n return \"\";\n}\n\nfunction toArrayBuffer(buf) {\n\tvar ab = new ArrayBuffer(buf.length);\n\tvar view = new Uint8Array(ab);\n\tfor (var i = 0; i < buf.length; ++i) {\n\t\tview[i] = buf[i];\n\t}\n\treturn ab;\n}\n\nvar decodeEntities = (function() {\n var element = document.createElement('div');\n \n function decodeHTMLEntities (str) {\n if(str && typeof str === 'string') {\n str = str.replace(/]*>([\\S\\s]*?)<\\/script>/gmi, '');\n str = str.replace(/<\\/?\\w(?:[^\"'>]|\"[^\"]*\"|'[^']*')*>/gmi, '');\n element.innerHTML = str;\n str = element.textContent;\n element.textContent = '';\n }\n \n return str;\n }\n \n return decodeHTMLEntities;\n })();\n\nfunction allowOnlyNumbersInput($container) {\n\n if (!$container || $container.length < 0) $container = $('html');\n\n $('*[data-only-numbers=\"true\"]', $container).keyup(function () {\n var value = this.value.replace(/[^0-9\\.,]/g, '');\n\n if (this.value != value) {\n this.value = value;\n }\n });\n}\n\nfunction stringToNumber(value) {\n\n var returnValue, currency, decimal, val = \"\" + value;\n\n currency = LhApp.Context.Currency.Symbol;\n decimal = LhApp.Context.Currency.DecimalSeparator;\n returnValue = val.replace(currency, '').replace(decimal, '.').trim();\n\n return parseFloat(returnValue).toFixed(2);\n}\n\nfunction numberToString(value, addCurrency, clearZeros) {\n var returnValue, currency, decimal, fractional, val = \"\" + value;\n\n currency = LhApp.Context.Currency.Symbol;\n decimal = LhApp.Context.Currency.DecimalSeparator;\n returnValue = val.replace(currency, '').replace('.', decimal).trim();\n\n\n if (clearZeros) {\n fractional = returnValue.split(decimal);\n \n if (fractional.length > 1) {\n if (new RegExp(\"^[0\\0]+$\").test(fractional[1])) {\n returnValue = fractional[0];\n }\n } \n }\n \n if (addCurrency)\n returnValue += \" \" + currency;\n\n return returnValue;\n}","var PostMessages = function () {\n\n var intervalId,\n lastHash,\n attachedCallback,\n window = this;\n\n return {\n receiveMessage: function (callback, sourceOrigin) {\n\n if (window['postMessage']) {\n if (callback) {\n attachedCallback = function (e) {\n if ((typeof sourceOrigin === 'string' && e.origin !== sourceOrigin)\n || (Object.prototype.toString.call(sourceOrigin) === \"[object Function]\" && sourceOrigin(e.origin) === !1)) {\n return !1;\n }\n callback(e);\n };\n }\n if (window['addEventListener']) {\n window[callback ? 'addEventListener' : 'removeEventListener']('message', attachedCallback, !1);\n } else {\n window[callback ? 'attachEvent' : 'detachEvent']('onmessage', attachedCallback);\n }\n } else {\n intervalId && clearInterval(intervalId);\n intervalId = null;\n\n if (callback) {\n intervalId = setInterval(function () {\n var hash = document.location.hash,\n re = /^#?\\d+&/;\n if (hash !== lastHash && re.test(hash)) {\n lastHash = hash;\n callback({ data: hash.replace(re, '') });\n }\n }, 100);\n }\n }\n }\n };\n}();\n\nPostMessages.receiveMessage(function (message) {\n\n if (message.data.Action === 'SetUser') {\n Vendd.MessageBus.publishAsync(Vendd.UserSelect, new Vendd.UserSelect.Messages.SubmitSetInterfaceUserInlineAdmin({ 'LoginName': message.data.UserEmail.trim(), 'RedirectToAccount': message.data.RedirectToAccount }));\n }\n\n if (message.data.Action === 'SetOrder') {\n Vendd.MessageBus.publishAsync(Vendd.UserSelect, new Vendd.UserSelect.Messages.SubmitSetInterfaceUserInlineAdmin({ 'LoginName': message.data.UserEmail.trim(), 'RedirectToAccount': message.data.RedirectToAccount, 'OrderId': message.data.OrderId }));\n }\n\n}, LhApp.Context.InLineAdminEndpoint);\n\n","LhApp = LhApp || {};\n\nLhApp.Function = {};\n\nLhApp.Function.Url = {};\nLhApp.Function.QueryString = {};\nLhApp.Function.String = {};\nLhApp.Function.Tracking = {};\n\n//custom ga in\nLhApp.Function.Tracking.ga = function () {\n\n if (!LhApp.Function.Tracking.canTrack('statisticCookies'))\n return;\n\n //pure ga tracking can be used only in conjuction with tag manager enabled\n if (!LhApp.Function.Tracking.InitGoogleAnalytics())\n return;\n\n ga.apply(this, arguments);\n}\n\nLhApp.Function.Tracking.canTrack = function (cookieType) {\n var Consents = (typeof (ConsentsManager) != \"undefined\" && ConsentsManager) || (typeof (CheckoutConsentsManager) != \"undefined\" && CheckoutConsentsManager);\n if (!Consents)\n return false;\n\n if (!cookieType)\n cookieType = 'marketingCookies';\n\n if (Consents.cookiesStatus[cookieType] === undefined)\n return false;\n\n if (!LhApp.Context.IsConsentsEnabled)\n return true;\n\n return Consents.cookiesStatus[cookieType];\n}\n\nLhApp.Function.Tracking.getTrackingModel = function () {\n var trackingModel = window.TrackingData;\n if (!trackingModel || !trackingModel.IsTrackingEnabled)\n return null;\n\n return JSON.parse(JSON.stringify(trackingModel));//retunr cloned object\n}\n\nLhApp.Function.Tracking.getTracker = function (trackerCode, trackingModel) { \n if (!trackingModel || !trackingModel.IsTrackingEnabled)\n return null;\n\n var tracker = trackingModel.Trackers[trackerCode.toLowerCase()]; // if available than IsActive = 1 in DB\n if (!tracker)\n return null;\n\n if (!tracker.Properties)\n return null;\n\n return tracker;\n}\n\nLhApp.Function.Tracking.getFeedItemId = function (product, datasource, tracker) { \n if (product.FeedCodes && product.FeedCodes[tracker.FeedCodeField])\n return product.FeedCodes[tracker.FeedCodeField];\n\n var productId, colorId, sizeId, dim3Id, dim4Id, dim5Id, dim6Id, merchantId;\n\n if (datasource == 'ProductChanged') {\n productId = product.ParentProductId;\n\n var colors = product.Dimensions.find(function (i) { return i.IsColor });\n var sizes = product.Dimensions.find(function (i) { return i.IsSize });\n var dim3s = product.Dimensions.find(function (i) { return i.IsDim3 });\n var dim4s = product.Dimensions.find(function (i) { return i.IsDim4 });\n var dim5s = product.Dimensions.find(function (i) { return i.IsDim5 });\n var dim6s = product.Dimensions.find(function (i) { return i.IsDim6 });\n var merchants = product.Dimensions.find(function (i) { return i.IsMerchant });\n\n var color = colors && colors.Versions.find(function (i) { return i.ProductId == product.SelectedProductId })\n var size = sizes && sizes.Versions.find(function (i) { return i.ProductId == product.SelectedProductId })\n var dim3 = dim3s && dim3s.Versions.find(function (i) { return i.ProductId == product.SelectedProductId })\n var dim4 = dim4s && dim4s.Versions.find(function (i) { return i.ProductId == product.SelectedProductId })\n var dim5 = dim5s && dim5s.Versions.find(function (i) { return i.ProductId == product.SelectedProductId })\n var dim6 = dim6s && dim6s.Versions.find(function (i) { return i.ProductId == product.SelectedProductId })\n var merchant = merchants && merchants.Versions.find(function (i) { return i.ProductId == product.SelectedProductId })\n\n colorId = color && color.VersionId;\n sizeId = size && size.VersionId;\n dim3Id = dim3 && dim3.VersionId;\n dim4Id = dim4 && dim4.VersionId;\n dim5Id = dim5 && dim5.VersionId;\n dim6Id = dim6 && dim6.VersionId;\n merchantId = merchant && merchant.VersionId;\n }\n else {\n productId = product.ProductId;\n\n colorId = product.ColorId;\n sizeId = product.SizeId;\n dim3Id = product.Dim3Id;\n dim4Id = product.Dim4Id;\n dim5Id = product.Dim5Id;\n dim6Id = product.Dim6Id;\n merchantId = product.MerchantId;\n }\n\n if (colorId && parseInt(colorId) > 0) {\n productId += \"-\" + colorId;\n }\n if (tracker.SplitFeedBySize && sizeId && parseInt(sizeId) > 0) {\n productId += \"-\" + sizeId;\n }\n if (tracker.SplitFeedByDim3 && dim3Id && parseInt(dim3Id) > 0) {\n productId += \"-\" + dim3Id;\n }\n if (tracker.SplitFeedByDim4 && dim4Id && parseInt(dim4Id) > 0) {\n productId += \"-\" + dim4Id;\n }\n if (tracker.SplitFeedByDim5 && dim5Id && parseInt(dim5Id) > 0) {\n productId += \"-\" + dim5Id;\n }\n if (tracker.SplitFeedByDim6 && dim6Id && parseInt(dim6Id) > 0) {\n productId += \"-\" + dim6Id;\n }\n if (tracker.SplitFeedByMerchant && merchantId && parseInt(merchantId) > 0) {\n productId += \"-M\" + merchantId;\n }\n\n return productId;\n}\n\nLhApp.Function.Tracking.InitGoogleTagManager = function (tagManagerCode) {\n if (tagManagerCode === undefined) // if not defined\n {\n var trackingModel = LhApp.Function.Tracking.getTrackingModel();\n if (!trackingModel || !trackingModel.GoogleTagManagerCode)\n return false;\n tagManagerCode = trackingModel.GoogleTagManagerCode;\n }\n\n if (!tagManagerCode)\n return false;\n\n //initialization check\n if (window.googleTagManagerInitialized)\n return true;\n window.googleTagManagerInitialized = true;\n\n (function (w, d, s, l, i) {\n w[l] = w[l] || [];\n w[l].push({\n 'gtm.start': new Date().getTime(),\n event: 'gtm.js'\n });\n var f = d.getElementsByTagName(s)[0],\n j = d.createElement(s),\n dl = l != 'dataLayer' ? '&l=' + l : '';\n j.async = true;\n j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl;\n f.parentNode.insertBefore(j, f);\n })(window, document, 'script', 'dataLayer', tagManagerCode);\n\n /*Expose Cookie Consents to Data Layer*/\n var consentsCookie = Cookies.getJSON('ConsentChecked');\n if (consentsCookie) {\n window.dataLayer.push({ 'functionalityCookiesEnabled': consentsCookie.functionalityCookies, 'marketingCookiesEnabled': consentsCookie.marketingCookies, 'statisticCookiesEnabled': consentsCookie.statisticCookies });\n }\n\n return true;\n}\n\nLhApp.Function.Tracking.InitGoogleAnalytics = function (analyticsCode) {\n if (analyticsCode === undefined) // if not defined\n {\n var trackingModel = LhApp.Function.Tracking.getTrackingModel();\n if (!trackingModel || !trackingModel.GoogleAnalyticsCode)\n return false;\n analyticsCode = trackingModel.GoogleAnalyticsCode;\n }\n\n if (!analyticsCode)\n return false;\n\n //initialization check\n if (window.googleAnalyticsInitialized)\n return true;\n window.googleAnalyticsInitialized = true;\n\n (function (i, s, o, g, r, a, m) {\n i['GoogleAnalyticsObject'] = r;\n i[r] = i[r] || function () {\n (i[r].q = i[r].q || []).push(arguments)\n }, i[r].l = 1 * new Date();\n a = s.createElement(o),\n m = s.getElementsByTagName(o)[0];\n a.async = 1;\n a.src = g;\n m.parentNode.insertBefore(a, m)\n })(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga');\n\n ga(\"create\", analyticsCode, 'auto');\n\n return true;\n}\n\nLhApp.Function.Url.getServiceEndpoint = function (url) {\n var rewritedUrl = LhApp.Context.Request.BaseUrl + '/services/';\n\n rewritedUrl += url;\n\n if (unescape(LhApp.Context.Request.FriendlyUrl).indexOf('?') != -1) {\n\n var queryString = '';\n var initialQueryString = unescape(LhApp.Context.Request.FriendlyUrl).substring(unescape(LhApp.Context.Request.FriendlyUrl).indexOf('?') + 1);\n\n var iid = LhApp.Function.QueryString.getValueOf('iid', unescape(LhApp.Context.Request.RawUrl));\n if (iid != '') queryString = 'iid=' + iid;\n else if (LhApp.Context.Item && LhApp.Context.Item.Id)\n queryString = 'iid=' + LhApp.Context.Item.Id;\n if (rewritedUrl.indexOf(initialQueryString) == -1) {\n\n if (initialQueryString.length > 0) queryString += '&' + initialQueryString;\n\n if (rewritedUrl.indexOf('?') == -1)\n queryString = '?' + queryString;\n else\n queryString = '&' + queryString;\n }\n rewritedUrl += queryString;\n }\n\n rewritedUrl = rewritedUrl.replace(\"?&\", \"?\");\n var domainUrl = rewritedUrl.split('?');\n var qsrt = \"\";\n if (domainUrl.length > 1) {\n \tvar q = domainUrl[1];\n \tvar qArray = q.split('&');\n \tvar operator = '?';\n \tfor (i = 0; i < qArray.length; i++) {\n \t\tif (qArray[i] != \"\" && qArray[i] != \"\" && qsrt.indexOf(qArray[i]) == -1) {\n \t\t\tif (i == 0) {\n \t\t\t\toperator = '?';\n \t\t\t} else {\n \t\t\t\toperator = '&';\n \t\t\t}\n \t\t\tqsrt += operator + qArray[i];\n \t\t}\n \t}\n }\n return domainUrl[0] + qsrt;\n};\n\nLhApp.Function.QueryString.parse = function (url) {\n var qparams = {},\n parts = (url || '').split('?'),\n qparts, qpart,\n i = 0;\n\n if (parts.length <= 1) {\n return qparams;\n } else {\n qparts = parts[1].split('&');\n for (i in qparts) {\n qpart = qparts[i].split('=');\n var pName = decodeURIComponent(qpart[0]).toLowerCase();\n var pValue = decodeURIComponent(qpart[1] || '');\n qparams[pName] = pValue;\n }\n }\n\n return qparams;\n};\n\nLhApp.Function.QueryString.getValueOf = function (parameterKey, url) {\n\n url = url || window.location.href;\n var parameterValue = '';\n\n var queryString = '';\n var hasQueryString = (url.indexOf('?') > -1);\n\n if (hasQueryString) {\n queryString = url.substring(url.indexOf('?') + 1);\n }\n\n var parameters = queryString.split(\"&\");\n\n if (queryString.indexOf(parameterKey) >= 0) {\n\n for (var i = 0; i < parameters.length; i++) {\n var pair = parameters[i].split(\"=\");\n if (pair[0] == parameterKey) {\n parameterValue = pair[1];\n }\n }\n }\n\n return parameterValue;\n};\n\nLhApp.Function.Url.setParameterValue = function (parameterKey, parameterValue) {\n\n var url = window.location.href;\n\n return this.setParameterValueOnUrl(url, parameterKey, parameterValue);\n};\n\nLhApp.Function.Url.setParameterValueOnUrl = function (url, parameterKey, parameterValue) {\n\n var newUrl;\n\n var queryString = '';\n var hasQueryString = (url.indexOf('?') > -1);\n\n if (hasQueryString) {\n queryString = url.substring(url.indexOf('?') + 1);\n }\n\n var parameters = queryString.split(\"&\");\n\n if (queryString.indexOf(parameterKey) >= 0) {\n\n for (var i = 0; i < parameters.length; i++) {\n var pair = parameters[i].split(\"=\");\n if (pair[0] == parameterKey) {\n parameters[i] = pair[0] + \"=\" + parameterValue;\n }\n }\n\n queryString = parameters.join(\"&\");\n\n } else {\n if (hasQueryString) {\n queryString += '&' + parameterKey + '=' + parameterValue;\n } else {\n queryString += '?' + parameterKey + '=' + parameterValue;\n }\n }\n\n if (hasQueryString) {\n newUrl = url.substring(0, url.indexOf('?') + 1) + queryString;\n } else {\n newUrl = url + queryString;\n }\n\n return newUrl;\n};\n\nLhApp.Function.Url.removeParameter = function (parameterKey) {\n\n var url = window.location.href;\n var parameterKeys = [parameterKey];\n\n return this.removeParametersFromUrl(url, parameterKeys);\n};\n\nLhApp.Function.Url.removeParameterFromUrl = function (url, parameterKey) {\n var parameterKeys = [parameterKey];\n\n return this.removeParametersFromUrl(url, parameterKeys);\n};\n\nLhApp.Function.Url.removeParameters = function (parameterKeys) {\n\n var url = window.location.href;\n\n return this.removeParametersFromUrl(url, parameterKeys);\n};\n\nLhApp.Function.Url.removeParametersFromUrl = function (url, parameterKeys) {\n\n var newUrl = url;\n\n $.each(parameterKeys, function (index, parameterKey) {\n\n var queryString = '';\n var hasQueryString = (newUrl.indexOf('?') > -1);\n\n if (hasQueryString) {\n queryString = newUrl.substring(newUrl.indexOf('?') + 1);\n\n var parameters = queryString.split(\"&\");\n\n if (queryString.indexOf(parameterKey) >= 0) {\n\n for (var i = 0; i < parameters.length; i++) {\n var pair = parameters[i].split(\"=\");\n if (pair[0] == parameterKey) {\n parameters.splice(i, 1);\n }\n }\n\n queryString = parameters.join(\"&\");\n if (queryString != \"\")\n newUrl = newUrl.substring(0, newUrl.indexOf('?') + 1) + queryString;\n else\n newUrl = newUrl.substring(0, newUrl.indexOf('?')) + queryString;\n }\n }\n });\n\n return newUrl;\n};\n\nLhApp.Function.getText = function (key) {\n\n if (typeof LhApp.Text == 'undefined')\n return '';\n\n var match = LhApp.Text[key];\n if (match === undefined) {\n var resource = LhApp.Function.getTranslatableTextFromServer(key);\n LhApp.Text[key] = resource;\n match = resource;\n }\n\n return match || '';\n};\n\nLhApp.Function.getTranslatableTextFromServer = function (key) {\n var result = key;\n $.ajax({\n async: false,\n type: 'POST',\n dataType: 'json',\n contentType: 'application/json; charset=UTF-8',\n ContentType: 'application/json; charset=UTF-8',\n url: LhApp.Function.Url.getServiceEndpoint('commonservice.svc/GetTranslatableResource'),\n data: JSON.stringify({\n key: key\n }),\n success: function (response) {\n result = response.d;\n }\n });\n\n return result;\n};\n\nLhApp.Function.String.isEmail = function(text) {\n var re = /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,20}|^$/i;\n return re.test(text);\n};\n\nLhApp.Function.String.isAlphaNumeric = function (text) {\n var letterNumber = /^[0-9a-zA-Z]+$/;\n return text.match(letterNumber) || false;\n};\n\nLhApp.Function.initVisitorState = function () {\n\n var cookieValue = Cookies.get(\"VisitorState\");\n if (cookieValue) {\n\n LhApp.Function.checkAndUpdateVisitorState(cookieValue);\n\n } else {\n\n Vendd.Service.call({\n url: 'CmsService.svc/InitVisitorState',\n data: null,\n onSuccess: function (res) {\n\n cookieValue = Cookies.get(\"VisitorState\");\n if (res.success && cookieValue) {\n LhApp.Function.checkAndUpdateVisitorState(cookieValue);\n }\n }\n });\n }\n};\n\nLhApp.Function.checkAndUpdateVisitorState = function (cookieValue) {\n\n if (cookieValue) {\n\n var oldUrl = window.location.href;\n var cookieValueAsUrl = \"?\" + cookieValue;\n\n $('body').removeClass('x-checking-visitor-state').removeAttr('x-checking-visitor-state');\n\n // 1. Checks to update cookie values from querystring\n var oldLanguageCode = LhApp.Function.QueryString.getValueOf(\"languageCode\", cookieValueAsUrl).toLowerCase();\n var newLanguageCode = LhApp.Function.QueryString.getValueOf(\"lang\", oldUrl).toLowerCase();\n\n if (newLanguageCode != '' && newLanguageCode != oldLanguageCode) {\n cookieValue = LhApp.Function.Url.setParameterValueOnUrl(cookieValueAsUrl, \"languageCode\", newLanguageCode).replace(\"?\", \"\");\n Cookies.set(\"VisitorState\", cookieValue, { secure: LhApp.Context.Request.IsSecure, samesite: 'Lax' });\n cookieValueAsUrl = \"?\" + cookieValue;\n }\n\n var oldCountryCode = LhApp.Function.QueryString.getValueOf(\"countryCode\", cookieValueAsUrl).toLowerCase();\n var newCountryCode = LhApp.Function.QueryString.getValueOf(\"country\", oldUrl).toLowerCase();\n\n if (newCountryCode != '' && newCountryCode != oldCountryCode) {\n cookieValue = LhApp.Function.Url.setParameterValueOnUrl(cookieValueAsUrl, \"countryCode\", newCountryCode).replace(\"?\", \"\");\n Cookies.set(\"VisitorState\", cookieValue, { secure: LhApp.Context.Request.IsSecure, samesite: 'Lax' });\n cookieValueAsUrl = \"?\" + cookieValue;\n }\n\n var oldCurrencyCode = LhApp.Function.QueryString.getValueOf(\"currencyCode\", cookieValueAsUrl).toLowerCase();\n var newCurrencyCode = LhApp.Function.QueryString.getValueOf(\"currency\", oldUrl).toLowerCase();\n\n if (newCurrencyCode != '' && newCurrencyCode != oldCurrencyCode) {\n cookieValue = LhApp.Function.Url.setParameterValueOnUrl(cookieValueAsUrl, \"currencyCode\", newCurrencyCode).replace(\"?\", \"\");\n Cookies.set(\"VisitorState\", cookieValue, { secure: LhApp.Context.Request.IsSecure, samesite: 'Lax' });\n cookieValueAsUrl = \"?\" + cookieValue;\n }\n }\n};\n\nLhApp.Function.hideExpandables = function (wrapper) {\n var $expandables = $('*[data-expandablecontainer].x-expanded:not(.x-loading)', $(wrapper));\n $expandables.each(function (i, item) {\n var $expandable = $(item);\n $expandable.removeClass('x-expanded');\n $('*[data-expandabletrigger=\"' + $expandable.data('expandablecontainer') + '\"].x-open', $(wrapper)).removeClass('x-open');\n });\n};\n\nLhApp.Function.bindUndropables = function (wrapper) {\n var $wrapper = $(wrapper);\n\n var $undropableElements = $('*[data-undropable]', $wrapper);\n $undropableElements.on('drop', function (e) {\n if (typeof (e.preventDefault) === 'function')\n e.preventDefault();\n });\n};\n\nLhApp.Function.bindExpandables = function (wrapper) {\n var $wrapper = $(wrapper);\n\n var $expandableContainers = $('*[data-expandablecontainer]', $wrapper);\n $expandableContainers.click(function (e) {\n e.stopPropagation();\n });\n\n var $triggers = $('*[data-expandabletrigger]', $wrapper);\n $triggers.each(function (i, item) {\n var $trigger = $(item);\n\n var triggerValue = $trigger.data('expandabletrigger');\n var $expandableContainer = $('*[data-expandablecontainer=\"' + triggerValue + '\"]', $wrapper);\n\n var $triggers = $('*[data-expandabletrigger=\"' + triggerValue + '\"]', $wrapper);\n\n if ($expandableContainer.length > 0) {\n $triggers.unbind('click');\n $triggers.click(function (e) {\n e.preventDefault();\n e.stopPropagation();\n\n $('*[data-expandablecontainer].x-expanded').each(function (w, wItem) {\n var wItemContainer = $(wItem).data('expandablecontainer');\n if (wItemContainer != triggerValue) {\n $(wItem).removeClass('x-expanded');\n $('*[data-expandabletrigger=\"' + wItemContainer + '\"].x-open').removeClass('x-open');\n }\n });\n\n if ($expandableContainer.hasClass('x-expanded')) {\n $expandableContainer.removeClass('x-expanded');\n $triggers.removeClass('x-open');\n } else {\n $expandableContainer.addClass('x-expanded');\n $triggers.addClass('x-open');\n\n EventManager.trigger('lazyload');\n }\n });\n }\n });\n};\n\nLhApp.Function.isButtonDisabled = function (buttonWrapper) {\n var isDisabled = false;\n\n if ($(buttonWrapper).get(0).tagName.toLowerCase() == 'input') {\n if ($(buttonWrapper).is(':disabled'))\n isDisabled = true;\n }\n else {\n var $internalButton = $(buttonWrapper).find('input:button');\n if ($internalButton.length > 0) {\n if ($internalButton.is(':disabled'))\n isDisabled = true;\n }\n else if ($(buttonWrapper).hasClass('x-disabled')) {\n isDisabled = true;\n }\n }\n\n return isDisabled;\n};\n\nLhApp.Function.bindHrefButtons = function (wrapper) {\n $('*[data-href]', $(wrapper)).click(function (e) {\n if (e !== undefined && typeof (e.preventDefault) == 'function')\n e.preventDefault();\n\n var isDisabled = LhApp.Function.isButtonDisabled(this);\n if (isDisabled) {\n e.preventDefault();\n }\n else {\n document.location = $(this).data('href');\n }\n });\n};\n\nLhApp.Function.bindScrollable = function (wrapper) {\n $('*[data-scroll-to]', $(wrapper)).click(function () {\n var $this = $(this),\n element = $this.data('scroll-to'), time = $this.data('scroll-time'), offset = $this.data('scroll-offset'),\n time = (typeof time == \"undefined\" || time == \"\") ? 600 : time,\n offset = (typeof offset == \"undefined\" || offset == \"\") ? -10 : offset;\n\n if (element == \"\")\n return;\n\n if (element == \"top\") {\n $('html, body').animate({\n scrollTop: 0\n }, time);\n }\n if (element == \"bottom\") {\n $('html, body').animate({\n scrollTop: $('body').height()\n }, time);\n }\n if ($(element).length > 0) {\n $('html, body').animate({\n scrollTop: $(element).offset().top + offset\n }, time);\n }\n });\n};\n\nLhApp.Function.bindLazyLoadableImages = function (wrapper) {\n\n var $selectedWrapper;\n if ($(wrapper).data('lazy-load-init')) {\n $selectedWrapper = $(wrapper);\n } else {\n $selectedWrapper = $('*[data-lazy-load-init]', $(wrapper));\n }\n\n $selectedWrapper.each(function (i, innerWrapper) {\n\n var $innerWrapper = $(innerWrapper);\n var $lazyLoadOptions = $('*[data-input=\"lazy-load-options\"]', $innerWrapper);\n var initLazyLoad = $innerWrapper.data('lazy-load-init');\n\n if (initLazyLoad) {\n\n var opts = {};\n var defOptions = {\n effect: \"fadeIn\"\n };\n\n if ($lazyLoadOptions.length == 1) {\n $.extend(true, opts, defOptions, JSON.parse($lazyLoadOptions.val()));\n } else {\n $.extend(true, opts, defOptions);\n }\n\n var $images = $(\"img[data-lazyload]\", $innerWrapper);\n if ($images.length > 0 && typeof $.fn.lazyload === \"function\") {\n $($images, $innerWrapper).lazyload(opts);\n }\n\n }\n\n if ($lazyLoadOptions.length > 0) {\n $lazyLoadOptions.remove();\n }\n\n });\n\n if ($.inArray('lazyload', EventManager.events) == -1) {\n EventManager.bind('lazyload', function () {\n $(window).trigger('lazyload');\n });\n }\n\n};\n\nLhApp.Function.PageTrackingRequest = function () {\n var url = decodeURIComponent(LhApp.Context.Request.RawUrl);\n var qstr = url.substring(url.indexOf('?') + 1);\n var dataItem = {\n querystring: qstr,\n cookie: document.cookie\n };\n\n Vendd.Service.call({\n url: 'MarkService.svc/PageTracking',\n data: { query: dataItem },\n onSuccess: function (res) {\n\n var cookies = res;\n for (var i = 0; i < cookies.length; i++) {\n document.cookie = cookies[i].Name + \"=\" + cookies[i].Value + \"; expires=\" + (new Date(cookies[i].Expires)).toUTCString() + \"; path=\" + cookies[i].Path;\n }\n }\n });\n};\n\nLhApp.Function.MailChimpEcommerce360Tracking = function (oId, cId, eId) {\n\n Vendd.Service.call({\n url: 'MarkService.svc/MailChimpEcommerce360Tracking',\n data: { orderId: oId, campaignId: cId, emailId: eId }\n });\n};\n\nLhApp.Function.applyExchangeRate = function (price) {\n return LhApp.Function.applyExchangeRateExtended(price, LhApp.Context.Currency.ExchangeRate);\n};\n\nLhApp.Function.applyExchangeRateExtended = function (price, rate) {\n return price * rate;\n};\n\n// multiple wishlists\nLhApp.Function.showProductWishlists = function($wrapper, product) {\n if (!LhApp.Context.MultipleWishlistsEnabled || $wrapper.length == 0)\n return;\n\n $wrapper.addClass('x-loading');\n\n var $wishlistsWrapper = $('.js-wishlist-lists', $wrapper);\n\n var model = Vendd.UserWishlist.GetClientModel();\n model = $.extend({}, model, { Product: product });\n\n var html = Vendd.Handlebars.parse(\"productWishlists\", model);\n $wishlistsWrapper.html(html);\n LhApp.Function.bindProductWishlists($wrapper);\n $wishlistsWrapper.show();\n\n $wrapper.removeClass('x-loading');\n};\n\nLhApp.Function.bindProductWishlists = function ($wrapper) {\n if (!LhApp.Context.MultipleWishlistsEnabled)\n return;\n\n var $lists = $('.js-list-select', $wrapper);\n $lists.on('click', function() {\n var $this = $(this);\n\n var $wishlistsWrapper = $this.closest('.js-product-wishlists');\n var $wrper = $this.closest('.product-wishlist');\n\n var qs = LhApp.Function.QueryString.getValueOf('list');\n\n var id = $wishlistsWrapper.data('id'),\n skuId = $wishlistsWrapper.data('skuid'),\n path = $wishlistsWrapper.data('path'),\n qty = $wishlistsWrapper.data('qty'),\n extraAttributes = [],\n bundleItems = [],\n listId = $wrper.data('list-id'),\n currentListId = qs ? parseInt(qs) || 0 : 0;\n\n Vendd.MessageBus.publishAsync($wrapper.get(0), new Vendd.Wishlist.Messages.Add(id, skuId, path, qty, extraAttributes, bundleItems, listId, currentListId));\n Vendd.MessageBus.publishAsync($wrapper.get(0), new Vendd.Widget.Messages.OpenWidget(Vendd.Widget.WishlistWidget, false));\n LhApp.Function.hideAllProductWishlists();\n });\n\n $wrapper.on('click', '.js-close-product-wishlists', function (e) {\n\t\te.preventDefault();\n\t\tLhApp.Function.hideAllProductWishlists();\n\t});\n};\n\nLhApp.Function.hideAllProductWishlists = function () {\n if (!LhApp.Context.MultipleWishlistsEnabled)\n return;\n\n $.each($('.js-wishlist-lists'), function (i, el) {\n $(el).html(\"\");\n $(el).hide();\n });\n};\n// multiple wishlists\n\nvar RenderPrice = function (price) {\n return LhApp.Function.renderPriceExtended(price, false, ' ', '', '');\n};\n\nvar RenderPriceExtended = function (price, isShopDefaultCurrency, separatorSymbol, prefixSymbol, suffixSymbol) {\n return LhApp.Function.renderPriceExtended(price, isShopDefaultCurrency, separatorSymbol, prefixSymbol, suffixSymbol);\n};\n\nLhApp.Function.renderPrice = function (price) {\n return LhApp.Function.renderPriceExtended(price, false, ' ', '', '');\n};\n\nLhApp.Function.renderPriceExtended = function (price, isShopDefaultCurrency, separatorSymbol, prefixSymbol, suffixSymbol) {\n\n var symbol = LhApp.Context.Currency.Symbol;\n var numberOfDigits = LhApp.Context.Currency.NumberOfDigits;\n var symbolShownFirst = LhApp.Context.Currency.SymbolShownFirst;\n var doShowSymbol = LhApp.Context.Currency.DoShowSymbol;\n\n if (isShopDefaultCurrency) {\n symbol = LhApp.Context.ShopDefaultCurrency.Symbol;\n numberOfDigits = LhApp.Context.ShopDefaultCurrency.NumberOfDigits;\n symbolShownFirst = LhApp.Context.ShopDefaultCurrency.SymbolShownFirst;\n doShowSymbol = LhApp.Context.ShopDefaultCurrency.DoShowSymbol;\n }\n\n var formatedPrice = price.toFixed(numberOfDigits).replace('.', ',');\n\n if (doShowSymbol) {\n if (!symbolShownFirst) {\n formatedPrice = formatedPrice + separatorSymbol + symbol;\n } else {\n formatedPrice = symbol + separatorSymbol + formatedPrice;\n }\n }\n\n if (prefixSymbol != '') {\n formatedPrice = prefixSymbol + separatorSymbol + formatedPrice;\n }\n\n if (suffixSymbol != '') {\n formatedPrice = formatedPrice + separatorSymbol + suffixSymbol;\n }\n\n return formatedPrice;\n};\n\nvar RenderPointsPrice = function (pointsPrice) {\n return LhApp.Function.renderPointsPriceExtended(pointsPrice, ',', ' ', '', '');\n};\n\nvar RenderPointsPriceExtended = function (pointsPrice, commaSymbol, separatorSymbol, prefixSymbol, suffixSymbol) {\n return LhApp.Function.renderPointsPriceExtended(pointsPrice, commaSymbol, prefixSymbol, suffixSymbol);\n};\n\nLhApp.Function.renderPointsPriceExtended = function (pointsPrice, commaSymbol, separatorSymbol, prefixSymbol, suffixSymbol) {\n\n if (suffixSymbol == '') {\n suffixSymbol = pointsPrice === 1 ? 'point' : 'points';\n }\n\n var innerSuffixSymbol = suffixSymbol.length > 1 ? ' ' + LhApp.Function.getText('Common:PointsPriceSymbol_' + suffixSymbol) : suffixSymbol;\n\n var formatedPrice = pointsPrice.toFixed(2).replace('.00', '').replace('.', commaSymbol);\n\n if (prefixSymbol != '') {\n formatedPrice = prefixSymbol + separatorSymbol + formatedPrice;\n }\n\n if (innerSuffixSymbol != '') {\n formatedPrice = formatedPrice + separatorSymbol + innerSuffixSymbol;\n }\n\n return formatedPrice;\n};\n\nLhApp.Function.validateClientModel = function(model) {\n if (!model) return false;\n\n if (!model.LangCode || model.LangCode != LhApp.Context.Language) return false;\n\n return true;\n}\n\nvar ReplacePrices = function (obj) {\n $('.x-product-box[data-productid]').each(function (i, el) {\n var itemId = parseInt($(el).attr('data-productid'));\n\n var itemData = obj.filter(function (a) { return a.Id === itemId })[0]\n\n var DeletedPrice = parseFloat(itemData.DeletedPrice);\n var Price = parseFloat(itemData.Price);\n var TotalPointsPrice = parseFloat(itemData.TotalPointsPrice);\n var TotalPointsGain = parseFloat(itemData.TotalPointsGain);\n var PointsPrice = parseFloat(itemData.PointsPrice);\n var PointsGain = parseFloat(itemData.PointsGain);\n\n // hide all\n $('.prices', el).addClass('hide');\n $('.deleted-price-container', el).addClass('hide');\n $('.current-price-container', el).addClass('hide');\n $('.current-point-price-container.1', el).addClass('hide');\n $('.current-point-price-container.2', el).addClass('hide');\n $('.current-point-price-container.3', el).addClass('hide');\n $('.current-point-price-container.4', el).addClass('hide');\n\n if (DeletedPrice > 0 || Price > 0 || TotalPointsPrice > 0 || TotalPointsGain > 0 || PointsPrice > 0 || PointsGain > 0) {\n $('.prices', el).removeClass('hide');\n\n if ((DeletedPrice > 0) && (DeletedPrice > Price)) {\n $('.deleted-price-container', el).removeClass('hide');\n $('.deleted-price', el).text(RenderPrice(itemData.DeletedPrice));\n }\n\n if (Price > 0) {\n $('.current-price-container', el).removeClass('hide');\n $('.current-price', el).text(RenderPrice(itemData.Price));\n }\n\n if (PointsPrice > 0 && PointsPrice != TotalPointsPrice) {\n $('.current-point-price-container.1', el).removeClass('hide');\n $('.current-point-price-container.1 .points-price', el).text(RenderPointsPrice(PointsPrice));\n }\n\n if (TotalPointsGain > 0) {\n $('.current-point-price-container.2', el).removeClass('hide');\n $('.current-point-price-container.2 .points-gain', el).text(RenderPointsPrice(TotalPointsGain));\n }\n\n if (PointsGain > 0 && TotalPointsGain === 0) {\n $('.current-point-price-container.3', el).removeClass('hide');\n $('.current-point-price-container.3 .points-gain', el).text(RenderPointsPrice(PointsGain));\n }\n\n if (TotalPointsPrice > 0) {\n $('.current-point-price-container.4', el).removeClass('hide');\n $('.current-point-price-container.4 .points-price', el).text(RenderPointsPrice(TotalPointsPrice));\n }\n }\n });\n}\n\nvar ReplaceAvailabilities = function (obj) {\n $('.x-product-box[data-productid]').each(function (i, el) {\n var itemId = parseInt($(el).attr('data-productid'));\n var itemData = obj.filter(function (a) { return a.Id === itemId })[0]\n\n var cartEnabled = itemData.CanBuy === true || itemData.CanBuyWithPoints === true;\n var wishlistEnabled = itemData.CanAddToList === true;\n\n if ($('.buttons .add-to-cart').length > 0 && $('.buttons .add-to-cart input').length > 0) {\n $('.buttons .add-to-cart').addClass('x-disabled');\n $('.buttons .add-to-cart input').attr('disabled', 'disabled');\n\n if (cartEnabled === true) {\n $('.buttons .add-to-cart').removeClass('x-disabled');\n $('.buttons .add-to-cart input').removeAttr('disabled', 'disabled');\n }\n }\n\n //if ($('.buttons .add-to-wishlist').length > 0 && $('.buttons .add-to-wishlist input').length > 0) {\n //$('.buttons .add-to-wishlist').addClass('x-disabled');\n //$('.buttons .add-to-wishlist input').attr('disabled', 'disabled');\n\n //if (wishlistEnabled === true) {\n //$('.buttons .add-to-wishlist').removeClass('x-disabled');\n //$('.buttons .add-to-wishlist input').removeAttr('disabled', 'disabled');\n //}\n //}\n });\n}\n\nLhApp.Function.validateTaxIdentifier = function (isInvoice, countryCode, taxIdentifier) {\n if (isInvoice === true && taxIdentifier.length > 0) {\n if (countryCode === 'GR') {\n if (!isNaN(parseInt(taxIdentifier)) && taxIdentifier.length === 9) {\n var result = 0;\n var arrTaxId = taxIdentifier.split(\"\").map(function (item) {\n return parseInt(item);\n });\n\n for (var i = arrTaxId.length - 2; i >= 0 ; i--) {\n result = result + arrTaxId[i] * Math.pow(2, (8 - i));\n }\n\n if ((result % 11) % 10 === arrTaxId[8]) {\n return true;\n } else {\n return false;\n }\n }\n }\n else\n return true;\n }\n\n return false;\n};\n\nLhApp.pauseScroll = false;\n\nLhApp.init = function () {\n\n LhApp.Function.bindScrollable($('body').get(0));\n LhApp.Function.bindExpandables($('body').get(0));\n LhApp.Function.bindHrefButtons($('body').get(0));\n LhApp.Function.bindUndropables($('body').get(0));\n //LhApp.Function.bindLazyLoadableImages($('body').get(0)); \n\n $('body').click(function (e) {\n LhApp.Function.hideExpandables(this);\n });\n\n $(document).scroll(function (e) {\n if (!LhApp.pauseScroll)\n LhApp.Function.hideExpandables($('body').get(0));\n });\n};\n\nvar disqus_config = function () {\n\n if (LhApp.Context.Item.Id && LhApp.Context.Request.FriendlyUrl) {\n\n this.page.url = LhApp.Context.Request.BaseUrl + LhApp.Context.Request.FriendlyUrl;\n this.page.identifier = LhApp.Context.Item.Id;\n\n }\n};\n\nvar replaceIframe = function (idFrame, url) {\n var originalFrame = document.getElementById(idFrame);\n var newFrame = document.createElement(\"iframe\");\n newFrame.id = originalFrame.getAttribute(\"id\");\n newFrame.width = originalFrame.getAttribute(\"width\");\n newFrame.height = originalFrame.getAttribute(\"height\");\n newFrame.style.display = \"none\";\n newFrame.src = url;\n var parent = originalFrame.parentNode;\n parent.replaceChild(newFrame, originalFrame);\n}\n\nvar convertToGreek = function() {\n $(\"input[type='text'].js-convert-to-greek\").keyup(function () {\n if ($(this).closest('.form-row').find('.js-disable-conversion').is(':checked')) return;\n var str = $(this).val().toUpperCase();\n var newstr = [];\n for (var i = 0, len = str.length; i < len; i++) {\n newstr[i] = convertCharacters(str[i]);\n }\n $(this).val(newstr.join(\"\"));\n $(this).trigger(\"input\"); //just to let angular know\n });\n}\n\nvar convertCharacters = function(character) {\n switch (character) {\n case \"A\":\n character = 'Α';\n break;\n case \"B\":\n character = 'Β';\n break;\n case \"C\":\n character = 'Ψ';\n break;\n case \"D\":\n character = 'Δ';\n break;\n case \"E\":\n character = 'Ε';\n break;\n case \"F\":\n character = 'Φ';\n break;\n case \"G\":\n character = 'Γ';\n break;\n case \"H\":\n character = 'Η';\n break;\n case \"I\":\n character = 'Ι';\n break;\n case \"J\":\n character = 'Ξ';\n break;\n case \"K\":\n character = 'Κ';\n break;\n case \"L\":\n character = 'Λ';\n break;\n case \"M\":\n character = 'Μ';\n break;\n case \"N\":\n character = 'Ν';\n break;\n case \"O\":\n character = 'Ο';\n break;\n case \"P\":\n character = 'Π';\n break;\n case \"Q\":\n character = 'Κ';\n break;\n case \"R\":\n character = 'Ρ';\n break;\n case \"S\":\n character = 'Σ';\n break;\n case \"T\":\n character = 'Τ';\n break;\n case \"U\":\n character = 'Θ';\n break;\n case \"V\":\n character = 'Ω';\n break;\n case \"W\":\n character = 'Σ';\n break;\n case \"X\":\n character = 'Χ';\n break;\n case \"Y\":\n character = 'Υ';\n break;\n case \"Z\":\n character = 'Ζ';\n break;\n }\n return character;\n}","if (typeof localStorage === 'object') {\n\ttry {\n\t\tlocalStorage.setItem('localStorage', 1);\n\t\tlocalStorage.removeItem('localStorage');\n\t} catch (e) {\n\t\tStorage.prototype._setItem = Storage.prototype.setItem;\n\t\tStorage.prototype.setItem = function () { };\n\t}\n}","$(document).ready(function() {\n\n window.ScriptsActivator.funcLoaded = false;\n window.ScriptsActivator.markLoaded = false;\n window.ScriptsActivator.statLoaded = false;\n\n window.ScriptsActivator.loadScripts = function (scripts) {\n if (Object.keys(scripts).length === 0)\n return;\n\n for (var key in scripts) {\n var s = scripts[key];\n if (typeof s === \"function\") {\n s.call();\n } else {\n for (var skey in s) {\n var ss = s[skey];\n if (typeof ss === \"function\") {\n ss.call();\n }\n }\n }\n }\n }\n\n window.ScriptsActivator.loadFunctionalityScripts = function () {\n this.loadScripts(window.ScriptsActivator.funcFn);\n this.funcLoaded = true;\n };\n\n window.ScriptsActivator.loadMarketingScripts = function () {\n this.loadScripts(window.ScriptsActivator.markFn);\n this.markLoaded = true;\n };\n\n window.ScriptsActivator.loadStatisticsScripts = function () {\n this.loadScripts(window.ScriptsActivator.statFn);\n this.statLoaded = true;\n };\n\n window.ScriptsActivator.loadAllScripts = function (func, mark, stat) {\n if (func && !this.funcLoaded)\n this.loadFunctionalityScripts();\n\n if (mark && !this.markLoaded)\n this.loadMarketingScripts();\n\n if (stat && !this.statLoaded)\n this.loadStatisticsScripts();\n }\n\n window.ScriptsActivator.removeScriptsElements = function() {\n $(\"script[data-script]\").each(function(a,script) {\n if (script) {\n $(script).remove();\n }\n });\n }\n\n window.ScriptsActivator.removeScriptsElements();\n});\n","var Vendd = (function (Vendd) {\n 'use strict';\n\n Vendd.Service = (function (Service) {\n\n Service.call = function (options) {\n var defOpts, opts, serviceUrl, onErrorInternal;\n\n defOpts = {\n async: true,\n method: options.method || 'POST',\n url: '#',\n data: {},\n rawdata: false,\n servicenamespace: options.servicenamespace || 'services',\n onSuccess: function (response) {\n },\n onFailure: function (err) {\n throw err;\n },\n onUnauthenticated: function (url) {\n throw new Error('not implemented: onUnauthenticated(url)');\n }\n };\n\n opts = _.extend(defOpts, options);\n\n serviceUrl = document.location.protocol.toLowerCase()\n + '//' + document.location.host.toLowerCase()\n + (opts.servicenamespace ? '/' + opts.servicenamespace : '')\n + '/' + opts.url;\n\n serviceUrl = serviceUrl.split('?')[0];\n\n var locationQueryParams = LhApp.Function.QueryString.parse(window.location.href);\n\n var serviceQueryParams = LhApp.Function.QueryString.parse(opts.url)\n\n ///force current page language in every service request\n if (!serviceQueryParams['lang']) {\n serviceQueryParams['lang'] = (locationQueryParams['lang'] || LhApp.Context.Language).toLowerCase();;\n }\n ///force country in every service request IF PRESENT in current url\n if (!serviceQueryParams['country'] && locationQueryParams['country']) {\n serviceQueryParams['country'] = locationQueryParams['country'].toLowerCase();\n }\n ///force currency in every service request IF PRESENT in current url\n if (!serviceQueryParams['currency'] && locationQueryParams['currency']) {\n serviceQueryParams['currency'] = locationQueryParams['currency'].toLowerCase();\n }\n \n var _data = {};\n var _query;\n //if is get request the data will be posted as query. any key present in queryparams will be overriten by the value of the same key (if exists) in data\n if ((options.method || 'POST').toUpperCase() == 'GET') {\n _.each(opts.data, function (val, key) {\n _data[key.toLowerCase()] = val;\n });\n _data = _.extend(serviceQueryParams, opts.data);\n }\n else {\n _data = opts.data;\n _query = $.param(serviceQueryParams).toString();\n }\n\n if (_query)\n serviceUrl += '?' + _query; \n\n onErrorInternal = function (ex) {\n if (ex && ex.responseJSON && ex.responseJSON.ExceptionType) {\n var typeName = ex.responseJSON.ExceptionType.split('.').pop();\n\n if (typeName === 'AuthenticationServiceException') {\n if (typeof (opts.onUnauthenticated) === 'function') {\n opts.onUnauthenticated(ex.responseJSON.Message);\n }\n else {\n throw ex;\n }\n }\n else {\n if (typeof (opts.onFailure) === 'function') {\n opts.onFailure(ex);\n }\n else {\n throw ex;\n }\n }\n }\n else {\n if (typeof (opts.onFailure) === 'function') {\n opts.onFailure(ex);\n }\n else {\n throw ex;\n }\n }\n };\n\n $.ajax({\n async: opts.async || true,\n type: opts.method,\n dataType: opts.rawdata ? 'text' : 'json',\n contentType: opts.rawdata ? '' : 'application/json; charset=UTF-8',\n ContentType: opts.rawdata ? '' : 'application/json; charset=UTF-8',\n url: serviceUrl,\n data: (opts.method == 'GET') ? _data : opts.rawdata ? _data : JSON.stringify(_data),\n success: function (response) {\n\n var obj = response;\n\n if (response.d)\n obj = response.d;\n\n if (typeof obj === 'string' || obj instanceof String)\n obj = JSON.parse(obj);\n\n if (typeof (opts.onSuccess) === 'function') {\n opts.onSuccess(obj);\n }\n },\n failure: function (ex) {\n onErrorInternal(ex);\n },\n error: function (ex) {\n onErrorInternal(ex);\n }\n });\n };\n\n return Service;\n\n })(Vendd.Service || {});\n\n return Vendd;\n\n})(Vendd || {});","var Vendd = (function (Vendd) {\n 'use strict';\n /*\n * ERROR CODE\n * ---------------\n * 1000 INVALID CONFIGURATOR ITEM ID\n * 1001 CONFIGURATOR NOT FOUND / INITIALIZED\n * 1002 INVALID CONFIGURATOR MODEL DATA\n * 1003 INVALID OPTIONAL ITEM ID\n * 1004 INVALID CONFIGURATOR VALUES \n * 1010 MIN QUANTITY OF OPTIONAL ITEM\n * 1011 MAX QUANTITY OF OPTIONAL ITEM\n * 1012 DEFAULT OPTIONAL ITEM CAN NOT REMOVE\n * 1020 MIN QUANTITY FOR GROUP OF OPTIONAL ITEMS\n * 1021 MAX QUANTITY FOR GROUP OF OPTIONAL ITEMS\n * 1040 MIN QUANTITY FOR ALL ITEMS\n * 1041 MAX QUANTITY FOR ALL ITEMS\n * 1030 INCOMATIBLE OPTIONAL ITEM\n * 1031 PREREQUISITES FOR OPTIONAL ITEM NOT EXIST\n * 1032 ERROR CODE 1030 & ERROR CODE 1031\n * 1033 NOT EXISTS ANY OF REQUIRED INGREDIENTS\n * 1034 INGREDIENT DISABLED FROM SELECTED SUBRECIPE\n * 1035 INGREDIENT DISABLED FROM MASTER RECIPE\n * 1050 NO LOCAL STORAGE CONFIGURATOR MODEL SAVED\n * 1060 ERROR SAVING DATA\n * 1061 ERROR SAVING DATA - NOT SET CONFIGURATOR ITEM ID\n * 1070 OUTDATED LOADED DATA\n * 1071 ERROR LOADING DATA - NOT GLOBALID SET\n * 1072 ERROR LOADING DATA - SAVED INGREDIENT DOES NOT EXISTS ANY MORE\n * 1073 ERROR LOADING DATA - SAVED INGREDIENT CHANGE PRICE\n * 1074 ERROR LOADING DATA - SAVED INGREDIENT CHANGE INCOMPATIBLES\n * 1075 ERROR LOADING DATA - SAVED INGREDIENT CHANGE PREREQUISITES\n * */\n var _recipes = {};\n var _recipesOld = {};\n var returnResponse = function (recipeId, statusCode, errorCode, data) {\n\n\n return {\n success: statusCode === 200,\n data: data || {},\n status: {\n statusCode: statusCode,\n recipeId: recipeId,\n ErrorCode: errorCode || 0\n }\n }\n };\n\n var getRecipe = function (model, recipeId) {\n\n var recipeModel = model ? model : testModel,\n recipe = _.isArray(recipeModel) ? _.first(_.filter(recipeModel, function (x) { return x.RecipeId === recipeId && x.TotalCount > 0; })) : recipeModel;\n\n return $.extend(true, {}, recipe);\n };\n\n var getTotalQuantity = function (model, ingredientId) {\n var items = _.filter(model.RecipeItems, function (item) { return item.IngredientId !== ingredientId; });\n return _.reduce(items, function (memo, item) { return memo + (item.Quantity || 0); }, 0);\n }\n\n var getGroupQuantity = function (model, group, ingredientId) {\n var items = _.filter(model.RecipeItems, function (item) { return item.GroupId === group.Id && item.IngredientId !== ingredientId; });\n return _.reduce(items, function (memo, item) { return memo + (item.Quantity || 0); }, 0);\n }\n\n var getTotalWeight = function (model, ingredientId) {\n var items = _.filter(model.RecipeItems, function (item) { return item.IngredientId !== ingredientId; });\n return _.reduce(items, function (memo, item) { return memo + (item.Weight || 0); }, 0);\n }\n Vendd.RecipeLibrary = Vendd.RecipeLibrary || {};\n\n Vendd.RecipeLibrary.DeclareState = function (model, recipeId) {\n var recipe = _recipes[recipeId];\n if (!recipe) {\n return returnResponse(recipeId, 500, 1000);\n }\n _recipes[recipeId] = model;\n var data = {};\n data.recipe = $.extend(true, {}, model);\n data.isValid = checkRestrictions(model);\n return returnResponse(recipeId, 200, 0, data);\n };\n\n Vendd.RecipeLibrary.GetModel = function (recipeId) {\n\n if (!_recipes[recipeId]) {\n return returnResponse(recipeId, 500, 1000);\n }\n\n return returnResponse(recipeId, 200, 0, _recipes[recipeId]);\n };\n\n Vendd.RecipeLibrary.InitRecipe = function (model, recipeId, force) {\n force = force || false;\n if (_recipes[recipeId] && !force) {\n return returnResponse(recipeId, 500, 1000);\n }\n var recipe = getRecipe(model, recipeId);\n if (!recipe) {\n return returnResponse(recipeId, 500, 1001);\n }\n _recipes[recipeId] = recipe;\n _recipes[recipeId].AFirstInclusion = 1;\n\n _recipes[recipeId].Ingredients = [];\n _recipes[recipeId].Groups = [];\n _recipes[recipeId].RecipeItems = [];\n\n $.each(recipe.Categories, function (indexCategory, category) {\n $.each(category.Groups, function (indexGroup, group) {\n $.each(group.VisualGroups, function (indexGroup, visualgroup) {\n var groupItems = _.reduce(visualgroup, function (vg, sum) { return vg.length + sum; });\n group.IsMultiSelect = !(group.MinQuantity <= 1 && group.MaxQuantity === 1 && groupItems > 1);\n group.DefaultQuantities = 0;\n\n if (!group.IsMultiSelect && group.MinQuantity === 0) {\n var sampleOptionItemNone = {\n CanRemove: true,\n Category: category.Category,\n DefaultQuantity: 0,\n DeletedPrice: 0,\n DeletedPriceText: \"\",\n Price: 0,\n PriceText: \"\",\n PriceWithoutVat: 0,\n PriceWithoutVatText: \"\",\n MinQuantity: 0,\n MaxQuantity: 1,\n Weight: 0,\n Name: \"None of below\",\n OrderNumber: 0,\n Quanta: 1,\n QuantaText: \"\",\n RecipeGroupId: group.Id,\n RecipeGroupName: group.Name,\n IngredientId: 0,\n Stock: 1,\n TaxClassId: 0,\n VariantId: 0,\n IsNullable: true\n };\n visualgroup.Items.unshift(sampleOptionItemNone);\n }\n\n $.each(visualgroup.Items, function (indexItem, item) {\n //fix wrong default value from min-max item quantity\n group.DefaultQuantities += item.DefaultQuantity;\n item.HasValidDefaultValues = item.MinQuantity <= item.DefaultQuantity && item.MaxQuantity >= item.DefaultQuantity;\n item.DefaultQuantity = item.MinQuantity > item.DefaultQuantity ? item.MinQuantity : item.MaxQuantity < item.DefaultQuantity ? item.MaxQuantity : item.DefaultQuantity;\n item.IsMandatory = item.MinQuantity === item.DefaultQuantity || !item.CanRemove;\n item.Disabled = (item.MinQuantity === item.DefaultQuantity && item.MaxQuantity === item.DefaultQuantity && item.DefaultQuantity > 0) || !item.CanRemove;\n item.Checked = item.IsDefault;\n var ingredient = item;\n ingredient.GroupId = group.Id;\n _recipes[recipeId].Ingredients.push(ingredient);\n if (item.Price <= 0) {\n item.Price = 0;\n item.PriceText = \"\";\n }\n if (ingredient.DefaultQuantity > 0) {\n _recipes[recipeId].RecipeItems.push({\n RecipeId: recipeId,\n Category: ingredient.Category,\n CategoryCode: ingredient.CategoryCode,\n ManufacturerProductCode: ingredient.ManufacturerProductCode,\n GroupId: group.Id,\n IngredientId: ingredient.IngredientId,\n ProductItemCode: ingredient.RecipeItemCode,\n ProductItemId: ingredient.RecipeItemId,\n VariantId: ingredient.VariantId,\n Name: ingredient.Name || \"\",\n Quantity: ingredient.DefaultQuantity,\n Price: 0,//(Math.round(ingredient.Price * 100) / 100) * ingredient.DefaultQuantity,\n PriceWithoutVat: 0,\n TotalPrice: 0,\n TotalPriceWithoutVat: 0,\n Weight: ingredient.Weight || 0,\n IsStandard: ingredient.DefaultQuantity > 0,\n SubRecipeId: ingredient.SubRecipeId,\n SubRecipeCode: ingredient.SubRecipeCode\n });\n }\n });\n group.HasValidDefaultValues = group.MinQuantity <= group.DefaultQuantities && group.MaxQuantity >= group.DefaultQuantities;\n if (!group.IsMultiSelect && group.DefaultQuantities === 0 && group.MinQuantity === 0) {\n var defaultItem = visualgroup.Items[0];\n defaultItem.Checked = true;\n }\n _recipes[recipeId].Groups.push(group);\n });\n });\n });\n\n $.each(_.filter(recipe.Ingredients, function (i) { return i.SubRecipeId && i.SubRecipe; }) || []\n , function (i, s) {\n Vendd.RecipeLibrary.InitRecipe(s.SubRecipe, s.RecipeItemId, force);\n });\n\n _recipes[recipeId].HashCode = getRecipeItemsHashCode(recipeId);\n\n if (localStorage.getItem(\"globalId_\" + recipeId) !== null) {\n localStorage.removeItem(\"globalId_\" + recipeId);\n }\n\n return Vendd.RecipeLibrary.DeclareState(recipe, recipeId);\n };\n\n Vendd.RecipeLibrary.ResetRecipe = function (model, recipeId) {\n\n if (!_recipes[recipeId]) {\n return returnResponse(recipeId, 500, 1000);\n }\n var recipe = getRecipe(model, recipeId);\n\n if (!recipe) {\n return returnResponse(recipeId, 500, 1001);\n }\n //reinitialize\n delete _recipes[recipeId];\n _recipes[recipeId] = recipe;\n\n if (localStorage.getItem(\"globalId_\" + recipeId) !== null) {\n localStorage.removeItem(\"globalId_\" + recipeId);\n }\n return Vendd.RecipeLibrary.DeclareState(model, recipeId);\n };\n\n Vendd.RecipeLibrary.AddIngredient = function (model, recipeId, ingredientId, quantity, isTotal) {\n var recipe = _recipes[recipeId];\n\n if (!_recipes[recipeId]) {\n return returnResponse(recipeId, 500, 1000);\n }\n\n if (!recipe) {\n return returnResponse(recipeId, 500, 1001);\n }\n\n var group = null;\n var ingredient = _.find(model.Ingredients, function (i) { return i.IngredientId === ingredientId; });\n if (ingredient) group = _.find(model.Groups, function (g) { return g.Id === ingredient.GroupId; });\n\n if (!(ingredient && group)) {\n return returnResponse(recipeId, 500, 1003);\n }\n\n var isCompatible = (Vendd.RecipeLibrary.CheckIncompatibles(recipeId, ingredientId)).success;\n var responsePrerequisites = (Vendd.RecipeLibrary.CheckPrerequisites(recipeId, ingredientId));\n var successPrerequisites = responsePrerequisites.success || (!responsePrerequisites.success && responsePrerequisites.data.BothPrerequisite);\n\n var recipeIngredient = _.first(_.filter(model.RecipeItems, function (x) { return x.IngredientId === ingredientId && x.RecipeId === recipeId; }));\n if (!isCompatible || !successPrerequisites) {\n var errorCode = !isCompatible && !successPrerequisites ? 1032 : !isCompatible ? 1030 : 1031;\n return returnResponse(recipeId, 500, errorCode);\n }\n\n var hasPrerequisitesAnyOfSet = (Vendd.RecipeLibrary.CheckPrerequisitesAnyOfSet(recipeId, ingredientId)).success;\n if (!hasPrerequisitesAnyOfSet) {\n return returnResponse(recipeId, 500, 1033);\n }\n var totalIngredientQuantity = isTotal ? quantity : ((recipeIngredient || {}).Quantity || 0) + quantity;\n totalIngredientQuantity = totalIngredientQuantity > 0 ? totalIngredientQuantity : 0;\n\n if (ingredient.MinQuantity && totalIngredientQuantity < ingredient.MinQuantity) {\n return returnResponse(recipeId, 500, 1010);\n }\n if (ingredient.MaxQuantity && totalIngredientQuantity > ingredient.MaxQuantity) {\n return returnResponse(recipeId, 500, 1011);\n }\n var maxGroupQuantity = group.MaxQuantity || 0;\n var groupQuantity = getGroupQuantity(model, group, ingredientId);\n\n if (maxGroupQuantity < groupQuantity + totalIngredientQuantity) {\n return returnResponse(recipeId, 500, 1021);\n }\n var maxQuantity = recipe.MaxQuantity || 0;\n var totalQuantity = getTotalQuantity(model, ingredientId);\n\n if (maxQuantity < totalQuantity + totalIngredientQuantity) {\n return returnResponse(recipeId, 500, 1041);\n }\n\n var price = (Math.round(ingredient.Price * 100) / 100);//* totalIngredientQuantity;\n var priceWithoutVat = (Math.round(ingredient.PriceWithoutVat * 100) / 100);//* totalIngredientQuantity;\n\n\n if (model.ParentRecipeId > 0) {\n var parentModel = Vendd.RecipeLibrary.GetModel(model.ParentRecipeItemId) || {};\n var parentIngredient = _.find(parentModel.Ingredients, function (i) { return i.VariantId === ingredient.VariantId; }) || {};\n if ((parentIngredient.IngredientId || 0) > 0) {\n var recipeAddResult = Vendd.RecipeLibrary.AddIngredient(parentModel, model.ParentRecipeItemId, parentIngredient.IngredientId, ingredient.Quantity, true);\n if (!recipeAddResult.success) {\n return returnResponse(recipeId, 500, 1034);\n };\n }\n }\n\n if (recipeIngredient) {\n recipeIngredient.Quantity = totalIngredientQuantity;\n recipeIngredient.Price = price;\n recipeIngredient.PriceWithoutVat = priceWithoutVat;\n } else {\n model.RecipeItems.push({\n RecipeId: recipeId,\n Category: ingredient.Category,\n CategoryCode: ingredient.CategoryCode,\n ManufacturerProductCode: ingredient.ManufacturerProductCode,\n GroupId: group.Id,\n IngredientId: ingredient.IngredientId,\n ProductItemCode: ingredient.RecipeItemCode,\n ProductItemId: ingredient.RecipeItemId,\n VariantId: ingredient.VariantId,\n Name: ingredient.Name || \"\",\n Quantity: quantity,\n Price: price,\n PriceWithoutVat: priceWithoutVat,\n TotalPrice: Math.max(totalIngredientQuantity - ingredient.DefaultQuantity, 0) * price,\n TotalPriceWithoutVat: Math.max(totalIngredientQuantity - ingredient.DefaultQuantity, 0) * priceWithoutVat,\n Weight: ingredient.Weight,\n IsStandard: ingredient.DefaultQuantity > 0,\n SubRecipeId: ingredient.SubRecipeId,\n SubRecipeCode: ingredient.SubRecipeCode\n });\n }\n\n model.HashCode = getRecipeItemsHashCode(recipeId);\n\n //if (ingredient.SubRecipeId > 0) {\n // var subRecipeModel = Vendd.RecipeLibrary.GetModel(ingredient.RecipeItemId) || {};\n // _.each(subRecipeModel.RecipeItems || [], function (si) {\n // var subRecipeIngredient = _.find(model.Ingredients, function (i) { return i.VariantId == si.VariantId; }) || {};\n // if ((subRecipeIngredient.IngredientId || 0) > 0) {\n // var subRecipeGroup = _.find(model.Groups, function (g) { return subRecipeIngredient.GroupId == g.Id; });\n // var recipeAddResult;\n // if (subRecipeGroup.IsMultiSelect) {\n // recipeAddResult = Vendd.RecipeLibrary.AddIngredient(model, recipeId, subRecipeIngredient.IngredientId, subRecipeIngredient.Quantity, true);\n // } else {\n // var ingredientIdFrom = (_.find(model.RecipeItems, function (i) { return subRecipeIngredient.GroupId == i.GroupId; }) || {}).IngredientId || 0;\n // if (ingredientIdFrom > 0) {\n // recipeAddResult = Vendd.RecipeLibrary.ChangeIngredient(model, recipeId, ingredientIdFrom, subRecipeIngredient.IngredientId);\n // } else {\n // recipeAddResult = Vendd.RecipeLibrary.AddIngredient(model, recipeId, subRecipeIngredient.IngredientId, subRecipeIngredient.Quantity, true);\n // }\n // }\n // if (!recipeAddResult.success) {\n // var subRecipeRemoveResult = Vendd.RecipeLibrary.RemoveIngredient(subRecipeModel, ingredient.RecipeItemId, si.IngredientId, 0, true, true);\n // //Vendd.RecipeLibrary.DeclareState(subRecipeModel, ingredient.RecipeItemId);\n // }\n // }\n // });\n //}\n\n return Vendd.RecipeLibrary.DeclareState(model, recipeId);\n };\n\n Vendd.RecipeLibrary.RemoveIngredient = function (model, recipeId, ingredientId, quantity, recursive, force) {\n force = force === undefined ? true : force;\n var recipe = _recipes[recipeId];\n\n if (!recipe) {\n return returnResponse(recipeId, 500, 1001);\n }\n\n var group = null;\n var ingredient = _.find(model.Ingredients, function (i) { return i.IngredientId === ingredientId; });\n if (ingredient) group = _.find(model.Groups, function (g) { return g.Id === ingredient.GroupId; });\n\n if (!(ingredient && group)) {\n return returnResponse(recipeId, 500, 1003);\n }\n\n var recipeIngredient = _.first(_.filter(model.RecipeItems, function (x) { return x.IngredientId === ingredientId && x.RecipeId === recipeId; }));\n\n var totalIngredientQuantity = recursive ? 0 : ((recipeIngredient || {}).Quantity || 0) - quantity;\n totalIngredientQuantity = totalIngredientQuantity > 0 ? totalIngredientQuantity : 0;\n\n if (ingredient.MinQuantity && totalIngredientQuantity < ingredient.MinQuantity) {\n return returnResponse(recipeId, 500, 1010);\n }\n\n var minGroupQuantity = group.MinQuantity || 0;\n var groupQuantity = getGroupQuantity(model, group, ingredientId);\n\n if (minGroupQuantity > groupQuantity + totalIngredientQuantity && !force) {\n return returnResponse(recipeId, 500, 1020);\n }\n var minQuantity = recipe.MinQuantity || 0;\n var totalQuantity = getTotalQuantity(model, ingredientId);\n\n if (minQuantity > totalQuantity + totalIngredientQuantity && !force) {\n return returnResponse(recipeId, 500, 1040);\n }\n\n if (recipeIngredient && totalIngredientQuantity > 0) {\n recipeIngredient.Quantity = totalIngredientQuantity;\n recipeIngredient.Price = price;\n } else {\n model.RecipeItems = _.filter(model.RecipeItems, function (x) { return x.IngredientId !== ingredientId; });\n }\n\n var ingredientsToBeRemoved = _.filter(model.Ingredients,\n function (i) {\n return i.Prerequisites && i.Prerequisites.indexOf(ingredientId) > -1 && model.RecipeItems.some(function (item) { return item.IngredientId === i.IngredientId });\n });\n\n for (var i = 0; i < ingredientsToBeRemoved.length; i++) {\n Vendd.RecipeLibrary.RemoveIngredient(model, recipeId, ingredientsToBeRemoved[i].IngredientId, null, true, true);\n }\n\n model.HashCode = getRecipeItemsHashCode(recipeId);\n\n return Vendd.RecipeLibrary.DeclareState(model, recipeId);\n\n };\n\n Vendd.RecipeLibrary.ChangeIngredient = function (model, recipeId, ingredientIdFrom, ingredientIdTo) {\n var recipe = _recipes[recipeId];\n\n if (!recipe) {\n return returnResponse(recipeId, 500, 1001);\n }\n\n var groupFrom = null;\n var ingredientFrom = _.find(model.Ingredients, function (i) { return i.IngredientId === ingredientIdFrom; });\n if (ingredientFrom) groupFrom = _.find(model.Groups, function (g) { return g.Id === ingredientFrom.GroupId; });\n\n if (!(ingredientFrom && groupFrom)) {\n return returnResponse(recipeId, 500, 1003);\n }\n\n var recipeIngredientFrom = _.first(_.filter(model.RecipeItems, function (x) { return x.IngredientId === ingredientIdFrom && x.RecipeId === recipeId; }));\n\n if (!recipeIngredientFrom) {\n return returnResponse(recipeId, 500, 1002);\n }\n var totalQuantity = 1;\n\n model.RecipeItems = _.filter(model.RecipeItems, function (x) { return x.IngredientId !== ingredientIdFrom; });\n\n var ingredientsToBeRemoved = _.filter(model.Ingredients,\n function (i) {\n return i.Prerequisites && i.Prerequisites.indexOf(ingredientIdFrom) > -1 && model.RecipeItems.some(function (item) { return item.IngredientId === i.IngredientId; });\n });\n\n var prerequisitesResult = [];\n\n for (var i = 0; i < ingredientsToBeRemoved.length; i++) {\n prerequisitesResult = Vendd.RecipeLibrary.RemoveIngredient(model, recipeId, ingredientsToBeRemoved[i].IngredientId, null, true, true);\n }\n\n var result = Vendd.RecipeLibrary.AddIngredient(model, recipeId, ingredientIdTo, 1, true);\n\n model.HashCode = getRecipeItemsHashCode(recipeId);\n\n if (result.success) return result;\n\n return Vendd.RecipeLibrary.DeclareState(model, recipeId);\n\n };\n\n Vendd.RecipeLibrary.GetFullRecipeItems = function (recipeId) {\n var recipe = _recipes[recipeId];\n if (!recipe) {\n return returnResponse(recipeId, 500, 1000);\n }\n\n var recipeItems = recipe.RecipeItems || [];\n _.each(\n _.filter(recipe.Ingredients, function (item) {\n return item.SubRecipeId && (_.find(recipeItems, function (i) { return i.IngredientId === item.IngredientId; }) !== undefined);\n }), function (item) {\n if (!item.IsStandard) {\n _.each(_recipes[item.RecipeItemId].RecipeItems, function (ingredient) { ingredient.IsStandard = false; });\n }\n recipeItems = recipeItems.concat(_recipes[item.RecipeItemId].RecipeItems);\n });\n var data = {};\n data.RecipeItems = recipeItems || [];\n return returnResponse(recipeId, 200, 0, data);\n };\n\n Vendd.RecipeLibrary.GetRecipeItems = function (recipeId) {\n var recipe = _recipes[recipeId];\n\n if (!recipe) {\n return returnResponse(recipeId, 500, 1000);\n }\n var data = {};\n data.RecipeItems = recipe.RecipeItems || [];\n return returnResponse(recipeId, 200, 0, data);\n };\n\n Vendd.RecipeLibrary.GetOneDealerData = function (recipeId) {\n var recipe = _recipes[recipeId];\n\n if (!recipe) {\n return returnResponse(recipeId, 500, 1000);\n }\n var data = {};\n\n data.ManufacturerName = recipe.ManufacturerName || \"\";\n data.ProductCode = recipe.ManufacturerProductCode || \"\";\n data.ManufacturerCode = recipe.ManufacturerCode || \"\";\n data.Series = recipe.CategoryCode || \"\";\n data.Name = recipe.Name || \"\";\n data.Guid = localStorage.getItem(\"globalId_\" + recipeId);\n\n data.Prices = {};\n data.Prices.OptionalTotalPrice = FixJSFloatBug(recipe.Prices.OptionalTotalPriceWithoutVat);\n data.Prices.StandardTotalPrice = FixJSFloatBug(recipe.Prices.StandardTotalPriceWithoutVat);\n data.Prices.InitialPrice = FixJSFloatBug(recipe.Prices.InitialPriceWithoutVat);\n data.Prices.TotalPrice = FixJSFloatBug(recipe.Prices.TotalPriceWithoutVat);\n\n data.ModelImageAbsoluteUrl = recipe.ProductImageUrl;\n\n var cartTypeCode = _.find(recipe.Attributes, function (i) { return i.Code === \"CarTypeCode\"; }) || {};\n data.CarTypeCode = (cartTypeCode.Value || \"Car\");\n var fuelTypeCode = _.find(recipe.Attributes, function (i) { return i.Code === \"FuelTypeCode\"; }) || {};\n data.FuelTypeCode = (fuelTypeCode.Value || \"\");\n var attributes = _.filter(recipe.Attributes, function (i) { return i.Code !== \"CarTypeCode\" && i.Code !== \"FuelTypeCode\"; }) || [];\n data.Attributes = _.map(attributes, function (i) {\n var item = {};\n item.AttributeCode = i.Code;\n item.Value = i.Value;\n item.Type = i.ValueType;\n return item;\n });\n var recipeItems = recipe.RecipeItems || [];\n _.each(\n _.filter(recipe.Ingredients, function (item) {\n return item.SubRecipeId && (_.find(recipeItems, function (i) { return i.IngredientId === item.IngredientId; }) !== undefined);\n }), function (item) {\n if (!item.IsStandard) {\n _.each(_recipes[item.RecipeItemId].RecipeItems, function (ingredient) { ingredient.IsStandard = false; ingredient.SubRecipeCode = item.ManufacturerProductCode; });\n }\n recipeItems = recipeItems.concat(_recipes[item.RecipeItemId].RecipeItems);\n });\n\n data.RecipeItems = _.map(recipeItems || [], function (i) {\n var item = {};\n item.CategoryCode = i.CategoryCode || \"\";\n item.Name = i.Name;\n item.Quantity = i.Quantity;\n //item.Price = i.Price;\n item.Price = i.PriceWithoutVat;\n item.ItemCode = i.ManufacturerProductCode || \"\";\n item.IsPackage = (i.SubRecipeId || 0) > 0;\n item.ParentPackageCode = i.SubRecipeCode || \"\";\n item.OptionType = i.IsStandard ? 0 : 1;\n return item;\n });\n return returnResponse(recipeId, 200, 0, data);\n };\n\n Vendd.RecipeLibrary.SetRecipeItems = function (recipeId, recipeItems) {\n var recipe = _recipes[recipeId];\n\n if (!recipe) {\n return returnResponse(recipeId, 500, 1000);\n }\n\n recipe.RecipeItems = recipeItems || [];\n\n return Vendd.RecipeLibrary.DeclareState(recipe, recipeId);\n };\n\n Vendd.RecipeLibrary.GetCheckedRecipeItems = function (recipeId, forceOptional) {\n var recipe = _recipes[recipeId];\n\n if (!recipe) {\n return returnResponse(recipeId, 500, 1000);\n }\n forceOptional = forceOptional !== undefined ? forceOptional : false;\n //var checkedItems = _.filter(recipe.Ingredients, function (item) { return item.DefaultQuantity > 0; });\n\n //var checkedRecipeItems = _.filter(recipe.RecipeItems, function (item) { return item.Quantity > 0; });\n\n var checkedRecipeItems = [];\n var optionalTotalPrice = 0;\n var optionalTotalItems = 0;\n var standardTotalPrice = 0;\n var standardTotalItems = 0;\n var optionalTotalPriceWithoutVat = 0;\n var standardTotalPriceWithoutVat = 0;\n\n //var deafaultItems = _.filter(recipe.Ingredients, function (item) { return item.DefaultQuantity > 0; });\n $.each(recipe.Ingredients, function (indexInArray, ingredient) {\n var item = _.find(recipe.RecipeItems, function (i) { return i.IngredientId === ingredient.IngredientId && i.Quantity > 0; });\n var groupQuantity = getGroupQuantity(recipe, { Id: ingredient.GroupId }, ingredient.IngredientId);\n var isMultiSelect = (_.find(recipe.Groups, function (group) { return ingredient.GroupId === group.Id; }) || {}).IsMultiSelect;\n var isChecked = item;\n if (!isMultiSelect) {\n var selectedItems = _.filter(recipe.RecipeItems, function (i) { return i.GroupId === ingredient.GroupId; }) || [];\n if (selectedItems.length > 1) {\n isChecked = isChecked && (selectedItems[0].IngredientId === ingredient.IngredientId);\n }\n }\n var isStandard = forceOptional ? false : (ingredient.IsNullable ? false : ingredient.DefaultQuantity > 0);\n if (isChecked) {\n var price = Math.round(ingredient.Price * 100) / 100;\n var totalPrice = ingredient.DefaultQuantity > 0 ?\n ((item.Quantity || 0) - (ingredient.DefaultQuantity || 0)) * price :\n (item.Quantity || 0) * price;\n var priceWithoutVat = Math.round(ingredient.PriceWithoutVat * 100) / 100;\n var totalPriceWithoutVat = ingredient.DefaultQuantity > 0 ?\n ((item.Quantity || 0) - (ingredient.DefaultQuantity || 0)) * priceWithoutVat :\n (item.Quantity || 0) * priceWithoutVat;\n checkedRecipeItems.push({\n RecipeItemId: recipeId,\n ImageUrl: ingredient.ImageUrl,\n Category: ingredient.Category,\n GroupId: ingredient.GroupId,\n IngredientId: ingredient.IngredientId,\n ProductItemId: ingredient.RecipeItemId,\n VariantId: ingredient.VariantId,\n Name: ingredient.Name || \"\",\n //ParentProductId: recipeId,\n Quantity: item.Quantity,\n Price: price,\n PriceWithoutVat: priceWithoutVat,\n TotalPriceWithoutVat: totalPriceWithoutVat,\n Weight: ingredient.Weight,\n IsStandard: isStandard\n });\n if (isStandard) {\n standardTotalPrice += totalPrice;\n standardTotalPriceWithoutVat += totalPriceWithoutVat;\n standardTotalItems++;\n } else {\n optionalTotalPrice += totalPrice;\n optionalTotalPriceWithoutVat += totalPriceWithoutVat;\n optionalTotalItems++;\n }\n }\n if (ingredient.IsNullable) {\n if (groupQuantity === 0) {\n checkedRecipeItems.push({\n RecipeItemId: recipeId,\n ImageUrl: ingredient.ImageUrl,\n Category: ingredient.Category,\n GroupId: ingredient.GroupId,\n IngredientId: ingredient.IngredientId,\n ProductItemId: ingredient.RecipeItemId,\n VariantId: ingredient.VariantId,\n Name: ingredient.Name || \"\",\n //ParentProductId: recipeId,\n Quantity: 1,\n Price: 0,\n PriceWithoutVat: 0,\n TotalPrice: 0,\n TotalPriceWithoutVat: 0,\n Weight: 0,\n IsStandard: isStandard\n });\n }\n }\n\n if (item && (item.Quantity || 0) > 0 && ingredient.SubRecipe) {\n var subCheckedRecipeItems = Vendd.RecipeLibrary.GetCheckedRecipeItems(ingredient.RecipeItemId, !isStandard) || {};\n if (subCheckedRecipeItems.success) {\n item.TotalPrice = subCheckedRecipeItems.data.Prices.TotalPrice;\n item.TotalPriceWithoutVat = subCheckedRecipeItems.data.Prices.TotalPriceWithoutVat;\n checkedRecipeItems = (checkedRecipeItems || []).concat(subCheckedRecipeItems.data.CheckedRecipeItems || []);\n //checkedRecipeItems = _.extend([], checkedRecipeItems, subCheckedRecipeItems.data.CheckedRecipeItems);\n }\n }\n });\n\n var uncheckedRecipeItems = _.reject(recipe.Ingredients, function (item) { return _.find(checkedRecipeItems, function (checked) { return item.IngredientId === checked.IngredientId; }); });\n\n var data = {};\n data.CheckedItemsOptionalTotal = optionalTotalItems;\n data.CheckedItemsStandardTotal = standardTotalItems;\n data.CheckedRecipeItems = checkedRecipeItems;\n data.UncheckedRecipeItems = uncheckedRecipeItems;\n data.Prices = {};\n data.Prices.OptionalTotalPrice = optionalTotalPrice;\n data.Prices.OptionalTotalPriceWithoutVat = optionalTotalPriceWithoutVat;\n data.Prices.StandardTotalPrice = standardTotalPrice;\n data.Prices.StandardTotalPriceWithoutVat = standardTotalPriceWithoutVat;\n data.Prices.InitialPrice = recipe.UnitPrice;\n data.Prices.InitialPriceWithoutVat = recipe.UnitPriceWithoutVat;\n data.Prices.TotalPrice = optionalTotalPrice + standardTotalPrice + recipe.UnitPrice;\n data.Prices.TotalPriceWithoutVat = optionalTotalPriceWithoutVat + standardTotalPriceWithoutVat + recipe.UnitPriceWithoutVat;\n recipe.Prices = data.Prices;\n\n return returnResponse(recipeId, 200, 0, data);\n\n };\n\n Vendd.RecipeLibrary.GetPrices = function (recipeId) {\n var recipe = _recipes[recipeId];\n\n if (!recipe) {\n return returnResponse(recipeId, 500, 1000);\n }\n\n var prices = {};\n prices.OptionalTotalPrice = 0;\n prices.StandardTotalPrice = 0;\n prices.OptionalTotalPriceWithoutVat = 0;\n prices.StandardTotalPriceWithoutVat = 0;\n _.each(recipe.RecipeItems, function (ri) {\n var ingredient = _.find(recipe.Ingredients, function (i) { return i.IngredientId === ri.IngredientId; }) || {};\n var defaultQuantity = ingredient.DefaultQuantity || 0;\n var initialPrice = Math.round((ingredient.Price || 0) * 100) / 100;\n var initialPriceWithoutVat = Math.round((ingredient.PriceWithoutVat || 0) * 100) / 100;\n var optionalQuantity = Math.max(ri.Quantity - defaultQuantity);\n var optionalTotalPrice = initialPrice * optionalQuantity;\n var optionalTotalPriceWithoutVat = initialPriceWithoutVat * optionalQuantity;\n var standardTotalPrice = 0;//defaultQuantity > 0 ? initialPrice * defaultQuantity : 0;\n var standardTotalPriceWithoutVat = 0;//defaultQuantity > 0 ? initialPrice * defaultQuantity : 0;\n if (ingredient.SubRecipe && ri.Quantity > 0) {\n var subPrices = Vendd.RecipeLibrary.GetPrices(ingredient.RecipeItemId) || {};\n optionalTotalPrice += (subPrices.OptionalTotalPrice || 0);\n optionalTotalPriceWithoutVat += (subPrices.OptionalTotalPriceWithoutVat || 0);\n standardTotalPrice += (subPrices.StandardTotalPrice || 0);\n standardTotalPriceWithoutVat += (subPrices.StandardTotalPriceWithoutVat || 0);\n }\n prices.OptionalTotalPrice += optionalTotalPrice;\n prices.StandardTotalPrice += standardTotalPrice;\n prices.OptionalTotalPriceWithoutVat += optionalTotalPriceWithoutVat;\n prices.StandardTotalPriceWithoutVat += standardTotalPriceWithoutVat;\n });\n prices.InitialPrice = recipe.UnitPrice;\n prices.InitialPriceWithoutVat = recipe.UnitPriceWithoutVat;\n prices.TotalPrice = prices.OptionalTotalPrice + prices.StandardTotalPrice + prices.InitialPrice;\n prices.TotalPriceWithoutVat = prices.OptionalTotalPriceWithoutVat + prices.StandardTotalPriceWithoutVat + prices.InitialPriceWithoutVat;\n recipe.Prices = prices;\n return prices;\n };\n\n Vendd.RecipeLibrary.GetWeight = function (recipeId) {\n var recipe = _recipes[recipeId];\n if (!recipe) {\n return returnResponse(recipeId, 500, 1000);\n }\n var weightObj = {};\n weightObj.InitialWeight = recipe.Weight || 0;\n weightObj.OptionalTotalWeight = getTotalWeight(recipe, recipeId);\n return weightObj;\n\n };\n\n Vendd.RecipeLibrary.GetEnabledItems = function (recipeId) {\n var recipe = _recipes[recipeId];\n\n if (!recipe) {\n return returnResponse(recipeId, 500, 1000);\n }\n\n var data = {};\n data.EnabledItems = [];\n data.DisableItems = [];\n\n data.GroupErrors = [];\n\n data.Errors = [];\n\n var totalQuantity = getTotalQuantity(recipe);\n var extraQuantity = 0;\n var errorCode = 0;\n if (totalQuantity < recipe.MinQuantity) {\n errorCode = 1042;\n extraQuantity = recipe.MinQuantity - totalQuantity;\n }\n else if (totalQuantity > recipe.MaxQuantity) {\n errorCode = 1043;\n extraQuantity = totalQuantity - recipe.MaxQuantity;\n }\n if (errorCode > 0) {\n data.Errors.push({\n RecipeId: recipeId,\n ErrorCode: errorCode,\n ExtraQuantity: extraQuantity,\n MinQuantity: recipe.MinQuantity,\n MaxQuantity: recipe.MaxQuantity,\n Quantity: totalQuantity\n });\n }\n\n //var subRecipeIngredientIds = [];\n\n\n //var subRecipes = _.filter(recipe.Ingredients, function (i) {\n // if (i.SubRecipeId == 0) return false;\n // return recipe.RecipeItems.some(function (r) { return r.VariantId === i.VariantId; });\n //}) || [];\n //_.each(subRecipes, function (sr) {\n // var subRecipe = Vendd.RecipeLibrary.GetModel(sr.RecipeItemId) || {};\n // _.each(subRecipe.Ingredients || [], function (i) {\n // if (i.VariantId > 0) {\n // var i_group = _.find(recipe.Groups, function (g) {\n // return g.Items.some(function (i_g) { return i.VariantId === i_g.VariantId; });\n // });\n // if (i_group.IsMultiSelect) {\n\n // //var ingredients = recipe.Ingredients.filter(function (item) { return item.VariantId === i.VariantId; });\n // var ingredients = _.map(\n // recipe.Ingredients.filter(function (item) { return item.VariantId === i.VariantId; }),\n // function (x) { return x.IngredientId; });\n // } else {\n // //var ingredients = i_group.Items;\n // var ingredients = _.map(i_group.Items, function (item) {\n // return item.IngredientId;\n // });\n // }\n // subRecipeIngredientIds = _.uniq(_.union(subRecipeIngredientIds, ingredients));\n // }\n // });\n //});\n\n $.each(recipe.Categories, function (indexCategory, category) {\n $.each(category.Groups, function (indexGroup, group) {\n //group.IsMultiSelect = !(group.MinQuantity <= 1 && group.MaxQuantity == 1 && group.Items.length > 1);\n var groupQuantity = getGroupQuantity(recipe, group);\n var disableAllGroup = _.filter(recipe.Ingredients, function (i) { return i.GroupId === group.Id && !i.CanRemove && !group.IsMultiSelect; }).length > 0;\n $.each(group.VisualGroups, function (indexVisualGroup, visualGroup) {\n $.each(visualGroup.Items, function (indexItem, ingredient) {\n var recipeIngredient = _.first(_.filter(recipe.RecipeItems, function (x) { return x.IngredientId === ingredient.IngredientId && x.RecipeId === recipeId; })) || {};\n var quantity = recipeIngredient.Quantity || 0;\n //einai project specific gia bjt, prepei na allaxei se general\n var isDisableFromSubRecipe = false; //subRecipeIngredientIds.some(function (x) { return x == ingredient.IngredientId; });\n var isDisabled = !ingredient.CanRemove ||\n (ingredient.MaxQuantity <= quantity && ingredient.MinQuantity > quantity) ||\n //(group.MinQuantity >= groupQuantity && quantity > 0) ||\n (group.MaxQuantity <= groupQuantity && quantity === 0) ||\n //(recipe.MinQuantity >= totalQuantity && quantity > 0) ||\n (recipe.MaxQuantity <= totalQuantity && quantity === 0)\n ;\n var canAdd = ingredient.MaxQuantity > quantity && group.MaxQuantity > groupQuantity;\n var canRemove = ingredient.MinQuantity < quantity && ingredient.CanRemove;\n var isChecked = quantity > 0;\n var checkIncompatibles = (Vendd.RecipeLibrary.CheckIncompatibles(recipeId, ingredient.IngredientId));\n var isEnabledIncompatible = checkIncompatibles.success || (!checkIncompatibles.success && checkIncompatibles.data.BothSelected);\n var checkPrerequisites = (Vendd.RecipeLibrary.CheckPrerequisites(recipeId, ingredient.IngredientId));\n var isEnabledPrerequisites = checkPrerequisites.success || (!checkPrerequisites.success && checkPrerequisites.data.BothPrerequisite);\n var checkPrerequisitesAnyOfSet = (Vendd.RecipeLibrary.CheckPrerequisitesAnyOfSet(recipeId, ingredient.IngredientId));\n var errorCode = 0;\n if (!disableAllGroup && ((!group.IsMultiSelect || !isDisabled) && (isEnabledIncompatible && isEnabledPrerequisites && checkPrerequisitesAnyOfSet.success && !isDisableFromSubRecipe) || ingredient.IsNullable)) {\n if (isDisabled && ingredient.DefaultQuantity > 0 && ingredient.MinQuantity === ingredient.DefaultQuantity) errorCode = 1012;\n else if (!checkIncompatibles.success) errorCode = checkIncompatibles.status.ErrorCode;\n else if (!checkPrerequisites.success) errorCode = checkPrerequisites.status.ErrorCode;\n else if (!checkPrerequisitesAnyOfSet.success) errorCode = checkPrerequisitesAnyOfSet.status.ErrorCode;\n data.EnabledItems.push({\n RecipeId: recipeId,\n GroupId: group.Id,\n IngredientId: ingredient.IngredientId,\n ProductItemId: ingredient.RecipeItemId,\n VariantId: ingredient.VariantId,\n ErrorCode: errorCode,\n CanAdd: canAdd,\n canRemove: canRemove,\n Incompatibles: checkIncompatibles.data.Incompatibles,\n MissingPrerequisites: checkPrerequisites.data.MissingPrerequisites,\n MissingAnyOfPrerequisites: checkPrerequisitesAnyOfSet.data.MissingAnyOfPrerequisites,\n });\n } else {\n var disableIncompatibles = true;\n if (isDisabled && ingredient.DefaultQuantity > 0 && ingredient.MinQuantity === ingredient.DefaultQuantity) errorCode = 1012;\n //else if (group.MinQuantity >= groupQuantity && group.IsMultiSelect && isChecked) errorCode = 1020;\n else if (group.MaxQuantity <= groupQuantity && group.IsMultiSelect && !isChecked) errorCode = 1021;\n else if (disableAllGroup) errorCode = 1021;\n //else if (recipe.MinQuantity >= totalQuantity && group.IsMultiSelect && isChecked) errorCode = 1040;\n else if (recipe.MaxQuantity <= totalQuantity && group.IsMultiSelect && !isChecked) errorCode = 1041;\n else if (ingredient.MinQuantity > quantity && group.IsMultiSelect && isChecked) errorCode = 1010;\n else if (ingredient.MaxQuantity <= quantity && group.IsMultiSelect && !isChecked) errorCode = 1011;\n else if (!checkIncompatibles.success) errorCode = 1030;\n else if (!checkPrerequisites.success) errorCode = 1031;\n else if (!checkPrerequisitesAnyOfSet.success) errorCode = 1033;\n else if (isDisableFromSubRecipe) errorCode = 1034;\n if (errorCode > 0) {\n data.DisableItems.push({\n RecipeId: recipeId,\n GroupId: group.Id,\n IngredientId: ingredient.IngredientId,\n ProductItemId: ingredient.RecipeItemId,\n VariantId: ingredient.VariantId,\n ErrorCode: errorCode,\n CanAdd: canAdd,\n canRemove: canRemove,\n Incompatibles: checkIncompatibles.data.Incompatibles,\n MissingPrerequisites: checkPrerequisites.data.MissingPrerequisites,\n MissingAnyOfPrerequisites: checkPrerequisitesAnyOfSet.data.MissingAnyOfPrerequisites,\n\n });\n }\n }\n });\n });\n var groupErrorCode = 0;\n var extraQuantity = 0;\n if (groupQuantity < group.MinQuantity) {\n groupErrorCode = 1022;\n extraQuantity = group.MinQuantity - groupQuantity;\n }\n else if (groupQuantity > group.MaxQuantity) {\n groupErrorCode = 1023;\n extraQuantity = groupQuantity - group.MaxQuantity;\n }\n if (groupErrorCode > 0) {\n data.GroupErrors.push({\n Id: group.Id,\n RecipeId: recipeId,\n ErrorCode: groupErrorCode,\n ExtraQuantity: extraQuantity,\n MinQuantity: group.MinQuantity,\n MaxQuantity: group.MaxQuantity,\n Quantity: groupQuantity,\n Name: group.Name,\n CategoryName: category.Category\n });\n }\n });\n });\n\n return returnResponse(recipeId, 200, 0, data);\n };\n\n Vendd.RecipeLibrary.CheckIncompatibles = function (recipeId, ingredientId) {\n\n var recipe = _recipes[recipeId];\n\n if (!recipe) {\n return returnResponse(recipeId, 500, 1000);\n }\n\n var ingredient = _.find(recipe.Ingredients, function (i) { return i.IngredientId === ingredientId; });\n var recipeIngredient = _.first(_.filter(recipe.RecipeItems, function (x) { return x.IngredientId === ingredient.IngredientId; })) || {};\n\n if (!ingredient) {\n return returnResponse(recipeId, 500, 1002);\n }\n\n var data = {};\n var incompatibles = _.filter(ingredient.Incompatibles,\n function (i) {\n return recipe.RecipeItems.some(function (item) { return item.IngredientId === i; });\n }) || [];\n\n if (incompatibles.length > 0) {\n data.Incompatibles = _.filter(recipe.Ingredients, function (item) { return incompatibles.some(function (i) { return item.IngredientId === i; }) });\n data.BothSelected = (recipeIngredient.Quantity || 0) > 0;\n return returnResponse(recipeId, 500, 1030, data);\n }\n\n return returnResponse(recipeId, 200);\n }\n\n Vendd.RecipeLibrary.CheckPrerequisites = function (recipeId, ingredientId) {\n\n var recipe = _recipes[recipeId];\n\n if (!recipe) {\n return returnResponse(recipeId, 500, 1000);\n }\n\n var ingredient = _.find(recipe.Ingredients, function (i) { return i.IngredientId === ingredientId });\n\n if (!ingredient) {\n return returnResponse(recipeId, 500, 1002);\n }\n\n var data = {};\n var missingPrerequisites = _.filter(ingredient.Prerequisites,\n function (i) {\n return !recipe.RecipeItems.some(function (item) { return item.IngredientId === i; });\n }) || [];\n\n if (missingPrerequisites.length > 0) {\n data.MissingPrerequisites = _.filter(recipe.Ingredients, function (item) { return missingPrerequisites.some(function (i) { return item.IngredientId === i; }) });\n var bothPrerequisite = _.filter(data.MissingPrerequisites,\n function (i) {\n return i.Prerequisites.length > 0 && i.Prerequisites.some(function (item) { return item === ingredient.IngredientId; });\n }) || [];\n data.BothPrerequisite = bothPrerequisite.length > 0;\n return returnResponse(recipeId, 500, 1031, data);\n }\n\n return returnResponse(recipeId, 200);\n }\n\n Vendd.RecipeLibrary.CheckPrerequisitesAnyOfSet = function (recipeId, ingredientId) {\n\n var recipe = _recipes[recipeId];\n\n if (!recipe) {\n return returnResponse(recipeId, 500, 1000);\n }\n\n var ingredient = _.find(recipe.Ingredients, function (i) { return i.IngredientId === ingredientId });\n\n if (!ingredient) {\n return returnResponse(recipeId, 500, 1002);\n }\n\n var data = {};\n data.MissingAnyOfPrerequisites = [];\n var hasMissingAnyOfPrerequisites = false;\n for (var i = 0; i < (ingredient.RequiresAnyOfSet || []).length; i++) {\n var requiredSetItems = ingredient.RequiresAnyOfSet[i].RequiresAnyOfItems || [];\n var anyOfIngredient = _.filter(requiredSetItems,\n function (i) {\n return recipe.RecipeItems.some(function (item) { return item.IngredientId === i; });\n }) || [];\n\n if (anyOfIngredient.length === 0 && requiredSetItems.length > 0) {\n hasMissingAnyOfPrerequisites = true;\n var missingAnyOfPrerequisites = _.filter(recipe.Ingredients, function (item) { return requiredSetItems.some(function (i) { return item.IngredientId === i; }); });\n data.MissingAnyOfPrerequisites.push(missingAnyOfPrerequisites);\n }\n }\n if (hasMissingAnyOfPrerequisites)\n return returnResponse(recipeId, 500, 1033, data);\n\n return returnResponse(recipeId, 200);\n }\n\n Vendd.RecipeLibrary.IsValid = function (recipeId) {\n var recipe = _recipes[recipeId];\n if (!recipe) {\n return returnResponse(recipeId, 500, 1000);\n }\n\n var data = {};\n data.Errors = [];\n data.GroupErrors = [];\n data.IngredientsErrors = [];\n\n var totalQuantity = getTotalQuantity(recipe, recipeId);\n var extraQuantity = 0;\n var errorCode = 0;\n if (totalQuantity < recipe.MinQuantity) {\n errorCode = 1042;\n extraQuantity = recipe.MinQuantity - totalQuantity;\n }\n else if (totalQuantity > recipe.MaxQuantity) {\n errorCode = 1043;\n extraQuantity = totalQuantity - recipe.MaxQuantity;\n }\n if (errorCode > 0) {\n data.Errors.push({\n ParentProductId: recipeId,\n ErrorCode: errorCode,\n ExtraQuantity: extraQuantity,\n MinQuantity: recipe.MinQuantity,\n MaxQuantity: recipe.MaxQuantity,\n Quantity: totalQuantity\n });\n }\n\n $.each(recipe.Categories, function (indexCategory, category) {\n $.each(category.Groups, function (indexGroup, group) {\n var groupErrorCode = 0;\n var extraQuantity = 0;\n var groupQuantity = getGroupQuantity(recipe, group);\n if (groupQuantity < group.MinQuantity) {\n groupErrorCode = 1022;\n extraQuantity = group.MinQuantity - groupQuantity;\n }\n else if (groupQuantity > group.MaxQuantity) {\n groupErrorCode = 1023;\n extraQuantity = groupQuantity - group.MaxQuantity;\n }\n if (groupErrorCode > 0) {\n data.GroupErrors.push({\n Id: group.Id,\n RecipeId: recipeId,\n ErrorCode: groupErrorCode,\n ExtraQuantity: extraQuantity,\n MinQuantity: group.MinQuantity,\n MaxQuantity: group.MaxQuantity,\n Quantity: groupQuantity,\n Name: group.Name,\n CategoryName: category.Category\n });\n }\n $.each(group.VisualGroups, function (indexVisualGroup, visualGroup) {\n $.each(visualGroup.Items, function (indexItem, ingredient) {\n var recipeIngredient = _.first(_.filter(recipe.RecipeItems, function (x) { return x.IngredientId === ingredient.IngredientId; })) || _.find(recipe.RecipeItems, function (i) { return ingredient.RecipeItemId === i.RecipeItemId; }) || {};\n var quantity = recipeIngredient.Quantity || 0;\n var checkIncompatibles = (Vendd.RecipeLibrary.CheckIncompatibles(recipeId, ingredient.IngredientId));\n var checkPrerequisites = (Vendd.RecipeLibrary.CheckPrerequisites(recipeId, ingredient.IngredientId));\n var checkPrerequisitesAnyOfSet = (Vendd.RecipeLibrary.CheckPrerequisitesAnyOfSet(recipeId, ingredient.IngredientId));\n var errorCodes = [];\n if (ingredient.MinQuantity > quantity) errorCodes.push(1010);\n else if (ingredient.MaxQuantity < quantity) errorCodes.push(1011);\n else if (!checkIncompatibles.success && quantity > 0) errorCodes.push(1030);\n else if (!checkPrerequisites.success && quantity > 0) errorCodes.push(1031);\n else if (!checkPrerequisitesAnyOfSet.success && quantity > 0) errorCodes.push(1033);\n if (errorCodes.length > 0) {\n data.IngredientsErrors.push({\n RecipeId: recipeId,\n GroupId: group.Id,\n IngredientId: ingredient.IngredientId,\n ErrorCodes: errorCodes,\n Incompatibles: checkIncompatibles.data.Incompatibles || [],\n MissingPrerequisites: checkPrerequisites.data.MissingPrerequisites || [],\n MissingAnyOfPrerequisites: checkPrerequisitesAnyOfSet.data.MissingAnyOfPrerequisites || [],\n Name: ingredient.Name || \"\",\n Price: ingredient.Price,\n PriceWithoutVat: ingredient.PriceWithoutVat,\n PriceText: ingredient.PriceText,\n PriceWithoutVatText: ingredient.PriceWithoutVatText,\n TotalPrice: ingredient.TotalPrice,\n TotalPriceWithoutVat: ingredient.TotalPriceWithoutVat\n\n });\n }\n });\n });\n });\n });\n data.IsValid = data.Errors.length === 0 && data.GroupErrors.length === 0 && data.IngredientsErrors.length === 0;\n return data;\n }\n\n Vendd.RecipeLibrary.CompareModels = function (recipeId, savedModel) {\n\n var recipe = _recipes[recipeId];\n\n if (!recipe) {\n return returnResponse(recipeId, 500, 1000);\n }\n\n //ingredients hash code\n var ingedientsSavedModel = _.sortBy(savedModel.Ingredients, function (i) { return i.IngredientId; });\n var ingedientTemplate = \"{0}_{1}_{2}_{3}_{4}\";\n var ingedientsSavedModelHashCode = _.map(ingedientsSavedModel,\n function (i) {\n return ingedientTemplate\n .replace(\"{0}\", i.IngredientId || \"\")\n .replace(\"{1}\", i.GroupId || \"\")\n .replace(\"{2}\", i.Price || \"\")\n .replace(\"{3}\", (i.Incompatibles || []).join(\",\"))\n .replace(\"{4}\", (i.Prerequisites || []).join(\",\"));\n }).join(\"|\");\n var ingedientsModel = _.sortBy(recipe.Ingredients, function (i) { return i.IngredientId; });\n var ingedientsModelHashCode = _.map(ingedientsModel,\n function (i) {\n return ingedientTemplate\n .replace(\"{0}\", i.IngredientId || \"\")\n .replace(\"{1}\", i.GroupId || \"\")\n .replace(\"{2}\", i.Price || \"\")\n .replace(\"{3}\", (i.Incompatibles || []).join(\",\"))\n .replace(\"{4}\", (i.Prerequisites || []).join(\",\"));\n }).join(\"|\");\n\n //groups hash code\n var groupTemplate = \"{0}_{1}\";\n var groupsSavedModel = _.sortBy(savedModel.Groups, function (i) { return i.Id; });\n var savedGroupsModelHashCode = _.map(groupsSavedModel,\n function (i) {\n return groupTemplate\n .replace(\"{0}\", i.MinQuantity || 0)\n .replace(\"{1}\", i.MaxQuantity || 0);\n }).join(\"|\");\n var groupsModel = _.sortBy(recipe.Groups, function (i) { return i.Id; });\n var groupsModelHashCode = _.map(groupsModel,\n function (i) {\n return groupTemplate\n .replace(\"{0}\", i.MinQuantity || 0)\n .replace(\"{1}\", i.MaxQuantity || 0);\n }).join(\"|\");\n\n //models hash code\n var modelTemplate = \"{0}_{1}_{2}_{3}\";\n var savedModelHashCode = modelTemplate\n .replace(\"{0}\", savedModel.MinQuantity || 0)\n .replace(\"{1}\", savedModel.MaxQuantity || 0)\n .replace(\"{2}\", savedModel.MaxFreeQuantity || 0)\n .replace(\"{3}\", savedModel.MaxReplaceQuantity || 0);\n var modelHashCode = modelTemplate\n .replace(\"{0}\", recipe.MinQuantity || 0)\n .replace(\"{1}\", recipe.MaxQuantity || 0)\n .replace(\"{2}\", recipe.MaxFreeQuantity || 0)\n .replace(\"{3}\", recipe.MaxReplaceQuantity || 0);\n\n //modelHashCode = \"\"; //<----remove this , is test data and only\n if (ingedientsSavedModelHashCode === ingedientsModelHashCode && groupsModelHashCode === savedGroupsModelHashCode && savedModelHashCode === modelHashCode)\n return returnResponse(recipeId, 200);\n\n var recipeItems = [];\n var IngredientsErrors = [];\n var IngredientsWarnings = [];\n var data = {};\n _.each(savedModel.RecipeItems, function (r) {\n var ingredient = _.find(recipe.Ingredients, function (i) { return r.IngredientId === i.IngredientId; }) || _.find(recipe.Ingredients, function (i) { return r.RecipeItemId === i.RecipeItemId; });\n var savedIngredient = _.find(savedModel.Ingredients, function (i) { return r.IngredientId === i.IngredientId; }) || _.find(savedModel.Ingredients, function (i) { return r.RecipeItemId === i.RecipeItemId; });\n if (ingredient === null) {\n IngredientsErrors.push({\n IngredientId: savedIngredient.IngredientId,\n Name: savedIngredient.Name,\n Price: savedIngredient.Price,\n Incompatibles: savedIngredient.Incompatibles,\n Prerequisites: savedIngredient.Prerequisites,\n ErrorCodes: [1072]\n });\n return;\n }\n if (ingredient.Price !== savedIngredient.Price) {\n IngredientsWarnings.push({\n IngredientId: savedIngredient.IngredientId,\n Name: savedIngredient.Name,\n Price: savedIngredient.Price,\n Incompatibles: savedIngredient.Incompatibles,\n Prerequisites: savedIngredient.Prerequisites,\n ErrorCodes: [1073]\n });\n }\n recipeItems.push({\n RecipeId: recipeId,\n Category: ingredient.Category,\n CategoryCode: ingredient.CategoryCode,\n GroupId: ingredient.GroupId,\n IngredientId: ingredient.IngredientId,\n ProductItemCode: ingredient.RecipeItemCode,\n ProductItemId: ingredient.RecipeItemId,\n VariantId: ingredient.VariantId,\n Name: ingredient.Name || \"\",\n Quantity: (savedIngredient.Quantity || 1),\n Price: savedIngredient.Price,\n TotalPrice: Math.max((savedIngredient.Quantity || 1) - ingredient.DefaultQuantity, 0) * savedIngredient.Price,\n Weight: ingredient.Weight,\n IsStandard: ingredient.DefaultQuantity > 0,\n SubRecipeId: ingredient.SubRecipeId,\n SubRecipeCode: ingredient.SubRecipeCode\n });\n });\n\n var checkModel = $.extend({}, recipe);\n recipe.RecipeItems = _.reject(recipeItems, function (r) { return IngredientsErrors.some(function (i) { return i.IngredientId === r.IngredientId; }); });\n\n var validatedModel = Vendd.RecipeLibrary.IsValid(recipeId);\n\n data.IngredientsErrors = validatedModel.IngredientsErrors.concat(IngredientsErrors);\n data.IngredientsWarnings = IngredientsWarnings;\n\n data = $.extend({}, validatedModel, data || {});\n if (!data.IsValid || data.IngredientsErrors.length > 0 || data.GroupErrors.length > 0 || data.Errors.length > 0) {\n return returnResponse(recipeId, 500, 1004, data);\n }\n return returnResponse(recipeId, 200);\n }\n /*\n * GET GLOBAL ID CONFIGURATION\n * RecipeId the receipe identifier\n * Force if true, although that mighth be cached global id , it will create a new one - default value:false,\n * FriendlyName a friendly name for saving - default value: empty,\n * Vin the vin number - default value: empty,\n * PartnerId the vin number - default value: empty,\n * serviceurl the url service - default value: '/services/api/Product/SaveRecipeConfiguration',\n * onSuccess the function of success saving global identifier,\n * onError the function of error saving global identifier,\n */\n Vendd.RecipeLibrary.GenerateGlobalId = function (config) {\n\n var _def = $.Deferred();\n var data = {};\n\n var defaultConfiguration = {\n Force: false,\n FriendlyName: \"\",\n Vin: \"\",\n PartnerId: \"\",\n serviceurl: \"/services/api/Product/SaveRecipeConfiguration\"\n };\n\n defaultConfiguration.onSuccess = function (response) {\n if (!response.success || !response.data || !response.data.GlobalId) {\n config.onError(response);\n return;\n }\n data.GlobalId = response.data.GlobalId;\n data.SavedGlobalIdToLocal = (Vendd.RecipeLibrary.SaveGlobalIdToLocal(config.RecipeId, data.GlobalId)).success;\n data.SaveRecipeItemsToLocal = (Vendd.RecipeLibrary.SaveRecipeItemsToLocal(config.RecipeId, data.GlobalId)).success;\n data.HashCode = getRecipeItemsHashCode(config.RecipeId, recipe.RecipeItems);\n _recipes[config.RecipeId].HashCode = data.HashCode;\n _def.resolve(returnResponse(config.RecipeId, 200, 0, data));\n };\n defaultConfiguration.onError = function (response) {\n _def.reject(returnResponse(config.RecipeId, 500, 1060, response));\n };\n\n config = $.extend({}, defaultConfiguration, config || {});\n\n if (!config.RecipeId) {\n _def.resolve(returnResponse(null, 500, 1061));\n return;\n }\n var recipe = _recipes[config.RecipeId];\n if (!recipe) {\n _def.resolve(returnResponse(config.RecipeId, 500, 1000));\n return;\n }\n\n var currentHashCode = getRecipeItemsHashCode(config.RecipeId);\n var savedHashCode = Vendd.RecipeLibrary.GetLocalStorageRecipeItemsHashCode(config.RecipeId);\n config.HtmlData.Body = \"\";\n\n if (!config.Force && localStorage.getItem(\"globalId_\" + config.RecipeId) !== null && currentHashCode === savedHashCode) {\n data.GlobalId = localStorage.getItem(\"globalId_\" + config.RecipeId);\n data.HashCode = currentHashCode;\n _recipes[config.RecipeId].HashCode = currentHashCode;\n _def.resolve(returnResponse(config.RecipeId, 200, 0, data));\n } else {\n var jsonData = (Vendd.RecipeLibrary.ConvertToSavedModel(config.RecipeId) || {}).data || {};\n var requestData = JSON.stringify({\n FriendlyName: config.FriendlyName,\n ConfigurationJson: JSON.stringify(jsonData),\n ProductItemId: config.RecipeId,\n ProductIdentifier: config.Vin,\n PartnerId: config.PartnerId !== \"\" ? config.PartnerId : null,\n Url: window.location.href,\n HtmlData: config.HtmlData,\n IsShare: !config.Force\n });\n $.ajax({\n type: \"POST\",\n dataType: 'json',\n contentType: 'application/json; charset=UTF-8',\n url: config.serviceurl,\n async: true,\n data: requestData,\n error: config.onError,\n success: config.onSuccess\n });\n }\n\n return _def.promise();\n };\n\n Vendd.RecipeLibrary.AssignConfigurationToUser = function (config) {\n\n var _def = $.Deferred();\n var data = {};\n\n var defaultConfiguration = {\n serviceurl: \"/services/api/Product/SaveRecipeConfiguration\"\n };\n\n defaultConfiguration.onSuccess = function (response) {\n if (!response.success) {\n config.onError(response);\n return;\n }\n _def.resolve(returnResponse(config.RecipeId, 200, 0, data));\n };\n defaultConfiguration.onError = function (response) {\n _def.reject(returnResponse(config.RecipeId, 500, 1060, response));\n };\n\n config = $.extend({}, defaultConfiguration, config || {});\n\n var requestData = JSON.stringify({\n GlobalId: config.GlobalId || \"\",\n FriendlyName: \"Update User\",\n ConfigurationJson: JSON.stringify({}),\n ProductItemId: config.RecipeItemId,\n Url: window.location.href,\n });\n $.ajax({\n type: \"POST\",\n dataType: 'json',\n contentType: 'application/json; charset=UTF-8',\n url: config.serviceurl,\n async: true,\n data: requestData,\n error: config.onError,\n success: config.onSuccess\n });\n\n return _def.promise();\n };\n\n Vendd.RecipeLibrary.LoadFromGlobalId = function (config) {\n var _def = $.Deferred();\n var data = {};\n\n var defaultConfiguration = {\n serviceurl: \"/services/api/Product/GetRecipeConfiguration\"\n };\n\n defaultConfiguration.onSuccess = function (response) {\n if (!response.success || !response.data || !response.data.GlobalId) {\n config.onError(data);\n return;\n }\n data = JSON.parse(response.data.ConfigurationJson || \"{}\");\n data.GlobalId = response.data.GlobalId;\n data.HtmlData = JSON.parse(response.data.Html || \"{}\");\n data.Pdf = response.data.Pdf || \"\";\n data.IsValid = true;\n data.Errors = [];\n data.GroupErrors = [];\n data.IngredientsErrors = [];\n data.IngredientsWarnings = [];\n\n recipe.RecipeItems = data.RecipeItems;\n var compareResult = Vendd.RecipeLibrary.CompareModels(config.RecipeId, data);\n var subrecipeCompareResults = _.map(data.SubRecipes || [], function (subrecipeData) {\n Vendd.RecipeLibrary.SetRecipeItems(subrecipeData.RecipeItemId, subrecipeData.RecipeItems);\n return Vendd.RecipeLibrary.CompareModels(subrecipeData.RecipeItemId, subrecipeData);\n });\n //console.log(\"compareResult:\", compareResult);\n if (!compareResult.success || subrecipeCompareResults.some(function (r) { return !r.success; })) {\n recipe.IsValid = false;\n recipe.IngredientsErrors = compareResult.data.IngredientsErrors;\n recipe.IngredientsWarnings = compareResult.data.IngredientsWarnings;\n recipe.Errors = compareResult.data.Errors;\n recipe.GroupErrors = compareResult.data.GroupErrors;\n //data.RecipeItems = recipe.RecipeItems;\n _def.resolve(returnResponse(config.RecipeId, 200, 1070, recipe));\n return;\n }\n\n recipe.GlobalId = data.GlobalId;\n recipe.Pdf = data.Pdf;\n recipe.IsValid = data.IsValid;\n recipe.Errors = data.Errors;\n recipe.IngredientsErrors = data.IngredientsErrors;\n recipe.IngredientsWarnings = data.IngredientsWarnings;\n\n _def.resolve(returnResponse(config.RecipeId, 200, 0, recipe));\n return;\n };\n defaultConfiguration.onError = function (data) {\n _def.reject(returnResponse(config.RecipeId, 500, 1070, data));\n return;\n };\n\n config = $.extend({}, defaultConfiguration, config || {});\n\n var recipe = _recipes[config.RecipeId];\n if (!recipe) {\n _def.resolve(returnResponse(config.RecipeId, 500, 1000));\n return;\n }\n\n if ((config.GlobalId || 0) === 0) {\n _def.resolve(returnResponse(config.RecipeId, 500, 1071));\n return;\n }\n\n var requestData = JSON.stringify({\n GlobalId: config.GlobalId\n });\n $.ajax({\n type: \"POST\",\n dataType: 'json',\n contentType: 'application/json; charset=UTF-8',\n url: config.serviceurl,\n async: true,\n data: requestData,\n error: config.onError,\n success: config.onSuccess\n });\n\n return _def.promise();\n };\n\n Vendd.RecipeLibrary.SaveGlobalIdToLocal = function (recipeId, globalId) {\n var recipe = _recipes[recipeId];\n\n if (!recipe) {\n return returnResponse(recipeId, 500, 1000);\n }\n\n localStorage.setItem(\"globalId_\" + recipeId, globalId);\n\n return returnResponse(recipeId, 200, 0);\n };\n\n Vendd.RecipeLibrary.SaveRecipeItemsToLocal = function (recipeId) {\n var recipe = _recipes[recipeId];\n\n if (!recipe) {\n return returnResponse(recipeId, 500, 1000);\n }\n var recipeItemsData = Vendd.RecipeLibrary.GetFullRecipeItems(recipeId);\n var recipeItems = recipeItemsData.RecipeItems;\n var currentHashCode = getRecipeItemsHashCode(recipeId, recipeItems);\n var savedHashCode = Vendd.RecipeLibrary.GetLocalStorageRecipeItemsHashCode(recipeId);\n if (currentHashCode === savedHashCode) {\n return returnResponse(recipeId, 200);\n }\n\n var dataLocalStorage = {\n RecipeItems: recipe.RecipeItems,\n HashCode: currentHashCode\n };\n\n localStorage.setItem(\"configurator_\" + recipeId, JSON.stringify(dataLocalStorage, null, 2));\n\n return returnResponse(recipeId, 200);\n };\n\n Vendd.RecipeLibrary.LoadFromLocalRecipeItems = function (recipeId) {\n var recipe = _recipes[recipeId];\n\n if (!recipe) {\n return returnResponse(recipeId, 500, 1000);\n }\n if (localStorage.getItem(\"configurator_\" + recipeId) === null) {\n return returnResponse(recipeId, 500, 1050);\n }\n //var savedData = $.cookie(\"model_recipe_\" + recipeId) || [];\n var dataLocalStorage = JSON.parse(localStorage.getItem(\"configurator_\" + recipeId) || \"{}\");\n recipe.RecipeItems = dataLocalStorage.RecipeItems;\n recipe.HashCode = dataLocalStorage.HashCode;\n\n var data = {};\n data.Recipe = recipe;\n data.GlobalId = \"\";\n return returnResponse(recipeId, 200, 0, data);\n };\n\n var getRecipeItemsHashCode = function (recipeId, items) {\n var recipe = _recipes[recipeId];\n if (!recipe) {\n return null;\n }\n var recipeItems = items || ((Vendd.RecipeLibrary.GetFullRecipeItems(recipeId) || {}).data || {}).RecipeItems;\n var hashCode = recipeId +\n (recipeItems.length > 0\n ? \"_\" + (_.map(_.sortBy(recipeItems, \"IngredientId\"), function (i) { return i.IngredientId + \"_\" + i.Quantity; }) || []).join(\"_\")\n : \"\");\n return hashCode;\n };\n\n Vendd.RecipeLibrary.GetLocalStorageRecipeItemsHashCode = function (recipeId) {\n var recipe = _recipes[recipeId];\n if (!recipe) {\n return null;\n }\n if (localStorage.getItem(\"configurator_\" + recipeId) === null) {\n return null;\n }\n var dataLocalStorage = JSON.parse(localStorage.getItem(\"configurator_\" + recipeId) || \"{}\");\n return dataLocalStorage.HashCode;\n }\n\n Vendd.RecipeLibrary.ClearLocalStorage = function (recipeId) {\n var recipe = _recipes[recipeId];\n if (!recipe) {\n return false;\n }\n if (localStorage.getItem(\"configurator_\" + recipeId) !== null) {\n localStorage.removeItem(\"configurator_\" + recipeId);\n }\n if (localStorage.getItem(\"globalId_\" + recipeId) !== null) {\n localStorage.removeItem(\"globalId_\" + recipeId);\n }\n return true;\n }\n\n Vendd.RecipeLibrary.ConvertToSavedModel = function (recipeId) {\n var recipe = _recipes[recipeId];\n\n if (!recipe) {\n return returnResponse(recipeId, 500, 1000);\n }\n var data = {};\n data = converModelToSaveDataModel(recipe) || {};\n data.Groups = converGroupsToSaveDataModel(recipe.Groups) || [];\n data.Ingredients = converIngedientToSaveDataModel(recipe.Ingredients) || [];\n data.RecipeItems = Vendd.RecipeLibrary.GetRecipeItems(recipeId).data.RecipeItems || [];\n data.SubRecipes = _.map(\n _.filter(recipe.RecipeItems, function (r) { return r.SubRecipeId > 0 && _recipes[r.ProductItemId]; }) || [],\n function (ri) {\n return (Vendd.RecipeLibrary.ConvertToSavedModel(ri.ProductItemId) || {}).data || {};\n }) || [];\n return returnResponse(recipeId, 200, 0, data);\n };\n\n var converModelToSaveDataModel = function (m) {\n return {\n RecipeId: m.RecipeId,\n RecipeItemId: m.RecipeItemId,\n MinQuantity: m.MinQuantity,\n MaxQuantity: m.MaxQuantity,\n MaxFreeQuantity: m.MaxFreeQuantity,\n MaxReplaceQuantity: m.MaxReplaceQuantity,\n UnitPrice: m.UnitPrice\n };\n };\n\n var converGroupsToSaveDataModel = function (groups) {\n var model = _.map(groups, function (g) {\n return {\n Id: g.Id,\n MinQuantity: g.MinQuantity,\n MaxQuantity: g.MaxQuantity,\n };\n });\n return model;\n };\n\n var converIngedientToSaveDataModel = function (ingredients) {\n var model = _.map(ingredients, function (i) {\n return {\n IngredientId: i.IngredientId,\n Name: i.Name,\n GroupId: i.GroupId,\n Price: i.Price,\n Incompatibles: i.Incompatibles || [],\n Prerequisites: i.Prerequisites || [],\n };\n });\n return model;\n };\n\n function checkRestrictions(recipe) {\n return true;\n };\n\n function FixJSFloatBug(price) {\n return parseFloat((price || 0).toFixed(2));\n }\n\n Vendd.RecipeLibrary.Tests = {\n 0: function () {\n var _rec = 2;\n console.log(Vendd.RecipeLibrary.InitRecipe(null, _rec));\n console.log(Vendd.RecipeLibrary.AddIngredient(null, _rec, 88694, 2));\n console.log(Vendd.RecipeLibrary.AddIngredient(null, _rec, 88691, 1));\n console.log(Vendd.RecipeLibrary.AddIngredient(null, _rec, 88691, 2));\n console.log(Vendd.RecipeLibrary.AddIngredient(null, _rec, 88691, 2, true));\n console.log(Vendd.RecipeLibrary.RemoveIngredient(null, _rec, 88694));\n console.log(Vendd.RecipeLibrary.DeclareState(null, _rec));\n return \"success\";\n },\n 1: function () {\n console.log(Vendd.RecipeLibrary.InitRecipe(null, 1));\n console.log(Vendd.RecipeLibrary.AddIngredient(null, 1, 88691, 2));\n console.log(Vendd.RecipeLibrary.AddIngredient(null, 1, 88694, 1));\n console.log(Vendd.RecipeLibrary.AddIngredient(null, 1, 88694, 2));\n console.log(Vendd.RecipeLibrary.AddIngredient(null, 1, 88694, 2, true));\n console.log(Vendd.RecipeLibrary.RemoveIngredient(null, 1, 88691));\n console.log(Vendd.RecipeLibrary.DeclareState(null, 1));\n return \"success\";\n },\n 2: function () {\n console.log(Vendd.RecipeLibrary.InitRecipe(null, 1));\n console.log(Vendd.RecipeLibrary.AddIngredient(null, 1, 88694, 1));\n console.log(Vendd.RecipeLibrary.AddIngredient(null, 1, 88691, 2));\n console.log(Vendd.RecipeLibrary.AddIngredient(null, 1, 88694, 2));\n console.log(Vendd.RecipeLibrary.AddIngredient(null, 1, 88694, 2, true));\n console.log(Vendd.RecipeLibrary.RemoveIngredient(null, 1, 88691));\n console.log(Vendd.RecipeLibrary.DeclareState(null, 1));\n return \"success\";\n }\n };\n return Vendd;\n\n})(Vendd || {});\n\nvar testModel = {};\n","var recaptchaLoaded = false;\nvar recaptchaMessagePublished = false;\nvar callback_recaptcha = function () {\n recaptchaLoaded = true;\n checkAsyncLoad();\n};\n\nvar googleMapsLoaded = false;\nvar googleMapsMessagePublished = false;\nvar callback_googlemaps = function () {\n googleMapsLoaded = true;\n checkAsyncLoad();\n};\n\nvar venddLoaded = false;\nvar callback_vendd = function () {\n venddLoaded = true;\n checkAsyncLoad();\n};\n\nvar checkAsyncLoad = function () {\n if (!venddLoaded) \n return;\n\n if (recaptchaLoaded && !recaptchaMessagePublished) {\n Vendd.MessageBus.publishAsync('checkAsyncLoad', new Vendd.Plugins.Messages.RecaptcaLoaded());\n recaptchaMessagePublished = true;\n }\n \n if (googleMapsLoaded && !googleMapsMessagePublished) {\n Vendd.MessageBus.publishAsync('checkAsyncLoad', new Vendd.Plugins.Messages.GoogleMapsLoaded());\n googleMapsMessagePublished = true;\n }\n\n};\n\nfunction checkout_callback_googlemaps() {\n\n angular.element(\".x-checkoutstore\").ready(function () {\n if ($('.x-checkoutstore').scope() && $('.x-checkoutstore').scope().Control && typeof ($('.x-checkoutstore').scope().Control.SetMap) === 'function') {\n $('.x-checkoutstore').scope().Control.SetMap(true);\n }\n }); \n\n}","$(document).ready(function () {\n\n if (Vendd && Vendd.Scripts && (typeof Vendd.Scripts.init === 'function')) {\n\n Vendd.Scripts.init();\n\n if (LhApp && LhApp.init && (typeof LhApp.init === 'function'))\n LhApp.init();\n } \n});"]}