Current section
Files
Jump to
Current section
Files
priv/static/teal/js/13.bd7ad30b174966e77b33.chunk.js
(window.webpackJsonp=window.webpackJsonp||[]).push([[13],{XNn6:function(t,n,r){t.exports=function(t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;var n="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},r=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])}return t},e=function(t){if(Array.isArray(t)){for(var n=0,r=Array(t.length);n<t.length;n++)r[n]=t[n];return r}return Array.from(t)};function s(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.reduce(function(t,r){var e=r.passengers[0];return e="function"==typeof e?e(n):r.passengers,t.concat(e)},[])}var o={},i=new(t.extend({data:function(){return{transports:o}},methods:{open:function(r){var e=r.to,s=r.from,o=r.passengers;if(e&&s&&o){r.passengers=function(t){return Array.isArray(t)||"object"===(void 0===t?"undefined":n(t))?Object.freeze(t):t}(o);var i=Object.keys(this.transports);-1===i.indexOf(e)&&t.set(this.transports,e,[]);var a=this.getTransportIndex(r),u=this.transports[e].slice(0);-1===a?u.push(r):u[a]=r,this.transports[e]=function(t,n){return t.map(function(t,n){return[n,t]}).sort(function(t,n){return this(t[1],n[1])||t[0]-n[0]}.bind(n)).map(function(t){return t[1]})}(u,function(t,n){return t.order-n.order})}},close:function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=t.to,e=t.from;if(r&&e&&this.transports[r])if(n)this.transports[r]=[];else{var s=this.getTransportIndex(t);if(s>=0){var o=this.transports[r].slice(0);o.splice(s,1),this.transports[r]=o}}},hasTarget:function(t){return this.transports.hasOwnProperty(t)},hasContentFor:function(t){return!!this.transports[t]&&this.getContentFor(t).length>0},getSourceFor:function(t){return this.transports[t]&&this.transports[t][0].from},getContentFor:function(t){var n=this.transports[t];if(n)return s(n)},getTransportIndex:function(t){var n=t.to,r=t.from;for(var e in this.transports[n])if(this.transports[n][e].from===r)return e;return-1}}}))(o),a=/^(attrs|props|on|nativeOn|class|style|hook)$/,u=function(t){return t.reduce(function(t,n){var r,e,s,o,i;for(s in n)if(r=t[s],e=n[s],r&&a.test(s))if("class"===s&&("string"==typeof r&&(i=r,t[s]=r={},r[i]=!0),"string"==typeof e&&(i=e,n[s]=e={},e[i]=!0)),"on"===s||"nativeOn"===s||"hook"===s)for(o in e)r[o]=l(r[o],e[o]);else if(Array.isArray(r))t[s]=r.concat(e);else if(Array.isArray(e))t[s]=[r].concat(e);else for(o in e)r[o]=e[o];else t[s]=n[s];return t},{})};function l(t,n){return function(){t&&t.apply(this,arguments),n&&n.apply(this,arguments)}}var p={abstract:!1,name:"portalTarget",props:{attributes:{type:Object,default:function(){return{}}},multiple:{type:Boolean,default:!1},name:{type:String,required:!0},slim:{type:Boolean,default:!1},slotProps:{type:Object,default:function(){return{}}},tag:{type:String,default:"div"},transition:{type:[Boolean,String,Object],default:!1},transitionEvents:{type:Object,default:function(){return{}}}},data:function(){return{transports:i.transports,firstRender:!0}},created:function(){this.transports[this.name]||this.$set(this.transports,this.name,[])},mounted:function(){var t=this;this.unwatch=this.$watch("ownTransports",this.emitChange),this.$nextTick(function(){t.transition&&(t.firstRender=!1)}),this.$options.abstract&&(this.$options.abstract=!1)},updated:function(){this.$options.abstract&&(this.$options.abstract=!1)},beforeDestroy:function(){this.unwatch()},computed:{ownTransports:function(){var t=this.transports[this.name]||[];return this.multiple?t:0===t.length?[]:[t[t.length-1]]},passengers:function(){return s(this.ownTransports,this.slotProps)},hasAttributes:function(){return Object.keys(this.attributes).length>0},withTransition:function(){return!!this.transition},transitionData:function(){var t=this.transition,r={};return this.firstRender&&"object"===n(this.transition)&&!this.transition.appear?(r.props={name:"__notranstition__portal-vue__"},r):("string"==typeof t?r.props={name:t}:"object"===(void 0===t?"undefined":n(t))&&(r.props=t),this.renderSlim&&(r.props.tag=this.tag),r.on=this.transitionEvents,r)},transportedClasses:function(){return this.ownTransports.map(function(t){return t.class}).reduce(function(t,n){return t.concat(n)},[])}},methods:{emitChange:function(t,n){if(this.multiple)this.$emit("change",[].concat(e(t)),[].concat(e(n)));else{var s=0===t.length?void 0:t[0],o=0===n.length?void 0:n[0];this.$emit("change",r({},s),r({},o))}},children:function(){return 0!==this.passengers.length?this.passengers:this.$slots.default||[]},noWrapper:function(){var t=!this.hasAttributes&&this.slim;return t&&this.children().length>1&&console.warn("[portal-vue]: PortalTarget with `slim` option received more than one child element."),t}},render:function(t){this.$options.abstract=!0;var n=this.noWrapper(),r=this.children(),e=n?"transition":"transition-group",s=this.tag;return this.withTransition?t(e,u([this.transitionData,{class:"vue-portal-target"}]),[r]):n?r[0]:t(s,u([{class:"vue-portal-target "+this.transportedClasses.join(" ")},this.attributes]),[r])}},h="undefined"!=typeof window,c=1,f={abstract:!1,name:"portal",props:{disabled:{type:Boolean,default:!1},name:{type:String,default:function(){return String(c++)}},order:{type:Number,default:0},slim:{type:Boolean,default:!1},slotProps:{type:Object,default:function(){return{}}},tag:{type:[String],default:"DIV"},targetEl:{type:h?[String,HTMLElement]:String},targetClass:{type:String},to:{type:String,default:function(){return String(Math.round(1e7*Math.random()))}}},mounted:function(){this.targetEl&&this.mountToTarget(),this.disabled||this.sendUpdate(),this.$options.abstract&&(this.$options.abstract=!1)},updated:function(){this.disabled?this.clear():this.sendUpdate(),this.$options.abstract&&(this.$options.abstract=!1)},beforeDestroy:function(){this.clear(),this.mountedComp&&this.mountedComp.$destroy()},watch:{to:function(t,n){n&&n!==t&&this.clear(n),this.sendUpdate()},targetEl:function(t,n){t&&this.mountToTarget()}},methods:{normalizedSlots:function(){return this.$scopedSlots.default?[this.$scopedSlots.default]:this.$slots.default},sendUpdate:function(){var t=this.normalizedSlots();t?i.open({from:this.name,to:this.to,passengers:[].concat(e(t)),class:this.targetClass&&this.targetClass.split(" "),order:this.order}):this.clear()},clear:function(t){i.close({from:this.name,to:t||this.to})},mountToTarget:function(){var n=void 0,e=this.targetEl;if("string"==typeof e)n=document.querySelector(e);else{if(!(e instanceof HTMLElement))return void console.warn("[vue-portal]: value of targetEl must be of type String or HTMLElement");n=e}if(n){var s=new t(r({},p,{parent:this,propsData:{name:this.to,tag:n.tagName,attributes:function(t){for(var n=t.hasAttributes()?t.attributes:[],r={},e=0;e<n.length;e++){var s=n[e];s.value&&(r[s.name]=""===s.value||s.value)}var o=void 0,i=void 0;return r.class&&(o=r.class,delete r.class),r.style&&(i=r.style,delete r.style),{attrs:r,class:o,style:i}}(n)}}));s.$mount(n),this.mountedComp=s}else console.warn("[vue-portal]: The specified targetEl "+e+" was not found")},normalizeChildren:function(t){return"function"==typeof t?t(this.slotProps):t}},render:function(t){var n=this.$slots.default||this.$scopedSlots.default||[],r=this.tag;return n.length&&this.disabled?(this.$options.abstract=!0,n.length<=1&&this.slim?n[0]:t(r,[this.normalizeChildren(n)])):t(r,{class:"v-portal",style:"display: none",key:"v-portal-placeholder"})}};function d(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.component(n.portalName||"Portal",f),t.component(n.portalTargetName||"PortalTarget",p)}return"undefined"!=typeof window&&window.Vue&&window.Vue.use({install:d}),{install:d,Portal:f,PortalTarget:p,Wormhole:i}}(r("XfhM"))}}]);