{"version":3,"file":"primeng-utils.umd.js","sources":["../../src/app/components/utils/objectutils.ts","../../src/app/components/utils/uniquecomponentid.ts","../../src/app/components/utils/primeng-utils.ts"],"sourcesContent":["export class ObjectUtils {\n\n public static equals(obj1: any, obj2: any, field?: string): boolean {\n if (field)\n return (this.resolveFieldData(obj1, field) === this.resolveFieldData(obj2, field));\n else\n return this.equalsByValue(obj1, obj2);\n }\n\n public static equalsByValue(obj1: any, obj2: any): boolean {\n if (obj1 === obj2) return true;\n\n if (obj1 && obj2 && typeof obj1 == 'object' && typeof obj2 == 'object') {\n var arrA = Array.isArray(obj1)\n , arrB = Array.isArray(obj2)\n , i\n , length\n , key;\n\n if (arrA && arrB) {\n length = obj1.length;\n if (length != obj2.length) return false;\n for (i = length; i-- !== 0;)\n if (!this.equalsByValue(obj1[i], obj2[i])) return false;\n return true;\n }\n\n if (arrA != arrB) return false;\n\n var dateA = obj1 instanceof Date\n , dateB = obj2 instanceof Date;\n if (dateA != dateB) return false;\n if (dateA && dateB) return obj1.getTime() == obj2.getTime();\n\n var regexpA = obj1 instanceof RegExp\n , regexpB = obj2 instanceof RegExp;\n if (regexpA != regexpB) return false;\n if (regexpA && regexpB) return obj1.toString() == obj2.toString();\n\n var keys = Object.keys(obj1);\n length = keys.length;\n\n if (length !== Object.keys(obj2).length)\n return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(obj2, keys[i])) return false;\n\n for (i = length; i-- !== 0;) {\n key = keys[i];\n if (!this.equalsByValue(obj1[key], obj2[key])) return false;\n }\n\n return true;\n }\n\n return obj1 !== obj1 && obj2 !== obj2;\n }\n\n public static resolveFieldData(data: any, field: any): any {\n if (data && field) {\n if (this.isFunction(field)) {\n return field(data);\n }\n else if (field.indexOf('.') == -1) {\n return data[field];\n }\n else {\n let fields: string[] = field.split('.');\n let value = data;\n for(let i = 0, len = fields.length; i < len; ++i) {\n if (value == null) {\n return null;\n }\n value = value[fields[i]];\n }\n return value;\n }\n }\n else {\n return null;\n }\n }\n\n public static isFunction(obj: any) {\n return !!(obj && obj.constructor && obj.call && obj.apply);\n }\n\n public static reorderArray(value: any[], from: number, to: number) {\n let target: number;\n if (value && from !== to) {\n if (to >= value.length) {\n to %= value.length;\n from %= value.length;\n }\n value.splice(to, 0, value.splice(from, 1)[0]);\n }\n }\n\n public static insertIntoOrderedArray(item: any, index: number, arr: any[], sourceArr: any[]): void {\n if (arr.length > 0) {\n let injected = false;\n for(let i = 0; i < arr.length; i++) {\n let currentItemIndex = this.findIndexInList(arr[i], sourceArr);\n if (currentItemIndex > index) {\n arr.splice(i, 0, item);\n injected = true;\n break;\n }\n }\n\n if (!injected) {\n arr.push(item);\n }\n }\n else {\n arr.push(item);\n }\n }\n\n public static findIndexInList(item: any, list: any): number {\n let index: number = -1;\n\n if (list) {\n for(let i = 0; i < list.length; i++) {\n if (list[i] == item) {\n index = i;\n break;\n }\n }\n }\n\n return index;\n }\n\n public static removeAccents(str) {\n if (str && str.search(/[\\xC0-\\xFF]/g) > -1) {\n str = str\n .replace(/[\\xC0-\\xC5]/g, \"A\")\n .replace(/[\\xC6]/g, \"AE\")\n .replace(/[\\xC7]/g, \"C\")\n .replace(/[\\xC8-\\xCB]/g, \"E\")\n .replace(/[\\xCC-\\xCF]/g, \"I\")\n .replace(/[\\xD0]/g, \"D\")\n .replace(/[\\xD1]/g, \"N\")\n .replace(/[\\xD2-\\xD6\\xD8]/g, \"O\")\n .replace(/[\\xD9-\\xDC]/g, \"U\")\n .replace(/[\\xDD]/g, \"Y\")\n .replace(/[\\xDE]/g, \"P\")\n .replace(/[\\xE0-\\xE5]/g, \"a\")\n .replace(/[\\xE6]/g, \"ae\")\n .replace(/[\\xE7]/g, \"c\")\n .replace(/[\\xE8-\\xEB]/g, \"e\")\n .replace(/[\\xEC-\\xEF]/g, \"i\")\n .replace(/[\\xF1]/g, \"n\")\n .replace(/[\\xF2-\\xF6\\xF8]/g, \"o\")\n .replace(/[\\xF9-\\xFC]/g, \"u\")\n .replace(/[\\xFE]/g, \"p\")\n .replace(/[\\xFD\\xFF]/g, \"y\");\n }\n \n return str;\n }\n}\n","\nexport var lastId = 0;\n\nexport function UniqueComponentId () {\n let prefix = 'pr_id_';\n lastId++;\n return `${prefix}${lastId}`;\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["lastId"],"mappings":";;;;;;;QAAA;SAmKC;QAjKiB,kBAAM,GAAb,UAAc,IAAS,EAAE,IAAS,EAAE,KAAc;YACrD,IAAI,KAAK;gBACL,QAAQ,IAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE,KAAK,CAAC,KAAK,IAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE;;gBAEnF,OAAO,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;SAC7C;QAEa,yBAAa,GAApB,UAAqB,IAAS,EAAE,IAAS;YAC5C,IAAI,IAAI,KAAK,IAAI;gBAAE,OAAO,IAAI,CAAC;YAE/B,IAAI,IAAI,IAAI,IAAI,IAAI,OAAO,IAAI,IAAI,QAAQ,IAAI,OAAO,IAAI,IAAI,QAAQ,EAAE;gBACpE,IAAI,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EACxB,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAC1B,CAAC,EACD,MAAM,EACN,GAAG,CAAC;gBAEV,IAAI,IAAI,IAAI,IAAI,EAAE;oBACd,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;oBACrB,IAAI,MAAM,IAAI,IAAI,CAAC,MAAM;wBAAE,OAAO,KAAK,CAAC;oBACxC,KAAK,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE,KAAK,CAAC;wBACtB,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;4BAAE,OAAO,KAAK,CAAC;oBAC5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