regular-hotzone
Version:
Hot Zone of Regular Components
1 lines • 50.6 kB
JavaScript
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("regularjs"),require("clipboard")):"function"==typeof define&&define.amd?define(["regularjs","clipboard"],e):"object"==typeof exports?exports.regularHotZone=e(require("regularjs"),require("clipboard")):t.regularHotZone=e(t.Regular,t.Clipboard)}(this,function(t,e){return function(t){function e(i){if(n[i])return n[i].exports;var o=n[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};return e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,i){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:i})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/dist/",e(e.s=30)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),o=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(i),r={};r.extend=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];for(var i in e)(void 0===t[i]||null===t[i]||n)&&void 0!==e[i]&&(t[i]=e[i]);return t},r.checkUrl=function(t,e){return new RegExp(e||"^((.*?:)?\\/\\/)((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.?)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[\\d\\D]*)?(\\#[-a-z\\d_]*)?$","ig").test(t)},r.getMultiple=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.DECIMAL_PLACES;return Math.pow(10,t)},r.decimalPoint=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return Math.round(t*r.getMultiple())/r.getMultiple()||0},r.getOffset=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{width:t.clientWidth||0,height:t.clientHeight||0}},r.getPageX=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t.hasOwnProperty("pageX")?t.pageX:t.touches[0].pageX},r.getPageY=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t.hasOwnProperty("pageY")?t.pageY:t.touches[0].pageY},r.getDistanceX=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r.getPageX(t)-(e.getBoundingClientRect().left+window.pageXOffset)},r.getDistanceY=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r.getPageY(t)-(e.getBoundingClientRect().top+window.pageYOffset)},r.throttle=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=+new Date,r=0,a=0,s=null,l=void 0,u=void 0,d=void 0,c=function(){a=o,t.apply(u,d)};return function(){o=+new Date,u=this,d=arguments,l=o-(n?r:a)-e,s&&clearTimeout(s),n?i?l>=0&&c():s=setTimeout(c,e):l>=0?c():i||(s=setTimeout(c,-l)),r=o}},r.debounce=function(t,e){return r.throttle(t,e,!0)},e.default=r},function(e,n){e.exports=t},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.MIN_LIMIT=48,e.DECIMAL_PLACES=4,e.MIDDLE_TEXT_HEIGHT=30,e.BTN_VERTICAL_SPACING=10,e.BTN_HORIZONTAL_SPACING=10},function(t,e,n){t.exports={default:n(33),__esModule:!0}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(22),r=i(o),a=n(26),s=i(a),l=n(25),u=i(l),d=n(24),c=i(d),f=n(23),h=i(f);e.default={"r-addItem":r.default,"r-resizeImg":s.default,"r-dragItem":u.default,"r-changeSize":c.default,"r-autofocus":h.default}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(3),r=i(o),a=n(2),s=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(a),l=n(0),u=i(l),d=s.MIN_LIMIT;e.default={limitMin:function(t,e){var n={};return t.heightPer*e.height<d&&(n.heightPer=u.default.decimalPoint(d/e.height)),t.widthPer*e.width<d&&(n.widthPer=u.default.decimalPoint(d/e.width)),n.heightPer&&t.topPer+n.heightPer>1&&(n.topPer=u.default.decimalPoint(1-n.heightPer)),n.widthPer&&t.leftPer+n.widthPer>1&&(n.leftPer=u.default.decimalPoint(1-n.widthPer)),(n.hasOwnProperty("heightPer")&&n.heightPer!==t.heightPer||n.hasOwnProperty("widthPer")&&n.widthPer!==t.widthPer||n.hasOwnProperty("topPer")&&n.topPer!==t.topPer||n.hasOwnProperty("leftPer")&&n.leftPer!==t.leftPer)&&n},dealEdgeValue:function(t,e,n){return e.hasOwnProperty("left")&&e.left<0&&(e.left=0,e.width=t.width+t.left),e.hasOwnProperty("top")&&e.top<0&&(e.top=0,e.height=t.height+t.top),!e.hasOwnProperty("left")&&e.hasOwnProperty("width")&&t.left+e.width>n.width&&(e.width=n.width-t.left),!e.hasOwnProperty("top")&&e.hasOwnProperty("height")&&t.top+e.height>n.height&&(e.height=n.height-t.top),(0,r.default)(t,e)},dealTL:function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:d,o={},a=t.width-e,s=t.height-n;return a>=Math.min(i,t.width)&&(0,r.default)(o,{width:a,left:t.left+e}),s>=Math.min(i,t.height)&&(0,r.default)(o,{height:s,top:t.top+n}),o},dealTC:function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:d,o={},r=t.height-n;return r>=Math.min(i,t.height)&&(o={height:r,top:t.top+n}),o},dealTR:function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:d,o={},a=t.width+e,s=t.height-n;return a>=Math.min(i,t.width)&&(0,r.default)(o,{width:a}),s>=Math.min(i,t.height)&&(0,r.default)(o,{height:s,top:t.top+n}),o},dealCL:function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:d,o={},a=t.width-e;return a>=Math.min(i,t.width)&&(0,r.default)(o,{width:a,left:t.left+e}),o},dealCR:function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:d,o={},a=t.width+e;return a>=Math.min(i,t.width)&&(0,r.default)(o,{width:a}),o},dealBL:function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:d,o={},a=t.width-e,s=t.height+n;return a>=Math.min(i,t.width)&&(0,r.default)(o,{width:a,left:t.left+e}),s>=Math.min(i,t.height)&&(0,r.default)(o,{height:s}),o},dealBC:function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:d,o={},a=t.height+n;return a>=Math.min(i,t.height)&&(0,r.default)(o,{height:a}),o},dealBR:function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:d,o={},a=t.width+e,s=t.height+n;return a>=Math.min(i,t.width)&&(0,r.default)(o,{width:a}),s>=Math.min(i,t.height)&&(0,r.default)(o,{height:s}),o}}},function(t,e){var n=t.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},function(t,e,n){t.exports=!n(8)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={trim:{get:function(t){return t},set:function(t){return t.trim()||""}},toNum:{get:function(t){return t},set:function(t){return t?1:0}},jumpWay:function(t){return{0:"当前页面打开",1:"新开页面"}[t]},getTarget:function(t){return{0:"_self",1:"_blank"}[t]}}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var i=n(37);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==i(t)?t.split(""):Object(t)}},function(t,e){var n=Math.ceil,i=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?i:n)(t)}},function(t,e,n){var i=n(14),o=n(12);t.exports=function(t){return i(o(t))}},function(t,e,n){"use strict";var i=t.exports={};i.isIE=function(t){return!!function(){var t=navigator.userAgent.toLowerCase();return-1!==t.indexOf("msie")||-1!==t.indexOf("trident")||-1!==t.indexOf(" edge/")}()&&(!t||t===function(){var t=3,e=document.createElement("div"),n=e.getElementsByTagName("i");do{e.innerHTML="\x3c!--[if gt IE "+ ++t+"]><i></i><![endif]--\x3e"}while(n[0]);return t>4?t:void 0}())},i.isLegacyOpera=function(){return!!window.opera}},function(t,e,n){"use strict";(t.exports={}).forEach=function(t,e){for(var n=0;n<t.length;n++){var i=e(t[n]);if(i)return i}}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(3),r=i(o),a=n(1),s=i(a),l=n(71),u=i(l),d=n(27),c=i(d),f=n(28),h=i(f),p=n(0),g=i(p),v=n(29),m=i(v),y=n(11),w=i(y),b=n(4),P=i(b),x=n(5),z=i(x),_=n(2),E=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(_),S=s.default.extend({template:u.default,config:function(t){var e=this;t.setting&&!t.setting.hasOwnProperty("target")&&(t.setting.target=1),this.supr(t),this.$watch(["setting.heightPer","setting.widthPer"],function(n){n&&setTimeout(function(){var n=g.default.getOffset(e.$parent.$refs.content);e.checkSize(t.setting,n)},0)})},checkSize:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=E.MIN_LIMIT,i=E.MIDDLE_TEXT_HEIGHT,o=E.BTN_VERTICAL_SPACING,a=E.BTN_HORIZONTAL_SPACING,s=n+o+i,l=n+a;if(e.height*t.heightPer<=s||e.width*t.widthPer<=l?this.removeSpacing(!0):this.removeSpacing(!1),!(!e.height||!e.width||e.height<n||e.width<n)){var u=z.default.limitMin(t,e);u&&((0,r.default)(this.data.setting,u),this.changeInfo(u),this.$update())}},removeSpacing:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.data.removeSpacing!==t&&(this.data.removeSpacing=t,this.$update())},hideZone:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.data.hideZone!==t&&(this.data.hideZone=t,this.$update())},stopPropagation:function(t){t&&t.stopPropagation()},setInfo:function(t){var e=this;this.stopPropagation(t);var n=this.data,i=n.hasCallback,o=n.index,r=n.config,a=this.data.setting,s=a.link,l=a.target;if(i)this.$emit("itemClick",o);else{new c.default({data:{link:s,target:l,config:r}}).$on("ok",function(t){e.changeInfo(t)})}},changeInfo:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.data.index;this.$emit("changeInfo",{info:t,index:e})},delItem:function(t,e){this.$emit("delItem",e)},copySuccess:function(t){this.$emit("copySuccess",t)},copyError:function(t){console.error("Action:",t.action),console.error("Trigger:",t.trigger),this.$emit("copyError",t)},notRange:function(t,e){return"100%"!==t||"100%"!==e},computed:m.default}).filter(w.default).directive(P.default).component("Replicator",h.default);S.Replicator=h.default,e.default=S},function(t,e){},function(t,e){t.exports='{#if image}\n<div ref="content" class="hz-m-wrap {class}" r-class={{\'hz-m-view\': !isEdit}} r-resizeImg\n> <img class="hz-u-img" src={image} /> <ul class="hz-m-area" {#if isEdit} r-addItem {/if} > {#list zones as item by item_index} <Zone class="hz-m-item" isEdit={isEdit} config={config} index={item_index} hasCallback={hasCallback} ref={\'zone_\' + item_index} setting={zones[item_index]} on-delItem={this.removeItem($event)} on-itemClick={this.itemClick($event)} on-changeInfo={this.changeInfo($event)} on-copySuccess={this.copySuccess($event)} on-copyError={this.copyError($event)} ></Zone> {/list} </ul>\n</div>\n{/if}'},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t){function e(e){function i(e){e&&e.preventDefault();var n=h.default.getPageX(e)-d,i=h.default.getPageY(e)-f;d=h.default.getPageX(e),f=h.default.getPageY(e);var o=c.default.dealBR(r,n,i,0);r=c.default.dealEdgeValue(r,o,l),s.dom.css(t.lastElementChild,{top:r.top+"px",left:r.left+"px",width:r.width+"px",height:r.height+"px"})}function o(){var t={topPer:h.default.decimalPoint(r.top/l.height),leftPer:h.default.decimalPoint(r.left/l.width),widthPer:h.default.decimalPoint(r.width/l.width),heightPer:h.default.decimalPoint(r.height/l.height)};n.isOverRange()?n.overRange():l.height<p&&r.width>p?(n.changeItem((0,a.default)(t,{topPer:0,heightPer:1})),n.setItem()):l.width<p&&r.height>p?(n.changeItem((0,a.default)(t,{leftper:0,widthPer:1})),n.setItem()):r.width>p&&r.height>p?(n.changeItem(t),n.setItem()):n.eraseItem(),s.dom.off(window,"mousemove",i),s.dom.off(window,"mouseup",o)}e&&e.preventDefault();var r={top:h.default.getDistanceY(e,t),left:h.default.getDistanceX(e,t),width:0,height:0},l=h.default.getOffset(t),u={topPer:h.default.decimalPoint(r.top/l.height),leftPer:h.default.decimalPoint(r.left/l.width),widthPer:0,heightPer:0},d=h.default.getPageX(e),f=h.default.getPageY(e);n.addItem(u),s.dom.on(window,"mousemove",i),s.dom.on(window,"mouseup",o)}var n=this;return s.dom.on(t,"mousedown",e),function(){s.dom.off(t,"mousedown",e)}}Object.defineProperty(e,"__esModule",{value:!0});var r=n(3),a=i(r);e.default=o;var s=n(1),l=n(2),u=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(l),d=n(5),c=i(d),f=n(0),h=i(f),p=u.MIN_LIMIT},function(t,e,n){"use strict";function i(t){setTimeout(function(){t.focus()},0)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=i},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t){function e(e){function i(t){t&&t.preventDefault(),g=!0;var e=u.default.getPageX(t)-h,n=u.default.getPageY(t)-p;h=u.default.getPageX(t),p=u.default.getPageY(t);var i=s.default[a](f,e,n);f=s.default.dealEdgeValue(f,i,c),r.dom.css(l,{top:f.top+"px",left:f.left+"px",width:f.width+"px",height:f.height+"px"})}function o(){if(g){g=!1;var t={topPer:u.default.decimalPoint(f.top/c.height),leftPer:u.default.decimalPoint(f.left/c.width),widthPer:u.default.decimalPoint(f.width/c.width),heightPer:u.default.decimalPoint(f.height/c.height)};n.changeInfo(t),r.dom.css(l,{top:100*t.topPer+"%",left:100*t.leftPer+"%",width:100*t.widthPer+"%",height:100*t.heightPer+"%"})}n.hideZone(!1),r.dom.off(window,"mousemove",i),r.dom.off(window,"mouseup",o)}var a=e.target.dataset.pointer;if(a){e&&e.stopPropagation();var l=t.parentNode,d=n.data.setting,c=u.default.getOffset(l.parentNode),f={width:u.default.getOffset(l).width||0,height:u.default.getOffset(l).height||0,top:d.topPer*c.height||0,left:d.leftPer*c.width||0},h=u.default.getPageX(e),p=u.default.getPageY(e),g=void 0;n.hideZone(!0),r.dom.on(window,"mousemove",i),r.dom.on(window,"mouseup",o)}}var n=this;return r.dom.on(t,"mousedown",e),function(){r.dom.off(t,"mousedown",e)}}Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var r=n(1),a=n(5),s=i(a),l=n(0),u=i(l)},function(t,e,n){"use strict";function i(t){function e(e){function i(e){e&&e.preventDefault(),f=!0,n.hideZone(!0);var i=n.data.setting,r=a.default.getPageX(e)-l,h=a.default.getPageY(e)-u;i.topPer=i.topPer||0,i.leftPer=i.leftPer||0,d=a.default.decimalPoint(h/s.height+i.topPer),c=a.default.decimalPoint(r/s.width+i.leftPer),d<0&&(d=0,h=-s.height*i.topPer),c<0&&(c=0,r=-s.width*i.leftPer),d+i.heightPer>1&&(d=1-i.heightPer,h=s.height*(d-i.topPer)),c+i.widthPer>1&&(c=1-i.widthPer,r=s.width*(c-i.leftPer)),o.dom.css(t,{transform:"translate("+r+"px, "+h+"px)"})}function r(){f&&(f=!1,o.dom.css(t,{transform:"translate(0, 0)"}),n.changeInfo({topPer:d,leftPer:c})),n.hideZone(!1),o.dom.off(window,"mousemove",i),o.dom.off(window,"mouseup",r)}e&&e.stopPropagation();var s=a.default.getOffset(t.parentNode),l=a.default.getPageX(e),u=a.default.getPageY(e),d=void 0,c=void 0,f=void 0;o.dom.on(window,"mousemove",i),o.dom.on(window,"mouseup",r)}var n=this;return o.dom.on(t,"mousedown",e),function(){o.dom.off(t,"mousedown",e)}}Object.defineProperty(e,"__esModule",{value:!0}),e.default=i;var o=n(1),r=n(0),a=function(t){return t&&t.__esModule?t:{default:t}}(r)},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t){var e=this,n=l.default.debounce(function(){var n=l.default.getOffset(t),i=e.data.zones||[];!i.length||!n.height||!n.width||n.height<c||n.width<c||i.forEach(function(t,i){return e.$refs["zone_"+i].checkSize(t,n)})},500);return f.listenTo(t,n),function(){f.removeListener(t,n)}}Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var r=n(2),a=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(r),s=n(0),l=i(s),u=n(62),d=i(u),c=a.MIN_LIMIT,f=(0,d.default)()},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),r=i(o),a=n(69),s=i(a),l=n(0),u=i(l),d=n(11),c=i(d),f=n(4),h=i(f),p=r.default.extend({name:"modal",template:s.default,checkUrl:u.default.checkUrl,config:function(t){u.default.extend(t,{link:"https://",isUrl:!0,config:{}}),this.supr(t)},init:function(){this.supr(),this.$root===this&&this.$inject(document.body)},removeTip:function(){this.data.isUrl=!0},handleKeyDown:function(t,e,n){13!==t.keyCode&&13!==t.which||(t&&t.preventDefault(),this.$refs.link.blur(),this.ok(e,n)),27!==t.keyCode&&27!==t.which||this.cancel()},ok:function(t,e){this.data.isUrl=this.checkUrl(t,this.data.config.pattern),this.data.isUrl&&(this.$emit("ok",{link:t,target:e}),this.destroy())},cancel:function(){this.$emit("cancel"),this.destroy()}}).filter(c.default).directive(h.default);e.default=p},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"j-rand-"+(100*Math.random()).toFixed(0);for("string"==typeof t&&""!==t||(t=e);null!==h(t);)t=e+"-"+(100*Math.random()).toFixed(0);return t}Object.defineProperty(e,"__esModule",{value:!0});var r=n(3),a=i(r),s=n(1),l=i(s),u=n(70),d=i(u),c=n(72),f=i(c),h=document.getElementById.bind(document),p=window.clipboardData&&window.clipboardData.setData,g=l.default.extend({template:d.default,config:function(t){(0,a.default)({btnText:"复制",copyText:"",mustDoCopy:!0},t),t.id=o("","j-replicator"),t.isolate&&console.log('%cIt will be copied just one time with param "isolate"',"color:#5C3B00;background-color:#FFFBE6;"),this.supr(t)},_initClipboard:function(){var t=this;if(f.default.isSupported()){var e=this;this.clipboard=new f.default("#"+this.data.id+">input[data-for-copy]",{text:function(){return e.data.copyText}}),this.clipboard.on("success",function(){t.$emit("success",t.data.copyText)}),this.clipboard.on("error",function(e){t.$emit("error",e),t.data.mustDoCopy&&t._mustDoCopy()})}else this.clipboard=null,console.log("%c抱歉,您当前所用的浏览器暂时不支持clipboard插件","color:#5C3B00;background-color:#FFFBE6;");this.$update()},init:function(){var t=this;this.supr(),this.$on("$destroy",function(){t.clipboard&&t.clipboard.destroy()}),this.$root===this?(this.data.visible=!1,this.$on("inject",function(){return t._initClipboard()}),this.$inject(document.body)):(this.data.visible=!0,this._initClipboard())},_onClick:function(t){this.copy(this.data.copyText,t.event)},copy:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.data.copyText,e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e)try{this._normalCopy(t,e)}catch(e){this._otherCopy(t)}else console.warn('%cParam "event" should be passed in!',"color:#5C3B00;background-color:#FFFBE6;"),this._otherCopy(t)},_normalCopy:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.data.copyText,e=arguments[1];this.data.copyText=t,this.$update(),this.clipboard&&this.clipboard.onClick(e)},_otherCopy:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.data.copyText;this.data.copyText=t,this.$update();var e=this.$refs.input;try{p?window.clipboardData.setData("text",t):(e.select(),document.execCommand("copy")),this.$emit("success",t)}catch(e){console.warn(e),this.$emit("error",e),this.data.mustDoCopy&&this._mustDoCopy(t)}},_mustDoCopy:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.data.copyText;window.prompt("Copy to clipboard:(Ctrl+C)",t)}});e.default=g},function(t,e,n){"use strict";function i(t){return 100*(t||0)+"%"}function o(t,e){return e>=.5?"50%":t+e/2<=.5?"100%":"initial"}function r(t,e){return e<.5&&t+e/2>.5?"100%":"initial"}Object.defineProperty(e,"__esModule",{value:!0});var a=n(2),s=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(a);e.default={zoneTop:function(){return i(this.data.setting.topPer)},zoneLeft:function(){return i(this.data.setting.leftPer)},zoneWidth:function(){return i(this.data.setting.widthPer)},zoneHeight:function(){return i(this.data.setting.heightPer)},infoTop:function(){var t=this.data.setting;return o(t.topPer,t.heightPer)},infoLeft:function(){var t=this.data.setting;return o(t.leftPer,t.widthPer)},infoBottom:function(){var t=this.data.setting;return r(t.topPer,t.heightPer)},infoRight:function(){var t=this.data.setting;return r(t.leftPer,t.widthPer)},infoTransform:function(){var t=this.data.setting;return"translate("+(t.widthPer>=.5?-50:0)+"%, "+(t.heightPer>=.5?t.widthPer>=.5?-100:-50:0)+"%)"},tooSmall:function(){var t=this.data.setting;return t.widthPer<.01&&t.heightPer<.01},btnsMinWidth:function(){var t=this.data.removeSpacing,e=void 0!==t&&t;return s.MIN_LIMIT+(e?0:s.BTN_HORIZONTAL_SPACING)+"px"},editBtnMargin:function(){var t=this.data.removeSpacing;return void 0!==t&&t?"0":"0 "+.5*s.BTN_HORIZONTAL_SPACING+"px "+s.BTN_VERTICAL_SPACING+"px 0"},copyBtnMargin:function(){var t=this.data.removeSpacing;return void 0!==t&&t?"0":"0 0 "+s.BTN_VERTICAL_SPACING+"px "+.5*s.BTN_HORIZONTAL_SPACING+"px"}}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}var o=n(3),r=i(o);n(20);var a=n(1),s=i(a),l=n(21),u=i(l),d=n(19),c=i(d),f=n(0),h=i(f),p=n(4),g=i(p),v=s.default.extend({template:u.default,config:function(t){h.default.extend(t,{hasCallback:!!this._handles&&!!this._handles.itemClick,isEdit:!0,config:{},zones:[]}),this.supr(t)},changeInfo:function(t){var e=t.info,n=t.index;this.changeItem(e,n)},addItem:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.data.zones.push(t),this.$emit("add",t),this.hasChange()},eraseItem:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.data.zones.length-1;this.$emit("erase",t),this.removeItem(t)},isOverRange:function(){var t=this.data,e=t.config,n=void 0===e?{}:e,i=t.zones,o=void 0===i?[]:i;return n.hasOwnProperty("maxNum")&&o.length>n.maxNum},overRange:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.data.zones.length-1;this.$emit("overRange",t),this.removeItem(t)},removeItem:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.data.zones.length-1;this.data.zones.splice(t,1),this.$emit("remove",t),this.hasChange()},setItem:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.data.zones.length-1;this.$refs["zone_"+t].setInfo()},changeItem:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.data.zones.length-1;(0,r.default)(this.data.zones[e],t),this.hasChange()},hasChange:function(){this.$emit("change",this.data.zones),this.$update()},itemClick:function(t){this.$emit("itemClick",t)},copySuccess:function(t){this.$emit("copySuccess",t)},copyError:function(t){this.$emit("copyError",t)},getInfo:function(){return this.data.zones}}).directive(g.default);v.component("Zone",c.default),v.Zone=c.default,t.exports=v},function(t,e,n){"use strict";function i(){function t(t,e){e||(e=t,t=0),t>r?r=t:t<a&&(a=t),i[t]||(i[t]=[]),i[t].push(e),o++}function e(){for(var t=a;t<=r;t++)for(var e=i[t],n=0;n<e.length;n++){var o=e[n];o()}}function n(){return o}var i={},o=0,r=0,a=0;return{add:t,process:e,size:n}}var o=n(32);t.exports=function(t){function e(t,e){!p&&c&&d&&0===h.size()&&a(),h.add(t,e)}function n(){for(p=!0;h.size();){var t=h;h=i(),t.process()}p=!1}function r(t){p||(void 0===t&&(t=d),f&&(s(f),f=null),t?a():n())}function a(){f=l(n)}function s(t){return clearTimeout(t)}function l(t){return function(t){return setTimeout(t,0)}(t)}t=t||{};var u=t.reporter,d=o.getOption(t,"async",!0),c=o.getOption(t,"auto",!0);c&&!d&&(u&&u.warn("Invalid options combination. auto=true and async=false is invalid. Setting async=true."),d=!0);var f,h=i(),p=!1;return{add:e,force:r}}},function(t,e,n){"use strict";function i(t,e,n){var i=t[e];return void 0!==i&&null!==i||void 0===n?i:n}(t.exports={}).getOption=i},function(t,e,n){n(59),t.exports=n(6).Object.assign},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var i=n(10);t.exports=function(t){if(!i(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){var i=n(16),o=n(55),r=n(54);t.exports=function(t){return function(e,n,a){var s,l=i(e),u=o(l.length),d=r(a,u);if(t&&n!=n){for(;u>d;)if((s=l[d++])!=s)return!0}else for(;u>d;d++)if((t||d in l)&&l[d]===n)return t||d||0;return!t&&-1}}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var i=n(34);t.exports=function(t,e,n){if(i(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,i){return t.call(e,n,i)};case 3:return function(n,i,o){return t.call(e,n,i,o)}}return function(){return t.apply(e,arguments)}}},function(t,e,n){var i=n(10),o=n(9).document,r=i(o)&&i(o.createElement);t.exports=function(t){return r?o.createElement(t):{}}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var i=n(9),o=n(6),r=n(38),a=n(42),s=n(13),l=function(t,e,n){var u,d,c,f=t&l.F,h=t&l.G,p=t&l.S,g=t&l.P,v=t&l.B,m=t&l.W,y=h?o:o[e]||(o[e]={}),w=y.prototype,b=h?i:p?i[e]:(i[e]||{}).prototype;h&&(n=e);for(u in n)(d=!f&&b&&void 0!==b[u])&&s(y,u)||(c=d?b[u]:n[u],y[u]=h&&"function"!=typeof b[u]?n[u]:v&&d?r(c,i):m&&b[u]==c?function(t){var e=function(e,n,i){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,i)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(c):g&&"function"==typeof c?r(Function.call,c):c,g&&((y.virtual||(y.virtual={}))[u]=c,t&l.R&&w&&!w[u]&&a(w,u,c)))};l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,t.exports=l},function(t,e,n){var i=n(46),o=n(51);t.exports=n(7)?function(t,e,n){return i.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){t.exports=!n(7)&&!n(8)(function(){return 7!=Object.defineProperty(n(39)("div"),"a",{get:function(){return 7}}).a})},function(t,e){t.exports=!0},function(t,e,n){"use strict";var i=n(49),o=n(47),r=n(50),a=n(56),s=n(14),l=Object.assign;t.exports=!l||n(8)(function(){var t={},e={},n=Symbol(),i="abcdefghijklmnopqrst";return t[n]=7,i.split("").forEach(function(t){e[t]=t}),7!=l({},t)[n]||Object.keys(l({},e)).join("")!=i})?function(t,e){for(var n=a(t),l=arguments.length,u=1,d=o.f,c=r.f;l>u;)for(var f,h=s(arguments[u++]),p=d?i(h).concat(d(h)):i(h),g=p.length,v=0;g>v;)c.call(h,f=p[v++])&&(n[f]=h[f]);return n}:l},function(t,e,n){var i=n(35),o=n(43),r=n(57),a=Object.defineProperty;e.f=n(7)?Object.defineProperty:function(t,e,n){if(i(t),e=r(e,!0),i(n),o)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var i=n(13),o=n(16),r=n(36)(!1),a=n(52)("IE_PROTO");t.exports=function(t,e){var n,s=o(t),l=0,u=[];for(n in s)n!=a&&i(s,n)&&u.push(n);for(;e.length>l;)i(s,n=e[l++])&&(~r(u,n)||u.push(n));return u}},function(t,e,n){var i=n(48),o=n(40);t.exports=Object.keys||function(t){return i(t,o)}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var i=n(53)("keys"),o=n(58);t.exports=function(t){return i[t]||(i[t]=o(t))}},function(t,e,n){var i=n(6),o=n(9),r=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(t.exports=function(t,e){return r[t]||(r[t]=void 0!==e?e:{})})("versions",[]).push({version:i.version,mode:n(44)?"pure":"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})},function(t,e,n){var i=n(15),o=Math.max,r=Math.min;t.exports=function(t,e){return t=i(t),t<0?o(t+e,0):r(t,e)}},function(t,e,n){var i=n(15),o=Math.min;t.exports=function(t){return t>0?o(i(t),9007199254740991):0}},function(t,e,n){var i=n(12);t.exports=function(t){return Object(i(t))}},function(t,e,n){var i=n(10);t.exports=function(t,e){if(!i(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!i(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!i(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!i(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e){var n=0,i=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+i).toString(36))}},function(t,e,n){var i=n(41);i(i.S+i.F,"Object",{assign:n(45)})},function(t,e,n){"use strict";var i=n(17);t.exports=function(t){function e(t,e){function n(){e(t)}if(!o(t))throw new Error("Element is not detectable by this strategy.");if(i.isIE(8))l(t).object={proxy:n},t.attachEvent("onresize",n);else{o(t).contentDocument.defaultView.addEventListener("resize",n)}}function n(t,e,n){n||(n=e,e=t,t=null),t=t||{};t.debug;i.isIE(8)?n(e):function(t,e){function n(){function n(){if("static"===u.position){t.style.position="relative";var e=function(t,e,n,i){var o=n[i];"auto"!==o&&"0"!==function(t){return t.replace(/[^-\d\.]/g,"")}(o)&&(t.warn("An element that is positioned static has style."+i+"="+o+" which is ignored due to the static positioning. The element will need to be positioned relative, so the style."+i+" will be set to 0. Element: ",e),e.style[i]=0)};e(a,t,u,"top"),e(a,t,u,"right"),e(a,t,u,"bottom"),e(a,t,u,"left")}}function s(){function i(t,e){if(!t.contentDocument)return void setTimeout(function(){i(t,e)},100);e(t.contentDocument)}r||n(),i(this,function(n){e(t)})}""!==u.position&&(n(u),r=!0);var d=document.createElement("object");d.style.cssText=o,d.tabIndex=-1,d.type="text/html",d.onload=s,i.isIE()||(d.data="about:blank"),t.appendChild(d),l(t).object=d,i.isIE()&&(d.data="about:blank")}var o="display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; padding: 0; margin: 0; opacity: 0; z-index: -1000; pointer-events: none;",r=!1,u=window.getComputedStyle(t),d=t.offsetWidth,c=t.offsetHeight;l(t).startSize={width:d,height:c},s?s.add(n):n()}(e,n)}function o(t){return l(t).object}function r(t){i.isIE(8)?t.detachEvent("onresize",l(t).object.proxy):t.removeChild(o(t)),delete l(t).object}t=t||{};var a=t.reporter,s=t.batchProcessor,l=t.stateHandler.getState;if(!a)throw new Error("Missing required dependency: reporter.");return{makeDetectable:n,addListener:e,uninstall:r}}},function(t,e,n){"use strict";var i=n(18).forEach;t.exports=function(t){function e(t){t.className+=" "+g+"_animation_active"}function n(t,e,n){if(t.addEventListener)t.addEventListener(e,n);else{if(!t.attachEvent)return d.error("[scroll] Don't know how to add event listeners.");t.attachEvent("on"+e,n)}}function o(t,e,n){if(t.removeEventListener)t.removeEventListener(e,n);else{if(!t.detachEvent)return d.error("[scroll] Don't know how to remove event listeners.");t.detachEvent("on"+e,n)}}function r(t){return f(t).container.childNodes[0].childNodes[0].childNodes[0]}function a(t){return f(t).container.childNodes[0].childNodes[0].childNodes[1]}function s(t,e){if(!f(t).listeners.push)throw new Error("Cannot add listener to an element that is not detectable.");f(t).listeners.push(e)}function l(t,o,s){function l(){if(t.debug){var e=Array.prototype.slice.call(arguments);if(e.unshift(h.get(o),"Scroll: "),d.log.apply)d.log.apply(null,e);else for(var n=0;n<e.length;n++)d.log(e[n])}}function u(t){var e=f(t).container.childNodes[0],n=window.getComputedStyle(e);return!n.width||-1===n.width.indexOf("px")}function v(){var t=window.getComputedStyle(o),e={};return e.position=t.position,e.width=o.offsetWidth,e.height=o.offsetHeight,e.top=t.top,e.right=t.right,e.bottom=t.bottom,e.left=t.left,e.widthCSS=t.width,e.heightCSS=t.height,e}function m(){var t=v();f(o).startSize={width:t.width,height:t.height},l("Element start size",f(o).startSize)}function y(){f(o).listeners=[]}function w(){if(l("storeStyle invoked."),!f(o))return void l("Aborting because element has been uninstalled");var t=v();f(o).style=t}function b(t,e,n){f(t).lastWidth=e,f(t).lastHeight=n}function P(t){return r(t).childNodes[0]}function x(){return 2*p.width+1}function z(){return 2*p.height+1}function _(t){return t+10+x()}function E(t){return t+10+z()}function S(t){return 2*t+x()}function I(t){return 2*t+z()}function T(t,e,n){var i=r(t),o=a(t),s=_(e),l=E(n),u=S(e),d=I(n);i.scrollLeft=s,i.scrollTop=l,o.scrollLeft=u,o.scrollTop=d}function k(){var t=f(o).container;if(!t){t=document.createElement("div"),t.className=g,t.style.cssText="visibility: hidden; display: inline; width: 0px; height: 0px; z-index: -1; overflow: hidden; margin: 0; padding: 0;",f(o).container=t,e(t),o.appendChild(t);var i=function(){f(o).onRendered&&f(o).onRendered()};n(t,"animationstart",i),f(o).onAnimationStart=i}return t}function O(){function t(){f(o).onExpand&&f(o).onExpand()}function e(){f(o).onShrink&&f(o).onShrink()}if(l("Injecting elements"),!f(o))return void l("Aborting because element has been uninstalled");!function(){var t=f(o).style;if("static"===t.position){o.style.position="relative";var e=function(t,e,n,i){var o=n[i];"auto"!==o&&"0"!==function(t){return t.replace(/[^-\d\.]/g,"")}(o)&&(t.warn("An element that is positioned static has style."+i+"="+o+" which is ignored due to the static positioning. The element will need to be positioned relative, so the style."+i+" will be set to 0. Element: ",e),e.style[i]=0)};e(d,o,t,"top"),e(d,o,t,"right"),e(d,o,t,"bottom"),e(d,o,t,"left")}}();var i=f(o).container;i||(i=k());var r=p.width,a=p.height,s="position: absolute; flex: none; overflow: hidden; z-index: -1; visibility: hidden; "+function(t,e,n,i){return t=t?t+"px":"0",e=e?e+"px":"0",n=n?n+"px":"0",i=i?i+"px":"0","left: "+t+"; top: "+e+"; right: "+i+"; bottom: "+n+";"}(-(1+r),-(1+a),-a,-r),u=document.createElement("div"),c=document.createElement("div"),h=document.createElement("div"),v=document.createElement("div"),m=document.createElement("div"),y=document.createElement("div");u.dir="ltr",u.style.cssText="position: absolute; flex: none; overflow: hidden; z-index: -1; visibility: hidden; width: 100%; height: 100%; left: 0px; top: 0px;",u.className=g,c.className=g,c.style.cssText=s,h.style.cssText="position: absolute; flex: none; overflow: scroll; z-index: -1; visibility: hidden; width: 100%; height: 100%;",v.style.cssText="position: absolute; left: 0; top: 0;",m.style.cssText="position: absolute; flex: none; overflow: scroll; z-index: -1; visibility: hidden; width: 100%; height: 100%;",y.style.cssText="position: absolute; width: 200%; height: 200%;",h.appendChild(v),m.appendChild(y),c.appendChild(h),c.appendChild(m),u.appendChild(c),i.appendChild(u),n(h,"scroll",t),n(m,"scroll",e),f(o).onExpandScroll=t,f(o).onShrinkScroll=e}function C(){function e(t,e,n){var i=P(t),o=_(e),r=E(n);i.style.width=o+"px",i.style.height=r+"px"}function n(n){var i=o.offsetWidth,r=o.offsetHeight;l("Storing current size",i,r),b(o,i,r),c.add(0,function(){if(!f(o))return void l("Aborting because element has been uninstalled");if(!s())return void l("Aborting because element container has not been initialized");if(t.debug){var n=o.offsetWidth,a=o.offsetHeight;n===i&&a===r||d.warn(h.get(o),"Scroll: Size changed before updating detector elements.")}e(o,i,r)}),c.add(1,function(){return f(o)?s()?void T(o,i,r):void l("Aborting because element container has not been initialized"):void l("Aborting because element has been uninstalled")}),n&&c.add(2,function(){return f(o)?s()?void n():void l("Aborting because element container has not been initialized"):void l("Aborting because element has been uninstalled")})}function s(){return!!f(o).container}function p(){l("notifyListenersIfNeeded invoked");var t=f(o);return function(){return void 0===f(o).lastNotifiedWidth}()&&t.lastWidth===t.startSize.width&&t.lastHeight===t.startSize.height?l("Not notifying: Size is the same as the start size, and there has been no notification yet."):t.lastWidth===t.lastNotifiedWidth&&t.lastHeight===t.lastNotifiedHeight?l("Not notifying: Size already notified"):(l("Current size not notified, notifying..."),t.lastNotifiedWidth=t.lastWidth,t.lastNotifiedHeight=t.lastHeight,void i(f(o).listeners,function(t){t(o)}))}function g(){if(l("startanimation triggered."),u(o))return void l("Ignoring since element is still unrendered...");l("Element rendered.");var t=r(o),e=a(o);0!==t.scrollLeft&&0!==t.scrollTop&&0!==e.scrollLeft&&0!==e.scrollTop||(l("Scrollbars out of sync. Updating detector elements..."),n(p))}function v(){if(l("Scroll detected."),u(o))return void l("Scroll event fired while unrendered. Ignoring...");var t=o.offsetWidth,e=o.offsetHeight;t!==f(o).lastWidth||e!==f(o).lastHeight?(l("Element size changed."),n(p)):l("Element size has not changed ("+t+"x"+e+").")}if(l("registerListenersAndPositionElements invoked."),!f(o))return void l("Aborting because element has been uninstalled");f(o).onRendered=g,f(o).onExpand=v,f(o).onShrink=v;var m=f(o).style;e(o,m.width,m.height)}function M(){if(l("finalizeDomMutation invoked."),!f(o))return void l("Aborting because element has been uninstalled");var t=f(o).style;b(o,t.width,t.height),T(o,t.width,t.height)}function j(){s(o)}function L(){l("Installing..."),y(),m(),c.add(0,w),c.add(1,O),c.add(2,C),c.add(3,M),c.add(4,j)}s||(s=o,o=t,t=null),t=t||{},l("Making detectable..."),!function(t){return!function(t){return t===t.ownerDocument.body||t.ownerDocument.body.contains(t)}(t)||null===window.getComputedStyle(t)}(o)?L():(l("Element is detached"),k(),l("Waiting until element is attached..."),f(o).onRendered=function(){l("Element is now attached"),L()})}function u(t){var e=f(t);e&&(e.onExpandScroll&&o(r(t),"scroll",e.onExpandScroll),e.onShrinkScroll&&o(a(t),"scroll",e.onShrinkScroll),e.onAnimationStart&&o(e.container,"animationstart",e.onAnimationStart),e.container&&t.removeChild(e.container))}t=t||{};var d=t.reporter,c=t.batchProcessor,f=t.stateHandler.getState,h=(t.stateHandler.hasState,t.idHandler);if(!c)throw new Error("Missing required dependency: batchProcessor");if(!d)throw new Error("Missing required dependency: reporter.");var p=function(){var t=document.createElement("div");t.style.cssText="position: absolute; width: 1000px; height: 1000px; visibility: hidden; margin: 0; padding: 0;";var e=document.createElement("div");e.style.cssText="position: absolute; width: 500px; height: 500px; overflow: scroll; visibility: none; top: -1500px; left: -1500px; visibility: hidden; margin: 0; padding: 0;",e.appendChild(t),document.body.insertBefore(e,document.body.firstChild);var n=500-e.clientWidth,i=500-e.clientHeight;return document.body.removeChild(e),{width:n,height:i}}(),g="erd_scroll_detection_container";return function(t,e){if(!document.getElementById(t)){var n=e+"_animation",i=e+"_animation_active",o="/* Created by the element-resize-detector library. */\n";o+="."+e+" > div::-webkit-scrollbar { display: none; }\n\n",o+="."+i+" { -webkit-animation-duration: 0.1s; animation-duration: 0.1s; -webkit-animation-name: "+n+"; animation-name: "+n+"; }\n",o+="@-webkit-keyframes "+n+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }\n",o+="@keyframes "+n+" { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }",function(e,n){n=n||function(t){document.head.appendChild(t)};var i=document.createElement("style");i.innerHTML=e,i.id=t,n(i)}(o)}}("erd_scroll_detection_scrollbar_style",g),{makeDetectable:l,addListener:s,uninstall:u}}},function(t,e,n){"use strict";function i(t){return Array.isArray(t)||void 0!==t.length}function o(t){if(Array.isArray(t))return t;var e=[];return s(t,function(t){e.push(t)}),e}function r(t){return t&&1===t.nodeType}function a(t,e,n){var i=t[e];return void 0!==i&&null!==i||void 0===n?i:n}var s=n(18).forEach,l=n(63),u=n(66),d=n(64),c=n(65),f=n(67),h=n(17),p=n(31),g=n(68),v=n(60),m=n(61);t.exports=function(t){function e(t,e,n){function l(t){var e=E.get(t);s(e,function(e){e(t)})}function u(t,e,n){E.add(e,n),t&&n(e)}if(n||(n=e,e=t,t={}),!e)throw new Error("At least one element required.");if(!n)throw new Error("Listener required.");if(r(e))e=[e];else{if(!i(e))return P.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");e=o(e)}var d=0,c=a(t,"callOnAdd",z.callOnAdd),f=a(t,"onReady",function(){}),h=a(t,"debug",z.debug);s(e,function(t){g.getState(t)||(g.initState(t),y.set(t));var i=y.get(t);if(h&&P.log("Attaching listener to element",i,t),!S.isDetectable(t))return h&&P.log(i,"Not detectable."),S.isBusy(t)?(h&&P.log(i,"System busy making it detectable"),u(c,t,n),k[i]=k[i]||[],void k[i].push(function(){++d===e.length&&f()})):(h&&P.log(i,"Making detectable..."),S.markBusy(t,!0),_.makeDetectable({debug:h},t,function(t){if(h&&P.log(i,"onElementDetectable"),g.getState(t)){S.markAsDetectable(t),S.markBusy(t,!1),_.addListener(t,l),u(c,t,n);var o=g.getState(t);if(o&&o.startSize){var r=t.offsetWidth,a=t.offsetHeight;o.startSize.width===r&&o.startSize.height===a||l(t)}k[i]&&s(k[i],function(t){t()})}else h&&P.log(i,"Element uninstalled before being detectable.");delete k[i],++d===e.length&&f()}));h&&P.log(i,"Already detecable, adding listener."),u(c,t,n),d++}),d===e.length&&f()}function n(t){if(!t)return P.error("At least one element is required.");if(r(t))t=[t];else{if(!i(t))return P.error("Invalid arguments. Must be a DOM element or a collection of DOM elements.");t=o(t)}s(t,function(t){E.removeAllListeners(t),_.uninstall(t),g.cleanState(t)})}t=t||{};var y;if(t.idHandler)y={get:function(e){return t.idHandler.get(e,!0)},set:t.idHandler.set};else{var w=d(),b=c({idGenerator:w,stateHandler:g});y=b}var P=t.reporter;if(!P){P=f(!1===P)}var x=a(t,"batchProcessor",p({reporter:P})),z={};z.callOnAdd=!!a(t,"callOnAdd",!0),z.debug=!!a(t,"debug",!1);var _,E=u(y),S=l({stateHandler:g}),I=a(t,"strategy","object"),T={reporter:P,batchProcessor:x,stateHandler:g,idHandler:y};if("scroll"===I&&(h.isLegacyOpera()?(P.warn("Scroll strategy is not supported on legacy Opera. Changing to object strategy."),I="object"):h.isIE(9)&&(P.warn("Scroll strategy is not supported on IE9. Changing to object strategy."),I="object")),"scroll"===I)_=m(T);else{if("object"!==I)throw new Error("Invalid strategy name: "+I);_=v(T)}var k={};return{listenTo:e,removeListener:E.removeListener,removeAllListeners:E.removeAllListeners,uninstall:n}}},function(t,e,n){"use strict";t.exports=function(t){function e(t){var e=r(t);return e&&!!e.isDetectable}function n(t){r(t).isDetectable=!0}function i(t){return!!r(t).busy}function o(t,e){r(t).busy=!!e}var r=t.stateHandler.getState;return{isDetectable:e,markAsDetectable:n,isBusy:i,markBusy:o}}},function(t,e,n){"use strict";t.exports=function(){function t(){return e++}var e=1;return{generate:t}}},function(t,e,n){"use strict";t.exports=function(t){function e(t){var e=o(t);return e&&void 0!==e.id?e.id:null}function n(t){var e=o(t);if(!e)throw new Error("setId required the element to have a resize detection state.");var n=i.generate();return e.id=n,n}var i=t.idGenerator,o=t.stateHandler.getState;return{get:e,set:n}}},function(t,e,n){"use strict";t.exports=function(t){function e(e){var n=t.get(e);return void 0===n?[]:r[n]||[]}function n(e,n){var i=t.get(e);r[i]||(r[i]=[]),r[i].push(n)}function i(t,n){for(var i=e(t),o=0,r=i.length;o<r;++o)if(i[o]===n){i.splice(o,1);break}}function o(t){var n=e(t);n&&(n.length=0)}var r={};return{get:e,add:n,removeListener:i,removeAllListeners:o}}},function(t,e,n){"use strict";t.exports=function(t){function e(){}var n={log:e,warn:e,error:e};if(!t&&window.console){var i=function(t,e){t[e]=function(){var t=console[e];if(t.apply)t.apply(console,arguments);else for(var n=0;n<arguments.length;n++)t(arguments[n])}};i(n,"log"),i(n,"warn"),i(n,"error")}return n}},function(t,e,n){"use strict";function i(t){return t[a]={},o(t)}function o(t){return t[a]}function r(t){delete t[a]}var a="_erd";t.exports={initState:i,getState:o,cleanState:r}},function(t,e){t.exports='<div class="hz-m-modal"> <div class="hz-modal_dialog"> <div class="hz-modal_hd"> <a title="ESC键也可以关闭哦" class="hz-modal_close" on-click={this.cancel()}> <i class="hz-u-icon hz-u-icon-close">×</i> </a> <h3 class="hz-modal_title">热区设置</h3> </div> <div class="hz-modal_bd"> <div class="hz-u-formitem" r-class={{\'hz-f-ml0\': !isUrl}}> <span class="hz-formitem_tt">跳转链接:</span> <div class="hz-formitem_ct"> <input r-autofocus ref="link" type="text" title={link} class="hz-u-input" r-class={{\'hz-u-input-error\': !isUrl}} placeholder="链接以 http:// 或 https:// 开头" r-model={link | trim} on-focus={this.removeTip()} on-keydown={this.handleKeyDown($event, link, target)} /> {#if !isUrl} <p class="hz-formitem_rqr">链接格式有误,请检查!</p> {/if} </div> </div> <div class="hz-u-formitem"> <span class="hz-formitem_tt">打开方式:</span> <label class="hz-formitem_ct hz-u-label"> <input type="checkbox" r-model={target | toNum}> 新开页面 </label> </div> </div> <div class="hz-modal_ft"> <button title="回车键也可以确认哦" on-click={this.ok(link, target)} class="hz-u-btn hz-u-btn-primary" >确认</button> <button class="hz-u-btn" title="ESC键也可以取消哦" on-click={this.cancel()} >取消</button> </div> </div>\n</div>'},function(t,e){t.exports='<div id="{id}" class="hz-u-copy {class}" title={title} on-click={this._onClick($event)} data-copy={copyText} r-hide={!visible}>\n{#if this.$body} {#inc this.$body}\n{#else} <span>{btnText||\'复制\'}</span>\n{/if} <input ref="input" data-for-copy="true" r-model={copyText} type="text"> </div>'},function(t,e){t.exports='{#if setting}\n{#if isEdit}\n<li r-dragItem class={class} r-style={{top: zoneTop, left: zoneLeft, width: zoneWidth, height: zoneHeight}}\n> {#if setting.link} <ul class="hz-m-bridge"> <li class="hz-u-bridge-tl" r-hide={this.notRange(infoBottom, infoRight)}></li> <li class="hz-u-bridge-tr" r-hide={this.notRange(infoBottom, infoLeft)}></li> <li class="hz-u-bridge-bl" r-hide={this.notRange(infoTop, infoRight)}></li> <li class="hz-u-bridge-br" r-hide={this.notRange(infoTop, infoLeft)}></li> </ul> <ul class="hz-m-info" r-hide={hideZone} on-mousedown={this.stopPropagation($event)} r-style={{top: infoTop, bottom: infoBottom, left: infoLeft, right: infoRight, transform: infoTransform}} > <li>跳转链接:<a href={setting.link} target={setting.target | getTarget} title={setting.link}>{setting.link}</a></li> <li>打开方式:{setting.target | jumpWay}</li> </ul> {/if} <ul r-changeSize class="hz-m-box" title="双击设置信息" on-dblclick={this.setInfo($event)} r-class={{\'hz-z-hidden\': tooSmall}} r-class={{\'hz-m-hoverbox\': !hideZone}} r-class={{\'hz-m-settedbox\': !!setting.link || !!setting.hasSet}} > <li class="hz-u-index" title="热区{index + 1}">{index + 1}</li> <li class="hz-u-tip" r-hide={hideZone || removeSpacing}> {#if setting.link || setting.hasSet}已{#else}双击{/if}设置信息 </li> <li title="删除该热区" r-hide={hideZone} class="hz-u-close hz-icon hz-icon-trash" on-click={this.delItem($event, index)} on-mousedown={this.stopPropagation($event)} ></li> <li class="hz-m-btns" r-hide={hideZone} r-style={{\'min-width\': btnsMinWidth}}> <span title="单击设置信息" class="hz-u-edit hz-icon hz-icon-edit" r-style={{\'margin\': editBtnMargin}} r-class={{\'hz-small-icon\': removeSpacing}} on-click={this.setInfo($event)} on-mousedown={this.stopPropagation($event)} ></span>{#if setting.link && config.showCopy}<span class="hz-m-copy" r-style={{\'margin\': copyBtnMargin}} on-dblclick={this.stopPropagation($event)} on-mousedown={this.stopPropagation($event)} > <Replicator copyText={setting.link} on-success={this.copySuccess($event)} on-error={this.copyError($event)} > <i title="复制链接" class="hz-icon hz-icon-copy" r-class={{\'hz-small-icon\': removeSpacing}} ></i> </Replicator> </span> {/if} </li> <li class="hz-u-square hz-u-square-tl" data-pointer="dealTL"></li> <li class="hz-u-square hz-u-square-tc" data-pointer="dealTC"></li> <li class="hz-u-square hz-u-square-tr" data-pointer="dealTR"></li> <li class="hz-u-square hz-u-square-cl" data-pointer="dealCL"></li> <li class="hz-u-square hz-u-square-cr" data-pointer="dealCR"></li> <li class="hz-u-square hz-u-square-bl" data-pointer="dealBL"></li> <li class="hz-u-square hz-u-square-bc" data-pointer="dealBC"></li> <li class="hz-u-square hz-u-square-br" data-pointer="dealBR"></li> </ul>\n</li>\n{#else}\n<li class={class} r-style={{top: zoneTop, left: zoneLeft, width: zoneWidth, height: zoneHeight}}\n> {#if setting.link} <ul class="hz-m-bridge"> <li class="hz-u-bridge-tl" r-hide={this.notRange(infoBottom, infoRight)}></li> <li class="hz-u-bridge-tr" r-hide={this.notRange(infoBottom, infoLeft)}></li> <li class="hz-u-bridge-bl" r-hide={this.notRange(infoTop, infoRight)}></li> <li class="hz-u-bridge-br" r-hide={this.notRange(infoTop, infoLeft)}></li> </ul> <ul class="hz-m-info" r-style={{top: infoTop, bottom: infoBottom, left: infoLeft, right: infoRight, transform: infoTransform}} > <li>跳转链接:<a href={setting.link} target={setting.target | getTarget} title={setting.link}>{setting.link}</a></li> <li>打开方式:{setting.target | jumpWay}</li> </ul> <a class="hz-m-link" href={setting.link} target={setting.target | getTarget}> <ul class="hz-m-box hz-m-settedbox" title={setting.link}> <li class="hz-