mirror of
https://github.com/S2-/gitlit
synced 2025-08-02 20:30:05 +02:00
2 lines
5.1 KiB
JavaScript
2 lines
5.1 KiB
JavaScript
var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_extends=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},PNotifyReference=function(r){"use strict";r=r&&r.__esModule?r.default:r;var t,e={initModule:function(t){var e=this;this.set(t);var n=this.get()._notice;n.on("mouseenter",function(){return e.set({_mouseIsIn:!0})}),n.on("mouseleave",function(){return e.set({_mouseIsIn:!1})})},doSomething:function(){var t=0,e=this.get()._notice,n=setInterval(function(){360===(t+=10)&&(t=0,clearInterval(n)),e.refs.elem.style.transform="rotate("+t+"deg)"},20)},update:function(){},beforeOpen:function(){},afterOpen:function(){},beforeClose:function(){},afterClose:function(){},beforeDestroy:function(){},afterDestroy:function(){}};function s(n,t){var i,o=t.putThing&&a(n,t);return{c:function(){o&&o.c(),i=document.createComment("")},m:function(t,e){o&&o.m(t,e),p(i,t,e)},p:function(t,e){e.putThing?o?o.p(t,e):((o=a(n,e)).c(),o.m(i.parentNode,i)):o&&(o.d(1),o=null)},d:function(t){o&&o.d(t),t&&y(i)}}}function a(i,n){var o,r,s,a,c,f,u,l,h=n.labels.text;function _(t){i.doSomething()}return{c:function(){var t,e;o=d("button"),r=d("i"),a=g(" "),c=g(h),u=g("\n \n "),l=d("div"),r.className=s=n._notice.get()._icons.athing+" svelte-1qy4b0e",t="click",e=_,o.addEventListener(t,e,!1),o.className="ui-pnotify-reference-button btn btn-default svelte-1qy4b0e",o.type="button",o.disabled=f=!n._mouseIsIn,l.className="ui-pnotify-reference-clearing svelte-1qy4b0e"},m:function(t,e){p(o,t,e),m(r,o),m(a,o),m(c,o),i.refs.thingElem=o,p(u,t,e),p(l,t,e)},p:function(t,e){t._notice&&s!==(s=e._notice.get()._icons.athing+" svelte-1qy4b0e")&&(r.className=s),t.labels&&h!==(h=e.labels.text)&&(c.data=h),t._mouseIsIn&&f!==(f=!e._mouseIsIn)&&(o.disabled=f)},d:function(t){var e,n;t&&y(o),e="click",n=_,o.removeEventListener(e,n,!1),i.refs.thingElem===o&&(i.refs.thingElem=null),t&&(y(u),y(l))}}}function n(t){var e,n,i,o=this;n=t,(e=this)._handlers=Object.create(null),e._bind=n._bind,e.options=n,e.root=n.root||e,e.store=e.root.store||n.store,this.refs={},this._state=c(_extends({_notice:null,_options:{},_mouseIsIn:!1},r.modules.Reference.defaults),t.data),this._intro=!0,document.getElementById("svelte-1qy4b0e-style")||((i=d("style")).id="svelte-1qy4b0e-style",i.textContent=".ui-pnotify-reference-button.svelte-1qy4b0e{float:right}.ui-pnotify-reference-clearing.svelte-1qy4b0e{clear:right;line-height:0}",m(i,document.head)),t.root||(this._oncreate=[]),this._fragment=s(this,this._state),this.root._oncreate.push(function(){(function(){this.fire("init",{module:this})}).call(o),o.fire("update",{changed:function(t,e){for(var n in e)t[n]=1;return t}({},o._state),current:o._state})}),t.target&&(this._fragment.c(),this._mount(t.target,t.anchor),f(this._oncreate))}function d(t){return document.createElement(t)}function m(t,e){e.appendChild(t)}function p(t,e,n){e.insertBefore(t,n)}function y(t){t.parentNode.removeChild(t)}function g(t){return document.createTextNode(t)}function c(t,e){for(var n in e)t[n]=e[n];return t}function f(t){for(;t&&t.length;)t.shift()()}function i(){}return c(n.prototype,{destroy:function(t){this.destroy=i,this.fire("destroy"),this.set=i,this._fragment.d(!1!==t),this._fragment=null,this._state={}},get:function(){return this._state},fire:function(t,e){var n=t in this._handlers&&this._handlers[t].slice();if(!n)return;for(var i=0;i<n.length;i+=1){var o=n[i];o.__calling||(o.__calling=!0,o.call(this,e),o.__calling=!1)}},on:function(t,e){var n=this._handlers[t]||(this._handlers[t]=[]);return n.push(e),{cancel:function(){var t=n.indexOf(e);~t&&n.splice(t,1)}}},set:function(t){if(this._set(c({},t)),this.root._lock)return;this.root._lock=!0,f(this.root._beforecreate),f(this.root._oncreate),f(this.root._aftercreate),this.root._lock=!1},_set:function(t){var e=this._state,n={},i=!1;for(var o in t)this._differs(t[o],e[o])&&(n[o]=i=!0);if(!i)return;this._state=c(c({},e),t),this._recompute(n,this._state),this._bind&&this._bind(n,this._state);this._fragment&&(this.fire("state",{changed:n,current:this._state,previous:e}),this._fragment.p(n,this._state),this.fire("update",{changed:n,current:this._state,previous:e}))},_mount:function(t,e){this._fragment[this._fragment.i?"i":"m"](t,e||null)},_differs:function(t,e){return t!=t?e==e:t!==e||t&&"object"===(void 0===t?"undefined":_typeof(t))||"function"==typeof t}}),c(n.prototype,e),n.prototype._recompute=i,(t=n).key="Reference",t.defaults={putThing:!1,labels:{text:"Spin Around"}},r.modules.Reference=t,r.modulesAppendContainer.push(t),_extends(r.icons.brighttheme,{athing:"bt-icon bt-icon-refresh"}),_extends(r.icons.bootstrap3,{athing:"glyphicon glyphicon-refresh"}),_extends(r.icons.fontawesome4,{athing:"fa fa-refresh"}),_extends(r.icons.fontawesome5,{athing:"fas fa-sync"}),r.icons.material||(r.icons.material={}),_extends(r.icons.material,{athing:"material-icons pnotify-material-icon-refresh"}),n}(PNotify);
|
||
//# sourceMappingURL=PNotifyReference.js.map
|