mirror of
https://github.com/gwenhael-le-moine/ledgerrb.git
synced 2025-01-15 15:40:53 +01:00
8 lines
37 KiB
JavaScript
8 lines
37 KiB
JavaScript
|
/*!
|
||
|
* Angular Material Design
|
||
|
* https://github.com/angular/material
|
||
|
* @license MIT
|
||
|
* v0.0.3
|
||
|
*/
|
||
|
!function(){function e(e,t){function n(){return[].concat(h)}function a(){return h.length}function i(e){return h.length&&e>-1&&e<h.length}function r(e){return e?i(d(e)+1):!1}function o(e){return e?i(d(e)-1):!1}function l(e){return i(e)?h[e]:null}function c(e,t){function n(e,t){var n=[];return angular.forEach(e,function(a,i){var r=t.apply(null,[a,i,e]);r&&n.push(r)}),n.length?n:null}return n(h,function(n){return n[e]==t?n:null})}function u(e,t){return e?(angular.isDefined(t)||(t=h.length),h.splice(t,0,e),d(e)):-1}function s(e){f(e)&&h.splice(d(e),1)}function d(e){return h.indexOf(e)}function f(e){return e&&d(e)>-1}function m(e,n){if(f(e)){var a=d(e)+1,r=i(a)?h[a]:t?g():null,o=r&&n&&!n(r);return o?m(r,n):r}return null}function p(e,n){if(f(e)){var a=d(e)-1,r=i(a)?h[a]:t?v():null,o=r&&n&&!n(r);return o?p(r,n):r}return null}function g(){return h.length?h[0]:null}function v(){return h.length?h[h.length-1]:null}t=!!t;var h=e||[];return{items:n,count:a,inRange:i,contains:f,indexOf:d,itemAt:l,findBy:c,add:u,remove:s,first:g,last:v,next:m,previous:p,hasPrevious:o,hasNext:r}}function t(e,t,n,a){function i(e){return c?"webkit"+e.charAt(0).toUpperCase()+e.substring(1):e}function r(e,n,i){function r(t){t.target===e[0]&&(e.off(l.TRANSITIONEND_EVENT,r),c.resolve())}var c=a.defer();n.append(e);var u;if(i){var s=i[0].getBoundingClientRect();u=o(s.left-e[0].offsetWidth,s.top-e[0].offsetHeight,0)+" scale(0.2)"}else u="translate3d(0,100%,0) scale(0.5)";return e.css(l.TRANSFORM,u).css("opacity",0),t(function(){t(function(){e.addClass("active").css(l.TRANSFORM,"").css("opacity","").on(l.TRANSITIONEND_EVENT,r)})}),c.promise}function o(e,t,n){return"translate3d("+Math.floor(e)+"px,"+Math.floor(t)+"px,"+Math.floor(n)+"px)"}var l,c=/webkit/i.test(n.vendorPrefix);return l={popIn:r,TRANSITIONEND_EVENT:"transitionend"+(c?" webkitTransitionEnd":""),ANIMATIONEND_EVENT:"animationend"+(c?" webkitAnimationEnd":""),TRANSFORM:i("transform"),TRANSITION:i("transition"),TRANSITION_DURATION:i("transitionDuration"),ANIMATION_PLAY_STATE:i("animationPlayState"),ANIMATION_DURATION:i("animationDuration"),ANIMATION_NAME:i("animationName"),ANIMATION_TIMING:i("animationTimingFunction"),ANIMATION_DIRECTION:i("animationDirection")}}function n(e){return function(t,n,a){"checkbox"==a.inkRipple?e.attachCheckboxBehavior(n):e.attachButtonBehavior(n)}}function a(e,t,n,a){function i(e){return o(e,{mousedown:!0,center:!1,animationDuration:350,mousedownPauseTime:175,animationName:"inkRippleButton",animationTimingFunction:"linear"})}function r(e){return o(e,{mousedown:!0,center:!0,animationDuration:300,mousedownPauseTime:180,animationName:"inkRippleCheckbox",animationTimingFunction:"linear"})}function o(t,i){function r(){return!t.controller("noink")&&!K.isDisabled(t)}function o(){function e(o){function s(){f(),m.css(n.ANIMATION_PLAY_STATE,"running"),t.off(u,s),t.on(c,e)}function d(){m.css(n.ANIMATION_PLAY_STATE,"paused")}function f(){a.cancel(p)}if(r()){var m=l(o),p=a(d,i.mousedownPauseTime,!1);m.on("$destroy",f),t.off(c,e),t.on(u,s)}}t.on(c,e)}function l(e){return e=e.touches?e.touches[0]:e,s(e.pageX,e.pageY,!0)}function s(a,r,o){var l=angular.element('<div class="material-ripple">').css(n.ANIMATION_DURATION,i.animationDuration+"ms").css(n.ANIMATION_NAME,i.animationName).css(n.ANIMATION_TIMING,i.animationTimingFunction).on(n.ANIMATIONEND_EVENT,function(){l.remove()});d||(d=angular.element('<div class="material-ripple-container">'),t.append(d)),d.append(l);var c=d.prop("offsetWidth");if(i.center)a=c/2,r=d.prop("offsetHeight")/2;else if(o){var u=f.getBoundingClientRect();a-=u.left,r-=u.top}var s={"background-color":e.getComputedStyle(l[0]).color||e.getComputedStyle(f).color,"border-radius":c/2+"px",left:a-c/2+"px",width:c+"px",top:r-c/2+"px",height:c+"px"};return s[n.ANIMATION_DURATION]=i.fadeoutDuration+"ms",l.css(s),l}i=angular.extend({mousedown:!0,hover:!0,focus:!0,center:!1,animationDuration:300,mousedownPauseTime:150,animationName:"",animationTimingFunction:"linear"},i||{});var d,f=t[0];i.mousedown&&o()}var l=!!("ontouchend"in document),c=l?"touchstart":"mousedown",u=l?"touche
|
||
|
i&&!r&&(e[a]=n+"px")}),e}},debounce:function(e,t,n){var a;return function(){var i=this,r=arguments;clearTimeout(a),a=setTimeout(function(){a=null,n||e.apply(i,r)},t),n&&!a&&e.apply(i,r)}}};angular.element.prototype.focus=angular.element.prototype.focus||function(){return this.length&&this[0].focus(),this};{var G={ARIA:{ROLE:{BUTTON:"button",CHECKBOX:"checkbox",DIALOG:"dialog",LIST:"list",LIST_ITEM:"listitem",RADIO:"radio",RADIO_GROUP:"radiogroup",SLIDER:"slider",TAB_LIST:"tablist",TAB:"tab",TAB_PANEL:"tabpanel"},PROPERTY:{CHECKED:"aria-checked",HIDDEN:"aria-hidden",EXPANDED:"aria-expanded",LABEL:"aria-label",SELECTED:"aria-selected",LABEL_BY:"aria-labelledby"},STATE:{}},KEY_CODE:{ESCAPE:27,SPACE:32,LEFT_ARROW:37,RIGHT_ARROW:39,ENTER:13},EVENTS:{SCOPE_DESTROY:"$destroy",TABS_CHANGED:"$materialTabsChanged",FOCUS_CHANGED:"$materialFocusChanged",WINDOW_RESIZE:"resize",KEY_DOWN:"keydown",CLICK:"click"}},W=G.EVENTS;G.KEY_CODE}angular.module("material.animations",["material.services.throttle"]).service("$materialEffects",["$rootElement","$$rAF","$sniffer","$q",t]),function(){function e(){return function(){return{controller:angular.noop}}}angular.module("material.animations").directive({noink:e(),nobar:e(),nostretch:e()})}(),angular.module("material.animations").directive("inkRipple",["$materialInkRipple",n]).factory("$materialInkRipple",["$window","$$rAF","$materialEffects","$timeout",a]),angular.module("material.components.button",["material.animations","material.services.aria"]).directive("materialButton",["ngHrefDirective","$materialInkRipple","$aria",i]),angular.module("material.components.card",[]).directive("materialCard",[r]),angular.module("material.components.checkbox",["material.animations","material.services.aria"]).directive("materialCheckbox",["inputDirective","$materialInkRipple","$aria",o]),angular.module("material.components.content",["material.services.registry"]).directive("materialContent",[l]),angular.module("material.components.dialog",["material.animations","material.services.compiler","material.services.aria"]).directive("materialDialog",["$$rAF",c]).factory("$materialDialog",["$timeout","$materialCompiler","$rootElement","$rootScope","$materialEffects","$animate","$aria",u]),angular.module("material.components.textField",[]).directive("materialInputGroup",[s]).directive("materialInput",[d]),angular.module("material.components.icon",[]).directive("materialIcon",[f]),angular.module("material.components.list",[]).directive("materialList",[m]).directive("materialItem",[p]),angular.module("material.components.radioButton",["material.animations","material.services.aria"]).directive("materialRadioGroup",[g]).directive("materialRadioButton",["$aria",v]),angular.module("material.components.sidenav",["material.services.registry"]).factory("$materialSidenav",["$materialComponentRegistry",$]).directive("materialSidenav",["$timeout",b]).controller("$materialSidenavController",["$scope","$element","$attrs","$timeout","$materialSidenav","$materialComponentRegistry",h]),angular.module("material.components.slider",["material.animations","material.services.aria"]).directive("materialSlider",[E]),angular.module("material.components.switch",["material.components.checkbox","material.components.radioButton"]).directive("materialSwitch",["materialCheckboxDirective","materialRadioButtonDirective",T]),angular.module("material.components.tabs",["material.animations","material.services.attrBind","material.services.registry"]),angular.module("material.components.tabs").directive("materialTab",["$attrBind","$aria","$materialInkRipple",R]),angular.module("material.components.tabs").factory("$materialTabs",["$materialComponentRegistry",x]).controller("materialTabsController",["$scope","$attrs","$materialComponentRegistry","$timeout",O]),angular.module("material.components.tabs").directive("materialTabs",["$q","$window","$timeout","$compile","$materialEffects","$$rAF","$aria",y]);var U=function(e,t){return e.tagName&&(e.hasAttribute(t)||e.hasAttribute("data-"+t)||e.tagName.toLowerCase()===t||e.tagName.toLowerCase()==="data-"+t)},j=fun
|