var Constant;
(function (Constant) {
    Constant.GET = "GET";
    Constant.json = "json";
    Constant.Function = "function";
    Constant.string = "string";
    Constant.object = "object";
    Constant.Post = "post";
    Constant.ZnodeCustomerShipping = "ZnodeCustomerShipping";
    Constant.AmericanExpressCardCode = "AMEX";
    Constant.gocoderGoogleAPI = $("#gocoderGoogleAPI").val(); //To be fetched from config file
    Constant.gocoderGoogleAPIKey = $("#gocoderGoogleAPIKey").val(); //To be fetched from config file 
    Constant.CMSDefaultPageSize = "16";
    Constant.CMSDefaultPageNumber = "1";
    Constant.DefaultDateFormat = "mm/dd/yyyy";
    Constant.DefaultRequiredDateFormat = "*mm/dd/yyyy";
    Constant.TrackingDefaultShipping = 3;
    Constant.TrackingDefaultPayment = 2;
    Constant.LastSelectedCategory = "LastSelectedCategory_";
    Constant.MinutesInAHour = 60;
})(Constant || (Constant = {}));
var ErrorMsg;
(function (ErrorMsg) {
    ErrorMsg.CallbackFunction = "Callback is not defined. No request made.";
    ErrorMsg.APIEndpoint = "API Endpoint not available: ";
    ErrorMsg.InvalidFunction = "invalid function name : ";
})(ErrorMsg || (ErrorMsg = {}));
//# sourceMappingURL=Znode.Model.js.map;
/// <reference path="../../typings/jquery/jquery.d.ts" />
/// <reference path="../../typings/jqueryui/jqueryui.d.ts" />
/// <reference path="../../typings/jquery.validation/jquery.validation.d.ts" />
/// <reference path="../../typings/jquery.cookie/jquery.cookie.d.ts" />
var isFadeOut = true;
var fadeOutTime = 10000;
var CheckBoxCollection = new Array();
var UpdateContainerId;
var ZnodeBase = /** @class */ (function () {
    function ZnodeBase() {
    }
    ZnodeBase.prototype.ajaxRequest = function (url, method, parameters, successCallback, responseType, async) {
        if (async === void 0) { async = true; }
        this.ajaxRequestCall(url, method, parameters, successCallback, responseType, async);
    };
    ZnodeBase.prototype.ajaxRequestWithoutCache = function (url, method, parameters, successCallback, responseType, async) {
        if (async === void 0) { async = true; }
        this.ajaxRequestCall(url, method, parameters, successCallback, responseType, async, false);
    };
    ZnodeBase.prototype.ajaxRequestCall = function (url, method, parameters, successCallback, responseType, async, cache) {
        if (async === void 0) { async = true; }
        if (cache === void 0) { cache = true; }
        if (!method) {
            method = Constant.GET;
        }
        if (!responseType) {
            responseType = Constant.json;
        }
        if (typeof successCallback != Constant.Function) {
            this.errorOutfunction(ErrorMsg.CallbackFunction);
        }
        else {
            $.ajax({
                type: method,
                url: url,
                async: async,
                cache: cache,
                data: this.cachestampfunction(parameters),
                dataType: responseType,
                success: function (response) {
                    successCallback(response);
                },
                error: function (xhr, ajaxOptions, thrownError) {
                    ZnodeBase.prototype.errorOutfunction(xhr.status);
                    ZnodeBase.prototype.errorOutfunction(thrownError);
                    ZnodeBase.prototype.errorOutfunction(ErrorMsg.APIEndpoint + url);
                }
            });
        }
    };
    ZnodeBase.prototype.cachestampfunction = function (data) {
        var d = new Date();
        if (data != null) {
            if (typeof data == Constant.string) {
                data += "&_=" + d.getTime();
            }
            else if (typeof data == Constant.object) {
                if (data.hasOwnProperty("_") == false) {
                    Object.defineProperty(data, '_', {
                        value: d.getTime(),
                        writable: true
                    });
                }
                else {
                    data["_"] = d.getTime();
                }
            }
            else {
                data = { "_": d.getTime() };
            }
        }
        return (data);
    };
    // Error output
    ZnodeBase.prototype.errorOutfunction = function (message) {
        console.log(message);
        if (this.errorAsAlert) {
            alert(message);
        }
    };
    ZnodeBase.prototype.executeFunctionByName = function (functionName, context, args, target) {
        if (target === void 0) { target = undefined; }
        try {
            var args = [].slice.call(arguments).splice(2);
            var namespaces = functionName.split(".");
            var func = namespaces.pop();
            for (var i = 0; i < namespaces.length; i++) {
                context = context[namespaces[i]];
            }
            if (target !== undefined)
                return context[func].apply(this, args, target);
            else
                return context[func].apply(this, args);
        }
        catch (ex) {
            console.log(ErrorMsg.InvalidFunction + functionName);
        }
    };
    ZnodeBase.prototype.executeInit = function (functionName, context, args) {
        try {
            if (functionName != "Product.Init") {
                localStorage.removeItem("isFromCategoryPage");
            }
            var args = [].slice.call(arguments).splice(2);
            var namespaces = functionName.split(".");
            var func = namespaces.pop();
            for (var i = 0; i < namespaces.length; i++) {
                context = context[namespaces[i]];
            }
            var _contextObject = new context();
            return _contextObject[func].apply(this, args);
        }
        catch (ex) {
            console.log("Invalid function name " + functionName);
        }
    };
    // Onready method runs when document is loaded and ready
    ZnodeBase.prototype.onready = function () {
        // Set the controller and action names
        var modules = $("body").data("controller").split(".");
        var action = $("body").data("view");
        // Loads modules based on controller and view
        // If init() methods are present, they will be run on load
        modules.forEach(function (module) {
            if (module !== 'undefined') {
                var functionName = module + ".Init";
                ZnodeBase.prototype.executeInit(functionName, window, arguments);
            }
        });
    };
    // to get cookies from server side
    ZnodeBase.prototype.getCookie = function (cookieName, isHttpOnly) {
        if (isHttpOnly === void 0) { isHttpOnly = true; }
        var cookieValue = "";
        if (isHttpOnly) {
            CommonHelper.prototype.GetHttpCookie(cookieName, function (response) {
                cookieValue = response;
            });
        }
        else {
            cookieValue = $.cookie(cookieName);
        }
        return cookieValue;
    };
    //To create HTTP cookie
    ZnodeBase.prototype.setCookie = function (cookieName, cookieValue, expiry, cookieExpireInMinutes, isHttpOnly) {
        if (isHttpOnly === void 0) { isHttpOnly = true; }
        if (isHttpOnly) {
            CommonHelper.prototype.CreateHttpCookie(cookieName, cookieValue, cookieExpireInMinutes, function (response) {
                return response;
            });
        }
        else {
            $.cookie(cookieName, cookieValue, { expires: expiry });
        }
    };
    //get locale resource by key name.
    ZnodeBase.prototype.getResourceByKeyName = function (keyname) {
        var defaultculture = $("body").data("culture");
        defaultculture = defaultculture.substr(0, defaultculture.indexOf("-"));
        var resourceClassObj = Object.create(window[defaultculture].prototype);
        resourceClassObj.constructor.apply(resourceClassObj);
        return resourceClassObj[keyname];
    };
    ZnodeBase.prototype.onImageError = function () {
        jQuery('img').on('error', function (e) {
            if ($("#brandListPartialPage").html() === undefined) {
                this.src = window.location.protocol + "//" + window.location.host + "/Content/Images/no-image.png";
            }
        });
    };
    ZnodeBase.prototype.ShowLoader = function () {
        if ($("#loader-content-backdrop").length == 0)
            $("body").append("<div id='loader-content-backdrop' class='modal-backdrop fade in'><div id='loading' class='loader loader-body'></div></div>");
    };
    ZnodeBase.prototype.HideLoader = function () {
        $("#loader-content-backdrop").remove();
    };
    ZnodeBase.prototype.IsiPad = function () {
        if ((navigator.userAgent.match(/iPad/i)) && (navigator.userAgent.match(/iPad/i) != null)) {
            var clickTimer = null;
            $(".navbar-nav li").find("a").on("click", function (e) {
                if ($(this).parent().find("ul").length > 0) {
                    e.preventDefault();
                    var control = this;
                    if (clickTimer == null) {
                        clickTimer = setTimeout(function () {
                            clickTimer = null;
                            $(control).parent().find("ul").show();
                        }, 500);
                    }
                    else {
                        clearTimeout(clickTimer);
                        clickTimer = null;
                        window.location.href = $(control).attr("href");
                    }
                }
            });
        }
    };
    //Get google geo-locator api
    ZnodeBase.prototype.GetGeoLocatorAPI = function () {
        return Constant.gocoderGoogleAPI;
    };
    //Get google geo-locator api key
    ZnodeBase.prototype.GetGeoLocatorAPIKey = function () {
        return Constant.gocoderGoogleAPIKey;
    };
    //Method to Get Parameter Values
    ZnodeBase.prototype.GetParameterValues = function (param) {
        var url = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
        for (var i = 0; i < url.length; i++) {
            var urlparam = url[i].split('=');
            if (urlparam[0] == param) {
                return urlparam[1];
            }
        }
    };
    ZnodeBase.prototype.InitializeZnodeAjaxifier = function () {
        try {
            ZnodeAjaxify.prototype.Apply();
        }
        catch (ex) { }
    };
    //Aside panel tab selection 
    ZnodeBase.prototype.activeAsidePannel = function () {
        var status = 0;
        var redirecturl = window.location.href;
        redirecturl = decodeURIComponent(redirecturl);
        var originurl = document.location.origin;
        var matchingUrl = redirecturl.replace(originurl, '');
        matchingUrl = decodeURIComponent(matchingUrl);
        $('.aside-panel li a.active').removeClass('active');
        $(".aside-panel li").each(function () {
            if ($.trim($(this).find('a').attr('href')).toLowerCase() == $.trim(matchingUrl).toLowerCase() || $.trim($(this).find('a').attr('href') + '#').toLowerCase() == $.trim(matchingUrl).toLowerCase()) {
                $(this).find('a').addClass('active');
                status = 1;
            }
            else if ($.trim($(this).find('a').attr('href')).toLowerCase() == $.trim(matchingUrl).split('?')[0].toLowerCase() || $.trim($(this).find('a').attr('href') + '#').toLowerCase() == $.trim(matchingUrl).toLowerCase()) {
                $(this).find('a').addClass('active');
                status = 1;
            }
        });
        if (status === 0) {
            var dataView = $("body").data("view");
            $(".aside-panel li").each(function () {
                if ($(this).find('a').attr('href') != undefined && $(this).find('a').attr('href') != "") {
                    var originurlArray = $(this).find('a').attr('href').split('/');
                    var actionName;
                    if (originurlArray != undefined && originurlArray.length > 1) {
                        if (originurlArray.length > 0 && originurlArray.length <= 3)
                            actionName = originurlArray[2].split("?")[0];
                        else
                            actionName = originurlArray[3].split("?")[0];
                        if (actionName != undefined && actionName != "") {
                            if (actionName === dataView) {
                                $(this).find('a').addClass('active');
                                status = 1;
                            }
                        }
                    }
                }
            });
        }
    };
    return ZnodeBase;
}());
$(window).on("load", function () {
    ZnodeBase.prototype.onready();
    ZnodeBase.prototype.HideLoader();
    ZnodeBase.prototype.IsiPad();
    ZnodeBase.prototype.InitializeZnodeAjaxifier();
});
ZnodeBase.prototype.onImageError();
$(document).off("contextmenu", "a[data-ajax=true]");
$(document).on("contextmenu", "a[data-ajax=true]", function () {
    return false;
});
//# sourceMappingURL=ZnodeGlobal.js.map;
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var Endpoint = /** @class */ (function (_super) {
    __extends(Endpoint, _super);
    function Endpoint() {
        return _super.call(this) || this;
    }
    Endpoint.prototype.GetProductDetails = function (productId, isQuickView, publishState, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/product/getproductquickview", Constant.GET, { "id": productId, "isQuickView": isQuickView, "publishState": publishState }, callbackMethod, "html");
    };
    Endpoint.prototype.GetProductOutOfStockDetails = function (productId, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/product/getproductoutofstockdetails", Constant.GET, { "productId": productId }, callbackMethod, "json");
    };
    Endpoint.prototype.GetProductListBySKU = function (sku, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/product/getproductlistbysku", Constant.GET, { "sku": sku }, callbackMethod, "json");
    };
    Endpoint.prototype.AddToWishList = function (sku, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/product/addtowishlist", Constant.GET, { "productSKU": sku }, callbackMethod, "json");
    };
    Endpoint.prototype.GetProductPrice = function (sku, parentProductSKU, quantity, selectedAddOnIds, parentProductId, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/product/getproductprice", Constant.GET, { "productSKU": sku, "parentProductSKU": parentProductSKU, "quantity": quantity, "addOnIds": selectedAddOnIds, "parentProductId": parentProductId }, callbackMethod, "json", false);
    };
    Endpoint.prototype.GetProduct = function (parameters, callbackMethod) {
        var token = $("[name='__RequestVerificationToken']").val();
        _super.prototype.ajaxRequest.call(this, "/product/getconfigurableproduct", Constant.Post, { "__RequestVerificationToken": token, "model": parameters }, callbackMethod, "html");
    };
    Endpoint.prototype.CheckGroupProductInventory = function (mainProductId, sku, quantity, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/product/checkgroupproductinventory", Constant.GET, { "mainProductId": mainProductId, "productSKU": sku, "quantity": quantity }, callbackMethod, "json", false);
    };
    Endpoint.prototype.GlobalLevelProductComapre = function (productId, categoryId, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/product/globallevelcompareproduct", Constant.GET, { "productId": productId, "categoryId": categoryId }, callbackMethod, "json");
    };
    Endpoint.prototype.GetProductComparison = function (callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/product/viewproductcomparison", Constant.GET, {}, callbackMethod, "json");
    };
    Endpoint.prototype.RemoveProduct = function (productId, control, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/product/removeproductformsession", Constant.GET, { "productId": productId, "control": control }, callbackMethod, "json");
    };
    Endpoint.prototype.GetCompareProductList = function (callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/product/getcompareproductlist", Constant.GET, {}, callbackMethod, "json");
    };
    Endpoint.prototype.GetRecentlyViewProduct = function (recentProductList, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/product/getrecentviewproducts", Constant.Post, { "recentProductList": recentProductList }, callbackMethod, "json");
    };
    Endpoint.prototype.UpdateCartQUantity = function (guid, quantity, productid, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/cart/updatecartquantity", Constant.Post, { "guid": guid, "quantity": quantity, "productId": productid }, callbackMethod, "html");
    };
    Endpoint.prototype.RemoveProductFromWishList = function (wishlistId, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/user/wishlist", Constant.Post, { "wishid": wishlistId }, callbackMethod, "json");
    };
    Endpoint.prototype.getView = function (url, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, url, Constant.GET, {}, callbackMethod, "html");
    };
    Endpoint.prototype.SignUpForNewsLetter = function (emailId, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/home/signupfornewsletter", Constant.Post, { "emailId": emailId }, callbackMethod, "json");
    };
    Endpoint.prototype.SendMail = function (callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/product/sendcomparedproductmail", Constant.GET, {}, callbackMethod, "html");
    };
    Endpoint.prototype.GetSenMailNotification = function (url, senderMailId, recieverMailId, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, url, Constant.Post, { "senderMailId": senderMailId, "recieverMailId": recieverMailId }, callbackMethod, "json");
    };
    Endpoint.prototype.RemoveCouponCode = function (couponCode, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/checkout/removecoupon", Constant.GET, { "couponcode": couponCode }, callbackMethod, "json");
    };
    Endpoint.prototype.RemoveGiftCard = function (discountCode, callbackMethod) {
        var token = $("[name='__RequestVerificationToken']").val();
        _super.prototype.ajaxRequest.call(this, "/checkout/applydiscount", Constant.Post, { "__RequestVerificationToken": token, "discountCode": discountCode, "isGiftCard": true }, callbackMethod, "json", false);
    };
    Endpoint.prototype.UpdateQuoteStatus = function (quoteId, status, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/user/updatequotestatus", Constant.GET, { "quoteId": quoteId, "status": status }, callbackMethod, "json");
    };
    Endpoint.prototype.DeleteTemplate = function (omsTemplateId, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/user/deletetemplate", Constant.GET, { "omsTemplateId": omsTemplateId }, callbackMethod, "json");
    };
    Endpoint.prototype.GetPaymentDetails = function (paymentSettingId, isAsync, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/checkout/getpaymentdetails", Constant.GET, { "paymentsettingid": paymentSettingId }, callbackMethod, "json", isAsync);
    };
    Endpoint.prototype.GetBillingAddressDetail = function (portalId, billingAddressId, shippingAddressId, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/checkout/getbillingaddressdetail", Constant.GET, { "portalId": portalId, "billingAddressId": billingAddressId, "shippingAddressId": shippingAddressId }, callbackMethod, "json", true);
    };
    Endpoint.prototype.ShippingOptions = function (isAsync, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/checkout/shippingoptions", Constant.GET, "", callbackMethod, "html", isAsync);
    };
    Endpoint.prototype.GetXml = function (id, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/xmlgenerator/view", Constant.GET, { "id": id }, callbackMethod, "html");
    };
    Endpoint.prototype.ProcessPayPalPayment = function (submitPaymentViewModel, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/checkout/submitorder", Constant.Post, { "submitPaymentViewModel": submitPaymentViewModel }, callbackMethod, "json");
    };
    Endpoint.prototype.DeleteQuoteLineItem = function (omsQuoteLineItemId, omsQuoteId, quoteLineItemCount, orderStatus, roleName, token, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/user/deletequotelineitem", Constant.Post, { "omsQuoteLineItemId": omsQuoteLineItemId, "omsQuoteId": omsQuoteId, "quoteLineItemCount": quoteLineItemCount, "orderStatus": orderStatus, "roleName": roleName, "__RequestVerificationToken": token }, callbackMethod, "json");
    };
    Endpoint.prototype.CreateQuote = function (submitQuoteViewModel, omsQuoteId, callbackMethod) {
        var token = $("[name='__RequestVerificationToken']").val();
        _super.prototype.ajaxRequest.call(this, "/user/createquote", Constant.Post, { "__RequestVerificationToken": token, "submitQuoteViewModel": submitQuoteViewModel, "omsQuoteId": omsQuoteId }, callbackMethod, "json");
    };
    Endpoint.prototype.GetPurchanseOrder = function (paymentType, paymentSettingId, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/checkout/getpaymentprovider", Constant.GET, { "paymentType": paymentType, "paymentSettingId": paymentSettingId }, callbackMethod, "html");
    };
    Endpoint.prototype.GetShippingEstimates = function (zipCode, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/cart/getshippingestimates", Constant.GET, { "zipCode": zipCode }, callbackMethod, "json");
    };
    Endpoint.prototype.GetBreadCrumb = function (categoryId, categoryIds, checkFromSession, callbackMethod) {
        var breadCrumbCategoryIds = (categoryIds != undefined && categoryIds != null && categoryIds != "") ? categoryIds.toLowerCase() : categoryIds;
        _super.prototype.ajaxRequest.call(this, "/product/getbreadcrumb", Constant.GET, { "categoryid": categoryId, "productassociatedcategoryids": breadCrumbCategoryIds, "checkfromsession": checkFromSession }, callbackMethod, "json");
    };
    Endpoint.prototype.GetSaveCreditCardCount = function (customerGUID, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/checkout/getsavecreditcardcount", Constant.GET, { "customerGUID": customerGUID }, callbackMethod, "html");
    };
    Endpoint.prototype.GetAjaxHeaders = function (callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/checkout/getajaxheaders", Constant.GET, {}, callbackMethod, "json", true);
    };
    Endpoint.prototype.GetPaymentAppHeader = function (callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/checkout/getpaymentappheader", Constant.GET, {}, callbackMethod, "json", true);
    };
    Endpoint.prototype.CallPriceApi = function (products, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/product/getproductprice", Constant.Post, { "products": products }, callbackMethod, "json");
    };
    Endpoint.prototype.IsAsyncPrice = function (callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/product/isasyncprice", Constant.Post, {}, callbackMethod, "json");
    };
    Endpoint.prototype.IsTemplateNameExist = function (templateName, omsTemplateId, callbackMethod) {
        var token = $("[name='__RequestVerificationToken']").val();
        _super.prototype.ajaxRequest.call(this, "/user/istemplatenameexist", Constant.Post, { "__RequestVerificationToken": token, "templateName": templateName, "omsTemplateId": omsTemplateId }, callbackMethod, "json", false);
    };
    Endpoint.prototype.GetAutoCompleteItemProperties = function (productId, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/product/getautocompleteitemproperties", Constant.GET, { "productId": productId }, callbackMethod, "json", false);
    };
    Endpoint.prototype.GetSiteMapCategory = function (pageSize, pageLength, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/sitemap/sitemaplist", Constant.Post, { "pageSize": pageSize, "pageLength": pageLength }, callbackMethod, "json");
    };
    Endpoint.prototype.GetBlogAndContentPageList = function (callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/sitemap/GetBlogAndContentPageList", Constant.GET, "", callbackMethod, "json");
    };
    Endpoint.prototype.GetUserCommentList = function (blogNewsId, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/blognews/getusercommentlist", Constant.GET, { "blogNewsId": blogNewsId }, callbackMethod, "html");
    };
    Endpoint.prototype.GetPublishedProductList = function (pageIndex, pageSize, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/sitemap/getpublishproduct", Constant.GET, { "pageIndex": pageIndex, "pageSize": pageSize }, callbackMethod, "json");
    };
    Endpoint.prototype.GetAmazonPayAddress = function (shippingOptionId, shippingAddressId, shippingCode, paymentSettingId, paymentApplicationSettingId, amazonOrderReferenceId, total, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/checkout/getamazonaddress", Constant.GET, { "shippingOptionId": shippingOptionId, "shippingAddressId": shippingAddressId, "shippingCode": shippingCode, "paymentSettingId": paymentSettingId, "paymentApplicationSettingId": paymentApplicationSettingId, "amazonOrderReferenceId": amazonOrderReferenceId, "total": total, callbackMethod: callbackMethod }, callbackMethod, "json");
    };
    Endpoint.prototype.AmazonShippingOptions = function (OrderReferenceId, paymentSettingId, total, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/checkout/amazonshippingoptions", Constant.GET, { "amazonOrderReferenceId": OrderReferenceId, "paymentSettingId": paymentSettingId, "total": total }, callbackMethod, "html", true);
    };
    Endpoint.prototype.GetCartCount = function (callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/home/getcartcount", Constant.GET, "", callbackMethod, "html", true);
    };
    Endpoint.prototype.GetHttpCookie = function (cookieName, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/home/gethttpcookie", Constant.GET, { "cookieName": cookieName }, callbackMethod, "json", false);
    };
    Endpoint.prototype.CreateHttpCookie = function (cookieName, cookieValue, cookieExpireInMinutes, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/home/createhttpcookie", "get", { "cookieName": cookieName, "cookieValue": cookieValue, "cookieExpireInMinutes": cookieExpireInMinutes }, callbackMethod, "json", false);
    };
    Endpoint.prototype.GetCartCountByProductId = function (productId, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/cart/getcartcount", Constant.GET, { "productId": productId }, callbackMethod, "json", false);
    };
    Endpoint.prototype.IsAttributeValueUnique = function (attributeCodeValues, id, isCategory, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/pim/productattribute/isattributevalueunique", Constant.GET, { "attributeCodeValues": attributeCodeValues, "id": id, "isCategory": isCategory }, callbackMethod, "json", false);
    };
    Endpoint.prototype.ValidationView = function (url, attributeTypeId, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, url, Constant.GET, { "AttributeTypeId": attributeTypeId }, callbackMethod, "html");
    };
    Endpoint.prototype.IsGlobalAttributeCodeExist = function (attributeCode, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/globalattribute/isattributecodeexist", Constant.GET, { "attributeCode": attributeCode }, callbackMethod, "json", false);
    };
    Endpoint.prototype.IsGlobalAttributeDefaultValueCodeExist = function (attributeId, attributeDefaultValueCode, defaultvalueId, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/globalattribute/isattributedefaultvaluecodeexist", Constant.GET, { "attributeId": attributeId, "attributeDefaultValueCode": attributeDefaultValueCode, "defaultValueId": defaultvalueId }, callbackMethod, "json", false);
    };
    Endpoint.prototype.IsGlobalAttributeValueUnique = function (attributeCodeValues, id, entityType, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/formbuilder/formattributevalueunique", Constant.GET, { "AttributeCodeValues": attributeCodeValues, "Id": id, "EntityType": entityType }, callbackMethod, "json", false);
    };
    Endpoint.prototype.GetDelegateApproval = function (callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/customdelegateapproval/getdelegateapprover", Constant.GET, "", callbackMethod, "html", true);
    };
    Endpoint.prototype.GetRecommendedAddress = function (_addressModel, callbackMethod) {
        var token = $("[name='__RequestVerificationToken']").val();
        _super.prototype.ajaxRequest.call(this, "/user/getrecommendedaddress", Constant.Post, { "__RequestVerificationToken": token, "addressViewModel": _addressModel }, callbackMethod, "json", false);
    };
    Endpoint.prototype.ImportPost = function (callbackMethod) {
        var token = $("[name='__RequestVerificationToken']").val();
        _super.prototype.ajaxRequest.call(this, "/user/importshippingaddress", Constant.Post, { "__RequestVerificationToken": token }, callbackMethod, "json");
    };
    Endpoint.prototype.GetAddressDetails = function (addressId, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/checkout/getaddressbyid", Constant.GET, { "addressId": addressId }, callbackMethod, "json", false);
    };
    Endpoint.prototype.GetAndSelectAddressDetails = function (addressId, addressType, callbackMethod, isCalculateCart) {
        if (isCalculateCart === void 0) { isCalculateCart = true; }
        _super.prototype.ajaxRequest.call(this, "/checkout/getaddressbyid", Constant.GET, { "addressId": addressId, "addressType": addressType, "isCalculateCart": isCalculateCart }, callbackMethod, "json", false);
    };
    Endpoint.prototype.GetApproverList = function (accountId, userId, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/user/getapproverlist", Constant.GET, { "accountId": accountId, "userId": userId }, callbackMethod, "json");
    };
    Endpoint.prototype.UpdateSearchAddress = function (addressViewModel, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/checkout/updatesearchaddress", Constant.Post, { "addressViewModel": addressViewModel }, callbackMethod, "json");
    };
    Endpoint.prototype.IsUserNameExist = function (userName, portalId, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/user/isusernameexists", Constant.GET, {
            "userName": userName, "portalId": $("#PortalId").val(),
        }, callbackMethod, "json", false);
    };
    Endpoint.prototype.GetPermissionList = function (accountId, accountPermissionAccessId, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/user/getpermissionlist", Constant.GET, { accountId: accountId, accountPermissionId: accountPermissionAccessId }, callbackMethod, "json", false);
    };
    Endpoint.prototype.DeleteAccountCustomers = function (id, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/user/customerdelete", Constant.GET, { "userId": id }, callbackMethod, "json");
    };
    Endpoint.prototype.CustomerEnableDisableAccount = function (accountid, id, isEnable, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/user/customerenabledisableaccount", Constant.GET, { "accountId": accountid, "userId": id, "isLock": isEnable, "isRedirect": false }, callbackMethod, "json");
    };
    Endpoint.prototype.SingleResetPassword = function (id, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/user/singleresetpassword", Constant.GET, { "userId": id }, callbackMethod, "json");
    };
    Endpoint.prototype.CustomerAccountResetPassword = function (accountid, id, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/user/bulkresetpassword", Constant.GET, { "accountid": accountid, "userId": id }, callbackMethod, "json");
    };
    Endpoint.prototype.DeleteImportLogs = function (importProcessLogId, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/import/deletelogs", Constant.GET, { "importProcessLogId": importProcessLogId }, callbackMethod, "json");
    };
    Endpoint.prototype.IsGlobalValueUnique = function (attributeCodeValues, id, entityType, callbackMethod) {
        var token = $("[name='__RequestVerificationToken']").val();
        _super.prototype.ajaxRequest.call(this, "/customuser/isglobalattributevalueunique", Constant.Post, { "__RequestVerificationToken": token, "AttributeCodeValues": attributeCodeValues, "Id": id, "EntityType": entityType }, callbackMethod, "json", false);
    };
    Endpoint.prototype.GetStates = function (countryCode, callbackMethod) {
        var stateCountryCode = (countryCode != undefined && countryCode != null && countryCode != "") ? countryCode.toLowerCase() : countryCode;
        _super.prototype.ajaxRequest.call(this, "/user/getstates", Constant.GET, { "countrycode": stateCountryCode }, callbackMethod, "json");
    };
    Endpoint.prototype.GetCart = function (shippingId, zipCode, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/cart/getcalculatedshipping", Constant.GET, { "shippingId": shippingId, "zipCode": zipCode }, callbackMethod, "html", true);
    };
    Endpoint.prototype.GetshippingBillingAddress = function (portalId, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/checkout/getshippingbillingaddress", "get", { "portalId": portalId }, callbackMethod, "json", true);
    };
    Endpoint.prototype.GetUserApproverList = function (omsQuoteId, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/user/getuserapproverlist", Constant.GET, { "omsquoteid": omsQuoteId }, callbackMethod, "html");
    };
    Endpoint.prototype.GetValidateUserBudget = function (callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/user/validateuserbudget", Constant.GET, {}, callbackMethod, "json", false);
    };
    Endpoint.prototype.SetAddressReceipentNameInCart = function (firstName, lastName, addressType, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/checkout/setaddressreceipentnameincart", Constant.GET, { "firstName": firstName, "lastName": lastName, "addressType": addressType }, callbackMethod, "json", false);
    };
    Endpoint.prototype.GenerateOrderNumber = function (portalId, callbackMethod) {
        _super.prototype.ajaxRequestWithoutCache.call(this, "/checkout/generateordernumber", Constant.GET, { "portalId": portalId }, callbackMethod, "json", false);
    };
    //Region B2B Theme
    Endpoint.prototype.Login = function (returnurl, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/user/b2blogin", "get", { "returnurl": returnurl }, callbackMethod, "html", false);
    };
    Endpoint.prototype.Logoff = function (callback) {
        _super.prototype.ajaxRequest.call(this, "/user/b2blogout", "get", {}, callback, "html", false);
    };
    Endpoint.prototype.GetAccountMenus = function (callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/user/b2bdashboard", "get", {}, callbackMethod, "html", false);
    };
    Endpoint.prototype.ForgotPassword = function (callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/user/b2bforgotpassword", "get", {}, callbackMethod, "html", false);
    };
    Endpoint.prototype.RemoveFromWishList = function (wishListId, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/user/wishlist", "get", { "wishid": wishListId }, callbackMethod, "json");
    };
    Endpoint.prototype.PaymentOptions = function (isAsync, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/checkout/paymentoptions", Constant.GET, "", callbackMethod, "html", isAsync);
    };
    Endpoint.prototype.GetLoginUserAddress = function (userid, quoteId, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/checkout/accountaddress", Constant.GET, { "userid": userid, "quoteId": quoteId }, callbackMethod, "html", false);
    };
    Endpoint.prototype.GetcartReview = function (shippingOptionId, shippingAddressId, shippingCode, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/checkout/getcartdetails", Constant.GET, { "shippingOptionId": shippingOptionId, "shippingAddressId": shippingAddressId, "shippingCode": shippingCode }, callbackMethod, "json", false);
    };
    Endpoint.prototype.ChangeUserProfile = function (profileId, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/user/changeuserprofile", Constant.GET, { profileId: profileId }, callbackMethod, "json", false);
    };
    Endpoint.prototype.GetBarcodeScanner = function (callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/home/getbarcodescanner", Constant.GET, "", callbackMethod, "html");
    };
    Endpoint.prototype.GetProductDetail = function (searchTerm, enableSpecificSearch, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/product/getproductdetail", Constant.GET, { "searchTerm": searchTerm, "enableSpecificSearch": enableSpecificSearch }, callbackMethod, "html");
    };
    Endpoint.prototype.ApplyGiftCard = function (discountCode, callbackMethod) {
        var token = $("[name='__RequestVerificationToken']").val();
        _super.prototype.ajaxRequest.call(this, "/checkout/applydiscount", Constant.Post, { "__RequestVerificationToken": token, "discountCode": discountCode, "isGiftCard": true }, callbackMethod, "json");
    };
    //End Region
    Endpoint.prototype.SaveSearchReportData = function (model, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/searchreport/savesearchreportdata", "post", { "model": model }, callbackMethod, "json");
    };
    Endpoint.prototype.GetSearchCMSPages = function (searchTerm, pageNumber, pageSize, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/search/getsearchcontentpage", "post", { "searchTerm": searchTerm, "pageNumber": pageNumber, "pageSize": pageSize }, callbackMethod, "html");
    };
    Endpoint.prototype.RemoveVoucher = function (code, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/checkout/removevoucher", Constant.GET, { "voucherNumber": code }, callbackMethod, "json");
    };
    Endpoint.prototype.AddToWishListPLP = function (sku, addOnSKUs, callbackMethod, isRedirectToLogin) {
        if (isRedirectToLogin === void 0) { isRedirectToLogin = false; }
        _super.prototype.ajaxRequest.call(this, "/product/addtowishlistplp", Constant.GET, { "productSKU": sku, "addOnProductSKUs": addOnSKUs, "isRedirectToLogin": isRedirectToLogin }, callbackMethod, "json");
    };
    Endpoint.prototype.GetHighlightInfoByCode = function (highlightCode, publishProductId, productSku, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/product/gethighlightinfobycode", Constant.GET, { "highLightCode": highlightCode, "productId": publishProductId, "sku": productSku }, callbackMethod, "json");
    };
    Endpoint.prototype.CheckDelegateExists = function (schwabId, callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/customaccount/checkdelegateexists", "get", { "schwabId": schwabId }, callbackMethod, "json");
    };
    Endpoint.prototype.GetCartDetails = function (callbackMethod) {
        _super.prototype.ajaxRequest.call(this, "/cart/getcartdetails", Constant.GET, {}, callbackMethod, "json");
    };
    return Endpoint;
}(ZnodeBase));
//# sourceMappingURL=ZnodeEndpoint.js.map;
/// <reference path="../../typings/jquery.cookie/jquery.cookie.d.ts" />
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var CommonHelper = /** @class */ (function (_super) {
    __extends(CommonHelper, _super);
    function CommonHelper() {
        return _super.call(this) || this;
    }
    CommonHelper.prototype.BlockHtmlTagForTextBox = function () {
        /* validated all text box in project*/
        $(':input').not('.AllowHtml').on("paste keypress change", function (e) {
            alert("asd");
            if ($(this).val().indexOf("~") != -1) {
                var _inputValue = CommonHelper.prototype.Removetildslashfromstring($(this).val(), "~");
                $(this).val(_inputValue);
            }
            if ($(this).val().indexOf("<") != -1) {
                var _inputValue = CommonHelper.prototype.Removetildslashfromstring($(this).val(), "<");
                $(this).val(_inputValue);
            }
            if ($(this).val().indexOf(">") != -1) {
                var _inputValue = CommonHelper.prototype.Removetildslashfromstring($(this).val(), ">");
                $(this).val(_inputValue);
            }
            /*new validation*/
            var key = [e.keyCode || e.which];
            if (key[0] != undefined) {
                if ((key == null) || (key[0] == 0) || (key[0] == 126) || (key[0] == 60) || (key[0] == 62)) {
                    return false;
                }
            }
        });
        /* validated all text box in project*/
        $(':input').not('.AllowHtml').on("paste", function (e) {
            if ($(this).attr('data-datype') === "Int32" || $(this).attr('data-datype') === "Decimal") {
                return false;
            }
        });
        $(":input").not('.AllowHtml').on("keypress", function (e) {
            if (e.which === 32 && !this.value.length)
                e.preventDefault();
        });
    };
    CommonHelper.prototype.Removetildslashfromstring = function (str, char) {
        var notildslash = "";
        var newstr = str.split(char);
        for (var i = 0; i < newstr.length; i++) {
            notildslash += newstr[i];
        }
        return notildslash;
    };
    CommonHelper.prototype.Validate = function () {
        var Locales = [];
        $(".LocaleLabel").each(function () {
            Locales.push($(this).attr('localename'));
        });
        var flag = true;
        for (var i = 0; i < Locales.length; i++) {
            var value = $("#Locale" + Locales[i]).val();
            if (value.length > 100) {
                $("#error" + Locales[i]).html("Error");
                flag = false;
            }
        }
        return flag;
    };
    CommonHelper.prototype.GetAjaxHeaders = function (callBackFUnction) {
        return Endpoint.prototype.GetAjaxHeaders(callBackFUnction);
    };
    CommonHelper.prototype.GetPaymentAppHeader = function (callBackFUnction) {
        var paymentApiHeaderResponseValue = $("#hdnPaymentApiResponseHeader").val();
        if (paymentApiHeaderResponseValue) {
            var response = {};
            response["Authorization"] = paymentApiHeaderResponseValue;
            return callBackFUnction(response);
        }
        return Endpoint.prototype.GetPaymentAppHeader(callBackFUnction);
    };
    CommonHelper.prototype.GetHttpCookie = function (cookieName, callBackFUnction) {
        return Endpoint.prototype.GetHttpCookie(cookieName, callBackFUnction);
    };
    CommonHelper.prototype.CreateHttpCookie = function (cookieName, cookieValue, cookieExpireInMinutes, callBackFUnction) {
        return Endpoint.prototype.CreateHttpCookie(cookieName, cookieValue, cookieExpireInMinutes, callBackFUnction);
    };
    CommonHelper.prototype.JQControl = function (element, selector) {
        return $(element).find(selector).eq(0);
    };
    CommonHelper.prototype.JQList = function (element, selector) {
        return $(element).find(selector);
    };
    CommonHelper.prototype.SubmitForm = function (formElement, callback, returnBack) {
        if (returnBack === void 0) { returnBack = false; }
        var isAjaxFunction = $(formElement).attr("data-ajax");
        var submitUrl = $(formElement).attr("action");
        submitUrl = (submitUrl != undefined && submitUrl != null && submitUrl != '') ? submitUrl.toLowerCase() : submitUrl;
        if (((typeof isAjaxFunction) != 'undefined') && (isAjaxFunction.toLowerCase() == "true")) {
            var beforeSendAjaxFunction = $(formElement).attr("data-ajax-begin");
            var successAjaxFunction = $(formElement).attr("data-ajax-success");
            var failuerAjaxFunction = $(formElement).attr("data-ajax-failure");
            var completeAjaxFunction = $(formElement).attr("data-ajax-complete");
            var updateAjaxControle = $(formElement).attr("data-ajax-update");
            $.ajax({
                type: Constant.Post,
                url: submitUrl,
                data: $(formElement).serialize(),
                beforeSend: function (xhr, setting) {
                    if ((typeof beforeSendAjaxFunction) != 'undefined') {
                        $.each(beforeSendAjaxFunction.split(";"), function (index, functionName) {
                            var functionToCall = functionName.replace("()", "").replace("return ", "").trim();
                            if (functionToCall.indexOf("(") > 0) {
                                CommonHelper.prototype.ExecuteFunctionByName(functionToCall.substr(0, functionToCall.indexOf("(")), window, functionToCall.match(/\(([^()]*)\)/g).map(function ($0) { return $0.substring(1, $0.length - 1); }));
                            }
                            else {
                                CommonHelper.prototype.ExecuteFunctionByName(functionToCall, window, setting);
                            }
                        });
                    }
                },
                success: function (response) {
                    if ((typeof updateAjaxControle) != 'undefined') {
                        CommonHelper.prototype.LoadHtmlById(updateAjaxControle, response);
                    }
                    if ((typeof successAjaxFunction) != 'undefined') {
                        $.each(successAjaxFunction.split(";"), function (index, functionName) {
                            var functionToCall = functionName.replace("()", "").replace("return ", "").trim();
                            if (functionToCall.indexOf("(") > 0) {
                                CommonHelper.prototype.ExecuteFunctionByName(functionToCall.substr(0, functionToCall.indexOf("(")), window, functionToCall.match(/\(([^()]*)\)/g).map(function ($0) { return $0.substring(1, $0.length - 1); }));
                            }
                            else {
                                CommonHelper.prototype.ExecuteFunctionByName(functionToCall, window, response);
                            }
                        });
                    }
                },
                error: function (xhr, ajaxOptions, thrownError) {
                    if ((typeof failuerAjaxFunction) != 'undefined') {
                        $.each(failuerAjaxFunction.split(";"), function (index, functionName) {
                            var functionToCall = functionName.replace("()", "").replace("return ", "").trim();
                            if (functionToCall.indexOf("(") > 0) {
                                CommonHelper.prototype.ExecuteFunctionByName(functionToCall.substr(0, functionToCall.indexOf("(")), window, functionToCall.match(/\(([^()]*)\)/g).map(function ($0) { return $0.substring(1, $0.length - 1); }));
                            }
                            else {
                                CommonHelper.prototype.ExecuteFunctionByName(functionToCall, window, xhr);
                            }
                        });
                    }
                    ZnodeBase.prototype.errorOutfunction(xhr.status);
                    ZnodeBase.prototype.errorOutfunction(thrownError);
                    ZnodeBase.prototype.errorOutfunction(ErrorMsg.APIEndpoint + $(formElement).attr("action"));
                },
                complete: function (xhr, textStatus) {
                    if ((typeof completeAjaxFunction) != 'undefined') {
                        $.each(completeAjaxFunction.split(";"), function (index, functionName) {
                            var functionToCall = functionName.replace("()", "").replace("return ", "").trim();
                            if (functionToCall.indexOf("(") > 0) {
                                CommonHelper.prototype.ExecuteFunctionByName(functionToCall.substr(0, functionToCall.indexOf("(")), window, functionToCall.match(/\(([^()]*)\)/g).map(function ($0) { return $0.substring(1, $0.length - 1); }));
                            }
                            else {
                                CommonHelper.prototype.ExecuteFunctionByName(functionToCall, window, xhr);
                            }
                        });
                        if (returnBack == true) {
                            callback(textStatus);
                        }
                    }
                    else {
                        if (returnBack == true) {
                            callback();
                        }
                    }
                }
            });
        }
        else {
            var form = $(formElement);
            form.submit();
        }
        return false;
    };
    CommonHelper.prototype.ExecuteFunctionByName = function (functionName, context, args) {
        if (functionName != "") {
            var args = Array.prototype.slice.call(arguments, 2);
            var namespaces = functionName.split(".");
            var func = namespaces.pop();
            for (var i = 0; i < namespaces.length; i++) {
                context = context[namespaces[i]];
            }
            return context[func].apply(context, args);
        }
    };
    CommonHelper.prototype.ExecuteFunctionByNameValue = function (functionName, context, args) {
        if (functionName != "") {
            var args = Array.isArray(args) ? args : Array.prototype.slice.call(arguments, 2);
            var namespaces = functionName.split(".");
            var func = namespaces.pop();
            for (var i = 0; i < namespaces.length; i++) {
                context = context[namespaces[i]];
            }
            return context[func].apply(context, args);
        }
    };
    CommonHelper.prototype.ExecuteFunctionByNameArgs = function (functionName, clickingElement, event) {
        if (functionName != "") {
            var functionToCall = functionName.replace("()", "").replace("return ", "").trim();
            if (functionToCall.indexOf("(") > 0) {
                var args = functionToCall.match(/\(([^()]*)\)/g).map(function ($0) { return $0.substring(1, $0.length - 1); });
                var argList;
                if (args.length == 1) {
                    argList = args[0].split(",");
                }
                else {
                    argList = args;
                }
                argList.forEach(function (element, idx) {
                    if (element == "this") {
                        argList[idx] = clickingElement;
                    }
                    else if (element == "event") {
                        argList[idx] = event;
                    }
                    else {
                        argList[idx] = element.replace(/\"/g, '');
                    }
                });
                CommonHelper.prototype.ExecuteFunctionByNameValue(functionToCall.substr(0, functionToCall.indexOf("(")), window, argList);
            }
        }
    };
    CommonHelper.prototype.LoadHtmlById = function (controle, html) {
        $(controle).empty();
        //$(updateAjaxControle).html(response);
        var htmlToAppend = $("<div id='loadHtml'>" + html + "<div>");
        var scripts = [];
        htmlToAppend.find("script").each(function (indx, script) {
            var scriptSrc = $(script).attr("src");
            if (typeof scriptSrc != 'undefined' && scriptSrc != "") {
                var scriptFileTupels = scriptSrc.split("/");
                scripts.push((scriptFileTupels[scriptFileTupels.length - 1]).replace(".js", "") + ".prototype.PageScripts");
            }
        });
        htmlToAppend.find("script[src]").remove(); //loading script using JavaScript is not supported by Content Security Policy
        var divToUpdate = document.getElementById(controle.replace("#", ""));
        if (divToUpdate != null) {
            try {
                divToUpdate.insertAdjacentHTML('beforeend', htmlToAppend.html()); //#loadHtml is not included in htmlToAppend.html()
            }
            catch (e) {
                console.log("Can not successfully load " + controle);
            }
            $.each(scripts, function (idx, scriptSrc) {
                try {
                    CommonHelper.prototype.ExecuteFunctionByName(scriptSrc, window, html);
                }
                catch (e) {
                    console.log(scriptSrc + " function can not be executed");
                }
            });
        }
    };
    CommonHelper.prototype.LoadHtmlByControl = function (controle, html) {
        $(controle).empty();
        //$(updateAjaxControle).html(response);
        var htmlToAppend = $("<div id='loadHtml'>" + html + "<div>");
        var scripts = [];
        htmlToAppend.find("script").each(function (indx, script) {
            var scriptSrc = $(script).attr("src");
            if (typeof scriptSrc != 'undefined' && scriptSrc != "") {
                var scriptFileTupels = scriptSrc.split("/");
                scripts.push((scriptFileTupels[scriptFileTupels.length - 1]).replace(".js", "") + ".prototype.PageScripts");
            }
        });
        htmlToAppend.find("script[src]").remove(); //loading script using JavaScript is not supported by Content Security Policy
        var divToUpdate = controle;
        if (divToUpdate != null) {
            try {
                $(divToUpdate).html(htmlToAppend.html()); //#loadHtml is not included in htmlToAppend.html()
            }
            catch (e) {
                console.log("Can not successfully load " + $(controle).attr("id") + " class:" + $(controle).attr("class"));
            }
            $.each(scripts, function (idx, scriptSrc) {
                try {
                    CommonHelper.prototype.ExecuteFunctionByName(scriptSrc, window, html);
                }
                catch (e) {
                    console.log(scriptSrc + " function can not be executed");
                }
            });
        }
    };
    CommonHelper.prototype.ResetAjaxActionLink = function (controle) {
        $(controle).find("a[data-ajax=true]").each(function (index, formElement) {
            $(formElement).removeAttr("data-ajax");
            $(formElement).on("click", function (event) {
                event.preventDefault();
                CommonHelper.prototype.ExecuteAjaxClickEvent(formElement);
            });
        });
    };
    CommonHelper.prototype.ExecuteAjaxClickEvent = function (formElement) {
        var beforeSendAjaxFunction = $(formElement).attr("data-ajax-begin");
        var successAjaxFunction = $(formElement).attr("data-ajax-success");
        var failuerAjaxFunction = $(formElement).attr("data-ajax-failure");
        var completeAjaxFunction = $(formElement).attr("data-ajax-complete");
        var updateAjaxControle = $(formElement).attr("data-ajax-update");
        var ajaxType = $(formElement).attr("data-ajax-method");
        if ((typeof ajaxType) != 'undefined') {
            ajaxType = Constant.GET;
        }
        $.ajax({
            type: ajaxType,
            url: $(formElement).attr("href"),
            data: $(formElement).serialize(),
            beforeSend: function (xhr, setting) {
                if ((typeof beforeSendAjaxFunction) != 'undefined') {
                    $.each(beforeSendAjaxFunction.split(";"), function (index, functionName) {
                        var functionToCall = functionName.replace("()", "").replace("return ", "").trim();
                        if (functionToCall.indexOf("(") > 0) {
                            CommonHelper.prototype.ExecuteFunctionByName(functionToCall.substr(0, functionToCall.indexOf("(")), window, functionToCall.match(/\(([^()]*)\)/g).map(function ($0) { return $0.substring(1, $0.length - 1); }));
                        }
                        else {
                            CommonHelper.prototype.ExecuteFunctionByName(functionToCall, window, setting);
                        }
                    });
                }
            },
            success: function (response) {
                if ((typeof updateAjaxControle) != 'undefined') {
                    CommonHelper.prototype.LoadHtmlById(updateAjaxControle, response);
                }
                if ((typeof successAjaxFunction) != 'undefined') {
                    $.each(successAjaxFunction.split(";"), function (index, functionName) {
                        var functionToCall = functionName.replace("()", "").replace("return ", "").trim();
                        if (functionToCall.indexOf("(") > 0) {
                            CommonHelper.prototype.ExecuteFunctionByName(functionToCall.substr(0, functionToCall.indexOf("(")), window, functionToCall.match(/\(([^()]*)\)/g).map(function ($0) { return $0.substring(1, $0.length - 1); }));
                        }
                        else {
                            CommonHelper.prototype.ExecuteFunctionByName(functionToCall, window, response);
                        }
                    });
                }
            },
            error: function (xhr, ajaxOptions, thrownError) {
                if ((typeof failuerAjaxFunction) != 'undefined') {
                    $.each(failuerAjaxFunction.split(";"), function (index, functionName) {
                        var functionToCall = functionName.replace("()", "").replace("return ", "").trim();
                        if (functionToCall.indexOf("(") > 0) {
                            CommonHelper.prototype.ExecuteFunctionByName(functionToCall.substr(0, functionToCall.indexOf("(")), window, functionToCall.match(/\(([^()]*)\)/g).map(function ($0) { return $0.substring(1, $0.length - 1); }));
                        }
                        else {
                            CommonHelper.prototype.ExecuteFunctionByName(functionToCall, window, xhr);
                        }
                    });
                }
                ZnodeBase.prototype.errorOutfunction(xhr.status);
                ZnodeBase.prototype.errorOutfunction(thrownError);
                ZnodeBase.prototype.errorOutfunction(ErrorMsg.APIEndpoint + $(formElement).attr("action"));
            },
            complete: function (xhr, textStatus) {
                if ((typeof completeAjaxFunction) != 'undefined') {
                    $.each(completeAjaxFunction.split(";"), function (index, functionName) {
                        var functionToCall = functionName.replace("()", "").replace("return ", "").trim();
                        if (functionToCall.indexOf("(") > 0) {
                            CommonHelper.prototype.ExecuteFunctionByName(functionToCall.substr(0, functionToCall.indexOf("(")), window, functionToCall.match(/\(([^()]*)\)/g).map(function ($0) { return $0.substring(1, $0.length - 1); }));
                        }
                        else {
                            CommonHelper.prototype.ExecuteFunctionByName(functionToCall, window, xhr);
                        }
                    });
                }
            }
        });
    };
    CommonHelper.prototype.ResetAjaxFormSubmit = function (controle) {
        $(controle).find("form[data-ajax=true] button[type=submit],form[data-ajax=true] input[type=submit]").each(function (index, formElement) {
            $(formElement).off().on("click", function (event) {
                event.preventDefault();
                var formControl = $(formElement).parents("form[data-ajax=true]").eq(0);
                var isFormValid = $(formControl).validate().form();
                if (isFormValid == true) {
                    CommonHelper.prototype.SubmitForm(formControl, function (e) { });
                }
            });
        });
    };
    CommonHelper.prototype.BindClickEventByAttr = function (controle, functionAttr) {
        var callingFunction = $(controle).attr(functionAttr);
        if ((typeof callingFunction) != 'undefined') {
            $(controle).off("click").on("click", function (event) {
                var clickingElement = this;
                $.each(callingFunction.split(";"), function (index, functionName) {
                    var functionToCall = functionName.replace("()", "").replace("return ", "").trim();
                    if (functionToCall.indexOf("(") > 0) {
                        CommonHelper.prototype.ExecuteFunctionByNameArgs(functionToCall, clickingElement, event);
                    }
                    else {
                        CommonHelper.prototype.ExecuteFunctionByName(functionToCall, window, controle);
                    }
                });
            });
        }
    };
    CommonHelper.prototype.BindBlurEventByAttr = function (controle, functionAttr) {
        var callingFunction = $(controle).attr(functionAttr);
        if ((typeof callingFunction) != 'undefined') {
            $(controle).off("blur").on("blur", function (event) {
                var clickingElement = this;
                $.each(callingFunction.split(";"), function (index, functionName) {
                    var functionToCall = functionName.replace("()", "").replace("return ", "").trim();
                    if (functionToCall.indexOf("(") > 0) {
                        CommonHelper.prototype.ExecuteFunctionByNameArgs(functionToCall, clickingElement, event);
                    }
                    else {
                        CommonHelper.prototype.ExecuteFunctionByName(functionToCall, window, controle);
                    }
                });
            });
        }
    };
    CommonHelper.prototype.BindChangeEventByAttr = function (controle, attr) {
        var callingFunction = $(controle).attr(attr);
        if ((typeof callingFunction) != 'undefined') {
            $(controle).off("change").on("change", function (event) {
                $.each(callingFunction.split(";"), function (index, functionName) {
                    var functionToCall = functionName.replace("()", "").replace("return ", "").trim();
                    if (functionToCall.indexOf("(") > 0) {
                        var args = functionToCall.match(/\(([^()]*)\)/g).map(function ($0) { return $0.substring(1, $0.length - 1); });
                        var argList;
                        if (args.length == 1) {
                            argList = args[0].split(",");
                        }
                        else {
                            argList = args;
                        }
                        CommonHelper.prototype.ExecuteFunctionByName(functionToCall.substr(0, functionToCall.indexOf("(")), window, argList);
                    }
                    else {
                        CommonHelper.prototype.ExecuteFunctionByName(functionToCall, window, controle);
                    }
                });
            });
        }
    };
    CommonHelper.prototype.BindKeypressEventByAttr = function (controle, functionAttr) {
        var callingFunction = $(controle).attr(functionAttr);
        if ((typeof callingFunction) != 'undefined') {
            $(controle).keypress(function (event) {
                var clickingElement = this;
                $.each(callingFunction.split(";"), function (index, functionName) {
                    var functionToCall = functionName.replace("()", "").replace("return ", "").trim();
                    if (functionToCall.indexOf("(") > 0) {
                        CommonHelper.prototype.ExecuteFunctionByNameArgs(functionToCall, clickingElement, event);
                    }
                    else {
                        CommonHelper.prototype.ExecuteFunctionByName(functionToCall, window, controle);
                    }
                });
            });
        }
    };
    CommonHelper.prototype.GetJsonObject = function (data) {
        try {
            return JSON.parse(data);
        }
        catch (e) {
            return data;
        }
    };
    CommonHelper.prototype.DisableEnterEvent = function (control) {
        $(control).off('keypress').on('keypress', function (e) {
            if (e.which == 13 || (e.which >= 48 && e.which <= 57) || (e.which >= 65 && e.which <= 90)) {
                e.preventDefault();
            }
        });
    };
    CommonHelper.prototype.EnableEnterEvent = function (control) {
        $(control).off('keypress');
    };
    CommonHelper.prototype.DisableSpaceEvent = function (control) {
        $(control).off('keypress').on('keypress', function (e) {
            if (e.which == 32) {
                e.preventDefault();
            }
        });
    };
    return CommonHelper;
}(ZnodeBase));
$(document).on("paste keypress change", ":input", function (e) {
    if ($(this).val().indexOf("~") != -1) {
        var _inputValue = CommonHelper.prototype.Removetildslashfromstring($(this).val(), "~");
        $(this).val(_inputValue);
    }
    if ($(this).val().indexOf("<") != -1) {
        var _inputValue = CommonHelper.prototype.Removetildslashfromstring($(this).val(), "<");
        $(this).val(_inputValue);
    }
    if ($(this).val().indexOf(">") != -1) {
        var _inputValue = CommonHelper.prototype.Removetildslashfromstring($(this).val(), ">");
        $(this).val(_inputValue);
    }
    /*new validation*/
    var key = [e.keyCode || e.which];
    if (key[0] != undefined) {
        if ((key == null) || (key[0] == 0) || (key[0] == 126) || (key[0] == 60) || (key[0] == 62)) {
            return false;
        }
    }
});
$(document).ajaxError(function (e, jqxhr, settings, exception) {
    e.stopPropagation();
    if (jqxhr != null) {
        if (jqxhr.status === 403) {
            if (jqxhr.statusText != undefined) {
                window.location.href = "/user/login?returnurl=" + jqxhr.statusText;
            }
            else
                window.location.reload();
        }
    }
});
$('.noSubmitOnEnterKeyPress').on('keyup keypress', function (e) {
    var keyCode = e.keyCode || e.which;
    if (keyCode === 13) {
        e.preventDefault();
        return false;
    }
});
$(document).off("change", "#ddlCulture");
$(document).on("change", "#ddlCulture", function () {
    CommonHelper.prototype.SubmitForm($(this).closest("form"), function (response) { });
});
$.ajaxSetup({
    error: function (x, e) {
        if (x.status === 403) {
            if (x.statusText != undefined) {
                window.location.href = "/user/login?returnurl=" + x.statusText;
            }
            else
                window.location.reload();
        }
    }
});
function SanitizeForXss(str) {
    str = str.replace(/&/g, '&amp;')
        .replace(/\"/g, '&quot;')
        .replace(/\'/g, '&#39;')
        .replace(/script/g, "");
    return str;
}
//# sourceMappingURL=ZnodeHelper.js.map;
$.validator.addMethod("code", function (value, element, params) {
    var keywords = params.split(',')
    if (jQuery.inArray(value, keywords) === -1) return true;
    return false;
});
$.validator.unobtrusive.adapters.add("code", [], function (options) {
    options.rules["code"] = "znode,znode9x,admin,znodellc";
    options.messages["code"] = options.message;
});
$(function () {
    jQuery.validator.methods["date"] = function (value, element) { return true; }
});
! function (t) {
    var a = ":input[IsRequired]", code = ":input[input-type=code]", none = ':input[validationrule=""]', alfanumeric = ':input[validationrule="Alphanumeric"]', roundoff = ':input[validationrule="RoundOff"]', url = ":input[validationrule='Url']", email = ":input[validationrule='Email']", i = ":input[MaxCharacters]", r = ":input[AllowDecimals]", s = ":input[AllowNegative]", n = ":input[MaxNumber]", l = ":input[MinNumber]", h = ":input[Extensions]", o = ":input[WYSIWYGEnabledProperty]", m = "data-val-required", u = "data-val-regex", c = "data-val-length", d = "data-val-range", f = "data-msg-extension", b = "data-val-regex-pattern", v = "data-val-length-max", x = "data-val-range-min", p = "data-val-range-max", g = "data-rule-extension", codeatr = "data-val-code";
    var IsMonogramming = $("#isMonogramming").val();
    t(a).each(function () {
        if (this.id === "Line1") {
            var message;
            if (IsMonogramming != undefined && IsMonogramming != null && IsMonogramming != "" && IsMonogramming.toLowerCase() == "true") {
                message = ZnodeBase.prototype.getResourceByKeyName("CustomizationRestrictMessageForMonogramming");
            } else {
                message = ZnodeBase.prototype.getResourceByKeyName("CustomizationRestrictMessage");
            }
            t(this).attr(m, message);
            t('label[for="' + this.name + '"]').addClass('required');
        }
        else {
            t(this).attr(m, t('label[for="' + this.name + '"]').html() + " field is required.")
            t('label[for="' + this.name + '"]').addClass('required')
        }
    }), t(alfanumeric).each(function () {
        t(this).attr(u, " Only alphanumeric are allowed in " + t('label[for="' + this.name + '"]').html() + "."), t(this).attr(b, t(this).attr("RegularExpression"))
    }), t(url).each(function () {
        t(this).attr(u, t('label[for="' + this.name + '"]').html() + " field having incorrect URL."), t(this).attr(b, t(this).attr("RegularExpression"))
    }), t(email).each(function () {
        t(this).attr(u, t('label[for="' + this.name + '"]').html() + " field having incorrect Email."), t(this).attr(b, t(this).attr("RegularExpression"))
    }), t(i).each(function () {
        t(this).attr(c, t('label[for="' + this.name + '"]').html() + " exceed max limit of " + t(this).attr("MaxCharacters") + " characters."), t(this).attr(v, t(this).attr("MaxCharacters"))
    }), t(r).each(function () {
        "false" === t(this).attr("AllowDecimals") && "false" === t(this).attr("AllowNegative") && (t(this).attr(u, " Only natural numbers are allow in the " + t('label[for="' + this.name + '"]').html() + " field."), t(this).attr(b, "^(?=.*?[1-9])[0-9()@#&%!.$ +-]+$"))
    }), t(s).each(function () {
        "false" === t(this).attr("AllowNegative") && "true" === t(this).attr("AllowDecimals") && (t(this).attr(u, "Only Positive decimal numbers are allowed in the " + t('label[for="' + this.name + '"]').html() + " field(Ex. 1.123456)."), t(this).attr(b, "^[+]?[0-9]{1,12}(?:\\.[0-9]{1,6})?$"))
    }), t(s).each(function () {
        "true" === t(this).attr("AllowNegative") && "true" === t(this).attr("AllowDecimals") && (t(this).attr(u, "Only numbers are allowed in the " + t('label[for="' + this.name + '"]').html() + " field that should not be greater than 12 digits. "), t(this).attr(b, "^[+-]?[0-9]{1,12}(?:\\.[0-9]{1,6})?$"))
    }), t(r).each(function () {
        "false" === t(this).attr("AllowDecimals") && "true" === t(this).attr("AllowNegative") && (t(this).attr(u, "Only Non-Decimal numbers are allowed in the " + t('label[for="' + this.name + '"]').html() + " field."), t(this).attr(b, "^-?[0-9]*$"))
    }), t(n).each(function () {
        t(this).attr(d, t('label[for="' + this.name + '"]').html() + " must be within a range of " + t(this).attr("MinNumber") + " - " + t(this).attr("MaxNumber")), t(this).attr(p, t(this).attr("MaxNumber")), t(this).attr(x, t(this).attr("MinNumber"))
    }), t(h).each(function () {
        t(this).attr(f, t('label[for="' + this.name + '"]').html() + " The FileExtensions field only accepts files with the following extensions: " + t(this).attr("Extensions")), t(this).attr(g, t(this).attr("Extensions"))
    }), t(o).each(function () {
        if (t(this).attr("WYSIWYGEnabledProperty") === "true")
            t("spam[data-valmsg-for='" + t(this).attr("name") + "']").attr("data-valmsg-for", "mceEditor" + t("spam[data-valmsg-for='" + t(this).attr("name") + "']").attr("data-valmsg-for"))
        "true" === t(this).attr("WYSIWYGEnabledProperty") && (t(this).addClass("mceEditor"), t(this).attr("name", "mceEditor" + t(this).attr("name")))
    }), t(none).each(function () {
        if (t(this).attr("RegularExpression") !== "")
            t(this).attr(u, t('label[for="' + this.name + '"]').html() + " is not according to pattern " + t(this).attr("RegularExpression")), t(this).attr(b, t(this).attr("RegularExpression"))
    }), t(roundoff).each(function () {
        t(this).attr(u, t(this).attr("Message")), t(this).attr(b, t(this).attr("RegularExpression"))
    }),
        t(code).each(function () { t(this).attr(codeatr, "System define keyword..") })
    t.validator.setDefaults({
        ignore: ""
    }),
        t.validator.unobtrusive.parse("form")
}($);;
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var _gridContainerName;
var deleteActionlink;
var isSelectCalender = false;
var selectedImages = [];
var DynamicGrid = /** @class */ (function (_super) {
    __extends(DynamicGrid, _super);
    function DynamicGrid(doc) {
        return _super.call(this) || this;
    }
    DynamicGrid.prototype.SetSortOrder = function () {
        DynamicGrid.prototype.getActionLink();
        $("#grid .grid-header th a").each(function () {
            var ahref = $(this).attr('href');
            if (ahref.indexOf('_swhg') >= 0) {
                var cutStr = ahref.substr(ahref.indexOf('_swhg'), ahref.length);
                ahref = ahref.replace(cutStr.split('&')[0], '');
                ahref = ahref.replace('_&', '');
                $(this).attr('href', ahref);
                //$(this).attr('data-swhglnk', false);
                $(this).attr('data-swhglnk', 'false');
            }
        });
        GridPager.prototype.UpdateHandler();
        $("#btnClearSearch").unbind("click");
        $("#btnClearSearch").on("click", function () {
            $(this).closest("form").find("input[type=text]").val('');
            $(this).closest("form").find("select").val('');
            CommonHelper.prototype.SubmitForm($(this).closest("form"), function (result) { });
        });
        var currentThemeName = $("#currentThemePath").val();
        var tooltipPath = "/Views/Themes/" + currentThemeName + "/Content/bootstrap/js/tooltip.min.js";
        var bootstrapjs = document.createElement('script');
        bootstrapjs.setAttribute('src', window.location.protocol + "//" + window.location.host + tooltipPath);
        document.body.appendChild(bootstrapjs);
        if ($('.datepicker').length) {
            var s = document.createElement('script');
            s.setAttribute('src', window.location.protocol + "//" + window.location.host + "/scripts/lib/datepicker.js");
            document.body.appendChild(s);
        }
        DynamicGrid.prototype.CreateNestedGridNode();
        if (!navigator.userAgent.match(/Trident\/7\./)) {
            $('.table-responsive').addClass('scroll-default');
        }
    };
    DynamicGrid.prototype.getActionLink = function () {
        var index = 0;
        $("#grid th").each(function () {
            var hdrText = $.trim($(this).text());
            hdrText = hdrText.replace(/\s/g, "");
            if (hdrText === "Checkbox") {
                DynamicGrid.prototype.setCheckboxHeader(this);
                DynamicGrid.prototype.checkAllChange();
            }
            else if (hdrText.toLocaleLowerCase() === "select") {
                DynamicGrid.prototype.rowCheckChange();
            }
            index++;
        });
        //Set header class
        $('#grid tbody tr:eq(0) td').each(function () {
            var className = $(this).attr('class');
            index = $(this).index();
            if (className !== "") {
                $(this).closest("#grid").find('th:eq(' + index + ')').attr("class", className);
            }
        });
    };
    DynamicGrid.prototype.DynamicPartialLoad = function (url) {
        Endpoint.prototype.getView(url, function (res) {
            if (res !== null) {
                var element = document.createElement("div");
                element.innerHTML = res;
                $('#Resultpartial').html(element.innerHTML);
            }
        });
    };
    DynamicGrid.prototype.setCheckboxHeader = function (header) {
        $(header).closest("th").html("<input type='Checkbox' name='check-all' class='header-check-all' id='check-all'/><span class='lbl padding-8'></span>");
        this.rowCheckChange();
    };
    DynamicGrid.prototype.checkAllChange = function () {
        $(document).off("change", ".header-check-all");
        $(document).on("change", ".header-check-all", function () {
            var index = $(this).closest('th').index();
            if (this.checked) {
                $(this).closest('#grid').find('tr').find('td:eq(' + index + ') input[type=checkbox]:enabled').prop('checked', true);
                $(this).closest('#grid').find('tr').find('td:eq(' + index + ') input[type=checkbox]:enabled').each(function () {
                    CheckBoxCollection.push($(this).attr("id"));
                });
            }
            else {
                $(this).closest('#grid').find('tr').find('td:eq(' + index + ') input[type=checkbox]').prop('checked', false);
                $(this).closest('#grid').find('tr').find('td:eq(' + index + ') input[type=checkbox]:enabled').each(function () {
                    var removeItem = $(this).attr("id");
                    CheckBoxCollection = jQuery.grep(CheckBoxCollection, function (value) {
                        return value != removeItem;
                    });
                });
            }
        });
    };
    DynamicGrid.prototype.rowCheckChange = function () {
        $(".grid-row-checkbox").unbind("change");
        $(".grid-row-checkbox").change(function () {
            if (this.checked) {
                var checkBoxCount = $(this).closest('#grid').find(".grid-row-checkbox").length;
                var checkBoxCheckedCount = $(this).closest('#grid').find(".grid-row-checkbox:checked").length;
                if (checkBoxCount === checkBoxCheckedCount)
                    $(this).closest('#grid').find("#check-all").prop('checked', true);
                else
                    $(this).closest('#grid').find("#check-all").prop('checked', false);
                CheckBoxCollection.push($(this).attr("id"));
                var result = [];
                $.each(CheckBoxCollection, function (i, e) {
                    if ($.inArray(e, result) == -1)
                        result.push(e);
                });
                CheckBoxCollection = result;
            }
            else {
                $(this).closest('#grid').find("#check-all").prop('checked', false);
                var removeItem = $(this).attr("id");
                CheckBoxCollection = jQuery.grep(CheckBoxCollection, function (value) {
                    return value != removeItem;
                });
            }
        });
    };
    DynamicGrid.prototype.SaveSelectedCheckboxItems = function (isSelected, selectedValue) {
        var selectedIds = new Array();
        if (localStorage.getItem("selectedchkboxItems") != "") {
            selectedIds = JSON.parse(localStorage.getItem("selectedchkboxItems"));
        }
        if (isSelected) {
            selectedIds.push(selectedValue);
        }
        else {
            //selectedIds.pop(selectedValue);
            selectedIds.splice(selectedValue);
        }
        this.SetDistinctItemsInArray(selectedIds);
    };
    DynamicGrid.prototype.CheckUncheckAllSelectedCheckboxItems = function (isSelected) {
        var selectedIds = new Array();
        if (localStorage.getItem("selectedchkboxItems") != "") {
            selectedIds = JSON.parse(localStorage.getItem("selectedchkboxItems"));
        }
        $(".grid-row-checkbox").each(function () {
            if (isSelected) {
                selectedIds.push($(this).attr('id'));
            }
            else {
                //selectedIds.pop($(this).attr('id'));
                selectedIds.pop();
            }
        });
        this.SetDistinctItemsInArray(selectedIds);
    };
    DynamicGrid.prototype.UncheckAllSelectedCheckboxItems = function () {
        localStorage.setItem("selectedchkboxItems", "");
    };
    DynamicGrid.prototype.SetDistinctItemsInArray = function (arrayObj) {
        var selectedIds = [];
        arrayObj.forEach(function (value) {
            if (selectedIds.indexOf(value) == -1) {
                selectedIds.push(value);
            }
        });
        if (selectedIds.length > 0) {
            localStorage.setItem("selectedchkboxItems", JSON.stringify(selectedIds));
        }
    };
    DynamicGrid.prototype.selectedRow = function (fun_success) {
        var ids = new Array();
        $(".grid-row-checkbox:checked").each(function () {
            ids.push({
                values: $.trim($(this).attr('id').split('_')[1])
            });
        });
        fun_success(ids);
    };
    DynamicGrid.prototype.setEnabledImage = function (index) {
        $("#grid tr").find("td:eq(" + index + ")").each(function () {
            var orgText = $(this).text();
            orgText = $.trim(orgText);
            $(this).text('');
            if (orgText === "True") {
                CommonHelper.prototype.LoadHtmlByControl($(this), "<i class='z-ok'></i>");
            }
            else {
                CommonHelper.prototype.LoadHtmlByControl($(this), "<i class='z-close'></i>");
            }
        });
    };
    DynamicGrid.prototype.setDeleteConfirm = function (index) {
        $("#grid tr").find("td:eq(" + index + ")").each(function () {
            var orgText = $(this).text();
            orgText = $.trim(orgText);
            $(this).text('');
            if (orgText.indexOf("isConfirm") >= 0) {
                if ((orgText.split('$')[1]).split('=')[1] === "true") {
                    $(this).html("<a class='zf-" + orgText.split('$')[0].toLowerCase() + " actiov-icon' href='#' title='" + orgText.split('$')[0] + "' onclick=CommonHelper.BindDeleteConfirmDialog('Confirm&nbspDelete?','Are&nbspyou&nbspsure,&nbspyou&nbspwant&nbspto&nbspdelete&nbspthis&nbsprecord?','" + orgText.split('$')[2] + "') ></a>");
                }
                else {
                    $(this).html("<a class='zf-" + orgText.split('$')[0].toLowerCase() + " actiov-icon' title='" + orgText.split('$')[0] + "' href='" + orgText.split('$')[2] + "'></a>");
                }
            }
            else {
                $(this).html("<a class='zf-" + orgText.split('$')[0].toLowerCase() + " actiov-icon' href='#' title='" + orgText.split('$')[0] + "' onclick=CommonHelper.BindDeleteConfirmDialog('Confirm&nbspDelete?','Are&nbspyou&nbspsure,&nbspyou&nbspwant&nbspto&nbspdelete&nbspthis&nbsprecord?','" + orgText.split('$')[1] + "') ></a>");
            }
        });
    };
    DynamicGrid.prototype.selectedRowByIndex = function (index, fun_success) {
        var ids = new Array();
        $("#grid tbody tr").find("td:eq(" + index + ") input[type=checkbox]:checked").each(function () {
            ids.push({
                values: $.trim($(this).attr('id').split('_')[1])
            });
        });
        fun_success(ids);
    };
    DynamicGrid.prototype.clickonGridClear = function (event, control) {
        event.preventDefault();
        var domain = $(control).attr('href');
        var location = window.location.href;
        location = location.replace((domain.split('?')[1]).split('=')[1], "");
        if (location.indexOf("FranchiseAdmin") >= 0 || location.indexOf("MallAdmin") >= 0) {
            window.location.href = (domain.split('?')[0]) + "?returnurl=../../" + location;
        }
        else {
            window.location.href = (domain.split('?')[0]) + "?returnurl=../" + location;
        }
    };
    DynamicGrid.prototype.DataValidattion = function (e, control) {
        var datatype = $(control).parent().parent().prev().find('select option:selected').attr('data-datype');
        switch (datatype) {
            case "Int32":
                // Allow: backspace, delete, tab, escape, enter and .
                if ($.inArray(e.keyCode, [46, 8, 9, 27, 13, 110, 190]) !== -1 ||
                    // Allow: Ctrl+A
                    (e.keyCode == 65 && e.ctrlKey === true) ||
                    // Allow: home, end, left, right, down, up
                    (e.keyCode >= 35 && e.keyCode <= 40)) {
                    // let it happen, don't do anything
                    return;
                }
                // Ensure that it is a number and stop the keypress
                if ((e.shiftKey || (e.keyCode < 48 || e.keyCode > 57)) && (e.keyCode < 96 || e.keyCode > 105)) {
                    e.preventDefault();
                }
                break;
            case "String":
                // Allow: backspace, delete, tab, escape, enter and .
                if ($.inArray(e.keyCode, [46, 8, 9, 27, 13, 110, 190]) !== -1 ||
                    // Allow: Ctrl+A
                    (e.keyCode == 65 && e.ctrlKey === true) ||
                    // Allow: home, end, left, right, down, up
                    (e.keyCode >= 35 && e.keyCode <= 40)) {
                    // let it happen, don't do anything
                    return;
                }
                var str = String.fromCharCode(e.keyCode);
                if (!/^[a-zA-Z0-9\s]+$/.test(str)) {
                    e.preventDefault();
                }
                else {
                    return;
                }
                break;
        }
    };
    DynamicGrid.prototype.DataValidattionOnFilters = function (e, control) {
        var datatype = $(control).attr('data-datype');
        switch (datatype) {
            case "Int32":
                // Allow: backspace, delete, tab, escape, enter and .
                if ($.inArray(e.keyCode, [46, 8, 9, 27, 13, 110, 190]) !== -1 ||
                    // Allow: Ctrl+A
                    (e.keyCode == 65 && e.ctrlKey === true) ||
                    // Allow: home, end, left, right, down, up
                    (e.keyCode >= 35 && e.keyCode <= 40)) {
                    // let it happen, don't do anything
                    return;
                }
                // Ensure that it is a number and stop the keypress
                if ((e.shiftKey || (e.keyCode < 48 || e.keyCode > 57)) && (e.keyCode < 96 || e.keyCode > 105)) {
                    e.preventDefault();
                }
                break;
            case "Decimal":
                // Allow: backspace, delete, tab, escape, enter and .
                if ($.inArray(e.keyCode, [46, 8, 9, 27, 13, 110, 190]) !== -1 ||
                    // Allow: Ctrl+A
                    (e.keyCode == 65 && e.ctrlKey === true) ||
                    // Allow: home, end, left, right, down, up
                    (e.keyCode >= 35 && e.keyCode <= 40)) {
                    // let it happen, don't do anything
                    return;
                }
                // Ensure that it is a number and stop the keypress
                if ((e.shiftKey || (e.keyCode < 48 || e.keyCode > 57)) && (e.keyCode < 96 || e.keyCode > 105)) {
                    e.preventDefault();
                }
                break;
        }
    };
    DynamicGrid.prototype.CreateNestedGridNode = function () {
        if ($("#subT").length > 0) {
            //var size = $("#grid > thead > tr >th").size(); // get total column
            var size = $("#grid > thead > tr >th").length; // get total column
            $("#grid > thead > tr >th").last().remove(); // remove last column
            $("#grid > thead > tr").prepend("<th style='padding:0 10px;'></th>"); // add one column at first for collapsible column
            $("#grid > tbody > tr").each(function (i, el) {
                $(this).prepend($("<td></td>")
                    .addClass("expand-grid")
                    .addClass("hoverEff")
                    .attr('title', "click for show/hide"));
                //Now get sub table from last column and add this to the next new added row
                var table = $("table", this).parent().html();
                //add new row with this subtable
                $(this).after("<tr><td style='padding-left:20px;' colspan='" + (size) + "'>" + table + "</td></tr>");
                $("table", this).parent().remove();
                // ADD CLICK EVENT FOR MAKE COLLAPSIBLE
                $(".hoverEff", this).on("click", function () {
                    if ($(this).hasClass("collapse-grid")) {
                        var id = $(this).parent().closest("tr").next().find('table:eq(0) tbody tr:eq(0) td').find("#recored-id").val();
                        var type = $(this).parent().closest("tr").next().find('table:eq(0) tbody tr:eq(0) td').find("#type-name").val();
                        var method = $(this).parent().closest("tr").next().find('table:eq(0) tbody tr:eq(0) td').find("#method-name").val();
                        var control = this;
                        this.GetSubGrid(id, type, method, function (response) {
                            $(control).parent().closest("tr").next().find('table:eq(0) thead').remove();
                            $(control).parent().closest("tr").next().find('table:eq(0) tbody tr:eq(0)').css("display", "none");
                            if ($(control).parent().closest("tr").next().find('table:eq(0) tbody tr').length == 1) {
                                $(control).parent().closest("tr").next().find('table:eq(0) tbody').append('<tr><td></td></tr>');
                            }
                            $(control).parent().closest("tr").next().find('table:eq(0) tbody tr:eq(1) td').html(response);
                            if ($("#report-title").text() === "Order Pick List") {
                                $("#subT table tbody tr").find('td:eq(3)').each(function () {
                                    var txt = $(this).text();
                                    $(this).html(txt);
                                });
                            }
                            $(control).parent().closest("tr").next().find('table:eq(0) tbody tr:eq(1) td').find('th').each(function () {
                                var header = $(this).text();
                                $(this).text(header.replace('_', ' '));
                            });
                            $(control).parent().closest("tr").next().slideToggle(100);
                            $(control).toggleClass("expand-grid collapse-grid");
                        });
                    }
                    else {
                        $(this).parent().closest("tr").next().slideToggle(100);
                        $(this).toggleClass("expand-grid collapse-grid");
                    }
                });
            });
            //by default make all subgrid in collapse mode
            $("#grid > tbody > tr td.expand-grid").each(function (i, el) {
                $(this).toggleClass("collapse-grid expand-grid");
                $(this).parent().closest("tr").next().slideToggle(100);
            });
        }
    };
    DynamicGrid.prototype.GetSubGrid = function (id, type, method, callback_fun) {
    };
    DynamicGrid.prototype.GetSelectedCheckBoxValue = function () {
        var selectedIds = new Array();
        if (localStorage.getItem("selectedchkboxItems") != undefined && localStorage.getItem("selectedchkboxItems") != "") {
            selectedIds = JSON.parse(localStorage.getItem("selectedchkboxItems"));
            for (var item in selectedIds) {
                selectedIds[item] = selectedIds[item].replace("rowcheck_", "");
            }
            return selectedIds;
        }
    };
    DynamicGrid.prototype.ShowHideGrid = function () {
        $("#grid-list-content").animate({
            opacity: 'toggle'
        }, 'slow');
        var text = $('#hide-grid-link').text();
        $('#hide-grid-link').text(text == "Hide Grid" ? "Show Grid" : "Hide Grid");
    };
    DynamicGrid.prototype.IsDataPresentInList = function (control, value) {
        $(control).parent().parent().next().find('select option').each(function () {
            if (this.value == value) {
                return false;
            }
        });
    };
    DynamicGrid.prototype.GetPopoverForFilter = function () {
        var popoverContent = $('.popovercontent');
        if (popoverContent.length > 0) {
            popoverContent.popover({
                html: true,
                content: function () {
                    var input_text = "";
                    var options_list = "<div class='parent-content-popover'> <select name=\"DataOperatorId\" style='float:left;width:80px;'>" +
                        $(this).attr("data-options-list") + "</select>";
                    if ($(this).attr('data-datype').toLowerCase() == "boolean") {
                        var isSelectedTrue = "";
                        if ($(this).attr("data-text-value") == "False") {
                            isSelectedTrue = "selected";
                        }
                        input_text = "<select name=" + $(this).attr('data-columnname') + " style='float:left;width:80px;'>" +
                            "<option value='True'>True</option><option value='False' " + isSelectedTrue + ">False</option ></select>";
                    }
                    if ($(this).attr('data-datype').toLowerCase() == "date" || $(this).attr('data-datype').toLowerCase() == "datetime") {
                        input_text = '<div class="" id="filter-componant-control-content" style="float:left;">' +
                            '<input id="filtercolumn" type="text" style="float:left;width:150px;"' +
                            ' data-datype="' + $(this).attr('data-datype') +
                            '" ' + $(this).attr('data-max-length') +
                            ' name="' + $(this).attr('data-columnname') +
                            '" data-columnname="' + $(this).attr('data-columnname') +
                            '" value="' + $(this).attr("data-text-value") + '"class="datepicker" data-date-format="' + $(this).attr("data-column-dateformat") + '"  maxlength=' + '"50" />' +
                            '</div>';
                    }
                    else {
                        input_text = '<div class="" id="filter-componant-control-content" style="float:left;">' +
                            '<input id="filtercolumn" type="text" style="float:left;width:150px;"' +
                            ' data-datype="' + $(this).attr('data-datype') +
                            '" ' + $(this).attr('data-max-length') +
                            ' name="' + $(this).attr('data-columnname') +
                            '" data-columnname="' + $(this).attr('data-columnname') +
                            '" value="' + $(this).attr("data-text-value") + '" maxlength=' + '"130" />' +
                            '</div>';
                    }
                    var buttonHtml = '<div class="pull-left"><button title="Search" class="filterButton filter-search-btn"><i class="icon-search zf-search"></i></button></div></div>';
                    return options_list + input_text + buttonHtml;
                },
                placement: "bottom"
            });
            $('.popovercontent').on('shown.bs.popover', function () {
                $(".filterButton").each(function (index, element) {
                    $(element).off("click").on("click", function (event) {
                        event.preventDefault();
                        DynamicGrid.prototype.FilterButtonPress(element);
                    });
                });
                if ($("#filtercolumn").attr("data-datype").toLowerCase() == "date") {
                    $('#filtercolumn').datepicker();
                }
            });
        }
    };
    DynamicGrid.prototype.FilterButtonPress = function (control) {
        CommonHelper.prototype.SubmitForm($(control).closest("form"), function (result) { });
    };
    DynamicGrid.prototype.HidePopover = function () {
        $('body').off('click');
        $('body').on('click', function (e) {
            if ($("#filtercolumn").length > 0) {
                if (!($("#filtercolumn").attr("data-datype").toLowerCase() == "date")) {
                    if (!isSelectCalender) {
                        $('[data-toggle="popover"]').each(function () {
                            if (!$(this).is(e.target) && $(this).has(e.target).length === 0 && $('.popover').has(e.target).length === 0) {
                                $(this).popover('hide');
                            }
                        });
                    }
                }
            }
            isSelectCalender = false;
            if (!$('div.dropdown').is(e.target) && $('div.dropdown').has(e.target).length === 0 && $('.open').has(e.target).length === 0) {
                $('div.dropdown').removeClass('open');
            }
        });
    };
    DynamicGrid.prototype.DataValidattionOnKeyDown = function () {
        $(document).on("keydown", "#filter-componant-control-content input[type=text]", function (e) {
            DynamicGrid.prototype.DataValidattionOnFilters(e, this);
        });
    };
    DynamicGrid.prototype.ShowHidecolumn = function (res) {
        GridPager.prototype.SelectedPageSize(controlContext);
    };
    DynamicGrid.prototype.GenerateFilter = function (data, target) {
        var _val = parseInt(data);
        if (!isNaN(_val)) {
            $($(target).closest("#searchform").attr("data-ajax-update")).find("section").find("#refreshGrid")[0].click();
            $(target).closest("#searchform").find("#filter-control-" + _val).remove();
        }
        else {
            $(target).closest("#searchform").find("#filter-content-main").append(data);
            this.GetPopoverForFilter();
        }
    };
    DynamicGrid.prototype.ClearFilter = function (control, filterId, ColumnName) {
        if ($(control).closest("form").find('input[name="' + ColumnName + '"]').length <= 0) {
            $("<input type='hidden' name='" + ColumnName + "' id='" + ColumnName + "' value=''/>").appendTo($(control).closest("form").find("#filter-control-" + filterId));
        }
        CommonHelper.prototype.SubmitForm($(control).closest("form"), function (result) { });
        /*ZnodeBase.prototype.activeAsidePannel()*/ ;
    };
    DynamicGrid.prototype.ClearFilterById = function (controlParams) {
        var control = controlParams[0];
        var filterId = $(control).attr("data-filterId");
        var ColumnName = $(control).attr("data-columnName");
        DynamicGrid.prototype.ClearFilter(control, filterId, ColumnName);
    };
    DynamicGrid.prototype.Init = function () {
        this.DataValidattionOnKeyDown();
        $("#btnClearSearch").unbind("click");
        $("#btnClearSearch").click(function () {
            $(this).closest("form").find("input[type=text]").val('');
            $(this).closest("form").find("select").val('');
            CommonHelper.prototype.SubmitForm($(this).closest("form"), function (result) { });
        });
        this.GetPopoverForFilter();
        this.getActionLink();
        this.HidePopover();
        localStorage.setItem("selectedchkboxItems", "");
    };
    DynamicGrid.prototype.GetNextPreviousRecords = function (areaName, controller, action, id) {
        var url = "";
        if (areaName != null && areaName != "") {
            url = "/" + areaName + "/" + controller + "/" + action + "?" + id;
        }
        else {
            url = "/" + controller + "/" + action + "?" + id;
        }
        this.DynamicPartialLoad(url);
    };
    DynamicGrid.prototype.ShowHideTileContext = function (id, isShow) {
        if (isShow) {
            $(id).hide();
        }
        else {
            $(id).show();
        }
    };
    DynamicGrid.prototype.ShowHideTileOverlay = function (obj) {
        if ($(obj).is(":checked")) {
            selectedImages.push({
                values: $.trim($(obj).attr("id").split('_')[1]),
                source: $(obj).parent().parent().find('img').attr('src'),
                text: $(obj).parent().parent().parent().find(".title").text()
            });
            $(obj).parent().parent().parent().addClass("img-checked");
        }
        else {
            var id = $.trim($(obj).attr("id").split('_')[1]);
            for (var i = 0; i < selectedImages.length; i++) {
                if (selectedImages[i].values === id)
                    selectedImages.splice(i, 1);
            }
            $(obj).parent().parent().parent().removeClass("img-checked");
        }
    };
    DynamicGrid.prototype.ConfirmDelete = function (url, control) {
        deleteActionlink = control;
        $("#hdnDeleteActionURL").val(url);
    };
    DynamicGrid.prototype.RefreshGrid = function (control, response) {
        $(control).closest('section').find("#refreshGrid").click();
        $('.modal-backdrop').remove();
        // Notification.prototype.DisplayNotificationMessagesHelper(response.message, response.status ? 'success' : 'error', isFadeOut, fadeOutTime);
    };
    DynamicGrid.prototype.ClearCheckboxArray = function () {
        CheckBoxCollection = new Array();
    };
    DynamicGrid.prototype.ConfirmEnableDisable = function (url) {
        $("#hdnEnableDisableActionURL").val(url);
    };
    DynamicGrid.prototype.RedirectToEnableDisable = function () {
        window.location.href = window.location.protocol + "//" + window.location.host + $("#hdnEnableDisableActionURL").val();
    };
    DynamicGrid.prototype.GetChildMenus = function (data) {
        $('#mainDiv').html(data);
        var bootstrapjs = document.createElement('script');
        bootstrapjs.setAttribute('src', window.location.protocol + "//" + window.location.host + "/Scripts/Custom/RoleAndAccessRight.js");
        document.body.appendChild(bootstrapjs);
    };
    DynamicGrid.prototype.GetMultipleSelectedIds = function (target) {
        if (target === void 0) { target = undefined; }
        var ids = [];
        if (target !== undefined) {
            _gridContainerName = "#" + $(target).closest("section").attr('update-container-id');
        }
        if (CheckBoxCollection === undefined || CheckBoxCollection.length === 0) {
            $(_gridContainerName + " #grid").find("tr").each(function () {
                if ($(this).find(".grid-row-checkbox").length > 0) {
                    if ($(this).find(".grid-row-checkbox").is(":checked")) {
                        var id = $(this).find(".grid-row-checkbox").attr("id");
                        CheckBoxCollection.push(id);
                    }
                }
            });
        }
        var result = [];
        $.each(CheckBoxCollection, function (i, e) {
            if ($.inArray(e, result) == -1)
                result.push(e.split("_")[1]);
        });
        return result.join();
    };
    DynamicGrid.prototype.LoadDatepickerScript = function () {
        $('.popovercontent').on("click", function () {
            if ($('.datepicker').length) {
                var s = document.createElement('script');
                s.setAttribute('src', window.location.protocol + "//" + window.location.host + "/scripts/lib/datepicker.js");
                document.body.appendChild(s);
            }
        });
    };
    DynamicGrid.prototype.RefreshGridOndelete = function (control, response) {
        if (response.status) {
            if (($(control).closest('section').find('#grid tbody tr').length) === $(control).closest('section').find('#grid tbody tr').find("input[type=checkbox]:checked").length || ($(control).closest('section').find('#grid tbody tr').length - 1) === 0) {
                if (PageIndex > 0) {
                    PageIndex = PageIndex - 1;
                }
            }
            if (($(control).closest('section').find('#grid tbody tr').length) !== $(control).closest('section').find('#grid tbody tr').find("input[type=checkbox]:checked").length && $("#pagerTxt").val() == $("#pagerTxt").next('span').text().replace("/ ", "").trim()) {
                PageIndex = 0;
            }
        }
        $(control).closest("section").find("#pagerTxt").val(PageIndex + 1);
        $(control).closest('section').find("#refreshGrid").click();
        this.ClearCheckboxArray();
        $('.modal-backdrop').remove();
        ZnodeNotification.prototype.DisplayNotificationMessagesHelper(response.message, response.status ? 'success' : 'error', isFadeOut, fadeOutTime);
    };
    DynamicGrid.prototype.RedirectToDelete = function (control) {
        control = deleteActionlink !== undefined ? deleteActionlink : control;
        $("#loading-div-background").show();
        $.ajax({
            type: "GET",
            url: $("#hdnDeleteActionURL").val(),
            success: (function (response) {
                DynamicGrid.prototype.RefreshGridOndelete(control, response);
            })
        });
    };
    return DynamicGrid;
}(ZnodeBase));
$(window).on("load", function () {
    var _dynamicGrid = new DynamicGrid(window.document);
    _dynamicGrid.Init();
    DynamicGrid.prototype.LoadDatepickerScript();
});
$(document).ajaxComplete(function () {
    var _dynamicGridAjax;
    _dynamicGridAjax = new DynamicGrid(window.document);
    _dynamicGridAjax.GetPopoverForFilter();
    _dynamicGridAjax.getActionLink();
    DynamicGrid.prototype.LoadDatepickerScript();
});
//# sourceMappingURL=DynamicGrid.js.map;
var CustomJurl = /** @class */ (function () {
    function CustomJurl() {
        this.getHost = function (e) {
            return window.location.href;
        };
        this.t = "";
        this.queryParameters = new Array();
        this.urlParameters = new Array();
        this.hashParameter = new Array();
    }
    CustomJurl.prototype.r = function (e) {
        return e === null || typeof e === "undefined" || this.i(e) === "";
    };
    CustomJurl.prototype.i = function (e) {
        if (e === null || typeof e === "undefined") {
            return e;
        }
        e = e + "";
        return e.replace(/(^\s*)|(\s*$)/g, "");
    };
    CustomJurl.prototype.o = function (e) {
        if (this.r(e)) {
            return {};
        }
        var t = {};
        var n = e.split("&");
        var i;
        for (i = 0; i < n.length; i += 1) {
            var s = n[i].split("=");
            t[s[0]] = "";
            if (s.length > 1) {
                t[s[0]] = s[1];
            }
        }
        return t;
    };
    CustomJurl.prototype.u = function (e) {
        if (this.r(e)) {
            return [];
        }
        var t = [];
        var n = e.split("/");
        var i;
        for (i = 0; i < n.length; i += 1) {
            if (!this.r(n[i])) {
                t.push(n[i]);
            }
        }
        return t;
    };
    CustomJurl.prototype.addUrlParameter = function (e, s) {
        e = this.i(e);
        if (!this.r(e)) {
            if (this.r(s) && isNaN(s)) {
                this.urlParameters.push(e);
            }
            else {
                if (s < this.urlParameters.length) {
                    this.urlParameters.splice(s, 0, e);
                }
            }
        }
        return this.urlParameters;
    };
    CustomJurl.prototype.setQueryParameter = function (e, s) {
        e = this.i(e);
        if (!this.r(e)) {
            this.queryParameters[e] = "";
            if (!this.r(s)) {
                this.queryParameters[e] = s;
            }
        }
        return this.queryParameters;
    };
    CustomJurl.prototype.setHashParameter = function (e) {
        e = this.i(e);
        if (this.r(e)) {
            this.hashParameter = null;
        }
        this.hashParameter = this.i(e);
        return this.hashParameter;
    };
    CustomJurl.prototype.getQueryParameter = function (e) {
        e = this.i(e);
        if (this.r(e) || !this.queryParameters.hasOwnProperty(e)) {
            return null;
        }
        return this.queryParameters[e];
    };
    CustomJurl.prototype.getParameterIndex = function (e) {
        e = this.i(e);
        var t;
        for (t = 0; t < this.urlParameters.length; t += 1) {
            if (this.urlParameters[t] === e) {
                return t;
            }
        }
        return null;
    };
    CustomJurl.prototype.removeUrlParameter = function (e) {
        e = this.i(e);
        if (this.urlParameters.indexOf(e) > -1) {
            this.urlParameters.splice(this.urlParameters.indexOf(e), 1);
        }
        return this.urlParameters;
    };
    CustomJurl.prototype.removeQueryParameter = function (e) {
        e = this.i(e);
        if (this.queryParameters.hasOwnProperty(e)) {
            delete this.queryParameters[e];
        }
        return this.queryParameters;
    };
    CustomJurl.prototype.build = function (baseUrl, data) {
        var e = baseUrl;
        var t = [], i;
        for (i in data) {
            if (data.hasOwnProperty(i)) {
                var s = i;
                var o = data[i];
                if (!this.r(o)) {
                    s += "=" + o;
                }
                t.push(s);
            }
        }
        if (t.length > 0) {
            if (baseUrl.indexOf("?") > -1) {
                e += "&" + t.join("&");
            }
            else {
                e += "?" + t.join("&");
            }
        }
        return e;
    };
    return CustomJurl;
}());
//# sourceMappingURL=CustomJurl.js.map;
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var PageCount;
var PageIndex;
var PageSize;
var RecordPerPageFieldName;
var PageFieldName;
var Sort;
var SortDir;
var SortFieldName;
var SortDirFieldName;
var GridPager = /** @class */ (function (_super) {
    __extends(GridPager, _super);
    function GridPager(doc) {
        return _super.call(this) || this;
    }
    GridPager.prototype.GridUpdateHandler = function (data) {
        CommonHelper.prototype.LoadHtmlByControl($("#" + UpdateContainerId), data);
        DynamicGrid.prototype.SetSortOrder();
        GridPager.prototype.UpdateHandler();
        $("#grid .grid-header th a").off("click");
        $("#grid .grid-header th a").on("click", function (e) {
            GridPager.prototype.FindSelectedCheckbox(this);
            GridPager.prototype.GetUpdateContainerId(this);
            GridPager.prototype.SortingHandler(e, this);
        });
        $(".pageSizeList").off("change");
        $(".pageSizeList").change(function () {
            GridPager.prototype.FindSelectedCheckbox(this);
            GridPager.prototype.GetUpdateContainerId(this);
            GridPager.prototype.SelectedPageSize(this);
        });
        $('.pagerTxt').off("keyup");
        $('.pagerTxt').keyup(function (e) {
            //if enter key is pressed
            if (e.keyCode == 13) {
                GridPager.prototype.FindSelectedCheckbox(this);
                GridPager.prototype.GetUpdateContainerId(this);
                GridPager.prototype.UrlHandler(this);
            }
        });
        $("#grid-content-backdrop").hide();
        $(".option-close").on("click", function (e) {
            DynamicGrid.prototype.ClearFilterById($(this));
        });
    };
    GridPager.prototype.UpdateHandler = function () {
        this.PreviousAndNextUpdateHandler();
        this.SelectedValueHandler();
        this.SetPagingInput();
        this.PagingHandler();
        this.SetArrows();
        GridPager.prototype.SetSelectedCheckboxChecked();
        var resize = document.createElement('script');
        // resize.setAttribute('src', window.location.protocol + "//" + window.location.host + "/Scripts/References/colResizable-1.6.js");
        document.body.appendChild(resize);
    };
    GridPager.prototype.Init = function () {
        GridPager.prototype.UpdateHandler();
        if (parseInt($('#PageCount').val()) == 0) {
            $('.pageSizeList').attr('disabled', '');
            $('.pagerTxt').attr('disabled', '');
        }
        $('.pagerTxt').off("keyup");
        $('.pagerTxt').keyup(function (e) {
            //if enter key is pressed
            if (e.keyCode == 13) {
                GridPager.prototype.GetUpdateContainerId(this);
                GridPager.prototype.UrlHandler(this);
            }
        });
        $(".pageSizeList").off("change");
        $(".pageSizeList").change(function () {
            GridPager.prototype.FindSelectedCheckbox(this);
            GridPager.prototype.GetUpdateContainerId(this);
            GridPager.prototype.SelectedPageSize(this);
        });
        $("#grid .grid-header th a").off("click");
        $("#grid .grid-header th a").on("click", function (e) {
            GridPager.prototype.FindSelectedCheckbox(this);
            GridPager.prototype.GetUpdateContainerId(this);
            GridPager.prototype.SortingHandler(e, this);
        });
    };
    GridPager.prototype.GetUpdateContainerId = function (control) {
        UpdateContainerId = $(control).closest('section').attr('update-container-id');
    };
    GridPager.prototype.SetUpdateContainerId = function (containerId) {
        UpdateContainerId = containerId;
    };
    GridPager.prototype.SetArrows = function () {
        var dir = $('#dir').val();
        var col = $('#col').val();
        var sortCol = "sort=" + col;
        var header = null;
        $('th a').each(function () {
            var href = $(this).attr('href');
            if (href.indexOf(sortCol) != -1) {
                header = $(this);
                return false;
            }
        });
        GridPager.prototype.SetSortableIcon();
        if (header != null) {
            if ($("#SortDir").val() != null && col != "" && typeof col != typeof undefined && col != null) {
                DynamicGrid.prototype.UncheckAllSelectedCheckboxItems();
                if (dir == 'Ascending') {
                    header.removeClass('selected');
                    header.addClass('selected');
                    header.removeClass('Descending');
                    header.addClass('Ascending');
                    header.html(header.text() + '<i class="zf-up"></i>');
                }
                if (dir == 'Descending') {
                    header.removeClass('selected');
                    header.addClass('selected');
                    header.removeClass('Ascending');
                    header.addClass('Descending');
                    header.html(header.text() + '<i class="zf-down"></i>');
                }
            }
        }
    };
    GridPager.prototype.PreviousAndNextUpdateHandler = function () {
        var MaxPages = parseInt($('#PageCount').val());
        var currentPageNumber = $("#PageIndex").val() + 1;
    };
    GridPager.prototype.SetSortableIcon = function () {
        if ($("#grid .grid-header th a").find("i").length == 0) {
            $("#grid .grid-header th a").append("<i class='zf-sortable'></i>");
        }
    };
    GridPager.prototype.SetPagingInput = function () {
        var currentPageNumber = 0;
        if (typeof $("#PageIndex").val() != 'undefined') {
            currentPageNumber = parseInt($("#PageIndex").val()) + 1;
        }
        else {
            currentPageNumber = 1;
        }
        var MaxPages = parseInt($('#PageCount').val());
        $(_gridContainerName + " .pagerTxt").attr('value', currentPageNumber);
        if (MaxPages == 1) {
            $(_gridContainerName + " #pageCountLabel").html('Page');
        }
        else {
            $(_gridContainerName + " #pageCountLabel").html("Pages");
        }
    };
    GridPager.prototype.GetRedirectUrl = function () {
        var redirecturl = $("#grid th a:eq(1)").attr('href');
        redirecturl = redirecturl !== undefined ? redirecturl.indexOf('&recordPerPage') > 0 ? redirecturl.substring(0, redirecturl.indexOf('&recordPerPage')) : redirecturl : redirecturl;
        if (redirecturl === undefined && $("#grid").closest(".dynamic-tabs").find('ul > li').eq($(".dynamic-tabs").tabs("option", "active")).length > 0) {
            redirecturl = $("#grid").closest(".dynamic-tabs").find('ul > li').eq($(".dynamic-tabs").tabs("option", "active")).find('a').attr('href');
            var paramVal = $("#grid").closest(".tab-container").find('li[class=active]').find('a').attr('data-queryparam');
            if (paramVal !== undefined)
                redirecturl += "?" + paramVal;
        }
        else if (redirecturl !== undefined)
            redirecturl = redirecturl.substring(0, $("#grid th a:eq(1)").attr('href').indexOf('sort') - 1);
        if (redirecturl === undefined || redirecturl === "")
            redirecturl = window.location.href;
        else
            redirecturl = window.location.protocol + "//" + window.location.host + redirecturl;
        if ($('#isUploadPopup') != undefined && $('#isUploadPopup').val() == "true")
            redirecturl = $('#MediaList').val();
        return redirecturl;
    };
    GridPager.prototype.FindSelectedCheckbox = function (control) {
        if (UpdateContainerId !== $(control).closest("section").attr("update-container-id")) {
            CheckBoxCollection = new Array();
        }
        $(control).closest("section").find("#grid tbody").find("input[type=checkbox]:checked").each(function () {
            var _checkbox = this.id;
            if (jQuery.inArray(_checkbox, CheckBoxCollection) === -1) {
                CheckBoxCollection.push(_checkbox);
            }
        });
    };
    GridPager.prototype.SetSelectedCheckboxChecked = function () {
        for (var i = 0; i < CheckBoxCollection.length; i++) {
            $("#" + UpdateContainerId + " #" + CheckBoxCollection[i]).prop("checked", true);
        }
    };
    GridPager.prototype.PagingHandler = function () {
        $(document).off('click', "#nextPage");
        $(document).on('click', "#nextPage", function (e) {
            // CheckBoxCollection = DynamicGrid.prototype
            e.preventDefault();
            GridPager.prototype.FindSelectedCheckbox(this);
            var MaxPages = parseInt($(this).closest("section").find("#PageCount").val());
            var currentPageNumber = parseInt($(this).closest("section").find("#pagerTxt").val());
            var requestedPage = currentPageNumber + 1;
            var url = window.location.protocol + "//" + window.location.host + $(this).closest('section').attr('data-pager-url'); //GridPager.prototype.GetRedirectUrl();
            var _viewMode = $('#viewmode').attr("value");
            if (requestedPage > MaxPages) {
                requestedPage = currentPageNumber;
            }
            console.log("inside");
            $(this).closest("section").find("#pagerTxt").val(requestedPage);
            GridPager.prototype.GetUpdateContainerId(this);
            GridPager.prototype.SetCustomJurl(requestedPage, _viewMode, url);
        });
        $(document).off('click', "#previousPage");
        $(document).on('click', "#previousPage", function (e) {
            e.preventDefault();
            GridPager.prototype.FindSelectedCheckbox(this);
            var MaxPages = parseInt($(this).closest("section").find("#PageCount").val());
            var currentPageNumber = parseInt($(this).closest("section").find("#pagerTxt").val());
            var requestedPage = currentPageNumber - 1;
            var url = window.location.protocol + "//" + window.location.host + $(this).closest('section').attr('data-pager-url'); //GridPager.prototype.GetRedirectUrl();
            var _viewMode = $('#viewmode').attr("value");
            if (requestedPage <= 0) {
                requestedPage = currentPageNumber;
            }
            $(this).closest("section").find("#pagerTxt").val(requestedPage);
            GridPager.prototype.GetUpdateContainerId(this);
            GridPager.prototype.SetCustomJurl(requestedPage, _viewMode, url);
        });
        $(document).off('click', "#first");
        $(document).on('click', "#first", function (e) {
            e.preventDefault();
            GridPager.prototype.FindSelectedCheckbox(this);
            var currentPageNumber = parseInt($(this).closest("section").find("#pagerTxt").val());
            var requestedPage = 1;
            var url = window.location.protocol + "//" + window.location.host + $(this).closest('section').attr('data-pager-url'); //GridPager.prototype.GetRedirectUrl();
            var _viewMode = $('#viewmode').attr("value");
            if (requestedPage <= 0) {
                requestedPage = currentPageNumber;
            }
            $(this).closest("section").find("#pagerTxt").val(requestedPage);
            GridPager.prototype.GetUpdateContainerId(this);
            GridPager.prototype.SetCustomJurl(requestedPage, _viewMode, url);
        });
        $(document).off('click', "#last");
        $(document).on('click', "#last", function (e) {
            e.preventDefault();
            GridPager.prototype.FindSelectedCheckbox(this);
            var currentPageNumber = parseInt($(this).closest("section").find("#pagerTxt").val());
            var requestedPage = parseInt($(this).closest("section").find("#PageCount").val());
            var url = window.location.protocol + "//" + window.location.host + $(this).closest('section').attr('data-pager-url'); // GridPager.prototype.GetRedirectUrl();
            var _viewMode = $('#viewmode').attr("value");
            if (requestedPage <= 0) {
                requestedPage = currentPageNumber;
            }
            $(this).closest("section").find("#pagerTxt").val(requestedPage);
            GridPager.prototype.GetUpdateContainerId(this);
            GridPager.prototype.SetCustomJurl(requestedPage, _viewMode, url);
        });
        $(document).off('click', "#refreshGrid");
        $(document).on('click', "#refreshGrid", function (e) {
            e.preventDefault();
            GridPager.prototype.FindSelectedCheckbox(this);
            var MaxPages = parseInt($('#PageCount').val());
            var currentPageNumber = parseInt($(this).closest("section").find("#pagerTxt").val());
            var requestedPage = currentPageNumber;
            var isPagerDisable = MaxPages == 0;
            if (!isPagerDisable) {
                if (isNaN(currentPageNumber) || currentPageNumber > MaxPages || currentPageNumber < 1)
                    return false;
            }
            var url = window.location.protocol + "//" + window.location.host + $(this).closest('section').attr('data-pager-url'); //GridPager.prototype.GetRedirectUrl();
            var _viewMode = $('#viewmode').attr("value");
            if (requestedPage <= 0) {
                requestedPage = currentPageNumber;
            }
            $(this).closest("section").find("#pagerTxt").val(requestedPage);
            GridPager.prototype.GetUpdateContainerId(this);
            GridPager.prototype.SetCustomJurl(requestedPage, _viewMode, url);
        });
        $(".detail_view").off("click");
        $(".detail_view").on('click', function (e) {
            e.preventDefault();
            GridPager.prototype.FindSelectedCheckbox(this);
            GridPager.prototype.GetUpdateContainerId(this);
            GridPager.prototype.RedirectToPage(this, $(this).attr("value"));
        });
    };
    GridPager.prototype.SetCustomJurl = function (requestedPage, _viewMode, url) {
        var _customUri = new CustomJurl();
        var newUrlParameter = _customUri.setQueryParameter($('#RecordPerPageFieldName').val(), $("#PageSize").val());
        newUrlParameter = _customUri.setQueryParameter($('#PageFieldName').val(), requestedPage);
        if (_viewMode !== undefined)
            newUrlParameter = _customUri.setQueryParameter("ViewMode", _viewMode);
        if ($("#Sort").val() != null) {
            newUrlParameter = _customUri.setQueryParameter($('#SortFieldName').val(), $('#Sort').val());
            newUrlParameter = _customUri.setQueryParameter($('#SortDirFieldName').val(), $("#SortDir").val());
        }
        var newUrl = _customUri.build(url, newUrlParameter);
        GridPager.prototype.pagingUrlHandler(newUrl);
    };
    GridPager.prototype.SortingHandler = function (e, control) {
        e.preventDefault();
        e.stopPropagation();
        var requestedPage = parseInt($(".pagerTxt").val());
        var url = e.currentTarget.attributes['href'].value;
        var _viewMode = $('#viewmode').attr("value");
        url = window.location.protocol + "//" + window.location.host + url;
        var sortDir = $("#SortDir").val();
        var anchorUrl = $(control).attr('href');
        if (requestedPage != null) {
            url = url + "&" + $('#PageFieldName').val() + "=" + requestedPage;
        }
        var absoluteUrl = window.location.origin + anchorUrl;
        GridPager.prototype.GetUpdateContainerId(control);
        GridPager.prototype.pagingUrlHandler(url);
    };
    GridPager.prototype.pagingUrlHandler = function (newUrl) {
        var formData = $("#searchform").serialize();
        $("#grid-content-backdrop").show();
        $.ajax({
            type: "POST",
            url: newUrl,
            data: formData,
            success: (function (html) {
                GridPager.prototype.GridUpdateHandler(html);
                GridPager.prototype.SetArrows();
                GridPager.prototype.SetSelectedCheckboxChecked();
            }),
        });
    };
    GridPager.prototype.UrlHandler = function (control) {
        var MaxPages = parseInt($('#PageCount').val());
        var url = window.location.protocol + "//" + window.location.host + $(control).closest('section').attr('data-pager-url'); //GridPager.prototype.GetRedirectUrl();
        var requestedPage = $(".pagerTxt").val();
        if (control.id == "pagerTxt") {
            requestedPage = control.value;
        }
        var _viewMode = $('#viewmode').attr("value");
        if (!(requestedPage > 0 && requestedPage <= MaxPages)) {
            requestedPage = 1;
        }
        var _customUri = new CustomJurl();
        var newUrlParameter = _customUri.setQueryParameter($('#PageFieldName').val(), requestedPage);
        var newUrl = _customUri.build(url, newUrlParameter);
        GridPager.prototype.GetUpdateContainerId(control);
        GridPager.prototype.pagingUrlHandler(newUrl);
    };
    GridPager.prototype.SelectedPageSize = function (control) {
        var recordPerPage = $(".pageSizeList").val();
        if (control.id == "pageSizeList") {
            recordPerPage = control.value;
        }
        var url = window.location.protocol + "//" + window.location.host + $(control).closest('section').attr('data-pager-url'); // GridPager.prototype.GetRedirectUrl();
        var _viewMode = $('#viewmode').attr("value");
        var _customUri = new CustomJurl();
        var newUrlParameter = _customUri.setQueryParameter($('#RecordPerPageFieldName').val(), recordPerPage);
        newUrlParameter = _customUri.setQueryParameter($('#PageFieldName').val(), 1);
        newUrlParameter = _customUri.setQueryParameter("ViewMode", _viewMode);
        var newUrl = _customUri.build(url, newUrlParameter);
        GridPager.prototype.GetUpdateContainerId(control);
        GridPager.prototype.pagingUrlHandler(newUrl);
    };
    GridPager.prototype.SelectedValueHandler = function () {
        if (localStorage.getItem("selectedchkboxItems") != "") {
            var checkBoxCount = $(".grid-row-checkbox").length;
            $(".grid-row-checkbox").each(function () {
                GridPager.prototype.SetSelectedChechboxValue($(this).attr('id'));
            });
        }
    };
    GridPager.prototype.ExecuteFirstRow = function () {
        var _viewMode = $('#viewmode').attr("value");
        if (_viewMode === "Detail") {
            $("#grid").find("tr:eq(1) td a").first().click();
        }
    };
    GridPager.prototype.SetSelectedChechboxValue = function (chkboxId) {
        var checkBoxCount = $(".grid-row-checkbox").length;
        var checkBoxCheckedCount = $(".grid-row-checkbox:checked").length;
        if (checkBoxCount === checkBoxCheckedCount) {
            $("#check-all").prop('checked', true);
        }
        else {
            $("#check-all").prop('checked', false);
        }
        var selectedIds = JSON.parse(localStorage.getItem("selectedchkboxItems"));
        for (var items = 0; items < selectedIds.length; items++) {
            if (selectedIds[items] === chkboxId) {
                $("#grid #" + chkboxId + "").prop('checked', true);
            }
        }
    };
    GridPager.prototype.SetPagingValues = function () {
        PageIndex = $("#PageIndex").val();
        PageCount = $("#PageCount").val();
        PageSize = $("#PageSize").val();
        RecordPerPageFieldName = $("#RecordPerPageFieldName").val();
        PageFieldName = $("#PageFieldName").val();
        Sort = $("#Sort").val();
        SortDir = $("#SortDir").val();
        SortFieldName = $("#SortFieldName").val();
        SortDirFieldName = $("#SortDirFieldName").val();
    };
    GridPager.prototype.RedirectToPage = function (control, viewMode) {
        var MaxPages = parseInt($('#PageCount').val());
        var currentPageNumber = parseInt($(control).closest("section").find("#pagerTxt").val());
        var requestedPage = currentPageNumber;
        //var url = window.location.protocol + "//" + window.location.host + $(control).closest('section').attr('data-pager-url');//GridPager.prototype.GetRedirectUrl();
        var url = window.location.href;
        if (requestedPage <= 0) {
            requestedPage = currentPageNumber;
        }
        $(this).closest("section").find("#pagerTxt").val(requestedPage);
        GridPager.prototype.SetCustomJurl(requestedPage, viewMode, url);
    };
    return GridPager;
}(ZnodeBase));
(function ($) {
    var _gridPager;
    _gridPager = new GridPager(window.document);
    if ($("#Dynamic_Grid").length > 0) {
        _gridPager.Init();
        _gridPager.SetSortableIcon();
    }
})($);
//# sourceMappingURL=GridPager.js.map;
function AddNewRowManage() {
    $("#Dynamic_Grid").show()
}

function isNumberKey(t) {
    var e = t.which ? t.which : event.keyCode;
    return 46 == e ? !1 : e > 31 && (48 > e || e > 57) ? !1 : !0
}

function DgUpdateString(t) {
    var e = "",
        i = [],
        n = {},
        a = !0,
        d = $(t).data("parameter"),
        o = $(t).closest("td").parent("tr");
    d = d.substring(1, d.length);
    d = d.split("&");
    for (var arrindex = 0; arrindex < d.length; arrindex++) {
        var _item = d[arrindex].split("=");
        n[_item[0]] = _item[1];
    }
    $(o).find("[data-dgview='edit']").each(function (t, e) {
        $(this).parents("td").find("[data-dgview='edit']").removeAttr("style"), !$(this).parents("td").hasClass("IsRequired") || "" != $(this).parent("td").find(".input-text").val() && 0 != $(this).find("option:selected").val() ? $(this).parents("td").hasClass("Password") && "" != $(this).val() && $(this).val().length < 6 ? ($(this).parents("td").find("[data-dgview='edit']").attr("style", "border-color:red"), $(this).parents("td").find("[data-dgview='edit']").attr("title", PasswordInstructionMessage), a = !1) : (columnName = $(this).data("columnname"), n[columnName] = $.trim($(this).val())) : ($(this).parents("td").find("[data-dgview='edit']").attr("style", "border-color:red"), a = !1)
    });
    var s = null;
    $(o).find(".chk-btn").each(function (t, e) {
        s = $(e), n[s.attr("name")] = s.is(":checked")
    }), s = null, -1 != window.location.href.indexOf("filter=MasterUserDetails") && $(o).find("[data-columnname='ShortCode']").length > 0 && $(o).find("[data-columnname='ShortCode']").each(function (t, e) {
        s = $(e), n[s.attr("data-columnname")] = s.html()
    }), i.push(n), e = JSON.stringify(i);
    var r = jQuery.Event(ListConstants.ROW_EDIT);
    return r.detail = {
        data: e,
        linkId: t
    }, a ? ($(document).trigger(r), DgCallAjax(e, t, function (t) {
        Notification.prototype.DisplayNotificationMessagesHelper(t.message, t.status ? "success" : "error", isFadeOut, fadeOutTime)
    }), e) : a
}

function DgCallAjax(t, e, i) {
    var n = $(e).attr("href");
    ZnodeBase.prototype.ajaxRequest(n, "get", {
        data: t
    }, i, "json")
}

function DgUpdateSuccess(t) {
    var e = $(t).closest("td").parent("tr");
    $(e).find("[data-dgview='edit']").each(function (t, e) {
        "dropDown" == $(this).attr("class") ? $(this).prev("[data-dgview='show']").text($(this).children("option:selected").text()) : $(this).prev("[data-dgview='show']").text($(this).val())
    }), e.find("[data-dgview='show']").show(), e.find("[data-dgview='edit']").hide(), e.find("[data-disable='checkbox']").attr("disabled", "disabled"), e.find("[data-managelink='Cancel']").parent("li").remove(), e.find("[data-managelink='Update']").parent("li").remove(), e.find("[data-managelink='Edit']").parent("li").show()
}

function DgUpdateAllSuccess() {
    var t = $("#dynamicGrid");
    $(t).find("[data-dgview='edit']").each(function (t, e) {
        "dropDown" == $(this).attr("class") ? $(this).prev("[data-dgview='show']").text($(this).children("option:selected").text()) : $(this).prev("[data-dgview='show']").text($(this).val())
    }), t.find("[data-dgview='show']").show(), t.find("[data-dgview='edit']").hide(), t.find(".fileUploader").removeClass("display-block").addClass("display-none"), $("#btnEditAll").show(), $("#btnCancelAll").hide(), $("#btnUpdateAll").hide()
}

function DgDeleteRow(t) {
    var e = "",
        i = [],
        n = {},
        a = $(t).data("parameter").split("="),
        d = $(t).parent("li").parent("ul").parent("div").parent("div").parent("td").parent("tr");
    n.Id = a[1], $(d).find("[data-dgview='edit']").each(function (t, e) {
        columnName = $(this).data("columnname"), n[columnName] = $.trim($(this).val())
    });
    var o = null;
    $(d).find(".chk-btn").each(function (t, e) {
        o = $(e), n[o.attr("name")] = o.is(":checked")
    }), i.push(n), e = JSON.stringify(i);
    var s = jQuery.Event(ListConstants.ROW_DELETE);
    return s.detail = {
        data: e,
        linkId: t
    }, $(document).trigger(s), e
}
var rowCount = 0,
    EditableGridEvent = {
        Init: function () {
            $(document).on("click", "#btnAddRow", function () {
                $("#txtRowCount").css("display", "block"), $("#lblRowCount").css("display", "block"), $("#btnSaveRowData").css("display", "block"), $("#gridAddNewRowDynamicDiv").css("display", "block"), $("[data-backbutton='back']").is(":visible") || $("#CancelRowAdd").css("display", "block"), $("#Dynamic_Grid").hide(), $("#SearchComponent").hide(), $(".HideShowComponent").show(), $("#editAllDiv").hide();
                var t = $("#gridAddNewRow tbody tr").html();
                gridHtml = void 0 == t ? gridHtml : "<tr>" + t + "</tr>";
                var e = rowCount;
                for (0 == e && (e = 1, $("#gridAddNewRow tbody tr").each(function () {
                        $(this).closest("tr").remove()
                }), rowCount = e), i = 0; i < e; i++) $("#gridAddNewRow").append(gridHtml), $("#gridAddNewRow").find(".fileUploader").removeClass("display-none").addClass("display-block");
                $("#gridAddNewRowDynamicDiv").find("[data-deletenewrow='newrow']").parents("td").removeClass("display-none"), $("#gridAddNewRowDynamicDiv").find("[data-columnname='Delete']").removeClass("display-none").parents("th").removeClass("display-none"), -1 != window.location.href.indexOf("filter=City") && $("[data-city='city']").hide(), -1 != window.location.href.indexOf("filter=MasterUserDetails") && ($("[data-regorg='regorg']").show(), $("#gridAddNewRow tbody tr").find("select[data-columnname='ApprovalId']").attr("disabled", "disabled"))
            }), $(document).on("click", "#CancelRowAdd", function () {
                $("#gridAddNewRow").closest("tr").remove(), $("#gridAddNewRow tbody tr").each(function () {
                    $(this).closest("tr").remove()
                }), $("#txtRowCount").val(""), $("#txtRowCount").css("display", "none"), $("#lblRowCount").css("display", "none"), $("#btnSaveRowData").css("display", "none"), $("#gridAddNewRowDynamicDiv").css("display", "none"), $("#CancelRowAdd").css("display", "none"), $("#Dynamic_Grid").show(), $("#SearchComponent").show(), $(".HideShowComponent").hide(), $("#editAllDiv").show(), -1 != window.location.href.indexOf("filter=MasterUserDetails") && ($("[data-regorg='regorg']").hide(), $("#grid-container").show());
                try {
                    $("#AddNewGridAlignment").addClass("pull-right"), $("#ChildAddNewGridAlignment").removeAttr("style")
                } catch (t) { }
            }), $(document).on("click", "#btnSaveRowData", function () {
                return EditableGrid.GetNewRowJson(this)
            }), $(document).on("click", "#btnUpdateAll", function () {
                return EditableGrid.GetAllRowJson(ListConstants.ROW_EDITALL)
            }), $(document).on("click", "#btnDeleteAll", function () {
                var t = void 0 == DeleteAllRowConfirmationMessage ? "Are you sure you want to delete all rows?" : DeleteAllRowConfirmationMessage;
                bootbox.confirm(t, function (t) {
                    return t ? EditableGrid.GetAllRowJson(ListConstants.ROW_DELETEALL) : void 0
                })
            }), $(document).on("click", "[data-deletenewrow='newrow']", function () {
                $("#gridAddNewRowDynamicDiv tbody tr").length > 1 && $(this).parent("td").parent("tr").remove()
            }), $(document).off("click", "[data-managelink='Edit']"), $(document).on("click", "[data-managelink='Edit']", function (t) {
                t.preventDefault();
                var e = $(this).closest("td").parent("tr");
                e.find("[data-dgview='show']").hide(), e.find("[data-dgview='edit']").show(), e.find("[data-disable='checkbox']").prop("disabled", false);
                var i = $(this).data("parameter"),
                    n = $(this).attr("href"),
                    a = '<li><a class="zf-update zf-ok" href="' + n + '" data-parameter="' + i + '" data-managelink="Update" title="Update"></a></li><li><a class="z-cancel z-close" href="' + n + '" data-parameter="' + i + '" data-managelink="Cancel" title="Cancel"></a></li>';
                $(this).closest("ul").prepend(a), e.find("[data-managelink='Edit']").parent("li").hide();
                var d = jQuery.Event(ListConstants.ROW_PrevEDIT);
                return d.detail = {
                    linkId: $(this)
                }, $(document).trigger(d), !1
            }), $(document).off("click", "[data-managelink='Cancel'],[data-managelink='Clear']"), $(document).on("click", "[data-managelink='Cancel'],[data-managelink='Clear']", function (t) {
                t.preventDefault();
                var e = $(this).closest("td").parent("tr");
                e.find("[data-dgview='show']").show(), e.find("[data-dgview='edit']").hide(), e.find("[data-disable='checkbox']").attr("disabled", "disabled"), e.find(".fileUploader").removeClass("display-block").addClass("display-none"), e.find("[data-managelink='Cancel']").parent("li").remove(), e.find("[data-managelink='Update']").parent("li").remove(), e.find("[data-managelink='Edit']").parent("li").show();
                var i = jQuery.Event(ListConstants.ROW_Cancel);
                return i.detail = {
                    linkId: $(this)
                }, $(document).trigger(i), !1
            }), $(document).off("click", "[data-managelink='Update']"), $(document).on("click", "[data-managelink='Update']", function (t) {
                t.preventDefault();
                var e = DgUpdateString(this);
                return e ? (DgUpdateSuccess(this), !1) : !1
            })
        }
    },
    EditableGrid = {
        GetNewRowJson: function (t) {
            var e = "",
                i = [],
                n = 1;
            $("#gridAddNewRow tbody tr").each(function (t) {
                if (0 != $(this)[0].rowIndex) {
                    x = $(this).children();
                    var e = {};
                    e.Id = n, $("td", this).each(function (t) {
                        var i = "";
                        $(this).find(".radio-btn").length > 0 && (i = $(this).find(".radio-btn").data("columnname"), e[i] = $(this).find(".radio-btn").is(":checked")), $(this).find(".chk-btn").length > 0 && (i = $(this).find(".chk-btn").data("columnname"), e[i] = $(this).find(".chk-btn").is(":checked")), $(this).find(".input-text").length > 0 && (i = $(this).find(".input-text").data("columnname"), e[i] = $.trim($(this).find(".input-text").val()), $(this).find(".input-text").parent("td").hasClass("IsRequired") && "" == $(this).find(".input-text").val() ? $(this).find(".input-text").attr("style", "border-color:red") : $(this).find(".input-text").removeAttr("style"), $(this).find(".input-text").parent("td").hasClass("Password") && $(this).find(".input-text").val().length < 6 && ($(this).find(".input-text").attr("title", PasswordInstructionMessage), $(this).find(".input-text").attr("style", "border-color:red"))), $(this).find("[type='hidden']").length > 0 && (i = $(this).find("[type='hidden']").data("columnname"), e[i] = $.trim($(this).find("[type='hidden']").val())), $(this).find(".dropDown").length > 0 && (i = $(this).find(".dropDown").data("columnname"), e[i] = $.trim($(this).find(".dropDown").val()), $(this).find(".dropDown").parent("td").hasClass("IsRequired") && "0" == $(this).find(".dropDown").val() ? $(this).find(".dropDown").attr("style", "border-color:red") : $(this).find(".dropDown").removeAttr("style"))
                    }), i.push(e), n = parseInt(n) + 1
                }
            }), e = JSON.stringify(i);
            var a = jQuery.Event(ListConstants.ROW_ADDED);
            return a.detail = {
                data: e,
                linkId: t
            }, $(document).trigger(a), e
        },
        GetAllRowJson: function (t) {
            var n = "",
        i = [];
            $("#dynamicGrid tbody tr").each(function (t) {
                if (0 != $(this)[0].rowIndex) {
                    x = $(this).children();
                    var n = {},
                        d = x.find("[data-managelink='Update']");
                    d = d.substring(1, d.length);
                    for (var a, e = $(d).data("parameter").split("&"), h = 0; h < e.length; h++) {
                        e[h];
                        a = h.split("="), n[a[0]] = a[1]
                    }
                    $("td", this).each(function (t) {
                        var i;
                        $(this).find(".radio-btn").length > 0 && (i = $(this).find(".radio-btn").data("columnname"), n[i] = $(this).find(".radio-btn").is(":checked")), $(this).find(".chk-btn").length > 0 && (i = $(this).find(".chk-btn").data("columnname"), n[i] = $(this).find(".chk-btn").is(":checked")), $(this).find(".input-text").length > 0 && (i = $(this).find(".input-text").data("columnname"), n[i] = $(this).find(".input-text").val()), $(this).find("[type='hidden']").length > 0 && (i = $(this).find("[type='hidden']").data("columnname"), n[i] = $(this).find("[type='hidden']").val()), $(this).find(".dropDown").length > 0 && (i = $(this).find(".dropDown").data("columnname"), n[i] = $(this).find(".dropDown").val())
                    }), i.push(n)
                }
            }), n = JSON.stringify(i);
            var d = jQuery.Event(t);
            return d.detail = {
                data: n,
                linkId: t
            }, $(document).trigger(d), n
        }
    };
ListConstants = {
    ROW_ADDED: "ROW_ADDED",
    ROW_EDIT: "ROW_EDIT",
    ROW_Cancel: "ROW_Cancel",
    ROW_PrevEDIT: "ROW_PrevEDIT",
    ROW_EDITALL: "ROW_EDITALL",
    ROW_DELETE: "ROW_DELETE",
    ROW_DELETEALL: "ROW_DELETEALL"
};;
var jurl=function(e){function r(e){return e===null||typeof e==="undefined"||i(e)===""}function i(e){if(e===null||typeof e==="undefined"){return e}e=e+"";return e.replace(/(^\s*)|(\s*$)/g,"")}function s(e){var t=/^((((file|gopher|news|nntp|telnet|http|ftp|https|ftps|sftp):\/\/)?(www\.)?([a-zA-Z0-9\-\.]+(\.[a-zA-Z]{2,3})?(:[a-zA-Z0-9]*)?))(\/[a-zA-Z0-9\-_\/]*)?)(\?([a-zA-Z0-9\-_&=%]*))?(#([a-zA-Z0-9\-_&=\/]*))?$/;var n=t.exec(e);if(n<3){return""}return{base:n[2],urlParameters:u(n[9]),queryParameters:o(n[11]),hashParameter:n[13]}}function o(e){if(r(e)){return{}}var t={};var n=e.split("&");var i;for(i=0;i<n.length;i+=1){var s=n[i].split("=");t[s[0]]="";if(s.length>1){t[s[0]]=s[1]}}return t}function u(e){if(r(e)){return[]}var t=[];var n=e.split("/");var i;for(i=0;i<n.length;i+=1){if(!r(n[i])){t.push(n[i])}}return t}var t=this;var n=s(e);t.addUrlParameter=function(e,s){e=i(e);if(!r(e)){if(r(s)&&isNaN(s)){n.urlParameters.push(e)}else{if(s<n.urlParameters.length){n.urlParameters.splice(s,0,e)}}}return t};t.setQueryParameter=function(e,s){e=i(e);if(!r(e)){n.queryParameters[e]="";if(!r(s)){n.queryParameters[e]=s}}return t};t.setHashParameter=function(e){e=i(e);if(r(e)){n.hashParameter=null}n.hashParameter=i(e);return t};t.getQueryParameter=function(e){e=i(e);if(r(e)||!n.queryParameters.hasOwnProperty(e)){return null}return n.queryParameters[e]};t.getParameterIndex=function(e){e=i(e);var t;for(t=0;t<n.urlParameters.length;t+=1){if(n.urlParameters[t]===e){return t}}return null};t.getHost=function(e){return n.base};t.removeUrlParameter=function(e){e=i(e);if(n.urlParameters.indexOf(e)>-1){n.urlParameters.splice(n.urlParameters.indexOf(e),1)}return t};t.removeQueryParameter=function(e){e=i(e);if(n.queryParameters.hasOwnProperty(e)){delete n.queryParameters[e]}return t};t.build=function(){var e=n.base;if(n.urlParameters.length>0){e+="/"+n.urlParameters.join("/")}var t=[],i;for(i in n.queryParameters){if(n.queryParameters.hasOwnProperty(i)){var s=i;var o=n.queryParameters[i];if(!r(o)){s+="="+o}t.push(s)}}if(t.length>0){e+="?"+t.join("&")}if(!r(n.hashParameter)){e+="#"+n.hashParameter}return e};return t};(function(e){e.fn.jurl=function(){if(this.attr("href")){return new jurl(this.attr("href"))}throw"Not href attribute on element: "+input}})(jQuery)
;
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var controlContext;
var MultiSelectDDL = /** @class */ (function (_super) {
    __extends(MultiSelectDDL, _super);
    function MultiSelectDDL(doc) {
        var _this = _super.call(this) || this;
        _this._endpoint = new Endpoint();
        MultiSelectDDL.prototype._Itemdata = new Array();
        return _this;
    }
    MultiSelectDDL.prototype.Init = function () {
        MultiSelectDDL.prototype.BindInlineOnClickEvent();
    };
    MultiSelectDDL.prototype.BindInlineOnClickEvent = function () {
        $('#selectall').on('click', function (e) {
            var HiddenItemDataStorage = $("#HiddenItemDataStorage").val();
            MultiSelectDDL.prototype.CheckAll(this, '@Model.HiddenItemDataStorage');
        });
        $("[id^='idChk_']").on('click', function (e) {
            var hiddenItemDataStorage = $(this).attr("data-HiddenItemDataStorage");
            MultiSelectDDL.prototype.CheckBoxChecked(this, hiddenItemDataStorage);
        });
        $("#id-submit-data").on('click', function (e) {
            MultiSelectDDL.prototype.SubmitData(this);
        });
    };
    MultiSelectDDL.prototype.BindSearch = function () {
        $('.ms-search input').on('keyup', function () {
            // ignore keystrokes that don't make a difference
            if ($(this).data('lastsearch') == $(this).val()) {
                return true;
            }
            // search non optgroup li's
            var instance = $('.dropdown');
            var optionsList = instance.find('ul');
            var search = $(this).val();
            optionsList.find('li:not(.optgroup)').each(function () {
                var optText = $(this).text();
                // show option if string exists
                if (optText.toLowerCase().indexOf(search.toLowerCase()) > -1) {
                    $(this).show();
                }
                // don't hide selected items
                else if (!$(this).hasClass('selected')) {
                    $(this).hide();
                }
            });
        });
        $(document).off("click", "div.dropdown");
        $(document).on("click", "div.dropdown", function () {
            $(this).addClass("open");
        });
    };
    MultiSelectDDL.prototype.GetRecord = function (IsAjax, Controller, Action, ParentMenuIds, SuccessCallBack, flag, target) {
        if (IsAjax) {
            $.ajax({
                url: "/" + Controller + "/" + Action,
                data: { id: ParentMenuIds.toString(), flag: flag },
                method: "GET",
                dataType: "json",
                success: function (data) {
                    ZnodeBase.prototype.executeFunctionByName(SuccessCallBack, window, data, target);
                },
                error: function (data) {
                    console.log(data);
                }
            });
        }
    };
    MultiSelectDDL.prototype.CheckBoxChecked = function (control, hiddenItem) {
        controlContext = control;
        var _IsSubmit = $(control).data("issubmit");
        var _IsSuboption = $(control).data("issuboption");
        if (_IsSubmit.toLowerCase() === "false") {
            MultiSelectDDL.prototype._Itemdata = [];
            $(control).parent().parent().parent().parent().find('input[type=checkbox]').each(function () {
                if ($(this).is(':checked')) {
                    MultiSelectDDL.prototype._Itemdata.push($(this).val());
                }
                else {
                    var index = MultiSelectDDL.prototype._Itemdata.indexOf($(this).val());
                    if (index != -1) {
                        MultiSelectDDL.prototype._Itemdata.splice(index, 1);
                    }
                }
            });
            var _Value = $(control).val();
            var _Controller = $(control).data("controller");
            var _Action = $(control).data("action");
            var _SuccessCallBack = $(control).data("sucess");
            var _IsMultiple = $(control).data("ismultiple");
            var _flag = true;
            if ($(control).is(':checked')) {
                if (_IsMultiple == "True") {
                    if ($.inArray(_Value, MultiSelectDDL.prototype._Itemdata) == -1) {
                        MultiSelectDDL.prototype._Itemdata.push(_Value);
                    }
                }
                else {
                    MultiSelectDDL.prototype._Itemdata = [];
                    MultiSelectDDL.prototype._Itemdata.push(_Value);
                }
            }
            else {
                if (_IsMultiple == "True") {
                    MultiSelectDDL.prototype._Itemdata = jQuery.grep(MultiSelectDDL.prototype._Itemdata, function (value) {
                        return value != _Value;
                    });
                }
                else {
                    MultiSelectDDL.prototype._Itemdata = [];
                    MultiSelectDDL.prototype._Itemdata.push(_Value);
                }
                _flag = false;
            }
            this.GetRecord(true, _Controller, _Action, MultiSelectDDL.prototype._Itemdata, _SuccessCallBack, _flag, control);
        }
        else if (typeof _IsSuboption != 'undefined' && _IsSuboption.toLowerCase() == "true") {
            var _ulId = $(control).val();
            var a = $("#" + _ulId).is(':checked');
            if ($("#" + _ulId).is(':checked')) {
                $(control).parent().parent().parent().parent().find('#optgroup-' + _ulId + ' input[type=checkbox]').each(function () {
                    this.checked = true;
                });
            }
            else {
                $(control).parent().parent().parent().parent().find('#optgroup-' + _ulId + ' input[type=checkbox]').each(function () {
                    this.checked = false;
                });
            }
        }
        if (hiddenItem) {
            $("#" + hiddenItem).val("");
            $("#" + hiddenItem).val(MultiSelectDDL.prototype._Itemdata);
        }
    };
    MultiSelectDDL.prototype.CheckAll = function (control, hiddenItem) {
        if ($("#selectall").is(':checked')) {
            $(control).parent().parent().parent().parent().find('input[type=checkbox]').each(function () {
                this.checked = true;
                $('#selectall').prop('checked');
            });
            MultiSelectDDL.prototype._Itemdata = [];
            $(control).parent().parent().parent().parent().find('input[type=checkbox]:checked').each(function () {
                MultiSelectDDL.prototype._Itemdata.push($(this).val());
            });
        }
        else {
            $(control).parent().parent().parent().parent().find('input[type=checkbox]').each(function () {
                this.checked = false;
            });
        }
        if (hiddenItem) {
            $("#" + hiddenItem).val("");
            $("#" + hiddenItem).val(MultiSelectDDL.prototype._Itemdata);
        }
    };
    MultiSelectDDL.prototype.SubmitData = function (control) {
        var _Submitdata = new Array();
        var _Id = $(control).data("ddlid");
        var tabId = $("#tabs .ui-tabs-active").attr("aria-labelledby");
        $(control).parent().parent().parent().parent().find('#' + _Id + ' input[type=checkbox]').each(function () {
            if ($(this).is(':checked')) {
                _Submitdata.push($(this).val());
            }
        });
        var _Controller = $(control).data("controller");
        var _Action = $(control).data("action");
        var ids = _Submitdata.join(", ");
        $.ajax({
            url: "/" + _Controller + "/" + _Action,
            data: { selectedIds: ids },
            method: "GET",
            dataType: "json",
            success: function (data) {
                var tabName = $("#tabs .ui-tabs-active").attr("aria-controls");
                if (typeof tabId != 'undefined') {
                    if (tabName.indexOf("ui-id") > -1) {
                        var current_index = $("#tabs").tabs("option", "active");
                        $("#tabs").tabs('load', current_index);
                    }
                    else {
                        var controller = $("#" + tabName).attr("data-controller");
                        var action = $("#" + tabName).attr("data-method");
                        var paramname = $("#" + tabName).attr("data-parameter");
                        var paramvalue = $("#" + tabName).attr("data-paramvalue");
                        var values = {};
                        values[paramname] = paramvalue;
                        $.ajax({
                            url: "/" + controller + "/" + action,
                            data: values,
                            method: "GET",
                            success: function (response) {
                                CommonHelper.prototype.LoadHtmlByControl($("#" + tabName), '');
                                CommonHelper.prototype.LoadHtmlByControl($("#" + tabName), response);
                            }
                        });
                    }
                    //if (data.HasNoError)
                    //    Notification.prototype.DisplayNotificationMessagesHelper(data.Message, 'success', true, fadeOutTime);
                    //else
                    //    Notification.prototype.DisplayNotificationMessagesHelper(data.Message, 'error', true, fadeOutTime);
                }
                else {
                    location.reload();
                }
            },
            error: function (data) {
                console.log(data);
            }
        });
    };
    MultiSelectDDL.prototype.SortSuccesssCallback = function () {
        GridPager.prototype.SelectedPageSize(controlContext);
    };
    MultiSelectDDL.prototype.SortColumn = function (id, enable, controller, Action) {
        $("#" + id).sortable({
            // enable: enable,
            axis: "y",
            cursor: "move",
            containment: "#" + id,
            stop: function (event, ui) {
                controlContext = event.target;
                var ids = [];
                $("#" + id).find("li").each(function () {
                    ids.push(parseInt($(this).find(".btncheckbox").data("value")));
                });
                if (enable) {
                    $.ajax({
                        url: "/" + controller + "/" + Action,
                        method: "GET",
                        data: { id: ids.toString() },
                        dataType: "json",
                        success: function (data) {
                            ZnodeBase.prototype.executeFunctionByName("MultiSelectDDL.prototype.SortSuccesssCallback", window, data);
                        },
                        error: function (data) {
                            console.log(data);
                        }
                    });
                }
            }
        }).disableSelection();
    };
    return MultiSelectDDL;
}(ZnodeBase));
//# sourceMappingURL=ZnodeMultiSelect.js.map;
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var EditableText = /** @class */ (function (_super) {
    __extends(EditableText, _super);
    function EditableText() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    EditableText.prototype.DialogDelete = function (DataTarget, target) {
        if (target === void 0) { target = undefined; }
        var selectedIds = DynamicGrid.prototype.GetMultipleSelectedIds(target);
        if (selectedIds.length > 0) {
            $('#' + DataTarget + '').modal('show');
        }
        else {
            $('#NoCheckboxSelected').modal('show');
        }
    };
    return EditableText;
}(ZnodeBase));
//# sourceMappingURL=TextBoxEditorFor.js.map;
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
//Parses extended directives on the view and replaces them all with their own dynamic content.
//Extended Directives:
//<z-widget-ajax>...</z-widget-ajax>
var _znodeAjaxifyOnLoadAllSubscriptions = [];
var _znodeAjaxifyDirectives = [];
var _znodeAjaxifyDirectivesArray;
var _znodeAjaxifyOnLoadSubscriptions = [];
var ZnodeAjaxify = /** @class */ (function (_super) {
    __extends(ZnodeAjaxify, _super);
    function ZnodeAjaxify() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    ZnodeAjaxify.prototype.Init = function () {
    };
    //Applies this plug-in on per need basis and replace all the extended directives with their ajax place holders.
    ZnodeAjaxify.prototype.Apply = function (onLoadAllCallback, onLoadCallback) {
        if (onLoadAllCallback === void 0) { onLoadAllCallback = null; }
        if (onLoadCallback === void 0) { onLoadCallback = null; }
        _znodeAjaxifyDirectives = this._buildAjaxifiedDirectiveQueue();
        _znodeAjaxifyDirectivesArray = new _ZnodeAjaxifiedDirectives(_znodeAjaxifyDirectives);
        //Subscribe to the events to trigger supplied callbacks.
        if (onLoadCallback)
            this.OnLoad(onLoadCallback);
        if (onLoadAllCallback)
            this.OnLoadAll(onLoadAllCallback);
        _znodeAjaxifyDirectives.forEach(function (directive, index, array) {
            ZnodeAjaxify.prototype._renderDirective(directive, _znodeAjaxifyDirectivesArray);
        });
    };
    ZnodeAjaxify.prototype.OnLoadAll = function (callback) {
        _znodeAjaxifyOnLoadAllSubscriptions.push(callback);
    };
    ZnodeAjaxify.prototype.OnLoad = function (callback) {
        _znodeAjaxifyOnLoadSubscriptions.push(callback);
    };
    ZnodeAjaxify.prototype._renderDirective = function (directive, directivesArray) {
        var directiveType = directive.DirectiveType;
        switch (directiveType) {
            case 'widget':
                ZnodeAjaxify.prototype._renderWidget(directive, directivesArray);
                break;
            case 'partial':
                ZnodeAjaxify.prototype._renderPartial(directive, directivesArray);
                break;
            default:
                var identifier = directive.Identifier;
                console.error("Invalid 'type' provided for one of the '<z-**> tags having identifier '" + identifier + "'. Skipping this element.");
                break;
        }
    };
    ZnodeAjaxify.prototype._renderPartial = function (directive, directivesArray) {
        var actionName = $(directive.Directive).attr('data-actionName');
        var controllerName = $(directive.Directive).attr('data-controllerName');
        var parameters = JSON.parse($(directive.Directive).attr('data-parameters'));
        var identifier = $(directive.Directive).attr('data-identifier');
        var replaceTargetSelector = $(directive.Directive).attr('data-replaceTargetSelector');
        var url = '/' + controllerName + '/' + actionName;
        if (url && url.length > 0) {
            try {
                jQuery.get(url, parameters, function (data, status, jqXHR) {
                    if (jqXHR.status == 200) {
                        //Success.
                        $(directive.Directive).html(data);
                        // target can be any Element or other EventTarget.
                        ZnodeAjaxify.prototype._triggerLoadEvent(directive.Directive);
                        directive.MarkOnLoad();
                        directivesArray.MarkOnLoad();
                        if (directivesArray.IsLoaded == true)
                            ZnodeAjaxify.prototype._checkAndTriggerLoadAll();
                    }
                    if (replaceTargetSelector && replaceTargetSelector.length > 0) {
                        $.each($(replaceTargetSelector), function (index, replaceTargetElement) {
                            if (replaceTargetElement)
                                $(replaceTargetElement).empty();
                        });
                    }
                    $(directive.Directive).prev().hide();
                }, 'html');
            }
            catch ( //Additional routine here to run in case of failure 
            _a) { //Additional routine here to run in case of failure 
                $(directive.Directive).prev().hide();
            }
        }
        else
            console.error("'Url' can not be built for one of the '<z-**> tags having identifier '" + identifier + "'. Skipping this element.");
    };
    ZnodeAjaxify.prototype._renderWidget = function (directive, directivesArray) {
        var url = '/dynamicContent/widget';
        if (url && url.length > 0) {
            url += '?' + this._processDataParams(directive.Directive);
            try {
                jQuery.get(url, null, function (data, status, jqXHR) {
                    if (jqXHR.status == 200) {
                        //Success.
                        $(directive.Directive).html(data);
                        ZnodeAjaxify.prototype._triggerLoadEvent(directive.Directive);
                        directive.MarkOnLoad();
                        directivesArray.MarkOnLoad();
                        if (directivesArray.IsLoaded == true)
                            ZnodeAjaxify.prototype._checkAndTriggerLoadAll();
                    }
                    $(directive.Directive).prev().hide();
                }, 'html');
            }
            catch ( //Additional routine here to run in case of failure 
            _a) { //Additional routine here to run in case of failure 
                $(directive.Directive).prev().hide();
            }
        }
    };
    ZnodeAjaxify.prototype._processDataParams = function (element) {
        var uriParts = [];
        $.each($(element).data(), function (key, value) {
            uriParts.push(key + '=' + (ZnodeAjaxify.prototype._isObject(value) === true ? encodeURIComponent(JSON.stringify(value)) : value));
        });
        return uriParts.join('&');
    };
    ZnodeAjaxify.prototype._buildAjaxifiedDirectiveQueue = function () {
        var directiveArray = [];
        var extendedDirectives = ["z-widget-ajax", 'z-ajax'];
        extendedDirectives.forEach(function (value, i, array) {
            $(value).each(function (index, element) {
                directiveArray.push(new _ZnodeAjaxifiedDirective(element));
            });
        });
        return directiveArray;
    };
    ZnodeAjaxify.prototype._triggerLoadEvent = function (element) {
        var subscriptions = _znodeAjaxifyOnLoadSubscriptions;
        if (subscriptions && subscriptions.length > 0) {
            // Create the event.
            var event_1 = document.createEvent('CustomEvent');
            // Define that the event name is 'onZnodeDirectiveLoad'.
            event_1.initEvent('onZnodeDirectiveLoad', true, true);
            // Listen for the event.
            element.addEventListener('onZnodeDirectiveLoad', function (e) {
                // e.target matches elem
                subscriptions.forEach(function (callback, index, arr) {
                    callback(e);
                });
            }, false);
            element.dispatchEvent(event_1);
        }
    };
    ZnodeAjaxify.prototype._checkAndTriggerLoadAll = function () {
        var subscriptions = _znodeAjaxifyOnLoadAllSubscriptions;
        var directives = _znodeAjaxifyDirectives;
        directives.forEach(function (directive, index, arr) {
            if (directive.IsLoaded != true) {
                return;
            }
            //If it reaches here, all the directives have been loaded.
            // Create the event.
            var event = document.createEvent('CustomEvent');
            // Define that the event name is 'onZnodeDirectiveLoadAll'.
            event.initEvent('onZnodeDirectiveLoadAll', true, true);
            // Listen for the event.
            document.addEventListener('onZnodeDirectiveLoadAll', function (e) {
                // e.target matches elem
                subscriptions.forEach(function (callback, index, arr) {
                    callback(e);
                });
            }, false);
            document.dispatchEvent(event);
        });
    };
    ZnodeAjaxify.prototype._isObject = function (obj) {
        return obj !== undefined && obj !== null && obj.constructor == Object;
    };
    return ZnodeAjaxify;
}(ZnodeBase));
var _ZnodeAjaxifyEventModel = /** @class */ (function () {
    function _ZnodeAjaxifyEventModel(_event, _type) {
        this.Event = null;
        this.EventType = null;
        this.Event = _event;
        this.EventType = _type;
    }
    return _ZnodeAjaxifyEventModel;
}());
var _ZnodeAjaxifiedDirective = /** @class */ (function () {
    function _ZnodeAjaxifiedDirective(_directive) {
        this.Directive = null;
        this.DirectiveType = null;
        this.IsLoaded = false;
        this.Identifier = null;
        this.Directive = _directive;
        this.DirectiveType = $(_directive).attr('data-type').toLowerCase();
        this.Identifier = $(_directive).attr('data-identifier');
    }
    _ZnodeAjaxifiedDirective.prototype.MarkOnLoad = function () {
        this.IsLoaded = true;
    };
    return _ZnodeAjaxifiedDirective;
}());
var _ZnodeAjaxifiedDirectives = /** @class */ (function () {
    function _ZnodeAjaxifiedDirectives(_directives) {
        this.Directives = null;
        this.IsLoaded = false;
        this.Directives = _directives;
    }
    _ZnodeAjaxifiedDirectives.prototype.MarkOnLoad = function () {
        this.IsLoaded = true;
        for (var i = 0; i < this.Directives.length; i++) {
            if (this.Directives[i].IsLoaded == false) {
                this.IsLoaded = false;
                break;
            }
        }
    };
    return _ZnodeAjaxifiedDirectives;
}());
//# sourceMappingURL=ZnodeAjaxify.js.map;
var en = /** @class */ (function () {
    function en() {
        this.ErrorEmailAddress = "Please use a valid email address.";
        this.RequiredEmailId = "Email ID is required.";
        this.RequiredNumericValue = "Please enter a numeric value.";
        this.RequiredFirstName = "First name is required.";
        this.RequiredLastName = "Last name is required.";
        this.ErrorPhoneNumber = "Please enter valid phone number.";
        this.RequiredShippingAddress = "Please add shipping address.";
        this.RequiredBillingAddress = "Please add billing address.";
        this.SelectShippingOption = "Please select shipping option.";
        this.CustomerShippingError = "Please enter account number and shipping method.";
        this.SelectPaymentOption = "Please select payment option.";
        this.SelectCOD = "Please select COD if overdue amount is less than or equal to zero.";
        this.ErrorPaymentApplication = "There was a problem with your order creation. Please contact customer service.";
        this.ErrorPaymentAsNoGatewayAvailable = "Could not proceed with payment as no payment gateway is available with this selection.";
        this.ProcessingPayment = "Your payment is processing. Please wait and do not close this window.";
        this.SelectAtleastOneOrder = "At least one order should be selected.";
        this.SelectAtleastOneRecord = "Please select at least one record.";
        this.ErrorQuantity = "Please enter a valid quantity.";
        this.ErrorProcessOrder = "Failed to process order.";
        this.ErrorProcessOrderContactAdmin = "There was an issue processing your order.  Please contact customer service.";
        this.ErrorOrderPlacementCardDataMissing = "Error occurred during processing an order. Order could not be placed as card data is missing.";
        this.ErrorOrderPlacement = "Error occurred during processing order. Order could not be placed.";
        this.SelectCODForZeroOrderTotal = "Please select COD for zero order total.";
        this.ErrorProcessPayment = "Unable to process payment.";
        this.ErrorProductQuantity = "Please specify valid product quantity.";
        this.RequiredProductQuantity = "Please specify the quantity of product(s).";
        this.SuccessMailSending = "Email sent successfully";
        this.ErrorMailSending = "Error in mail sending.";
        this.ErrorValidSKU = "Please enter valid SKU.";
        this.ErrorValidQuantity = "Please enter a valid quantity.";
        this.ErrorWholeNumber = "Please enter whole number.";
        this.CallForPricing = "Call for pricing";
        this.ErrorSelectedQuantityExceedsMaxCartQuantity = "Selected quantity exceeds product maximum given current shopping cart quantities.";
        this.ErrorSelectedQuantityLessThanMinSpecifiedQuantity = "Selected quantity is less than minimum specified quantity.";
        this.ErrorAddToCartFromPDPOrQuickView = "This product can be added to cart only from product details page.";
        this.RequiredTemplateName = "Please enter template name.";
        this.EnterQuantityHaving = "Please enter quantity having ";
        this.XNumbersAfterDecimalPoint = " numbers after decimal point.";
        this.SelectedQuantityBetween = "Selected quantity should be between ";
        this.defaultMaxErrorMessage = "You have exceeded the maximum order quantity for this item. Please reduce the quantity and try again. ";
        this.defaultMinErrorMessage = "You’re almost there! Please adjust your order to meet the minimum quantity.";
        this.To = " to ";
        this.FullStop = ".";
        this.SelectedCardType = "The selected card type is of ";
        this.SelectCardNumberAndCardType = ".  Please check the credit card number and the card type.";
        this.ErrorProcessCreditCardPayment = "We were unable to process your credit card payment. <br /><br />Reason:<br />";
        this.ContactUsToCompleteOrder = "<br /><br />If the problem persists, contact us to complete your order.";
        this.EnterMinOrderOf = "Please enter minimum order of ";
        this.EnterMaxOrderOf = "Please enter maximum order of ";
        this.ErrorPriceNotSet = "Price is not set for this product.";
        this.ErrorRequiredPurchaseOrder = "Please enter purchase order number.";
        this.ErrorFileSizeMessage = "File size is too large. Maximum file size permitted is 5 MB.";
        this.ErrorFileTypeMessage = "Please use one of the following file types: JPG, JPEG, PNG, GIF, PDF, DOC, DOCX, PPT, XLS, ZIP, TTF, XLSX, ODT, TXT, or CSV.";
        this.ErrorExtensionNotAllowed = "Extension not allowed.";
        this.ErrorFileRequireMessage = "Please select file.";
        this.RequiredComment = "Comments are required.";
        this.ZipCodeError = "Please enter the Zip code.";
        this.ZipCodeMessage = "Please wait ...";
        this.NoShippingOptionsFound = "No shipping options found for this zip code. Please try another option.";
        this.RequiredPhoneNumber = "Phone number is required.";
        this.TextHome = "Home";
        this.ErrorFileRequired = "Please select a file.";
        this.ErrorStarRatingRequired = "Please provide a star rating for the product.";
        this.ErrorInventoryNotSet = "Out of stock";
        this.TemplateNameAlreadyExist = "Template name already exists.";
        this.CheckingInventory = "Checking Inventory ...";
        this.ErrorPurchaseOrderLength = "Purchase order number cannot exceed more than 50 characters.";
        this.LableBrand = "Brands";
        this.AllowedTerritories = "Some cart item are not permitted to ship to selected country.";
        this.EnterQuantityError = "Please enter the product quantity first";
        this.SelectCSVFileError = "Please select file with .csv extension only";
        this.FileNotPresentError = "File not present.";
        this.ErrorCSVFileTypeMessage = "Please select only CSV files.";
        this.ErrorBudgetAmount = "Budget Amount is required.";
        this.SelectApprovalUserId = "Please select approval name.";
        this.EmailAddressIsRequired = "Email Address is required.";
        this.SuccessResetPassword = "Your password reset link has been sent to your email address.";
        this.MinQuantityError = "We’re sorry, but you must order at least <MinimumOrderQuantity> of this product.";
        this.MinimumOrderQuantityPlaceholder = "<MinimumOrderQuantity>";
        this.RequiredUserName = "User name is required.";
        this.RequiredPassword = "Password is required.";
        this.RequiredConfirmPassword = "Re-type password is required.";
        this.FirstNameLengthErrorMessage = "First Name cannot be longer than 100 characters.";
        this.LastNameLengthErrorMessage = "Last Name cannot be longer than 100 characters.";
        this.AddToCartMessage = "Added to cart.";
        this.AddToCartErrorMessage = "Add to cart failed.";
        this.CartUpdateMessage = "Cart updated.";
        this.ConfirmShippingMethod = "Please confirm your shipping method";
        this.QuantityEnteredExceedsQuantityAvailable = "Quantity entered exceeds quantity available.";
        this.WhileSuppliesLast = "While supplies last.";
        this.PendingApproval = "Pending approval";
        this.RequiredRecipientName = "Recipient name is required.";
        this.PerOrderLimitFailed = "You have exceeded the per order limit. Please delete some of the items from cart or manage the quantity and try again. Your per order limit is  ";
        this.AnnualOrderLimitFailed = "You have exceeded the annual order limit. Please delete some of the items from cart or manage the quantity and try again. Your annual limit is";
        this.AddedToCartSucessMessage = "Added to cart<a href='/cart'>Click here</a> to view your shopping cart and checkout.";
        this.AddedToCartErrorMessage = "Failed to add the product.";
        this.ErrorProductRemoveFromWishList = "Product could not be removed from wishlist";
        this.RequiredLogoSelection = "Please select a logo.";
        this.ErrorCodeE00027 = "Valid address and Zip code must be entered.";
        this.BarcodeInvalidMessage = "Product not found";
        this.BarcodeLoadErrorMessage = "Unable to load scanner";
        this.ButtonPlaceOrder = "Place Order";
        this.ButtonApplePay = "Apple Pay";
        this.ButtonUpdateOrder = "Update Order";
        this.ErrorEnterGiftCardNumber = "Please enter voucher amount.";
        this.ErrorSelectAnotherPaymentMethod = "Please select at least one more payment method to complete the transaction.";
        this.ErrorRequiredVoucher = "Please enter valid voucher.";
        this.ErrorPleaseSelectOveragePaymentMethod = "Please select overage payment method.";
        this.TaxExemptErrorFileTypeMessage = "This file type is not supported. Please select another file of type JPG, PNG, EPS, AI, TIFF, or GIF.";
        this.LogoUploadSuccessMessage = "Your logo was successfully uploaded!";
        this.LogoUploadErrorMessage = "Your file was not uploaded as {artifiError}. Please try again or use a new file. If you continue to experience problems please use on site chat or call {supportContact} for help.";
        this.ArtifiErrorCode200 = "File started";
        this.ArtifiErrorCode206 = "Upload is in progress";
        this.ArtifiErrorCode201 = "File uploaded";
        this.ArtifiErrorCode413 = "File is bigger than maximum size limit";
        this.ArtifiErrorCode415 = "File type is invalid. Please use a JPG, PNG, EPS, AI, TIFF, or GIF file.";
        this.ArtifiErrorCode404 = "Unable to find upload image URL";
        this.ArtifiErrorCode400 = "The request is invalid";
        this.ArtifiErrorCode444 = "Error while uploading";
        this.ArtifiErrorCode500 = "Internal server error";
        this.PendingB2b = "PendingB2b";
        this.ReplaceLogo = "Drag and drop, click, or tap to replace.";
        this.QuantityIncreaseCCError = "Increase to quantity not allowed when using Credit Card Payment Method.";
        this.QuantityIncreaseMultiplePaymentError = "Increase to quantity not allowed when using Budget/Ecert method.";
        this.NumericZipCodeError = "Please enter numeric Zip Code.";
        this.ErrorVoucherAlreadyApplied = "Voucher is already applied.";
        this.ErrorNoVoucherApplied = "No further vouchers can be applied.";
        this.ErrorMaxQuantity = "Maximum quantity (";
        this.ErrorForCartRestriction = ") will be exceeded for this offer. Please review and revise quantity.";
        this.CustomizationRestrictMessage = "This item requires customization. Please add custom text to your product.";
        this.NotecardMaxErrorMessage = "Entered Quantity exceeds the available quantity of Gift Notecard. Please reduce the quantity and try again. ";
        this.NotecardMinErrorMessage = "All Notecard quantity is not allocated within the products. Please update the quantity. ";
        this.TextUpto = "(up to";
        this.PersonalizationNote = "NOTE: All sales are final for items that have been ordered with customization.";
        this.TextCustomizeAllItems = "Customize All Items";
        this.CategoryProductsLimitExceedMessage = "The item you are trying to add exceeds the limit ({categoryProductsLimit}) established for this category. Please edit your cart before trying again.";
        this.DataCaptureValidationButtonText = "Complete entry then click here.";
        this.ErrorStaplesPay = "Credit Card Details are Incorrect.";
        this.ShareEmailSuccessfullySent = "Share email successfully sent.";
        this.defaultCustomizedMinErrorMessage = "You have not met the customized minimum order quantity for this item. Please update the quantity.";
        this.defaultIndividualizedMinErrorMessage = "You have not met the individualized minimum order quantity for this item. Please update the quantity.";
        this.CustomizationRestrictMessageForMonogramming = "Individualized Text Required.";
        this.EmailAddressErrorMessage = "Email Address is required.";
        this.ShippingPostalCodeErrorMessage = "Shipping Postal/ZIP Code is required.";
        this.ErrorExceedsPointBudgetBalance = "Unable to add this item to your cart as it exceeds your points budget. Please adjust your cart and try again.";
        this.InvalidEmailAddressMessage = "Please enter valid email address.";
        this.InvalidShippingPostalCodeMessage = "Please enter valid shipping postal/zip code.";
        this.InvalidPromoCodeCoupon = "Invalid Coupon Code";
        this.AcceptedPromoCodeCoupon = "Coupon Successfully Applied.";
        this.SelectedBrand = "Selected Brand: ";
        this.ButtonSubmitForApproval = "Submit For Approval";
        this.CategoryDCValidationLabel1 = "This category is protected. Please enter your";
        this.CategoryDCValidationLabel2 = "in the field below to access.";
        this.AddToCartStollUpErrorMessage = "An error has occurred. Please refresh your page or reach out to customer service for assistance.";
        this.EmptyDataCaptureErrorMessage = "Please enter valid data in the required fields.";
        this.ErrorRequiredLogoUpload = "Are you sure you don't want to decorate at least one area?";
    }
    return en;
}());
//# sourceMappingURL=Resource.en.js.map;
var de = /** @class */ (function () {
    function de() {
        this.ErrorEmailAddress = "Please use a valid email address.";
        this.RequiredEmailId = "Email ID is required.";
        this.RequiredNumericValue = "Please enter numeric value.";
        this.RequiredFirstName = "First Name is required.";
        this.RequiredLastName = "Last Name is required.";
        this.ErrorPhoneNumber = "Enter valid phone number.";
        this.RequiredShippingAddress = "Please add shipping address.";
        this.RequiredBillingAddress = "Please add billing address.";
        this.SelectShippingOption = "Please select shipping option.";
        this.SelectPaymentOption = "Please select payment option";
        this.SelectCOD = "Please select COD for over due amount is less than or equals to zero.";
        this.ErrorPaymentApplication = "There was a problem with your order creation please contact customer service.";
        this.ErrorPaymentAsNoGatewayAvailable = "Could not proceed with payment as no payment gateway available with this selection.";
        this.ProcessingPayment = "Your payment is processing. Please wait and do not close this window.";
        this.SelectAtleastOneOrder = "At least one order should be selected.";
        this.SelectAtleastOneRecord = "Please select at least one record";
        this.ErrorQuantity = "Please enter valid quantity";
        this.ErrorProcessOrder = "Failed to process order";
        this.ErrorOrderPlacementCardDataMissing = "Error occurred during processing an order.Order could not be placed as card data is missing.";
        this.ErrorOrderPlacement = "Error occurred during processing order. Order could not be placed.";
        this.SelectCODForZeroOrderTotal = "Please select COD for Zero Order Total.";
        this.ErrorProcessPayment = "Unable to process Payment.";
        this.ErrorProductQuantity = "Please specify valid product quantity.";
        this.RequiredProductQuantity = "Please specify the quantity of product(s).";
        this.SuccessMailSending = "Mail sent successfully.";
        this.ErrorMailSending = "Error in mail sending.";
        this.ErrorValidSKU = "Please enter valid sku.";
        this.ErrorValidQuantity = "Enter valid quantity.";
        this.ErrorWholeNumber = "Enter whole number";
        this.CallForPricing = "Call for pricing";
        this.ErrorSelectedQuantityExceedsMaxCartQuantity = "Selected quantity exceeds product maximum given current Shopping Cart quantities.";
        this.ErrorSelectedQuantityLessThanMinSpecifiedQuantity = "Selected quantity is less than minimum specified quantity.";
        this.ErrorAddToCartFromPDPOrQuickView = "This product can be added to cart only from product details or quick view page.";
        this.RequiredTemplateName = "Please enter template name.";
        this.EnterQuantityHaving = "Please enter quantity having ";
        this.XNumbersAfterDecimalPoint = " numbers after decimal point.";
        this.SelectedQuantityBetween = "Selected quantity should be between ";
        this.To = " to ";
        this.FullStop = ".";
        this.SelectedCardType = "The selected card type is of ";
        this.SelectCardNumberAndCardType = ".  Please check the credit card number and the card type.";
        this.ErrorProcessCreditCardPayment = "We were unable to process your credit card payment. <br /><br />Reason:<br />";
        this.ContactUsToCompleteOrder = "<br /><br />If the problem persists, contact us to complete your order.";
        this.EnterMinOrderOf = "Please enter minimum Order of ";
        this.EnterMaxOrderOf = "Please enter maximum Order of ";
        this.QuoteItemsOutOfStockErrorMsg = "Items are out of stock can not proceed to Checkout page.";
        this.TemplateNameAlreadyExist = "Template name already exists.";
        this.CheckingInventory = "Checking Inventory...";
        this.LableBrand = "Brands";
        this.ErrorStaplesPay = "Credit Card Details are Incorrect.";
        this.ErrorValidationMessage = "Unable to save, atleast one allowed E-mail domain is required.";
        this.ErrorExceedsPointBudgetBalance = "Unable to add this item to your cart as it exceeds your points budget. Please adjust your cart and try again.";
    }
    return de;
}());
//# sourceMappingURL=Resource.de.js.map;
var fr = /** @class */ (function () {
    function fr() {
        this.ErrorEmailAddress = "Veuillez utiliser une adresse mail valide.";
        this.RequiredEmailId = "L'identifiant e-mail est requis.";
        this.RequiredNumericValue = "Veuillez saisir une valeur numérique.";
        this.RequiredFirstName = "Le prénom est requis.";
        this.RequiredLastName = "Le nom de famille est obligatoire.";
        this.ErrorPhoneNumber = "Entrez un numéro de téléphone valide.";
        this.RequiredShippingAddress = "Veuillez ajouter l'adresse de livraison.";
        this.RequiredBillingAddress = "Veuillez ajouter une adresse de facturation.";
        this.SelectShippingOption = "Veuillez sélectionner l'option d'expédition.";
        this.CustomerShippingError = "Veuillez saisir le numéro de compte et la méthode d'expédition.";
        this.SelectPaymentOption = "Veuillez sélectionner l'option de paiement.";
        this.SelectCOD = "Veuillez sélectionner COD car le montant en souffrance est inférieur ou égal à zéro.";
        this.ErrorPaymentApplication = "Impossible de contacter l'application de paiement.";
        this.ErrorPaymentAsNoGatewayAvailable = "Impossible de procéder au paiement car aucune passerelle de paiement n'est disponible avec cette sélection.";
        this.ProcessingPayment = "Votre paiement est en cours de traitement. Veuillez patienter et ne fermez pas cette fenêtre.";
        this.SelectAtleastOneOrder = "Au moins une commande doit être sélectionnée.";
        this.SelectAtleastOneRecord = "Veuillez sélectionner au moins un enregistrement.";
        this.ErrorQuantity = "Veuillez saisir une quantité valide.";
        this.ErrorProcessOrder = "Impossible de traiter la commande.";
        this.ErrorOrderPlacementCardDataMissing = "Une erreur s'est produite lors du traitement d'une commande. La commande n'a pas pu être passée car les données de la carte sont manquantes.";
        this.ErrorOrderPlacement = "Une erreur s'est produite lors du traitement de l'ordre. La commande n'a pas pu être passée.";
        this.SelectCODForZeroOrderTotal = "Veuillez sélectionner COD pour Zero Order Total.";
        this.ErrorProcessPayment = "Impossible de traiter le paiement.";
        this.ErrorProductQuantity = "Veuillez spécifier une quantité de produit valide.";
        this.RequiredProductQuantity = "Veuillez spécifier la quantité de produit (s).";
        this.SuccessMailSending = "E-mail envoyé avec succès";
        this.ErrorMailSending = "Erreur lors de l'envoi du courrier.";
        this.ErrorValidSKU = "Veuillez entrer une référence valide.";
        this.ErrorValidQuantity = "Entrez une quantité valide.";
        this.ErrorWholeNumber = "Entrez le nombre entier.";
        this.CallForPricing = "Appelez pour les prix";
        this.ErrorSelectedQuantityExceedsMaxCartQuantity = "La quantité sélectionnée dépasse le produit maximum compte tenu des quantités actuelles du panier.";
        this.ErrorSelectedQuantityLessThanMinSpecifiedQuantity = "La quantité sélectionnée est inférieure à la quantité minimale spécifiée.";
        this.ErrorAddToCartFromPDPOrQuickView = "Ce produit peut être ajouté au panier uniquement à partir des détails du produit ou de la page de vue rapide.";
        this.RequiredTemplateName = "Veuillez saisir le nom du modèle.";
        this.EnterQuantityHaving = "Veuillez saisir la quantité ayant";
        this.XNumbersAfterDecimalPoint = " chiffres après le point décimal.";
        this.SelectedQuantityBetween = "La quantité sélectionnée doit être comprise entre";
        this.defaultMaxErrorMessage = "Vous avez dépassé la quantité maximale de commande pour cet article. Veuillez réduire la quantité et réessayer.";
        this.defaultMinErrorMessage = "Vous n'avez pas atteint la quantité minimale de commande pour cet article. Veuillez mettre à jour la quantité.";
        this.To = " à ";
        this.FullStop = ".";
        this.SelectedCardType = "Le type de carte sélectionné est de";
        this.SelectCardNumberAndCardType = ". Veuillez vérifier le numéro de carte de crédit et le type de carte.";
        this.ErrorProcessCreditCardPayment = "Nous n'avons pas pu traiter votre paiement par carte de crédit. <br /><br />Raison:<br />";
        this.ContactUsToCompleteOrder = "<br /><br />Si le problème persiste, contactez-nous pour finaliser votre commande.";
        this.EnterMinOrderOf = "Veuillez saisir un minimum de commande de";
        this.EnterMaxOrderOf = "Veuillez saisir un ordre maximum de ";
        this.ErrorPriceNotSet = "Le prix n'est pas fixé pour ce produit.";
        this.ErrorRequiredPurchaseOrder = "Veuillez saisir le numéro du bon de commande.";
        this.ErrorFileSizeMessage = "La taille du fichier est trop grande. La taille de fichier maximale autorisée est de 5 Mo.";
        this.ErrorFileTypeMessage = "Veuillez sélectionner uniquement les fichiers JPG, JPEG, PNG, GIF, PDF, DOC, DOCX, PPT, XLS, ZIP, TTF, XLSX, ODT, TXT, CSV.";
        this.ErrorExtensionNotAllowed = "Extension non autorisée.";
        this.ErrorFileRequireMessage = "Veuillez sélectionner un fichier.";
        this.RequiredComment = "Des commentaires sont requis.";
        this.ZipCodeError = "Veuillez saisir le code postal.";
        this.ZipCodeMessage = "S'il vous plaît, attendez...";
        this.NoShippingOptionsFound = "Aucune option d'expédition trouvée pour ce code postal. Veuillez essayer une autre option.";
        this.RequiredPhoneNumber = "Le numéro de téléphone est requis.";
        this.TextHome = "Accueil";
        this.ErrorFileRequired = "Veuillez sélectionner un fichier.";
        this.ErrorStarRatingRequired = "Veuillez indiquer le nombre d'étoiles du produit.";
        this.ErrorInventoryNotSet = "En rupture de stock";
        this.TemplateNameAlreadyExist = "Le nom du modèle existe déjà.";
        this.CheckingInventory = "Vérification de l'inventaire ...";
        this.ErrorPurchaseOrderLength = "Le numéro du bon de commande ne doit pas dépasser plus de 50 caractères.";
        this.LableBrand = "Marques";
        this.AllowedTerritories = "Certains articles du panier ne sont pas autorisés à être expédiés dans le pays sélectionné.";
        this.EnterQuantityError = "Veuillez d'abord saisir la quantité du produit";
        this.SelectCSVFileError = "Veuillez sélectionner un fichier avec l'extension .csv uniquement";
        this.FileNotPresentError = "Fichier non présent.";
        this.ErrorCSVFileTypeMessage = "Veuillez sélectionner uniquement le fichier CSV.";
        this.ErrorBudgetAmount = "Le montant du budget est requis.";
        this.SelectApprovalUserId = "Veuillez sélectionner le nom de l'approbation.";
        this.EmailAddressIsRequired = "Adresse e-mail est nécessaire.";
        this.SuccessResetPassword = "Votre lien de réinitialisation de mot de passe a été envoyé à votre adresse e-mail.";
        this.MinQuantityError = "Nous sommes désolés, mais vous devez commander au moins<Quantité minimum d'achat> de ce produit.";
        this.MinimumOrderQuantityPlaceholder = "<Quantité minimum d'achat>";
        this.RequiredUserName = "Nom d'utilisateur est nécessaire.";
        this.RequiredPassword = "Mot de passe requis.";
        this.RequiredConfirmPassword = "Un nouveau mot de passe est requis.";
        this.FirstNameLengthErrorMessage = "Le prénom ne peut pas dépasser 100 caractères.";
        this.LastNameLengthErrorMessage = "Le nom de famille ne peut pas dépasser 100 caractères.";
        this.AddToCartMessage = "Ajouté au panier.";
        this.AddToCartErrorMessage = "Le panier a échoué.";
        this.CartUpdateMessage = "Panier mis à jour.";
        this.ConfirmShippingMethod = "Veuillez confirmer votre méthode d'expédition";
        this.QuantityEnteredExceedsQuantityAvailable = "La quantité saisie dépasse la quantité disponible.";
        this.WhileSuppliesLast = "Jusqu'à épuisement des stocks.";
        this.PendingApproval = "EN ATTENTE DE VALIDATION";
        this.RequiredRecipientName = "Le nom du destinataire est requis.";
        this.PerOrderLimitFailed = "Vous avez dépassé la limite par commande. Veuillez supprimer certains articles du panier ou gérer la quantité et réessayer. Votre limite par commande est";
        this.AnnualOrderLimitFailed = "Vous avez dépassé la limite de commande annuelle. Veuillez supprimer certains articles du panier ou gérer la quantité et réessayer. Votre limite annuelle est";
        this.AddedToCartSucessMessage = "Ajouté au panier<a href='/cart'>Cliquez ici</a> pour afficher votre panier et passer à la caisse.";
        this.AddedToCartErrorMessage = "Échec de l'ajout du produit.";
        this.ErrorProductRemoveFromWishList = "Le produit n'a pas pu être retiré de la liste de souhaits";
        this.RequiredLogoSelection = "Veuillez sélectionner un logo.";
        this.ErrorCodeE00027 = "Une adresse et un code postal valides doivent être saisis.";
        this.BarcodeInvalidMessage = "Produit non trouvé";
        this.BarcodeLoadErrorMessage = "Impossible de charger le scanner";
        this.ButtonPlaceOrder = "Passer la commande";
        this.ButtonUpdateOrder = "Mise à jour de la commande";
        this.LogoUploadSuccessMessage = "Your logo has been successfully uploaded!";
        this.LogoUploadErrorMessage = "Your file was not uploaded as {artifiError}. Please try again or use a new file. If you continue to experience problems please use on site chat or call {supportContact} for help.";
        this.ArtifiErrorCode200 = "File started";
        this.ArtifiErrorCode206 = "Upload is in progress";
        this.ArtifiErrorCode201 = "File uploaded";
        this.ArtifiErrorCode413 = "File is bigger than maximum size limit";
        this.ArtifiErrorCode415 = "File type is invalid";
        this.ArtifiErrorCode404 = "Unable to find upload image URL";
        this.ArtifiErrorCode400 = "The request is invalid";
        this.ArtifiErrorCode444 = "Error while uploading";
        this.ArtifiErrorCode500 = "Internal server error";
        this.CustomizationRestrictMessage = "Cet article requiert une personnalisation. Veuillez ajouter le texte personnalisé à votre produit.";
        this.NotecardMaxErrorMessage = "La quantité saisie dépasse la quantité disponible de cartes-cadeaux. Veuillez réduire la quantité et réessayer. ";
        this.NotecardMinErrorMessage = "Toute la quantité de Notecard n'est pas allouée dans les produits. Veuillez mettre à jour la quantité. ";
        this.TextUpto = "(maximum";
        this.PersonalizationNote = "REMARQUE: Toutes les ventes sont finales pour les articles commandés avec une personnalisation.";
        this.TextCustomizeAllItems = "Personnaliser tous les articles";
        this.CategoryProductsLimitExceedMessage = "L’article que vous tentez d’ajouter dépasse la limite de ({categoryProductsLimit}) établie pour cette catégorie. Veuillez modifier votre panier avant d’essayer à nouveau.";
        this.ErrorStaplesPay = "Credit Card Details are Incorrect.";
        this.DataCaptureValidationButtonText = "Complétez la saisie puis cliquez ici.";
        this.ShareEmailSuccessfullySent = "Courriel de partage envoyé avec succès.";
        this.defaultCustomizedMinErrorMessage = "Vous n’avez pas atteint la quantité minimale requise pour commander cet article personnalisé. Veuillez mettre à jour la quantité.";
        this.defaultIndividualizedMinErrorMessage = "Vous n’avez pas atteint la quantité minimale requise pour commander cet article individualisé. Veuillez mettre à jour la quantité.";
        this.CustomizationRestrictMessageForMonogramming = "Texte de personnalisation individuelle requis.";
        this.EmailAddressErrorMessage = "Adresse e-mail est nécessaire.";
        this.ShippingPostalCodeErrorMessage = "Le code postal / ZIP de livraison est requis.";
        this.ErrorExceedsPointBudgetBalance = "Impossible d'ajouter cet article à votre panier car il dépasse votre budget de points. Veuillez ajuster votre panier et réessayer.";
        this.InvalidEmailAddressMessage = "Veuillez saisir une adresse e-mail valide.";
        this.InvalidShippingPostalCodeMessage = "Veuillez saisir un code postal d'expédition valide..";
        this.InvalidPromoCodeCoupon = "Code promo invalide";
        this.AcceptedPromoCodeCoupon = "Code promo ajouté avec succès.";
        this.SelectedBrand = "Marque sélectionnée: ";
        this.ButtonSubmitForApproval = "Soumettre pour approbation";
        this.CategoryDCValidationLabel1 = "Cette catégorie est protégée. Veuillez saisir votre";
        this.CategoryDCValidationLabel2 = "dans le champ ci-dessous pour obtenir l'accès.";
        this.AddToCartStollUpErrorMessage = "Une erreur est survenue. S'il vous plaît actualiser votre page ou communiquer avec un représentant du service à la clientèle pour obtenir de l'aide.";
        this.ErrorPleaseSelectOveragePaymentMethod = "Veuillez sélectionner le mode de paiement excédentaire.";
        this.ErrorRequiredLogoUpload = "Vous devez ajouter au moins un emplacement de décoration à votre article.";
        this.ErrorMaxQuantity = "L’article que vous tentez d’ajouter dépasse la limite de (";
        this.ErrorForCartRestriction = ") établie pour cette catégorie. Veuillez modifier votre panier avant d’essayer à nouveau.";
    }
    return fr;
}());
//# sourceMappingURL=Resource.fr.js.map;
var ja = /** @class */ (function () {
    function ja() {
        this.ErrorEmailAddress = "有効なメールアドレスを使用してください。";
        this.RequiredEmailId = "メールIDが必要です。";
        this.RequiredNumericValue = "数値を入力してください。";
        this.RequiredFirstName = "名は必須です。";
        this.RequiredLastName = "姓が必要です。";
        this.ErrorPhoneNumber = "有効な電話番号を入力してください。";
        this.RequiredShippingAddress = "配送先住所を追加してください。";
        this.RequiredBillingAddress = "請求先住所を追加してください。";
        this.SelectShippingOption = "配送オプションを選択してください。";
        this.CustomerShippingError = "口座番号と配送方法を入力してください。";
        this.SelectPaymentOption = "支払いオプションを選択してください。";
        this.SelectCOD = "超過金額がゼロ以下の場合は、代金引換を選択してください。";
        this.ErrorPaymentApplication = "ペイメントアプリケーションに接続できません。";
        this.ErrorPaymentAsNoGatewayAvailable = "この選択では利用可能な支払いゲートウェイがないため、支払いを続行できませんでした。";
        this.ProcessingPayment = "お支払いを処理しています。このウィンドウを閉じないでください。";
        this.SelectAtleastOneOrder = "少なくとも1つのオーダーを選択する必要があります。";
        this.SelectAtleastOneRecord = "少なくとも1つのレコードを選択してください。";
        this.ErrorQuantity = "有効な数量を入力してください。";
        this.ErrorProcessOrder = "注文の処理に失敗しました。";
        this.ErrorOrderPlacementCardDataMissing = "注文の処理中にエラーが発生しました。カードのデータがないため、注文できませんでした。";
        this.ErrorOrderPlacement = "注文の処理中にエラーが発生しました。注文できませんでした。";
        this.SelectCODForZeroOrderTotal = "ゼロ注文合計のCODを選択してください。";
        this.ErrorProcessPayment = "支払いを処理できません。";
        this.ErrorProductQuantity = "有効な製品数量を指定してください。";
        this.RequiredProductQuantity = "製品の数量を指定してください。";
        this.SuccessMailSending = "電子メールを正常に送信";
        this.ErrorMailSending = "メール送信エラー。";
        this.ErrorValidSKU = "有効なSKUを入力してください。";
        this.ErrorValidQuantity = "有効な数量を入力してください。";
        this.ErrorWholeNumber = "整数を入力してください。";
        this.CallForPricing = "価格の問い合わせ";
        this.ErrorSelectedQuantityExceedsMaxCartQuantity = "選択された数量は、現在のショッピングカートの数量の最大値を超えています。";
        this.ErrorSelectedQuantityLessThanMinSpecifiedQuantity = "選択した数量は、指定された最小数量未満です。";
        this.ErrorAddToCartFromPDPOrQuickView = "この製品は、製品の詳細またはクイックビューページからのみカートに追加できます。";
        this.RequiredTemplateName = "テンプレート名を入力してください。";
        this.EnterQuantityHaving = "持っている数量を入力してください";
        this.XNumbersAfterDecimalPoint = " 小数点以下の数値。";
        this.SelectedQuantityBetween = "選択した数量は";
        this.defaultMaxErrorMessage = "このアイテムの最大注文数量を超えました。数量を減らして、もう一度お試しください。 ";
        this.defaultMinErrorMessage = "このアイテムの最小注文数量に達していません。数量を更新してください。 ";
        this.To = " に ";
        this.FullStop = ".";
        this.SelectedCardType = "選択したカードタイプは";
        this.SelectCardNumberAndCardType = "。クレジットカード番号とカードタイプをご確認ください。";
        this.ErrorProcessCreditCardPayment = "クレジットカードでのお支払いを処理できませんでした。 <br /><br />理由：<br />";
        this.ContactUsToCompleteOrder = "<br /><br />問題が解決しない場合は、ご連絡の上、ご注文を完了してください。";
        this.EnterMinOrderOf = "最小注文数を入力してください";
        this.EnterMaxOrderOf = "最大注文数を入力してください ";
        this.ErrorPriceNotSet = "この商品には価格が設定されていません。";
        this.ErrorRequiredPurchaseOrder = "注文番号を入力してください。";
        this.ErrorFileSizeMessage = "ファイルサイズが大きすぎます。許可される最大ファイルサイズは5 MBです。";
        this.ErrorFileTypeMessage = "JPG、JPEG、PNG、GIF、PDF、DOC、DOCX、PPT、XLS、ZIP、TTF、XLSX、ODT、TXT、CSVファイルのみを選択してください。";
        this.ErrorExtensionNotAllowed = "延長は許可されていません。";
        this.ErrorFileRequireMessage = "ファイルを選択してください。";
        this.RequiredComment = "コメントが必要です。";
        this.ZipCodeError = "郵便番号を入力してください。";
        this.ZipCodeMessage = "お待ちください...";
        this.NoShippingOptionsFound = "この郵便番号の配送オプションは見つかりませんでした。別のオプションを試してください。";
        this.RequiredPhoneNumber = "電話番号が必要です。";
        this.TextHome = "ホーム";
        this.ErrorFileRequired = "ファイルを選択してください。";
        this.ErrorStarRatingRequired = "製品の星評価を提供してください。";
        this.ErrorInventoryNotSet = "在庫切れ";
        this.TemplateNameAlreadyExist = "テンプレート名は既に存在します。";
        this.CheckingInventory = "在庫を確認しています...";
        this.ErrorPurchaseOrderLength = "注文書番号は50文字を超えることはできません。";
        this.LableBrand = "ブランド";
        this.AllowedTerritories = "一部のカートアイテムは選択した国への発送が許可されていません。";
        this.EnterQuantityError = "最初に製品の数量を入力してください";
        this.SelectCSVFileError = "拡張子が.csvのファイルのみを選択してください";
        this.FileNotPresentError = "ファイルがありません。";
        this.ErrorCSVFileTypeMessage = "CSVファイルのみを選択してください。";
        this.ErrorBudgetAmount = "予算額が必要です。";
        this.SelectApprovalUserId = "承認名を選択してください。";
        this.EmailAddressIsRequired = "メールアドレスが必要です。";
        this.SuccessResetPassword = "パスワードリセットリンクがメールアドレスに送信されました。";
        this.MinQuantityError = "申し訳ありませんが、少なくとも注文する必要があります <最小注文数量> この製品の。";
        this.MinimumOrderQuantityPlaceholder = "<最小注文数量>";
        this.RequiredUserName = "ユーザー名が必要です。";
        this.RequiredPassword = "パスワードが必要です。";
        this.RequiredConfirmPassword = "パスワードの再入力が必要です。";
        this.FirstNameLengthErrorMessage = "名は100文字以下にする必要があります。";
        this.LastNameLengthErrorMessage = "姓は100文字以下にする必要があります。";
        this.AddToCartMessage = "カートに追加しました。";
        this.AddToCartErrorMessage = "カートに追加できませんでした。";
        this.CartUpdateMessage = "カートを更新しました。";
        this.ConfirmShippingMethod = "配送方法をご確認ください";
        this.QuantityEnteredExceedsQuantityAvailable = "入力した数量が利用可能な数量を超えています。";
        this.WhileSuppliesLast = "供給が続く間。";
        this.PendingApproval = "承認待ちの";
        this.RequiredRecipientName = "受信者名は必須です。";
        this.PerOrderLimitFailed = "注文あたりの制限を超えました。カートから一部の商品を削除するか、数量を管理して、もう一度お試しください。注文あたりの制限は ";
        this.AnnualOrderLimitFailed = "年間注文制限を超えました。カートから一部の商品を削除するか、数量を管理して、もう一度お試しください。あなたの年間制限は";
        this.AddedToCartSucessMessage = "カートに追加<a href='/cart'>ここをクリック</a> ショッピングカートとチェックアウトを表示します。";
        this.AddedToCartErrorMessage = "製品の追加に失敗しました。";
        this.ErrorProductRemoveFromWishList = "製品をウィッシュリストから削除できませんでした";
        this.RequiredLogoSelection = "ロゴを選択してください。";
        this.ErrorCodeE00027 = "有効な住所と郵便番号を入力する必要があります。";
        this.BarcodeInvalidMessage = "製品が見つかりません";
        this.BarcodeLoadErrorMessage = "スキャナーを読み込めません";
        this.ButtonPlaceOrder = "注文する";
        this.ButtonUpdateOrder = "Update Order";
        this.LogoUploadSuccessMessage = "Your logo has been successfully uploaded!";
        this.LogoUploadErrorMessage = "Your file was not uploaded as {artifiError}. Please try again or use a new file. If you continue to experience problems please use on site chat or call {supportContact} for help.";
        this.ArtifiErrorCode200 = "File started";
        this.ArtifiErrorCode206 = "Upload is in progress";
        this.ArtifiErrorCode201 = "File uploaded";
        this.ArtifiErrorCode413 = "File is bigger than maximum size limit";
        this.ArtifiErrorCode415 = "File type is invalid";
        this.ArtifiErrorCode404 = "Unable to find upload image URL";
        this.ArtifiErrorCode400 = "The request is invalid";
        this.ArtifiErrorCode444 = "Error while uploading";
        this.ArtifiErrorCode500 = "Internal server error";
        this.CustomizationRestrictMessage = "このアイテムはカスタマイズが必要です。製品にカスタムテキストを追加してください。";
        this.TextUpto = "(まで";
        this.CategoryProductsLimitExceedMessage = "The item you are trying to add exceeds the limit ({categoryProductsLimit}) established for this category. Please edit your cart before trying again.";
        this.ErrorStaplesPay = "Credit Card Details are Incorrect.";
        this.DataCaptureValidationButtonText = "入力を完了してから、ここをクリックしてください。";
        this.defaultCustomizedMinErrorMessage = "You have not met the customized minimum order quantity for this item. Please update the quantity.";
        this.defaultIndividualizedMinErrorMessage = "You have not met the individualized minimum order quantity for this item. Please update the quantity.";
        this.ErrorExceedsPointBudgetBalance = "ポイント予算を超えているため、このアイテムをカートに追加できません。カートを調整して、もう一度お試しください。";
        this.CategoryDCValidationLabel1 = "This category is protected. Please enter your";
        this.CategoryDCValidationLabel2 = "in the field below to access.";
        this.ErrorPleaseSelectOveragePaymentMethod = "超過分の支払い方法を選択してください。";
    }
    return ja;
}());
//# sourceMappingURL=Resource.ja.js.map;
