mirror of
https://github.com/Monibuca/plugin-ts.git
synced 2025-10-27 17:30:28 +08:00
2 lines
8.7 KiB
JavaScript
2 lines
8.7 KiB
JavaScript
(function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s="5a74")})({1471:function(t,e,n){var r=n("24fb");e=r(!1),e.push([t.i,".layout{padding-bottom:30px;display:flex;flex-wrap:wrap;padding:30px}.room{text-align:center}.room:hover{border:1px solid grey;border-radius:10%;cursor:pointer}.size{position:absolute;top:40%;left:0;right:0}",""]),t.exports=e},"20f8":function(t,e,n){"use strict";n.r(e);var r=n("84d5"),o=n.n(r);for(var i in r)"default"!==i&&function(t){n.d(e,t,(function(){return r[t]}))}(i);e["default"]=o.a},"24fb":function(t,e,n){"use strict";function r(t,e){var n=t[1]||"",r=t[3];if(!r)return n;if(e&&"function"===typeof btoa){var i=o(r),s=r.sources.map((function(t){return"/*# sourceURL=".concat(r.sourceRoot||"").concat(t," */")}));return[n].concat(s).concat([i]).join("\n")}return[n].join("\n")}function o(t){var e=btoa(unescape(encodeURIComponent(JSON.stringify(t)))),n="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(e);return"/*# ".concat(n," */")}t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=r(e,t);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},e.i=function(t,n,r){"string"===typeof t&&(t=[[null,t,""]]);var o={};if(r)for(var i=0;i<this.length;i++){var s=this[i][0];null!=s&&(o[s]=!0)}for(var a=0;a<t.length;a++){var c=[].concat(t[a]);r&&o[c[0]]||(n&&(c[2]?c[2]="".concat(n," and ").concat(c[2]):c[2]=n),e.push(c))}},e}},"35d6":function(t,e,n){"use strict";function r(t,e){for(var n=[],r={},o=0;o<e.length;o++){var i=e[o],s=i[0],a=i[1],c=i[2],u=i[3],l={id:t+":"+o,css:a,media:c,sourceMap:u};r[s]?r[s].parts.push(l):n.push(r[s]={id:s,parts:[l]})}return n}function o(t,e,n){var o=r(t,e);i(o,n)}function i(t,e){const n=e._injectedStyles||(e._injectedStyles={});for(var r=0;r<t.length;r++){var o=t[r],i=n[o.id];if(!i){for(var s=0;s<o.parts.length;s++)a(o.parts[s],e);n[o.id]=!0}}}function s(t){var e=document.createElement("style");return e.type="text/css",t.appendChild(e),e}function a(t,e){var n=s(e),r=t.css,o=t.media,i=t.sourceMap;if(o&&n.setAttribute("media",o),i&&(r+="\n/*# sourceURL="+i.sources[0]+" */",r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),n.styleSheet)n.styleSheet.cssText=r;else{while(n.firstChild)n.removeChild(n.firstChild);n.appendChild(document.createTextNode(r))}}n.r(e),n.d(e,"default",(function(){return o}))},"5a74":function(t,e,n){"use strict";var r;(n.r(e),"undefined"!==typeof window)&&(Object({NODE_ENV:"production",BASE_URL:"/"}).NEED_CURRENTSCRIPT_POLYFILL&&n("f6fd"),(r=window.document.currentScript)&&(r=r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/))&&(n.p=r[1]));var o=n("8bbf"),i=n.n(o);const s=/-(\w)/g,a=t=>t.replace(s,(t,e)=>e?e.toUpperCase():""),c=/\B([A-Z])/g,u=t=>t.replace(c,"-$1").toLowerCase();function l(t){const e={};return t.forEach(t=>{e[t]=void 0}),e}function f(t,e,n){t[e]=[].concat(t[e]||[]),t[e].unshift(n)}function p(t,e){if(t){const n=t.$options[e]||[];n.forEach(e=>{e.call(t)})}}function d(t,e){return new CustomEvent(t,{bubbles:!1,cancelable:!1,detail:e})}const h=t=>/function Boolean/.test(String(t)),m=t=>/function Number/.test(String(t));function v(t,e,{type:n}={}){if(h(n))return"true"===t||"false"===t?"true"===t:""===t||t===e||null!=t;if(m(n)){const e=parseFloat(t,10);return isNaN(e)?t:e}return t}function b(t,e){const n=[];for(let r=0,o=e.length;r<o;r++)n.push(_(t,e[r]));return n}function _(t,e){if(3===e.nodeType)return e.data.trim()?e.data:null;if(1===e.nodeType){const n={attrs:y(e),domProps:{innerHTML:e.innerHTML}};return n.attrs.slot&&(n.slot=n.attrs.slot,delete n.attrs.slot),t(e.tagName,n)}return null}function y(t){const e={};for(let n=0,r=t.attributes.length;n<r;n++){const r=t.attributes[n];e[r.nodeName]=r.nodeValue}return e}function g(t,e){const n="function"===typeof e&&!e.cid;let r,o,i,s=!1;function c(t){if(s)return;const e="function"===typeof t?t.options:t,n=Array.isArray(e.props)?e.props:Object.keys(e.props||{});r=n.map(u),o=n.map(a);const c=Array.isArray(e.props)?{}:e.props||{};i=o.reduce((t,e,r)=>(t[e]=c[n[r]],t),{}),f(e,"beforeCreate",(function(){const t=this.$emit;this.$emit=(e,...n)=>(this.$root.$options.customElement.dispatchEvent(d(e,n)),t.call(this,e,...n))})),f(e,"created",(function(){o.forEach(t=>{this.$root.props[t]=this[t]})})),o.forEach(t=>{Object.defineProperty(m.prototype,t,{get(){return this._wrapper.props[t]},set(e){this._wrapper.props[t]=e},enumerable:!1,configurable:!0})}),s=!0}function h(t,e){const n=a(e),r=t.hasAttribute(e)?t.getAttribute(e):void 0;t._wrapper.props[n]=v(r,e,i[n])}class m extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"});const n=this._wrapper=new t({name:"shadow-root",customElement:this,shadowRoot:this.shadowRoot,data(){return{props:{},slotChildren:[]}},render(t){return t(e,{ref:"inner",props:this.props},this.slotChildren)}}),r=new MutationObserver(t=>{let e=!1;for(let n=0;n<t.length;n++){const r=t[n];s&&"attributes"===r.type&&r.target===this?h(this,r.attributeName):e=!0}e&&(n.slotChildren=Object.freeze(b(n.$createElement,this.childNodes)))});r.observe(this,{childList:!0,subtree:!0,characterData:!0,attributes:!0})}get vueComponent(){return this._wrapper.$refs.inner}connectedCallback(){const t=this._wrapper;if(t._isMounted)p(this.vueComponent,"activated");else{const n=()=>{t.props=l(o),r.forEach(t=>{h(this,t)})};s?n():e().then(t=>{(t.__esModule||"Module"===t[Symbol.toStringTag])&&(t=t.default),c(t),n()}),t.slotChildren=Object.freeze(b(t.$createElement,this.childNodes)),t.$mount(),this.shadowRoot.appendChild(t.$el)}}disconnectedCallback(){p(this.vueComponent,"deactivated")}}return n||c(e),m}var w=g;n("24fb"),n("35d6");function C(t,e,n,r,o,i,s,a){var c,u="function"===typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),r&&(u.functional=!0),i&&(u._scopeId="data-v-"+i),s?(c=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},u._ssrRegister=c):o&&(c=a?function(){o.call(this,this.$root.$options.shadowRoot)}:o),c)if(u.functional){u._injectStyles=c;var l=u.render;u.render=function(t,e){return c.call(e),l(t,e)}}else{var f=u.beforeCreate;u.beforeCreate=f?[].concat(f,c):[c]}return{exports:t,options:u}}var S=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"layout"},[t._l(t.Rooms,(function(e){return n("Badge",{key:e.StreamPath,staticClass:"room",attrs:{count:e.TsCount},nativeOn:{click:function(n){return t.publish(e)}}},[n("Icon",{attrs:{type:"ios-folder-open-outline",size:"100"}}),n("div",{staticClass:"size"},[t._v(t._s(t.unitFormat(e.TotalSize)))]),n("div",[t._v(t._s(e.StreamPath))])],1)})),0==t.Rooms.length?n("div",{staticClass:"empty"},[n("Icon",{attrs:{type:"md-wine",size:"50"}}),t._v("没有任何文件夹 ")],1):t._e()],2)},j=[],x={data(){return{Rooms:[]}},methods:{fetchlist(){window.ajax.getJSON("/ts/list").then(t=>{this.Rooms=t})},publish(t){this.$Modal.confirm({title:"提示",content:"是否发布该目录",onOk(){window.ajax.getJSON("/ts/publish?streamPath="+t.StreamPath)}})},unitFormat:window.unitFormat},mounted(){this.fetchlist()}},E=x;function O(t){var e=n("20f8");e.__inject__&&e.__inject__(t)}var R=C(E,S,j,!1,O,null,null,!0),$=R.exports;window.customElements.define("plugin-ts",w(i.a,$))},"84d5":function(t,e,n){var r=n("1471");"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var o=n("35d6").default;t.exports.__inject__=function(t){o("452152fc",r,t)}},"8bbf":function(t,e){t.exports=Vue},f6fd:function(t,e){(function(t){var e="currentScript",n=t.getElementsByTagName("script");e in t||Object.defineProperty(t,e,{get:function(){try{throw new Error}catch(r){var t,e=(/.*at [^\(]*\((.*):.+:.+\)$/gi.exec(r.stack)||[!1])[1];for(t in n)if(n[t].src==e||"interactive"==n[t].readyState)return n[t];return null}}})})(document)}});
|
|
//# sourceMappingURL=plugin-ts.min.js.map
|