connect-admin/js/vendor/shepherd.min.js

2 lines
29 KiB
JavaScript
Raw Normal View History

/*! shepherd 0.5.1 */
!function(t,e){"function"==typeof define&&define.amd?define(e):"object"==typeof exports?module.exports=e(require,exports,module):t.Tether=e()}(this,function(){return function(){var t,e,i,o,n,s,r,h,l,a,p,u,f,c,d,g,m,v={}.hasOwnProperty,b=[].indexOf||function(t){for(var e=0,i=this.length;i>e;e++)if(e in this&&this[e]===t)return e;return-1},y=[].slice;null==this.Tether&&(this.Tether={modules:[]}),p=function(t){var e,i,o,n,s;if(i=getComputedStyle(t).position,"fixed"===i)return t;for(o=void 0,e=t;e=e.parentNode;){try{n=getComputedStyle(e)}catch(r){}if(null==n)return e;if(/(auto|scroll)/.test(n.overflow+n["overflow-y"]+n["overflow-x"])&&("absolute"!==i||"relative"===(s=n.position)||"absolute"===s||"fixed"===s))return e}return document.body},d=function(){var t;return t=0,function(){return t++}}(),m={},l=function(t){var e,o,s,r,h;if(s=t._tetherZeroElement,null==s&&(s=t.createElement("div"),s.setAttribute("data-tether-id",d()),n(s.style,{top:0,left:0,position:"absolute"}),t.body.appendChild(s),t._tetherZeroElement=s),e=s.getAttribute("data-tether-id"),null==m[e]){m[e]={},h=s.getBoundingClientRect();for(o in h)r=h[o],m[e][o]=r;i(function(){return m[e]=void 0})}return m[e]},f=null,r=function(t){var e,i,o,n,s,r,h;t===document?(i=document,t=document.documentElement):i=t.ownerDocument,o=i.documentElement,e={},h=t.getBoundingClientRect();for(n in h)r=h[n],e[n]=r;return s=l(i),e.top-=s.top,e.left-=s.left,null==e.width&&(e.width=document.body.scrollWidth-e.left-e.right),null==e.height&&(e.height=document.body.scrollHeight-e.top-e.bottom),e.top=e.top-o.clientTop,e.left=e.left-o.clientLeft,e.right=i.body.clientWidth-e.width-e.left,e.bottom=i.body.clientHeight-e.height-e.top,e},h=function(t){return t.offsetParent||document.documentElement},a=function(){var t,e,i,o,s;return t=document.createElement("div"),t.style.width="100%",t.style.height="200px",e=document.createElement("div"),n(e.style,{position:"absolute",top:0,left:0,pointerEvents:"none",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),e.appendChild(t),document.body.appendChild(e),o=t.offsetWidth,e.style.overflow="scroll",s=t.offsetWidth,o===s&&(s=e.clientWidth),document.body.removeChild(e),i=o-s,{width:i,height:i}},n=function(t){var e,i,o,n,s,r,h;for(null==t&&(t={}),e=[],Array.prototype.push.apply(e,arguments),h=e.slice(1),s=0,r=h.length;r>s;s++)if(o=h[s])for(i in o)v.call(o,i)&&(n=o[i],t[i]=n);return t},c=function(t,e){var i,o,n,s,r;if(null!=t.classList){for(s=e.split(" "),r=[],o=0,n=s.length;n>o;o++)i=s[o],i.trim()&&r.push(t.classList.remove(i));return r}return t.className=t.className.replace(new RegExp("(^| )"+e.split(" ").join("|")+"( |$)","gi")," ")},e=function(t,e){var i,o,n,s,r;if(null!=t.classList){for(s=e.split(" "),r=[],o=0,n=s.length;n>o;o++)i=s[o],i.trim()&&r.push(t.classList.add(i));return r}return c(t,e),t.className+=" "+e},u=function(t,e){return null!=t.classList?t.classList.contains(e):new RegExp("(^| )"+e+"( |$)","gi").test(t.className)},g=function(t,i,o){var n,s,r,h,l,a;for(s=0,h=o.length;h>s;s++)n=o[s],b.call(i,n)<0&&u(t,n)&&c(t,n);for(a=[],r=0,l=i.length;l>r;r++)n=i[r],a.push(u(t,n)?void 0:e(t,n));return a},o=[],i=function(t){return o.push(t)},s=function(){var t,e;for(e=[];t=o.pop();)e.push(t());return e},t=function(){function t(){}return t.prototype.on=function(t,e,i,o){var n;return null==o&&(o=!1),null==this.bindings&&(this.bindings={}),null==(n=this.bindings)[t]&&(n[t]=[]),this.bindings[t].push({handler:e,ctx:i,once:o})},t.prototype.once=function(t,e,i){return this.on(t,e,i,!0)},t.prototype.off=function(t,e){var i,o,n;if(null!=(null!=(o=this.bindings)?o[t]:void 0)){if(null==e)return delete this.bindings[t];for(i=0,n=[];i<this.bindings[t].length;)n.push(this.bindings[t][i].handler===e?this.bindings[t].splice(i,1):i++);return n}},t.prototype.trigger=function(){var t,e,i,o,n,s,r,h,l;if(i=arguments[0],t=2<=arguments.length?y.call(arguments,1):[],null!=(r=this.bindings)?r[i]:void 0){for(n=0,l=[];n<this.bindings[i].length;)h=this.bindings[i][n],o=h.handler,e=h.ctx,s=h.once,o.apply(null!=e?e:this,t),l.push(s?this.bindings[i].splice(n,1):n++);return