!function(){try{var t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},e=(new Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="5fd07a5f-e404-46bd-8145-5ed847979ffe",t._sentryDebugIdIdentifier="sentry-dbid-5fd07a5f-e404-46bd-8145-5ed847979ffe")}catch(t){}}();var _global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};_global.SENTRY_RELEASE={id:"14f6a097859d0d8b3d6211949e2cbf557516f71e"},(window.webpackJsonp=window.webpackJsonp||[]).push([[115],{2109:function(t,e,n){"use strict";n.r(e);var l=n(2110),i={name:"vue-clamp",props:{tag:{type:String,default:"div"},autoresize:{type:Boolean,default:!1},maxLines:Number,maxHeight:[String,Number],ellipsis:{type:String,default:"…"},location:{type:String,default:"end",validator:function(t){return-1!==["start","middle","end"].indexOf(t)}},expanded:Boolean},data:function(){return{offset:null,text:this.getText(),localExpanded:!!this.expanded}},computed:{clampedText:function(){if("start"===this.location)return this.ellipsis+(this.text.slice(-this.offset)||"").trim();if("middle"===this.location){var t=Math.floor(this.offset/2);return(this.text.slice(0,t)||"").trim()+this.ellipsis+(this.text.slice(-t)||"").trim()}return(this.text.slice(0,this.offset)||"").trim()+this.ellipsis},isClamped:function(){return!!this.text&&this.offset!==this.text.length},realText:function(){return this.isClamped?this.clampedText:this.text},realMaxHeight:function(){if(this.localExpanded)return null;var t=this.maxHeight;return t?"number"==typeof t?t+"px":t:null}},watch:{expanded:function(t){this.localExpanded=t},localExpanded:function(t){t?this.clampAt(this.text.length):this.update(),this.expanded!==t&&this.$emit("update:expanded",t)},isClamped:{handler:function(t){var e=this;this.$nextTick((function(){return e.$emit("clampchange",t)}))},immediate:!0}},mounted:function(){this.init(),this.$watch((function(t){return[t.maxLines,t.maxHeight,t.ellipsis,t.isClamped,t.location].join()}),this.update),this.$watch((function(t){return[t.tag,t.text,t.autoresize].join()}),this.init)},updated:function(){this.text=this.getText(),this.applyChange()},beforeDestroy:function(){this.cleanUp()},methods:{init:function(){var i=this;this.$slots.default&&(this.offset=this.text.length,this.cleanUp(),this.autoresize&&(Object(l.a)(this.$el,this.update),this.unregisterResizeCallback=function(){Object(l.b)(i.$el,i.update)}),this.update())},update:function(){this.localExpanded||(this.applyChange(),(this.isOverflow()||this.isClamped)&&this.search())},expand:function(){this.localExpanded=!0},collapse:function(){this.localExpanded=!1},toggle:function(){this.localExpanded=!this.localExpanded},getLines:function(){return Object.keys(Array.prototype.slice.call(this.$refs.content.getClientRects()).reduce((function(t,e){var i=e.top+"/"+e.bottom;return t[i]||(t[i]=!0),t}),{})).length},isOverflow:function(){return!!((this.maxLines||this.maxHeight)&&(this.maxLines&&this.getLines()>this.maxLines||this.maxHeight&&this.$el.scrollHeight>this.$el.offsetHeight))},getText:function(){var t=(this.$slots.default||[]).filter((function(t){return!t.tag&&!t.isComment}))[0];return t?t.text.trim():""},moveEdge:function(t){this.clampAt(this.offset+t)},clampAt:function(t){this.offset=t,this.applyChange()},applyChange:function(){this.$refs.text.textContent=this.realText},stepToFit:function(){this.fill(),this.clamp()},fill:function(){for(;(!this.isOverflow()||this.getLines()<2)&&this.offset1&&this.offset>0;)this.moveEdge(-1)},search:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var i=t[0];void 0===i&&(i=0);var s=t[1];if(void 0===s&&(s=this.offset),s-i<=3)this.stepToFit();else{var n=Math.floor((s+i)/2);this.clampAt(n),this.isOverflow()?this.search(i,n):this.search(n,s)}},cleanUp:function(){this.unregisterResizeCallback&&this.unregisterResizeCallback()}},render:function(t){var e=[t("span",this.$isServer?{}:{ref:"text",attrs:{"aria-label":this.text.trim()}},this.$isServer?this.text:this.realText)],i={expand:this.expand,collapse:this.collapse,toggle:this.toggle,clamped:this.isClamped,expanded:this.localExpanded},s=this.$scopedSlots.before?this.$scopedSlots.before(i):this.$slots.before;s&&e.unshift.apply(e,Array.isArray(s)?s:[s]);var n=this.$scopedSlots.after?this.$scopedSlots.after(i):this.$slots.after;n&&e.push.apply(e,Array.isArray(n)?n:[n]);var a=[t("span",{style:{boxShadow:"transparent 0 0"},ref:"content"},e)];return t(this.tag,{style:{maxHeight:this.realMaxHeight,overflow:"hidden"}},a)}};e.default=i}}]); //# sourceMappingURL=49ec924.js.map