-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain-es5.6b3911653b0ff936a386.js
1 lines (1 loc) · 15.2 KB
/
main-es5.6b3911653b0ff936a386.js
1
!function(){function t(t){return function(t){if(Array.isArray(t))return e(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,n){if(!t)return;if("string"==typeof t)return e(t,n);var o=Object.prototype.toString.call(t).slice(8,-1);"Object"===o&&t.constructor&&(o=t.constructor.name);if("Map"===o||"Set"===o)return Array.from(t);if("Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return e(t,n)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function e(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}function n(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function o(t,e,o){return e&&n(t.prototype,e),o&&n(t,o),t}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{0:function(t,e,n){t.exports=n("2v48")},"2v48":function(t,e,n){"use strict";n.r(e);var o,r,l=n("ENSU"),u=n("kZht"),s=n("Vhhf"),a=n("6uGs"),c=n("uryd"),d=n("P0vk"),h=n("aJOL"),m=n("FxgA"),f=n("b5Xb"),p=n("1VvW"),v=n("8EXQ"),b=((r=function t(){i(this,t)}).\u0275fac=function(t){return new(t||r)},r.\u0275cmp=u.Gb({type:r,selectors:[["app-root"]],decls:32,vars:0,consts:[[1,"dashboard"],["mode","side","opened","",1,"dashboard__menu"],[1,"title"],["src","assets/img/angular.svg","alt","angular",1,"logo"],["routerLink","/",1,"logo-title"],[1,"menu"],[1,"menu__item"],["routerLink","samples/guide"],[1,"dashboard__content"]],template:function(t,e){1&t&&(u.Rb(0,"mat-drawer-container",0),u.qc(1,"\n "),u.Rb(2,"mat-drawer",1),u.qc(3,"\n "),u.Rb(4,"mat-toolbar",2),u.qc(5,"\n "),u.Nb(6,"img",3),u.qc(7,"\n "),u.Rb(8,"a",4),u.qc(9,"@angular-ru/tooltip"),u.Qb(),u.qc(10,"\n "),u.Qb(),u.qc(11,"\n\n "),u.Rb(12,"mat-list",5),u.qc(13,"\n "),u.Rb(14,"mat-list-item",6),u.qc(15,"\n "),u.Rb(16,"a",7),u.qc(17,"- "),u.Rb(18,"strong"),u.qc(19,"Guide overview"),u.Qb(),u.Qb(),u.qc(20,"\n "),u.Qb(),u.qc(21,"\n "),u.Nb(22,"mat-divider"),u.qc(23,"\n "),u.Qb(),u.qc(24,"\n "),u.Qb(),u.qc(25,"\n\n "),u.Rb(26,"mat-drawer-content",8),u.qc(27,"\n "),u.Nb(28,"router-outlet"),u.qc(29,"\n "),u.Qb(),u.qc(30,"\n"),u.Qb(),u.qc(31,"\n"))},directives:[d.b,d.a,h.a,p.a,c.a,c.b,v.a,d.c,p.c],encapsulation:2,changeDetection:0}),r),y=((o=function t(){i(this,t)}).\u0275fac=function(t){return new(t||o)},o.\u0275mod=u.Kb({type:o}),o.\u0275inj=u.Jb({imports:[[p.b.forRoot([{path:"",pathMatch:"full",redirectTo:"samples"},{path:"samples",children:[{path:"",pathMatch:"full",redirectTo:"guide"},{path:"guide",loadChildren:function(){return n.e(6).then(n.bind(null,"G7lC")).then(function(t){return t.GuideModule})}}]}],{useHash:!0,scrollPositionRestoration:"enabled"})],p.b]}),o);n("JM6N");var T,E=((T=function t(){i(this,t)}).\u0275fac=function(t){return new(t||T)},T.\u0275mod=u.Kb({type:T,bootstrap:[b]}),T.\u0275inj=u.Jb({imports:[[l.a,a.b,y,m.b,d.d,h.b,c.c,f.a.forRoot()]]}),T);Object(s.f)(!0)&&Object(u.U)(),l.c().bootstrapModule(E,{ngZoneEventCoalescing:!0}).catch(function(t){return console.error(t)})},"9FoD":function(t,e,n){"use strict";function o(){return Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15)}function i(t){return"string"==typeof t}n.d(e,"a",function(){return o}),n.d(e,"b",function(){return i}),n("Vhhf")},GoXd:function(t,e,n){"use strict";n.d(e,"a",function(){return s});var r=n("9FoD"),l=n("kZht"),u=n("aDqW"),s=function(){var t=function(){function t(e){i(this,t),this.translate=e}return o(t,[{key:"instant",value:function(t){return Object(r.b)(t)?this.translate.instant(t):t}}]),t}();return t.\u0275fac=function(e){return new(e||t)(l.Vb(u.a))},t.\u0275prov=l.Ib({token:t,factory:t.\u0275fac}),t}()},JM6N:function(t,e,n){"use strict";n.d(e,"a",function(){return d});var r=n("An66"),l=n("X2rR"),u=n("QeIy"),s=n("ztO2"),a=n("xNRp"),c=n("kZht"),d=function(){var t=function(){function t(){i(this,t)}return o(t,null,[{key:"forRoot",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{ngModule:t,providers:[{provide:a.a,useValue:Object.assign(Object.assign({},s.a),e)},{provide:a.b,useClass:l.a}]}}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=c.Kb({type:t}),t.\u0275inj=c.Jb({providers:[u.a],imports:[[r.b]]}),t}()},M1Zg:function(e,n,r){"use strict";r.d(n,"a",function(){return h});var l=r("kZht"),u=r("9FoD"),s=r("Vhhf"),a=r("KTx3"),c=r("QeIy"),d=r("xNRp"),h=function(){var e=function(){function e(t,n,o,r,l,s){i(this,e),this.el=t,this.renderer=n,this.ngZone=o,this.options=r,this.interceptor=l,this.domLeak=s,this.placement="top",this.localCssStyle=null,this.size="small",this.uid=Object(u.a)(),this.delta=2,this.layoutMinDuration=100,this.tooltipDomElement=null,this.timeoutId=null,this.frameId=null,this.createLayoutId=null,this.hideId=null,this.mouseLeaveTooltipId=null,this.tooltipMouseenter=null,this.tooltipMouseleave=null,this.handlerOptions={passive:!0},this.internalTooltipValue=null,this.internalContext=null,this.addUidToElement(),this.connectMouseEvents()}return o(e,[{key:"context",set:function(t){this.internalContext=t,this.refreshTooltipContent()}},{key:"tooltip",set:function(t){this.internalTooltipValue=t,this.refreshTooltipContent()}},{key:"offsetElementHeight",get:function(){var t,e;return null!==(e=null===(t=this.tooltipDomElement)||void 0===t?void 0:t.clientHeight)&&void 0!==e?e:0}},{key:"offsetElementWidth",get:function(){var t,e;return null!==(e=null===(t=this.tooltipDomElement)||void 0===t?void 0:t.clientWidth)&&void 0!==e?e:0}},{key:"onMouseenterHandler",value:function(){this.tooltipDisabled||(this.domLeak.invalidationOfIrrelevantNodes(),this.showTooltip())}},{key:"onMouseleaveHandler",value:function(){this.tooltipDisabled||(this.destroyAllTimeouts(),this.hideTooltip())}},{key:"ngOnDestroy",value:function(){this.disconnectMouseEvents(),this.destroyAllTimeouts(),this.removeOldNodes()}},{key:"showTooltip",value:function(){this.destroyAllTimeouts(),Object(s.e)(this.tooltipDomElement)?this.addTooltipShowClass():this.addTooltipToBodyWithAnimation()}},{key:"hideTooltip",value:function(){var t=this;this.ngZone.runOutsideAngular(function(){window.clearTimeout(t.hideId),t.hideId=window.setTimeout(function(){t.removeTooltipShowClass(),t.timeoutId=window.setTimeout(function(){return t.removeOldNodes()},t.options.durationAfterDestroy)},t.layoutMinDuration)})}},{key:"addTooltipElementToBody",value:function(){this.tooltipDomElement=this.createTooltipElement(),Object(s.e)(this.tooltipDomElement)&&(this.renderer.appendChild(document.body,this.tooltipDomElement),this.renderer.setAttribute(this.tooltipDomElement,"id",this.uid),this.renderer.addClass(this.tooltipDomElement,"ng-tooltip"),this.renderer.addClass(this.tooltipDomElement,"ng-tooltip-".concat(this.placement)),this.renderer.addClass(this.tooltipDomElement,"ng-tooltip-".concat(this.size)))}},{key:"setPosition",value:function(){var t,n=this.el.nativeElement.getBoundingClientRect(),o=null===(t=this.tooltipDomElement)||void 0===t?void 0:t.getBoundingClientRect(),i=e.getScrollPos();if("top"===this.placement){var r=this.calculateByTop(n,o),l=r.top,u=r.left;this.setStyle(l,u,i)}else if("bottom"===this.placement){var s=this.calculateByBottom(n,o),a=s.top,c=s.left;this.setStyle(a,c,i)}else if("left"===this.placement){var d=this.calculateByLeft(n,o),h=d.top,m=d.left;this.setStyle(h,m,i)}else if("right"===this.placement){var f=this.calculateByRight(n,o),p=f.top,v=f.left;this.setStyle(p,v,i)}}},{key:"addTooltipToBodyWithAnimation",value:function(){var t=this;this.ngZone.runOutsideAngular(function(){t.frameId=window.setTimeout(function(){t.addTooltipElementToBody(),Object(s.e)(t.tooltipDomElement)&&(t.tooltipListenOnHoverEvent(),t.createLayoutId=window.setTimeout(function(){t.setPosition(),t.addTooltipShowClass(),t.markElementAddInDom()},t.layoutMinDuration))},t.options.durationBeforeCreate)})}},{key:"refreshTooltipContent",value:function(){if(Object(s.e)(this.tooltipDomElement)){var t=this.createTooltipContent();if(Object(s.e)(t)){for(var e=this.tooltipDomElement.children,n=0,o=Array.from(e);n<o.length;n++){var i=o[n];this.renderer.removeChild(this.tooltipDomElement,i)}this.renderer.appendChild(this.tooltipDomElement,t)}}}},{key:"markElementAddInDom",value:function(){Object(s.e)(this.tooltipDomElement)&&this.domLeak.actualContainsInDomUidCollections.add(this.uid)}},{key:"markElementRemoveFromDom",value:function(){Object(s.c)(this.tooltipDomElement)&&this.domLeak.actualContainsInDomUidCollections.delete(this.uid)}},{key:"connectMouseEvents",value:function(){var t=this;this.ngZone.runOutsideAngular(function(){t.el.nativeElement.addEventListener("mouseenter",function(){return t.onMouseenterHandler()},t.handlerOptions),t.el.nativeElement.addEventListener("mouseleave",function(){return t.onMouseleaveHandler()},t.handlerOptions)})}},{key:"disconnectMouseEvents",value:function(){var t=this;this.el.nativeElement.removeEventListener("mouseenter",function(){return t.onMouseenterHandler()},this.handlerOptions),this.el.nativeElement.removeEventListener("mouseleave",function(){return t.onMouseleaveHandler()},this.handlerOptions)}},{key:"addUidToElement",value:function(){this.el.nativeElement.setAttribute("data-tooltip-uid",this.uid)}},{key:"addTooltipShowClass",value:function(){Object(s.e)(this.tooltipDomElement)&&this.renderer.addClass(this.tooltipDomElement,"ng-tooltip-show")}},{key:"removeTooltipShowClass",value:function(){Object(s.e)(this.tooltipDomElement)&&this.renderer.removeClass(this.tooltipDomElement,"ng-tooltip-show")}},{key:"tooltipListenOnHoverEvent",value:function(){var t,e,n=this;window.clearTimeout(this.mouseLeaveTooltipId),Object(s.e)(this.tooltipDomElement)&&(null===(t=this.tooltipMouseenter)||void 0===t||t.unsubscribe(),null===(e=this.tooltipMouseleave)||void 0===e||e.unsubscribe(),this.tooltipMouseenter=Object(a.a)(this.tooltipDomElement,"mouseenter").subscribe(function(){window.clearTimeout(n.hideId),window.clearTimeout(n.mouseLeaveTooltipId)}),this.tooltipMouseleave=Object(a.a)(this.tooltipDomElement,"mouseleave").subscribe(function(){window.clearTimeout(n.mouseLeaveTooltipId),n.mouseLeaveTooltipId=window.setTimeout(function(){return n.hideTooltip()},n.options.timeoutForWaitAfterBlurTooltip)}))}},{key:"createTooltipContent",value:function(){var e,n,o,i,r,u=document.createElement("div");if(this.internalTooltipValue instanceof l.M){var a=this.internalTooltipValue.createEmbeddedView({$implicit:this.internalContext});a.detectChanges(),u.append.apply(u,t(a.rootNodes))}else{if(Object(s.b)(this.internalTooltipValue))return null;if(Object(s.e)(this.internalTooltipValue)){var c=null===(e=this.internalTooltipValue)||void 0===e?void 0:e.toString();u.innerHTML=null!==(i=null===(o=(n=this.interceptor).instant)||void 0===o?void 0:o.call(n,c))&&void 0!==i?i:c}}return u.style.cssText=null!==(r=this.localCssStyle)&&void 0!==r?r:this.options.cssStyle,u}},{key:"createTooltipElement",value:function(){var t=this.createTooltipContent();if(Object(s.e)(t)){var e=this.renderer.createElement("div");return this.renderer.appendChild(e,t),e}return null}},{key:"destroyAllTimeouts",value:function(){window.clearTimeout(this.frameId),window.clearTimeout(this.createLayoutId),window.clearTimeout(this.mouseLeaveTooltipId),window.clearTimeout(this.timeoutId),window.clearTimeout(this.hideId)}},{key:"removeOldNodes",value:function(){if(Object(s.e)(this.tooltipDomElement)){var t=document.getElementById(this.uid);null==t||t.remove(),this.tooltipDomElement=null}this.markElementRemoveFromDom()}},{key:"setStyle",value:function(t,e,n){this.renderer.setStyle(this.tooltipDomElement,"top","".concat(t+n,"px")),this.renderer.setStyle(this.tooltipDomElement,"left","".concat(e,"px"))}},{key:"calculateByTop",value:function(t,e){var n;return{top:t.top-this.offsetElementHeight,left:t.left+(t.width-(null!==(n=null==e?void 0:e.width)&&void 0!==n?n:0))/this.delta}}},{key:"calculateByBottom",value:function(t,e){var n;return{top:t.bottom,left:t.left+(t.width-(null!==(n=null==e?void 0:e.width)&&void 0!==n?n:0))/this.delta}}},{key:"calculateByLeft",value:function(t,e){var n;return{top:t.top+(t.height-(null!==(n=null==e?void 0:e.height)&&void 0!==n?n:0))/this.delta,left:t.left-this.offsetElementWidth}}},{key:"calculateByRight",value:function(t,e){var n;return{top:t.top+(t.height-(null!==(n=null==e?void 0:e.height)&&void 0!==n?n:0))/this.delta,left:t.right}}}],[{key:"getScrollPos",value:function(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0}}]),e}();return e.\u0275fac=function(t){return new(t||e)(l.Mb(l.l),l.Mb(l.F),l.Mb(l.A),l.Mb(d.a),l.Mb(d.b),l.Mb(c.a))},e.\u0275dir=l.Hb({type:e,selectors:[["","tooltip",""]],inputs:{tooltipDisabled:["tooltip-disabled","tooltipDisabled"],placement:["tooltip-placement","placement"],localCssStyle:["tooltip-css-style","localCssStyle"],size:["tooltip-size","size"],context:["tooltip-context","context"],tooltip:"tooltip"}}),e}()},QeIy:function(t,e,n){"use strict";n.d(e,"a",function(){return s});var r=n("ZTXN"),l=n("mWib"),u=n("kZht"),s=function(){var t=function(){function t(){var e=this;i(this,t),this.actualContainsInDomUidCollections=new Set,this.domMemoryLeakTicker$=new r.a,this.timeoutCheck=500,this.domMemoryLeakTicker$.pipe(Object(l.a)(this.timeoutCheck)).subscribe(function(){Array.from(new Set(e.actualContainsInDomUidCollections)).forEach(function(t){var e;!document.querySelector('[data-tooltip-uid="'.concat(t,'"]'))&&(null===(e=document.getElementById(t))||void 0===e||e.remove())})})}return o(t,[{key:"invalidationOfIrrelevantNodes",value:function(){this.domMemoryLeakTicker$.next()}}]),t}();return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=u.Ib({token:t,factory:t.\u0275fac}),t}()},Vhhf:function(t,e,n){"use strict";function o(t){return t}function i(t){var e="string"==typeof t?t.trim():t;return[void 0,null,NaN,"",1/0].includes(e)}function r(t){return!0===t}function l(t){return null==t}function u(t){return!l(t)}function s(t){return!function(t){return Boolean(t)}(t)}n.d(e,"a",function(){return o}),n.d(e,"b",function(){return i}),n.d(e,"c",function(){return s}),n.d(e,"d",function(){return l}),n.d(e,"e",function(){return u}),n.d(e,"f",function(){return r})},X2rR:function(t,e,n){"use strict";n.d(e,"a",function(){return r});var o=n("kZht"),r=function(){var t=function t(){i(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=o.Ib({token:t,factory:t.\u0275fac}),t}()},b5Xb:function(t,e,n){"use strict";n("GoXd"),n("X2rR"),n("M1Zg");var o=n("JM6N");n.d(e,"a",function(){return o.a}),n("ztO2"),n("xNRp")},xNRp:function(t,e,n){"use strict";n.d(e,"b",function(){return i}),n.d(e,"a",function(){return r});var o=n("kZht"),i=new o.r("TOOLTIP_TEXT_INTERCEPTOR_TOKEN"),r=new o.r("TOOLTIP_OPTIONS_TOKEN")},zn8P:function(t,e){function n(t){return Promise.resolve().then(function(){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e})}n.keys=function(){return[]},n.resolve=n,t.exports=n,n.id="zn8P"},ztO2:function(t,e,n){"use strict";n.d(e,"a",function(){return o}),n("GoXd"),n("xNRp");var o={cssStyle:"",durationBeforeCreate:200,durationAfterDestroy:1500,timeoutForWaitAfterBlurTooltip:400}}},[[0,0,5]]])}();