1 line
9.5 KiB
JavaScript
1 line
9.5 KiB
JavaScript
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("SplitPane",[],t):"object"==typeof exports?exports.SplitPane=t():e.SplitPane=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/dist/",t(t.s=19)}([function(e,t){e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;t<this.length;t++){var n=this[t];n[2]?e.push("@media "+n[2]+"{"+n[1]+"}"):e.push(n[1])}return e.join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},i=0;i<this.length;i++){var s=this[i][0];"number"==typeof s&&(r[s]=!0)}for(i=0;i<t.length;i++){var o=t[i];"number"==typeof o[0]&&r[o[0]]||(n&&!o[2]?o[2]=n:n&&(o[2]="("+o[2]+") and ("+n+")"),e.push(o))}},e}},function(e,t){e.exports=function(e,t,n,r){var i,s=e=e||{},o=typeof e.default;"object"!==o&&"function"!==o||(i=e,s=e.default);var a="function"==typeof s?s.options:s;if(t&&(a.render=t.render,a.staticRenderFns=t.staticRenderFns),n&&(a._scopeId=n),r){var c=Object.create(a.computed||null);Object.keys(r).forEach(function(e){var t=r[e];c[e]=function(){return t}}),a.computed=c}return{esModule:i,exports:s,options:a}}},function(e,t,n){function r(e){for(var t=0;t<e.length;t++){var n=e[t],r=u[n.id];if(r){r.refs++;for(var i=0;i<r.parts.length;i++)r.parts[i](n.parts[i]);for(;i<n.parts.length;i++)r.parts.push(o(n.parts[i]));r.parts.length>n.parts.length&&(r.parts.length=n.parts.length)}else{for(var s=[],i=0;i<n.parts.length;i++)s.push(o(n.parts[i]));u[n.id]={id:n.id,refs:1,parts:s}}}}function i(e,t){for(var n=[],r={},i=0;i<t.length;i++){var s=t[i],o=s[0],a=s[1],c=s[2],l=s[3],u={css:a,media:c,sourceMap:l};r[o]?(u.id=e+":"+r[o].parts.length,r[o].parts.push(u)):(u.id=e+":0",n.push(r[o]={id:o,parts:[u]}))}return n}function s(){var e=document.createElement("style");return e.type="text/css",p.appendChild(e),e}function o(e){var t,n,r=document.querySelector('style[data-vue-ssr-id~="'+e.id+'"]'),i=null!=r;if(i&&h)return v;if(m){var o=d++;r=f||(f=s()),t=a.bind(null,r,o,!1),n=a.bind(null,r,o,!0)}else r=r||s(),t=c.bind(null,r),n=function(){r.parentNode.removeChild(r)};return i||t(e),function(r){if(r){if(r.css===e.css&&r.media===e.media&&r.sourceMap===e.sourceMap)return;t(e=r)}else n()}}function a(e,t,n,r){var i=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=g(t,i);else{var s=document.createTextNode(i),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(s,o[t]):e.appendChild(s)}}function c(e,t){var n=t.css,r=t.media,i=t.sourceMap;if(r&&e.setAttribute("media",r),i&&(n+="\n/*# sourceURL="+i.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var l="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!l)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var i=n(18),u={},p=l&&(document.head||document.getElementsByTagName("head")[0]),f=null,d=0,h=!1,v=function(){},m="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());e.exports=function(e,t,n){h=n;var s=i(e,t);return r(s),function(t){for(var n=[],o=0;o<s.length;o++){var a=s[o],c=u[a.id];c.refs--,n.push(c)}t?(s=i(e,t),r(s)):s=[];for(var o=0;o<n.length;o++){var c=n[o];if(0===c.refs){for(var l=0;l<c.parts.length;l++)c.parts[l]();delete u[c.id]}}}};var g=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}()},function(e,t,n){n(16);var r=n(1)(n(4),n(13),"data-v-566a42b8",null);e.exports=r.exports},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(11),s=r(i),o=n(10),a=r(o);t.default={name:"splitPane",components:{Resizer:s.default,Pane:a.default},props:{minPercent:{type:Number,default:10},defaultPercent:{type:Number,default:50},split:{validator:function(e){return["vertical","horizontal"].indexOf(e)>=0},required:!0},className:String},computed:{userSelect:function(){return this.active?"none":""},cursor:function(){return this.active?"col-resize":""}},watch:{defaultPercent:function(e,t){this.percent=e}},data:function(){return{active:!1,hasMoved:!1,height:null,percent:this.defaultPercent,type:"vertical"===this.split?"width":"height",resizeType:"vertical"===this.split?"left":"top"}},methods:{onClick:function(){this.hasMoved||(this.percent=50,this.$emit("resize"))},onMouseDown:function(){this.active=!0,this.hasMoved=!1},onMouseUp:function(){this.active=!1},onMouseMove:function(e){if(0!==e.buttons&&0!==e.which||(this.active=!1),this.active){var t=0,n=e.currentTarget;if("vertical"===this.split)for(;n;)t+=n.offsetLeft,n=n.offsetParent;else for(;n;)t+=n.offsetTop,n=n.offsetParent;var r="vertical"===this.split?e.pageX:e.pageY,i="vertical"===this.split?e.currentTarget.offsetWidth:e.currentTarget.offsetHeight,s=Math.floor((r-t)/i*1e4)/100;s>this.minPercent&&s<100-this.minPercent&&(this.percent=s),this.$emit("resize"),this.hasMoved=!0}}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={name:"Pane",props:{className:String},data:function(){return{classes:[this.$parent.split,this.className].join(" "),percent:50}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={props:{split:{validator:function(e){return["vertical","horizontal"].indexOf(e)>=0},required:!0},className:String},computed:{classes:function(){return["splitter-pane-resizer",this.split,this.className].join(" ")}}}},function(e,t,n){t=e.exports=n(0)(),t.push([e.i,".splitter-pane-resizer[data-v-212fa2a4]{box-sizing:border-box;background:#000;position:absolute;opacity:.2;z-index:1;background-clip:padding-box}.splitter-pane-resizer.horizontal[data-v-212fa2a4]{height:11px;margin:-5px 0;border-top:5px solid hsla(0,0%,100%,0);border-bottom:5px solid hsla(0,0%,100%,0);cursor:row-resize;width:100%}.splitter-pane-resizer.vertical[data-v-212fa2a4]{width:11px;height:100%;margin-left:-5px;border-left:5px solid hsla(0,0%,100%,0);border-right:5px solid hsla(0,0%,100%,0);cursor:col-resize}",""])},function(e,t,n){t=e.exports=n(0)(),t.push([e.i,'.clearfix[data-v-566a42b8]:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.vue-splitter-container[data-v-566a42b8]{height:100%;position:relative}.vue-splitter-container-mask[data-v-566a42b8]{z-index:9999;width:100%;height:100%;position:absolute;top:0;left:0}',""])},function(e,t,n){t=e.exports=n(0)(),t.push([e.i,".splitter-pane.vertical.splitter-paneL[data-v-815c801c]{position:absolute;left:0;height:100%;padding-right:3px}.splitter-pane.vertical.splitter-paneR[data-v-815c801c]{position:absolute;right:0;height:100%;padding-left:3px}.splitter-pane.horizontal.splitter-paneL[data-v-815c801c]{position:absolute;top:0;width:100%}.splitter-pane.horizontal.splitter-paneR[data-v-815c801c]{position:absolute;bottom:0;width:100%;padding-top:3px}",""])},function(e,t,n){n(17);var r=n(1)(n(5),n(14),"data-v-815c801c",null);e.exports=r.exports},function(e,t,n){n(15);var r=n(1)(n(6),n(12),"data-v-212fa2a4",null);e.exports=r.exports},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement;return(e._self._c||t)("div",{class:e.classes})},staticRenderFns:[]}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"vue-splitter-container clearfix",style:{cursor:e.cursor,userSelect:e.userSelect},on:{mouseup:e.onMouseUp,mousemove:e.onMouseMove}},[n("pane",{staticClass:"splitter-pane splitter-paneL",style:(r={},r[e.type]=e.percent+"%",r),attrs:{split:e.split}},[e._t("paneL")],2),e._v(" "),n("resizer",{style:(i={},i[e.resizeType]=e.percent+"%",i),attrs:{className:e.className,split:e.split},nativeOn:{mousedown:function(t){e.onMouseDown(t)},click:function(t){e.onClick(t)}}}),e._v(" "),n("pane",{staticClass:"splitter-pane splitter-paneR",style:(s={},s[e.type]=100-e.percent+"%",s),attrs:{split:e.split}},[e._t("paneR")],2),e._v(" "),e.active?n("div",{staticClass:"vue-splitter-container-mask"}):e._e()],1);var r,i,s},staticRenderFns:[]}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement;return(e._self._c||t)("div",{class:e.classes},[e._t("default")],2)},staticRenderFns:[]}},function(e,t,n){var r=n(7);"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);n(2)("93b24118",r,!0)},function(e,t,n){var r=n(8);"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);n(2)("084fcb29",r,!0)},function(e,t,n){var r=n(9);"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);n(2)("2e723840",r,!0)},function(e,t){e.exports=function(e,t){for(var n=[],r={},i=0;i<t.length;i++){var s=t[i],o=s[0],a=s[1],c=s[2],l=s[3],u={id:e+":"+i,css:a,media:c,sourceMap:l};r[o]?r[o].parts.push(u):n.push(r[o]={id:o,parts:[u]})}return n}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),s=r(i);t.default=s.default,"undefined"!=typeof window&&window.Vue&&window.Vue.component("split-pane",s.default)}])}); |