ice-utilities
Version:
Utilities for manage arrays, breadcrumb, dom elements, dates, injectors, local storage, login, objects, router animations, router, session storage, strings and translate utilities, encryption, for angular 6+ with ECMAScript 6 - ECMAScript 2015
2 lines • 21.1 kB
JavaScript
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("simple-crypto-js/src/SimpleCrypto"),require("devextreme/ui/notify"),require("@angular/router"),require("@angular/core"),require("@angular/animations")):"function"==typeof define&&define.amd?define("ice-utilities",["exports","simple-crypto-js/src/SimpleCrypto","devextreme/ui/notify","@angular/router","@angular/core","@angular/animations"],e):e(t["ice-utilities"]={},t.SimpleCrypto,t.notify,t.ng.router,t.ng.core,t.ng.animations)}(this,function(t,e,r,o,n,i){"use strict";e=e&&e.hasOwnProperty("default")?e["default"]:e,r=r&&r.hasOwnProperty("default")?r["default"]:r;var s=function(){return(s=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function a(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(r=o.next()).done;)s.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(n=o["return"])&&n.call(o)}finally{if(i)throw i.error}}return s}function u(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(a(arguments[e]));return t}var c=function(){function t(){}return t.isObject=function(t){return"object"==typeof t},t.isEmpty=function(t){return this.isObject(t)&&JSON.stringify(t)===JSON.stringify({})},t.isEmptyCircular=function(t){var e=!0;return Object.keys(t).forEach(function(t){e=!1}),e},t.copyNestedObject=function(t){return s({},t)},t.copyObject=function(t){return this.copyNestedObject(t)},t.objectToNum=function(e){var n={};Object.keys(e).forEach(function(t){n[t]=+e[t]})},t.merge=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),s({},t,e)},t}(),l=function(){function t(){}return t.setKey=function(t){t&&null!==t&&0<t.length&&(this._key=t,this._SimpleCrypto=new e(this._key))},t.hasEncryption=function(){return this._key&&0<this._key.length&&this._SimpleCrypto},t.encrypt=function(t){return this.hasEncryption()&&t&&null!==t?this._SimpleCrypto.encrypt(t):""},t.decrypt=function(t){if(this.hasEncryption()&&t&&null!==t&&0<t.length){var e=this._SimpleCrypto.decrypt(t);try{e=JSON.parse(e)}catch(n){}return e}return null},t.generateKey=function(){return e.generateRandom()},t}(),f=function(){function t(){}return t.codeKey=function(t){return btoa(t.toUpperCase())},t.setSession=function(t,e){if(l.hasEncryption())sessionStorage.setItem(this.codeKey(t),l.encrypt(e));else{var n=void 0;n=c.isObject(e)?JSON.stringify(e):e,sessionStorage.setItem(t,n)}},t.deleteSession=function(t){l.hasEncryption()?sessionStorage.removeItem(this.codeKey(t)):sessionStorage.removeItem(t)},t.getSession=function(t){if(l.hasEncryption())return l.decrypt(sessionStorage.getItem(this.codeKey(t)));var e=sessionStorage.getItem(t);try{e=JSON.parse(e)}catch(n){}return e},t}(),h=function(){function t(){this._keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}return t.prototype.encode=function(t){var e,n,r,i,o,s,a,u="",c=0;for(t=this._utf8_encode(t);c<t.length;)i=(e=t.charCodeAt(c++))>>2,o=(3&e)<<4|(n=t.charCodeAt(c++))>>4,s=(15&n)<<2|(r=t.charCodeAt(c++))>>6,a=63&r,isNaN(n)?s=a=64:isNaN(r)&&(a=64),u=u+this._keyStr.charAt(i)+this._keyStr.charAt(o)+this._keyStr.charAt(s)+this._keyStr.charAt(a);return u},t.prototype.decode=function(t){var e,n,r,i,o,s,a="",u=0;for(t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"");u<t.length;)e=this._keyStr.indexOf(t.charAt(u++))<<2|(i=this._keyStr.indexOf(t.charAt(u++)))>>4,n=(15&i)<<4|(o=this._keyStr.indexOf(t.charAt(u++)))>>2,r=(3&o)<<6|(s=this._keyStr.indexOf(t.charAt(u++))),a+=String.fromCharCode(e),64!==o&&(a+=String.fromCharCode(n)),64!==s&&(a+=String.fromCharCode(r));return a=this._utf8_decode(a)},t.prototype._utf8_encode=function(t){t=t.replace(/\r\n/g,"\n");for(var e="",n=0;n<t.length;n++){var r=t.charCodeAt(n);r<128?e+=String.fromCharCode(r):(127<r&&r<2048?e+=String.fromCharCode(r>>6|192):(e+=String.fromCharCode(r>>12|224),e+=String.fromCharCode(r>>6&63|128)),e+=String.fromCharCode(63&r|128))}return e},t.prototype._utf8_decode=function(t){for(var e,n,r="",i=0,o=e=0;i<t.length;)(o=t.charCodeAt(i))<128?(r+=String.fromCharCode(o),i++):191<o&&o<224?(e=t.charCodeAt(i+1),r+=String.fromCharCode((31&o)<<6|63&e),i+=2):(e=t.charCodeAt(i+1),n=t.charCodeAt(i+2),r+=String.fromCharCode((15&o)<<12|(63&e)<<6|63&n),i+=3);return r},t}(),d=function(){function t(){}return t.setSanitizerInstance=function(t){!this.sanitizer&&t&&(this.sanitizer=t)},t.includes=function(t,e){return t.includes(e)},t.startsWith=function(t,e){return t.startsWith(e)},t.endsWith=function(t,e){return t.endsWith(e)},t.isString=function(t){return"string"==typeof t||t instanceof String},t.removeAccents=function(t){return t?t.normalize("NFD").replace(/[\u0300-\u036f]/g,""):""},t.StringToNumber=function(t){return parseInt(t,10)},t.Utf8Encode=function(t){return t},t.Utf8Decode=function(t){return t},t.base64Decode=function(t){return(new h).decode(t)},t.isEmpty=function(t){return""===t},t.bypassSecurityTrustUrl=function(t){return this.sanitizer.bypassSecurityTrustUrl(t)},t.toMd5=function(t){return function(t){function u(t,e){return t<<e|t>>>32-e}function c(t,e){var n,r,i,o,s;return i=2147483648&t,o=2147483648&e,s=(1073741823&t)+(1073741823&e),(n=1073741824&t)&(r=1073741824&e)?2147483648^s^i^o:n|r?1073741824&s?3221225472^s^i^o:1073741824^s^i^o:s^i^o}function e(t,e,n,r,i,o,s){return c(u(t=c(t,c(c(function a(t,e,n){return t&e|~t&n}(e,n,r),i),s)),o),e)}function n(t,e,n,r,i,o,s){return c(u(t=c(t,c(c(function a(t,e,n){return t&n|e&~n}(e,n,r),i),s)),o),e)}function r(t,e,n,r,i,o,s){return c(u(t=c(t,c(c(function a(t,e,n){return t^e^n}(e,n,r),i),s)),o),e)}function i(t,e,n,r,i,o,s){return c(u(t=c(t,c(c(function a(t,e,n){return e^(t|~n)}(e,n,r),i),s)),o),e)}function o(t){var e,n="",r="";for(e=0;e<=3;e++)n+=(r="0"+(t>>>8*e&255).toString(16)).substr(r.length-2,2);return n}var s,a,l,f,h,d,y,m,g,p=Array();for(p=function S(t){for(var e,n=t.length,r=n+8,i=16*((r-r%64)/64+1),o=Array(i-1),s=0,a=0;a<n;)s=a%4*8,o[e=(a-a%4)/4]=o[e]|t.charCodeAt(a)<<s,a++;return s=a%4*8,o[e=(a-a%4)/4]=o[e]|128<<s,o[i-2]=n<<3,o[i-1]=n>>>29,o}(t=function v(t){t=t.replace(/\r\n/g,"\n");for(var e="",n=0;n<t.length;n++){var r=t.charCodeAt(n);r<128?e+=String.fromCharCode(r):(127<r&&r<2048?e+=String.fromCharCode(r>>6|192):(e+=String.fromCharCode(r>>12|224),e+=String.fromCharCode(r>>6&63|128)),e+=String.fromCharCode(63&r|128))}return e}(t)),d=1732584193,y=4023233417,m=2562383102,g=271733878,s=0;s<p.length;s+=16)y=i(y=i(y=i(y=i(y=r(y=r(y=r(y=r(y=n(y=n(y=n(y=n(y=e(y=e(y=e(y=e(l=y,m=e(f=m,g=e(h=g,d=e(a=d,y,m,g,p[s+0],7,3614090360),y,m,p[s+1],12,3905402710),d,y,p[s+2],17,606105819),g,d,p[s+3],22,3250441966),m=e(m,g=e(g,d=e(d,y,m,g,p[s+4],7,4118548399),y,m,p[s+5],12,1200080426),d,y,p[s+6],17,2821735955),g,d,p[s+7],22,4249261313),m=e(m,g=e(g,d=e(d,y,m,g,p[s+8],7,1770035416),y,m,p[s+9],12,2336552879),d,y,p[s+10],17,4294925233),g,d,p[s+11],22,2304563134),m=e(m,g=e(g,d=e(d,y,m,g,p[s+12],7,1804603682),y,m,p[s+13],12,4254626195),d,y,p[s+14],17,2792965006),g,d,p[s+15],22,1236535329),m=n(m,g=n(g,d=n(d,y,m,g,p[s+1],5,4129170786),y,m,p[s+6],9,3225465664),d,y,p[s+11],14,643717713),g,d,p[s+0],20,3921069994),m=n(m,g=n(g,d=n(d,y,m,g,p[s+5],5,3593408605),y,m,p[s+10],9,38016083),d,y,p[s+15],14,3634488961),g,d,p[s+4],20,3889429448),m=n(m,g=n(g,d=n(d,y,m,g,p[s+9],5,568446438),y,m,p[s+14],9,3275163606),d,y,p[s+3],14,4107603335),g,d,p[s+8],20,1163531501),m=n(m,g=n(g,d=n(d,y,m,g,p[s+13],5,2850285829),y,m,p[s+2],9,4243563512),d,y,p[s+7],14,1735328473),g,d,p[s+12],20,2368359562),m=r(m,g=r(g,d=r(d,y,m,g,p[s+5],4,4294588738),y,m,p[s+8],11,2272392833),d,y,p[s+11],16,1839030562),g,d,p[s+14],23,4259657740),m=r(m,g=r(g,d=r(d,y,m,g,p[s+1],4,2763975236),y,m,p[s+4],11,1272893353),d,y,p[s+7],16,4139469664),g,d,p[s+10],23,3200236656),m=r(m,g=r(g,d=r(d,y,m,g,p[s+13],4,681279174),y,m,p[s+0],11,3936430074),d,y,p[s+3],16,3572445317),g,d,p[s+6],23,76029189),m=r(m,g=r(g,d=r(d,y,m,g,p[s+9],4,3654602809),y,m,p[s+12],11,3873151461),d,y,p[s+15],16,530742520),g,d,p[s+2],23,3299628645),m=i(m,g=i(g,d=i(d,y,m,g,p[s+0],6,4096336452),y,m,p[s+7],10,1126891415),d,y,p[s+14],15,2878612391),g,d,p[s+5],21,4237533241),m=i(m,g=i(g,d=i(d,y,m,g,p[s+12],6,1700485571),y,m,p[s+3],10,2399980690),d,y,p[s+10],15,4293915773),g,d,p[s+1],21,2240044497),m=i(m,g=i(g,d=i(d,y,m,g,p[s+8],6,1873313359),y,m,p[s+15],10,4264355552),d,y,p[s+6],15,2734768916),g,d,p[s+13],21,1309151649),m=i(m,g=i(g,d=i(d,y,m,g,p[s+4],6,4149444226),y,m,p[s+11],10,3174756917),d,y,p[s+2],15,718787259),g,d,p[s+9],21,3951481745),d=c(d,a),y=c(y,l),m=c(m,f),g=c(g,h);return(o(d)+o(y)+o(m)+o(g)).toLowerCase()}(t)},t}(),y=function(){function t(){}return t.setTranlateInstance=function(t){!this.translateService&&t&&(this.translateService=t)},t.Translate=function(t){if(this.translateService){var e="";return this.translateService.get(t).subscribe(function(t){e=t}),e}return t},t}(),m=function(){function t(){}return t.setResponsiveWidth=function(t){!this.responsiveWidth&&t&&(this.responsiveWidth=t)},t.setTimeShow=function(t){!this.timeshow&&t&&(this.timeshow=t)},t.areEquals=function(t,e){return JSON.stringify(t)===JSON.stringify(e)},t.isEmptyData=function(t){return this.areEquals(t,"")||this.areEquals(t,0)||null===t||this.areEquals(t,{})||this.areEquals(t,[])},t.isUndefined=function(t){return void 0===t},t.setSysname=function(t){f.setSession("sysname",t)},t.getSysname=function(){return f.getSession("sysname")},t.autoFixSidebarState=function(t,e){return t<=this.responsiveWidth?"inres":"inres"===e?"out":e},t.fixsidebarState=function(t,e,n,r){return e<=r?"inres"===n?"in":"inres":t},t.fixContainerState=function(t,e,n){return e<=n?"inres":t},t.successNotify=function(t,e){r(y.Translate(t)+" "+JSON.stringify(e),"success",this.timeshow)},t.cathNotify=function(t,e,n){void 0===n&&(n="warning");var r=y.Translate(e);this.notifyError(r,t,n)},t.notifyError=function(t,e,n){if(r(t+" :"+this.errorCath(e),n,this.timeshow),"error"===n)throw new Error(t)},t.cathNotifyExtraMen=function(t,e,n,r){void 0===r&&(r="warning");var i=y.Translate(e)+" "+n;this.notifyError(i,t,r)},t.errorCath=function(t){var e="";return d.isString(t)?e=t:c.isObject(t)&&(t.error?d.isString(t.error)?e=t.error:c.isObject(t.error)&&t.error.ResponseStatus?t.error.ResponseStatus.Message?e=t.error.ResponseStatus.Message:t.error.ResponseStatus.ErrorCode&&(e=t.error.ResponseStatus.ErrorCode):d.isString(t.message)&&(e=t.message):t.message?e=t.message:t.statusText&&(e=t.statusText)),y.Translate(e)},t.getNativeWindow=function(){return window},t.openWindow=function(t,e){return window.open(t,"","location=no,width=1800,height=900,scrollbars=yes,top=100,left=700,resizable = no")},t.setWithHeight=function(t){if(t&&t.fullScreen)return{fullscreen:1};var e=1.5;t&&t.Media&&(e=t.Media);var n={width:window.innerWidth/e,height:window.innerHeight/e};return t&&t.hasOwnProperty("width")&&(n.width=t.width),t&&t.hasOwnProperty("height")&&(n.height=t.height),n},t.responsiveWidth=960,t.timeshow=8e3,t}(),g=function(){function t(){}return t.inArray=function(t,e){return t.includes(e)},t.notInArray=function(t,e){return!this.inArray(t,e)},t.objectInArray=function(t,e){return t.find(function(t){return m.areEquals(t,e)})},t.objectNotInArray=function(t,e){return!this.objectInArray(t,e)},t.objectPropInArray=function(t,e,n){return t.find(function(t){return m.areEquals(t[e],n)})},t.objectNotPropInArray=function(t,e,n){return!this.objectPropInArray(t,e,n)},t.cloneArray=function(t){return u(t)},t.removeFromArray=function(t,e){return t.splice(e,1),t},t.arrayMerge=function(t,e){return u(t,e)},t}(),p=function(){function t(){}return t.toDate=function(t,e){var n=t;if(t)try{if(!("function"==typeof n.getMonth)){var r=n.split(".");n=Date.parse(r[0])}return e&&n.setHours(0,0,0,0),n}catch(i){}return null},t.unsetTimeZero=function(t){return t?t.replace(/0001-01-01T00:00:00\.0000000/,""):""},t.unsetAnytimeZero=function(e){var n=this;return Object.keys(e).forEach(function(t){"0001-01-01T00:00:00.0000000"===e[t]&&(e[t]=n.unsetTimeZero(e[t]))}),e},t.unsetArrayTimeZero=function(t){var e,n,r=[];try{for(var i=function a(t){var e="function"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}(t),o=i.next();!o.done;o=i.next()){var s=o.value;s=this.unsetAnytimeZero(s),r.push(s)}}catch(u){e={error:u}}finally{try{o&&!o.done&&(n=i["return"])&&n.call(i)}finally{if(e)throw e.error}}return r},t.isWeekend=function(t){var e=t.getDay();return 0===e||6===e},t.isToday=function(t){return t===new Date},t}(),S=function(){function t(){}return t.codeKey=function(t){return btoa(t.toUpperCase())},t.setStorage=function(t,e){if(l.hasEncryption())localStorage.setItem(this.codeKey(t),l.encrypt(e));else{var n=void 0;n=c.isObject(e)?JSON.stringify(e):e,localStorage.setItem(t,n)}},t.deleteStorage=function(t){l.hasEncryption()?localStorage.removeItem(this.codeKey(t)):localStorage.removeItem(t)},t.getstorage=function(t){if(l.hasEncryption())return l.decrypt(localStorage.getItem(this.codeKey(t)));var e=localStorage.getItem(t);try{e=JSON.parse(e)}catch(n){}return e},t}(),v=function(){function t(){}return t.LoginKey=function(){return l.hasEncryption()?btoa(l.encrypt(this.getCurrentUser())):btoa(JSON.stringify(this.getCurrentUser()))},t.isLoggedin=function(){var t;if(l.hasEncryption())return t=l.decrypt(atob(f.getSession("isLoggedin"))),m.areEquals(t,this.getCurrentUser());var e=f.getSession("isLoggedin");return null!==e&&(t=atob(e),m.areEquals(JSON.parse(t),this.getCurrentUser()))},t.setLoggedin=function(){f.setSession("isLoggedin",this.LoginKey())},t.logOff=function(){sessionStorage.clear()},t.logFail=function(t){this.logOff();var e=y.Translate(t.statusText);r(e,"error",5e3)},t.setCurrentUser=function(t){f.setSession("currentUser",t)},t.getCurrentUser=function(){return f.getSession("currentUser")},t.setEmpresasUser=function(t){f.setSession("empresasUser",t)},t.getEmpresasUser=function(){return f.getSession("empresasUser")},t.getEmresaIdProd=function(){return this.getCurrentUser().IDEmpresaProd},t.setEmpresaCode=function(t,e){var n=this.getCurrentUser();n.CompanyCode=t,e&&(n.CompanyName=e),this.setCurrentUser(n)},t.getEmpresaCode=function(){return this.getCurrentUser().CompanyCode},t}(),C=function(){function t(){}return t.setRouterInstance=function(t){!this.router&&t&&(this.router=t)},t.setStaticDir=function(t){!this.staticDir&&t&&(this.staticDir="/"+t+"/",this.staticDirR="/"+t+"R/")},t.setDynamicDir=function(t){!this.dynamicDir&&t&&(this.dynamicDir="/"+t+"/",this.dynamicDirR="/"+t+"R/")},t.setNotAllowedDir=function(t){!this.notAllowed&&t&&(this.notAllowed=t)},t.setListDir=function(t){!this.listDir&&t&&(this.listDir=t)},t.getRerouteUrl=function(t,e,n){if(this.router){var r=void 0,i=t.toUpperCase(),o=e.toUpperCase(),s=this.router.url;return d.includes(s,"/"+i+"/")?r="/"+i+"R/"+o+"/":d.includes(s,"/"+i+"R/")&&(r="/"+i+"/"+o+"/"),n&&(r+=n.toString()),r}return"/"},t.setDinamicDirUrl=function(t,e){return""+this.dynamicDir+t.toUpperCase()+"/"+e.toString()},t.setCustomDirUrl=function(t,e){return""+this.staticDir+t+"/"+e},t.evalPerm=function(t){if(this.router){var e=this.router.url;if(e=e.split("(")[0],d.includes(e,";"))e=e.split(";")[0];t&&(e=e.replace(t,"")),d.includes(e,this.dynamicDirR)?e=e.replace(this.dynamicDirR,this.dynamicDir):d.includes(e,this.staticDirR)&&(e=e.replace(this.staticDirR,this.staticDir)),(d.includes(e,this.dynamicDir)||d.includes(e,this.staticDirR)||d.includes(e,this.staticDir)||d.includes(e,this.staticDirR))&&this.urlNotAllowed(e)&&this.router.navigate([this.notAllowed])}else this.router.navigate([this.notAllowed])},t.getSegmentsRoute=function(t,e,n){void 0===e&&(e={}),void 0===n&&(n=!1);var r=this.router.parseUrl(t).root.children[o.PRIMARY_OUTLET].segments.map(function(t){return t.path});return n?u(r,[this.listDir],[e]):u(r,[e])},t.getSegmentsRouteId=function(t,e,n,r){void 0===n&&(n={}),void 0===r&&(r=!1);var i=this.router.parseUrl(t).root.children[o.PRIMARY_OUTLET].segments.map(function(t){return t.path});return r?u(i,[e.toString()],["Lista"],[n]):u(i,[e.toString()],[n])},t.setNotAllowMen=function(t){f.setSession("notallowedmen",t)},t.getNotAllowMen=function(t){var e=f.getSession("notallowedmen");return null!==e?f.deleteSession("notallowedmen"):e=t,y.Translate(e)},t.setAllowedUrl=function(t){f.setSession("allowedurl",t)},t.urlNotAllowed=function(t){var e=f.getSession("allowedurl"),n=!0;return null!==e&&(n=g.notInArray(e,t)),n},t.dynamicDir="",t.staticDir="",t.dynamicDirR="",t.staticDirR="",t.notAllowed="/",t.listDir="list",t}(),w=function(){function t(){}return t.getBreadCrumb=function(){return f.getSession("breadcrumb")},t.setBreadCrumb=function(t,e){e||(t=m.getSysname()+t),f.setSession("breadcrumb",t)},t.getPrinModFromBreadCrumb=function(t){return t.split(/\//)[1]},t}(),b=function(){function r(){}return r.getContainerElement=function(n){return new Promise(function(t,e){r.waitForContainerElement(n,t)})},r.getContainerClassElement=function(n){return new Promise(function(t,e){r.waitForContainerClassElement(n,t)})},r.waitForContainerElement=function(t,e){var n=document.getElementById(t);n&&null!==n?e(n):setTimeout(r.waitForContainerElement.bind(this,t,e),30)},r.waitForContainerClassElement=function(t,e){var n=document.getElementsByClassName(t);n&&null!==n?e(n):setTimeout(r.waitForContainerClassElement.bind(this,t,e),30)},r}(),A=function(){function t(){}return t.iniIceUtilities=function(t){this.globals.setResponsiveWidth(t.responsiveWidth),this.globals.setTimeShow(t.timeshow),this.router.setRouterInstance(t.router),this.router.setDynamicDir(t.dynamicDir),this.router.setStaticDir(t.staticDir),this.router.setNotAllowedDir(t.notAllowed),this.router.setListDir(t.listDir),this.strings.setSanitizerInstance(t.sanitizer),this.translate.setTranlateInstance(t.translateService),this.encryption.setKey(t.encryptionKey)},t.arrays=g,t.breadCrumbs=w,t.domElements=b,t.dates=p,t.globals=m,t.localStorage=S,t.login=v,t.objects=c,t.router=C,t.session=f,t.strings=d,t.translate=y,t.encryption=l,t}();function E(){return i.trigger("routerTransition",[i.state("void",i.style({})),i.state("*",i.style({})),i.transition(":enter",[i.style({transform:"translateX(100%)"}),i.animate("0.5s ease-in-out",i.style({transform:"translateX(0%)"}))]),i.transition(":leave",[i.style({transform:"translateX(0%)"}),i.animate("0.5s ease-in-out",i.style({transform:"translateX(-100%)"}))])])}function D(){return i.trigger("routerTransition",[i.state("void",i.style({})),i.state("*",i.style({})),i.transition(":enter",[i.style({transform:"translateY(100%)"}),i.animate("0.5s ease-in-out",i.style({transform:"translateY(0%)"}))]),i.transition(":leave",[i.style({transform:"translateY(0%)"}),i.animate("0.5s ease-in-out",i.style({transform:"translateY(-100%)"}))])])}var O=i.trigger("slideInOutAnimationContent",[i.state("in",i.style({left:60,width:60,marginLeft:-60})),i.state("out",i.style({left:235,width:235,marginLeft:-235})),i.transition("in => out",i.animate("400ms ease-in-out")),i.transition("out => in",i.animate("400ms ease-in-out"))]);t.IceUtilities=A,t.InjectorUtils=function I(t){return n.Injector.create({providers:[{provide:t,deps:[]}]}).get(t)},t.routerTransition=function T(){return E()},t.LoginRouterTransition=function U(){return D()},t.sidebarAnim=function N(t){i.trigger("slideInOut",[i.state("in",i.style({transform:"translate3d(20%, 0, 0)"})),i.state("out",i.style({transform:"translate3d(100%, 0, 0)"})),i.transition("in => out",i.animate("400ms ease-in-out")),i.transition("out => in",i.animate("400ms ease-in-out"))])},t.slideToRight=function R(){return i.trigger("routerTransition",[i.state("void",i.style({})),i.state("*",i.style({})),i.transition(":enter",[i.style({transform:"translateX(-100%)"}),i.animate("0.5s ease-in-out",i.style({transform:"translateX(0%)"}))]),i.transition(":leave",[i.style({transform:"translateX(0%)"}),i.animate("0.5s ease-in-out",i.style({transform:"translateX(100%)"}))])])},t.slideToLeft=E,t.slideToBottom=function j(){return i.trigger("routerTransition",[i.state("void",i.style({})),i.state("*",i.style({})),i.transition(":enter",[i.style({transform:"translateY(-100%)"}),i.animate("0.5s ease-in-out",i.style({transform:"translateY(0%)"}))]),i.transition(":leave",[i.style({transform:"translateY(0%)"}),i.animate("0.5s ease-in-out",i.style({transform:"translateY(100%)"}))])])},t.slideToTop=D,t.slideInOutAnimationSideBar=function _(){return i.trigger("slideInOutAnimationSideBar",[i.state("in",i.style({left:60,width:60,marginLeft:-60})),i.state("out",i.style({left:235,width:235,marginLeft:-235})),i.transition("in => out",i.animate("400ms ease-in-out")),i.transition("out => in",i.animate("400ms ease-in-out"))])},t.fideInFadeOut=function x(){return i.trigger("simpleFadeAnimation",[i.state("in",i.style({opacity:1})),i.transition(":enter",[i.style({opacity:0}),i.animate(600)]),i.transition(":leave",i.animate(600,i.style({opacity:0})))])},t.slideInOutAnimationContent=O,Object.defineProperty(t,"__esModule",{value:!0})});
//# sourceMappingURL=ice-utilities.umd.min.js.map