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ACpC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QAC9E,CAAC,CAAC;QAEF,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,UAAU,KAAK,EAAE,OAAO;YAClD,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;QAChE,CAAC,CAAC;QAEF,CAAC,CAAC;YACE,CAAC,CAAC,yBAAyB,CAAC,CAAC,OAAO,EAAE,CAAC;YACvC,CAAC,CAAC,UAAU,CAAC,WAAW,CAAC;gBACrB,UAAU,EAAE,QAAQ;gBACpB,QAAQ,EAAE,CAAC;aACd,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;QAEH,IAAI,eAAe,GAAG;YAClB,CAAC,CAAC,2BAA2B,CAAC,CAAC,EAAE,CAAC,OAAO,EAAE;gBACvC,CAAC,CAAC,IAAI,CAAC;oBACH,GAAG,EAAE,iBAAiB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC;iBACjD,CAAC,CAAC,IAAI,CAAC;oBACJ,QAAQ,CAAC,MAAM,EAAE,CAAC;gBACtB,CAAC,CAAC,CAAC;YACP,CAAC,CAAC,CAAC;QACP,CAAC,CAAC;QAEF,eAAe,EAAE,CAAC;IACtB,CAAC,EAnCa,IAAI,GAAJ,WAAI,KAAJ,WAAI,QAmCjB;AAAD,CAAC,EAnCM,MAAM,KAAN,MAAM,QAmCZ","file":"kaliaa.bundle.default.js","sourcesContent":["module Kaliaa.Tools {\r\n export var isUploadSupported = function () {\r\n if (navigator.userAgent.match(/(Android (1.0|1.1|1.5|1.6|2.0|2.1))|(Windows Phone (OS 7|8.0))|(XBLWP)|(ZuneWP)|(w(eb)?OSBrowser)|(webOS)|(Kindle\\/(1.0|2.0|2.5|3.0))/)) {\r\n return false;\r\n }\r\n\r\n var elem = document.createElement('input');\r\n elem.type = 'file';\r\n return !elem.disabled;\r\n };\r\n}","/// \r\nvar Globalize; // temporary solution\r\n\r\nmodule Kaliaa.Init {\r\n Globalize.culture(\"fi-FI\");\r\n\r\n $.validator.methods[\"number\"] = function (value, element) {\r\n return this.optional(element) || (value.indexOf('.') === -1 && !isNaN(Globalize.parseFloat(value)));\r\n };\r\n\r\n $.validator.methods[\"range\"] = function (value, element, param) {\r\n value = Globalize.parseFloat(value);\r\n return this.optional(element) || (value >= param[0] && value <= param[1]);\r\n };\r\n\r\n $.validator.methods[\"date\"] = function (value, element) {\r\n return this.optional(element) || Globalize.parseDate(value);\r\n };\r\n\r\n $(() => {\r\n $('[data-toggle=\"tooltip\"]').tooltip();\r\n $.datepicker.setDefaults({\r\n dateFormat: \"d.m.yy\",\r\n firstDay: 1\r\n });\r\n });\r\n\r\n var setModeSelector = () => {\r\n $(\"#mode-selector a.inactive\").on(\"click\", function () {\r\n $.ajax({\r\n url: \"/Groups/Select/\" + $(this).data(\"value\")\r\n }).done(() => {\r\n location.reload();\r\n });\r\n });\r\n };\r\n\r\n setModeSelector();\r\n}"]}