f7cloud_client/apps/photos/js/NcSelect-CjUzohn5-BzxyFHzp.chunk.mjs
root 8b6a0139db f7cloud_client
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-17 22:59:26 +00:00

11 lines
47 KiB
JavaScript

import{V as ht}from"./vue.runtime.esm-Ct3_M7aQ.chunk.mjs";import{n as U,e as $t,r as Rt,aB as It,a0 as jt,a as Z,ac as dt,f as Mt,D as zt}from"./index-BMeBqg0T.chunk.mjs";import{u as Kt,N as Ht}from"./NcAvatar-YSp2ORHc-k3rtAvRh.chunk.mjs";import"./video-rmrjCz0n.chunk.mjs";import{u as Wt}from"./useModelMigration-EhAWvqDD-wVDp4GUR.chunk.mjs";const qt={name:"ChevronDownIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var Ut=function(){var t=this,n=t._self._c;return n("span",t._b({staticClass:"material-design-icon chevron-down-icon",attrs:{"aria-hidden":t.title?null:"true","aria-label":t.title,role:"img"},on:{click:function(o){return t.$emit("click",o)}}},"span",t.$attrs,!1),[n("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[n("path",{attrs:{d:"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z"}},[t.title?n("title",[t._v(t._s(t.title))]):t._e()])])])},Jt=[],Xt=U(qt,Ut,Jt,!1,null,null);const Yt=Xt.exports;var at={exports:{}},Qt=at.exports,ft;function Zt(){return ft||(ft=1,function(t,n){(function(o,i){t.exports=i()})(typeof self<"u"?self:Qt,function(){return(()=>{var o={646:s=>{s.exports=function(r){if(Array.isArray(r)){for(var p=0,h=new Array(r.length);p<r.length;p++)h[p]=r[p];return h}}},713:s=>{s.exports=function(r,p,h){return p in r?Object.defineProperty(r,p,{value:h,enumerable:!0,configurable:!0,writable:!0}):r[p]=h,r}},860:s=>{s.exports=function(r){if(Symbol.iterator in Object(r)||Object.prototype.toString.call(r)==="[object Arguments]")return Array.from(r)}},206:s=>{s.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},319:(s,r,p)=>{var h=p(646),y=p(860),f=p(206);s.exports=function(g){return h(g)||y(g)||f()}},8:s=>{function r(p){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?s.exports=r=function(h){return typeof h}:s.exports=r=function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h},r(p)}s.exports=r}},i={};function c(s){var r=i[s];if(r!==void 0)return r.exports;var p=i[s]={exports:{}};return o[s](p,p.exports,c),p.exports}c.n=s=>{var r=s&&s.__esModule?()=>s.default:()=>s;return c.d(r,{a:r}),r},c.d=(s,r)=>{for(var p in r)c.o(r,p)&&!c.o(s,p)&&Object.defineProperty(s,p,{enumerable:!0,get:r[p]})},c.o=(s,r)=>Object.prototype.hasOwnProperty.call(s,r),c.r=s=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})};var u={};return(()=>{c.r(u),c.d(u,{VueSelect:()=>T,default:()=>Y,mixins:()=>X});var s=c(319),r=c.n(s),p=c(8),h=c.n(p),y=c(713),f=c.n(y);const g={props:{autoscroll:{type:Boolean,default:!0}},watch:{typeAheadPointer:function(){this.autoscroll&&this.maybeAdjustScroll()},open:function(e){var a=this;this.autoscroll&&e&&this.$nextTick(function(){return a.maybeAdjustScroll()})}},methods:{maybeAdjustScroll:function(){var e,a=((e=this.$refs.dropdownMenu)===null||e===void 0?void 0:e.children[this.typeAheadPointer])||!1;if(a){var l=this.getDropdownViewport(),d=a.getBoundingClientRect(),w=d.top,v=d.bottom,B=d.height;if(w<l.top)return this.$refs.dropdownMenu.scrollTop=a.offsetTop;if(v>l.bottom)return this.$refs.dropdownMenu.scrollTop=a.offsetTop-(l.height-B)}},getDropdownViewport:function(){return this.$refs.dropdownMenu?this.$refs.dropdownMenu.getBoundingClientRect():{height:0,top:0,bottom:0}}}},m={data:function(){return{typeAheadPointer:-1}},watch:{filteredOptions:function(){if(this.resetFocusOnOptionsChange){for(var e=0;e<this.filteredOptions.length;e++)if(this.selectable(this.filteredOptions[e])){this.typeAheadPointer=e;break}}},open:function(e){e&&this.typeAheadToLastSelected()},selectedValue:function(){this.open&&this.typeAheadToLastSelected()}},methods:{typeAheadUp:function(){for(var e=this.typeAheadPointer-1;e>=0;e--)if(this.selectable(this.filteredOptions[e])){this.typeAheadPointer=e;break}},typeAheadDown:function(){for(var e=this.typeAheadPointer+1;e<this.filteredOptions.length;e++)if(this.selectable(this.filteredOptions[e])){this.typeAheadPointer=e;break}},typeAheadSelect:function(){var e=this.filteredOptions[this.typeAheadPointer];e&&this.selectable(e)&&this.select(e)},typeAheadToLastSelected:function(){var e=this.selectedValue.length!==0?this.filteredOptions.indexOf(this.selectedValue[this.selectedValue.length-1]):-1;e!==-1&&(this.typeAheadPointer=e)}}},b={props:{loading:{type:Boolean,default:!1}},data:function(){return{mutableLoading:!1}},watch:{search:function(){this.$emit("search",this.search,this.toggleLoading)},loading:function(e){this.mutableLoading=e}},methods:{toggleLoading:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return this.mutableLoading=e??!this.mutableLoading}}};function x(e,a,l,d,w,v,B,F){var z,E=typeof e=="function"?e.options:e;return a&&(E.render=a,E.staticRenderFns=l,E._compiled=!0),{exports:e,options:E}}const S={Deselect:x({},function(){var e=this.$createElement,a=this._self._c||e;return a("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"10",height:"10"}},[a("path",{attrs:{d:"M6.895455 5l2.842897-2.842898c.348864-.348863.348864-.914488 0-1.263636L9.106534.261648c-.348864-.348864-.914489-.348864-1.263636 0L5 3.104545 2.157102.261648c-.348863-.348864-.914488-.348864-1.263636 0L.261648.893466c-.348864.348864-.348864.914489 0 1.263636L3.104545 5 .261648 7.842898c-.348864.348863-.348864.914488 0 1.263636l.631818.631818c.348864.348864.914773.348864 1.263636 0L5 6.895455l2.842898 2.842897c.348863.348864.914772.348864 1.263636 0l.631818-.631818c.348864-.348864.348864-.914489 0-1.263636L6.895455 5z"}})])},[]).exports,OpenIndicator:x({},function(){var e=this.$createElement,a=this._self._c||e;return a("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"10"}},[a("path",{attrs:{d:"M9.211364 7.59931l4.48338-4.867229c.407008-.441854.407008-1.158247 0-1.60046l-.73712-.80023c-.407008-.441854-1.066904-.441854-1.474243 0L7 5.198617 2.51662.33139c-.407008-.441853-1.066904-.441853-1.474243 0l-.737121.80023c-.407008.441854-.407008 1.158248 0 1.600461l4.48338 4.867228L7 10l2.211364-2.40069z"}})])},[]).exports},_={inserted:function(e,a,l){var d=l.context;if(d.appendToBody){document.body.appendChild(e);var w=d.$refs.toggle.getBoundingClientRect(),v=w.height,B=w.top,F=w.left,z=w.width,E=window.scrollX||window.pageXOffset,Q=window.scrollY||window.pageYOffset;e.unbindPosition=d.calculatePosition(e,d,{width:z+"px",left:E+F+"px",top:Q+B+v+"px"})}},unbind:function(e,a,l){l.context.appendToBody&&(e.unbindPosition&&typeof e.unbindPosition=="function"&&e.unbindPosition(),e.parentNode&&e.parentNode.removeChild(e))}},O=function(e){var a={};return Object.keys(e).sort().forEach(function(l){a[l]=e[l]}),JSON.stringify(a)};var L=0;const C=function(){return++L};function A(e,a){var l=Object.keys(e);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(e);a&&(d=d.filter(function(w){return Object.getOwnPropertyDescriptor(e,w).enumerable})),l.push.apply(l,d)}return l}function P(e){for(var a=1;a<arguments.length;a++){var l=arguments[a]!=null?arguments[a]:{};a%2?A(Object(l),!0).forEach(function(d){f()(e,d,l[d])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(l)):A(Object(l)).forEach(function(d){Object.defineProperty(e,d,Object.getOwnPropertyDescriptor(l,d))})}return e}const T=x({components:P({},S),directives:{appendToBody:_},mixins:[g,m,b],props:{value:{},components:{type:Object,default:function(){return{}}},options:{type:Array,default:function(){return[]}},limit:{type:Number,default:null},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},deselectFromDropdown:{type:Boolean,default:!1},searchable:{type:Boolean,default:!0},multiple:{type:Boolean,default:!1},placeholder:{type:String,default:""},transition:{type:String,default:"vs__fade"},clearSearchOnSelect:{type:Boolean,default:!0},closeOnSelect:{type:Boolean,default:!0},label:{type:String,default:"label"},ariaLabelCombobox:{type:String,default:"Search for options"},ariaLabelListbox:{type:String,default:"Options"},ariaLabelClearSelected:{type:String,default:"Clear selected"},ariaLabelDeselectOption:{type:Function,default:function(e){return"Deselect ".concat(e)}},autocomplete:{type:String,default:"off"},reduce:{type:Function,default:function(e){return e}},selectable:{type:Function,default:function(e){return!0}},getOptionLabel:{type:Function,default:function(e){return h()(e)==="object"?e.hasOwnProperty(this.label)?e[this.label]:console.warn('[vue-select warn]: Label key "option.'.concat(this.label,'" does not')+" exist in options object ".concat(JSON.stringify(e),`.
`)+"https://vue-select.org/api/props.html#getoptionlabel"):e}},getOptionKey:{type:Function,default:function(e){if(h()(e)!=="object")return e;try{return e.hasOwnProperty("id")?e.id:O(e)}catch(a){return console.warn(`[vue-select warn]: Could not stringify this option to generate unique key. Please provide'getOptionKey' prop to return a unique key for each option.
https://vue-select.org/api/props.html#getoptionkey`,e,a)}}},onTab:{type:Function,default:function(){this.selectOnTab&&!this.isComposing&&this.typeAheadSelect()}},taggable:{type:Boolean,default:!1},tabindex:{type:Number,default:null},pushTags:{type:Boolean,default:!1},filterable:{type:Boolean,default:!0},filterBy:{type:Function,default:function(e,a,l){return(a||"").toLocaleLowerCase().indexOf(l.toLocaleLowerCase())>-1}},filter:{type:Function,default:function(e,a){var l=this;return e.filter(function(d){var w=l.getOptionLabel(d);return typeof w=="number"&&(w=w.toString()),l.filterBy(d,w,a)})}},createOption:{type:Function,default:function(e){return h()(this.optionList[0])==="object"?f()({},this.label,e):e}},resetFocusOnOptionsChange:{type:Boolean,default:!0},resetOnOptionsChange:{default:!1,validator:function(e){return["function","boolean"].includes(h()(e))}},clearSearchOnBlur:{type:Function,default:function(e){var a=e.clearSearchOnSelect,l=e.multiple;return a&&!l}},noDrop:{type:Boolean,default:!1},inputId:{type:String},dir:{type:String,default:"auto"},selectOnTab:{type:Boolean,default:!1},selectOnKeyCodes:{type:Array,default:function(){return[13]}},searchInputQuerySelector:{type:String,default:"[type=search]"},mapKeydown:{type:Function,default:function(e,a){return e}},appendToBody:{type:Boolean,default:!1},calculatePosition:{type:Function,default:function(e,a,l){var d=l.width,w=l.top,v=l.left;e.style.top=w,e.style.left=v,e.style.width=d}},dropdownShouldOpen:{type:Function,default:function(e){var a=e.noDrop,l=e.open,d=e.mutableLoading;return!a&&l&&!d}},keyboardFocusBorder:{type:Boolean,default:!1},uid:{type:[String,Number],default:function(){return C()}}},data:function(){return{search:"",open:!1,isComposing:!1,isKeyboardNavigation:!1,pushedTags:[],_value:[]}},computed:{isTrackingValues:function(){return this.value===void 0||this.$options.propsData.hasOwnProperty("reduce")},selectedValue:function(){var e=this.value;return this.isTrackingValues&&(e=this.$data._value),e!=null&&e!==""?[].concat(e):[]},optionList:function(){return this.options.concat(this.pushTags?this.pushedTags:[])},searchEl:function(){return this.$scopedSlots.search?this.$refs.selectedOptions.querySelector(this.searchInputQuerySelector):this.$refs.search},scope:function(){var e=this,a={search:this.search,loading:this.loading,searching:this.searching,filteredOptions:this.filteredOptions};return{search:{attributes:P({id:this.inputId,disabled:this.disabled,placeholder:this.searchPlaceholder,tabindex:this.tabindex,readonly:!this.searchable,role:"combobox","aria-autocomplete":"list","aria-label":this.ariaLabelCombobox,"aria-controls":"vs-".concat(this.uid,"__listbox"),"aria-owns":"vs-".concat(this.uid,"__listbox"),"aria-expanded":this.dropdownOpen.toString(),ref:"search",type:"search",autocomplete:this.autocomplete,value:this.search},this.dropdownOpen&&this.filteredOptions[this.typeAheadPointer]?{"aria-activedescendant":"vs-".concat(this.uid,"__option-").concat(this.typeAheadPointer)}:{}),events:{compositionstart:function(){return e.isComposing=!0},compositionend:function(){return e.isComposing=!1},keydown:this.onSearchKeyDown,keypress:this.onSearchKeyPress,blur:this.onSearchBlur,focus:this.onSearchFocus,input:function(l){return e.search=l.target.value}}},spinner:{loading:this.mutableLoading},noOptions:{search:this.search,loading:this.mutableLoading,searching:this.searching},openIndicator:{attributes:{ref:"openIndicator",role:"presentation",class:"vs__open-indicator"}},listHeader:a,listFooter:a,header:P({},a,{deselect:this.deselect}),footer:P({},a,{deselect:this.deselect})}},childComponents:function(){return P({},S,{},this.components)},stateClasses:function(){return{"vs--open":this.dropdownOpen,"vs--single":!this.multiple,"vs--multiple":this.multiple,"vs--searching":this.searching&&!this.noDrop,"vs--searchable":this.searchable&&!this.noDrop,"vs--unsearchable":!this.searchable,"vs--loading":this.mutableLoading,"vs--disabled":this.disabled}},searching:function(){return!!this.search},dropdownOpen:function(){return this.dropdownShouldOpen(this)},searchPlaceholder:function(){return this.isValueEmpty&&this.placeholder?this.placeholder:void 0},filteredOptions:function(){var e=this,a=function(v){return e.limit!==null?v.slice(0,e.limit):v},l=[].concat(this.optionList);if(!this.filterable&&!this.taggable)return a(l);var d=this.search.length?this.filter(l,this.search,this):l;if(this.taggable&&this.search.length){var w=this.createOption(this.search);this.optionExists(w)||d.unshift(w)}return a(d)},isValueEmpty:function(){return this.selectedValue.length===0},showClearButton:function(){return!this.multiple&&this.clearable&&!this.open&&!this.isValueEmpty}},watch:{options:function(e,a){var l=this;!this.taggable&&(typeof l.resetOnOptionsChange=="function"?l.resetOnOptionsChange(e,a,l.selectedValue):l.resetOnOptionsChange)&&this.clearSelection(),this.value&&this.isTrackingValues&&this.setInternalValueFromOptions(this.value)},value:{immediate:!0,handler:function(e){this.isTrackingValues&&this.setInternalValueFromOptions(e)}},multiple:function(){this.clearSelection()},open:function(e){this.$emit(e?"open":"close")},search:function(e){e.length&&(this.open=!0)}},created:function(){this.mutableLoading=this.loading,this.$on("option:created",this.pushTag)},methods:{setInternalValueFromOptions:function(e){var a=this;Array.isArray(e)?this.$data._value=e.map(function(l){return a.findOptionFromReducedValue(l)}):this.$data._value=this.findOptionFromReducedValue(e)},select:function(e){this.$emit("option:selecting",e),this.isOptionSelected(e)?this.deselectFromDropdown&&(this.clearable||this.multiple&&this.selectedValue.length>1)&&this.deselect(e):(this.taggable&&!this.optionExists(e)&&this.$emit("option:created",e),this.multiple&&(e=this.selectedValue.concat(e)),this.updateValue(e),this.$emit("option:selected",e)),this.onAfterSelect(e)},deselect:function(e){var a=this;this.$emit("option:deselecting",e),this.updateValue(this.selectedValue.filter(function(l){return!a.optionComparator(l,e)})),this.$emit("option:deselected",e)},keyboardDeselect:function(e,a){var l,d;this.deselect(e);var w=(l=this.$refs.deselectButtons)===null||l===void 0?void 0:l[a+1],v=(d=this.$refs.deselectButtons)===null||d===void 0?void 0:d[a-1],B=w??v;B?B.focus():this.searchEl.focus()},clearSelection:function(){this.updateValue(this.multiple?[]:null),this.searchEl.focus()},onAfterSelect:function(e){var a=this;this.closeOnSelect&&(this.open=!this.open),this.clearSearchOnSelect&&(this.search=""),this.noDrop&&this.multiple&&this.$nextTick(function(){return a.$refs.search.focus()})},updateValue:function(e){var a=this;this.value===void 0&&(this.$data._value=e),e!==null&&(e=Array.isArray(e)?e.map(function(l){return a.reduce(l)}):this.reduce(e)),this.$emit("input",e)},toggleDropdown:function(e){var a=e.target!==this.searchEl;a&&e.preventDefault();var l=[].concat(r()(this.$refs.deselectButtons||[]),r()([this.$refs.clearButton]));this.searchEl===void 0||l.filter(Boolean).some(function(d){return d.contains(e.target)||d===e.target})?e.preventDefault():this.open&&a?this.searchEl.blur():this.disabled||(this.open=!0,this.searchEl.focus())},isOptionSelected:function(e){var a=this;return this.selectedValue.some(function(l){return a.optionComparator(l,e)})},isOptionDeselectable:function(e){return this.isOptionSelected(e)&&this.deselectFromDropdown},hasKeyboardFocusBorder:function(e){return!(!this.keyboardFocusBorder||!this.isKeyboardNavigation)&&e===this.typeAheadPointer},optionComparator:function(e,a){return this.getOptionKey(e)===this.getOptionKey(a)},findOptionFromReducedValue:function(e){var a=this,l=[].concat(r()(this.options),r()(this.pushedTags)).filter(function(d){return JSON.stringify(a.reduce(d))===JSON.stringify(e)});return l.length===1?l[0]:l.find(function(d){return a.optionComparator(d,a.$data._value)})||e},closeSearchOptions:function(){this.open=!1,this.$emit("search:blur")},maybeDeleteValue:function(){if(!this.searchEl.value.length&&this.selectedValue&&this.selectedValue.length&&this.clearable){var e=null;this.multiple&&(e=r()(this.selectedValue.slice(0,this.selectedValue.length-1))),this.updateValue(e)}},optionExists:function(e){var a=this;return this.optionList.some(function(l){return a.optionComparator(l,e)})},optionAriaSelected:function(e){return this.selectable(e)?String(this.isOptionSelected(e)):null},normalizeOptionForSlot:function(e){return h()(e)==="object"?e:f()({},this.label,e)},pushTag:function(e){this.pushedTags.push(e)},onEscape:function(){this.search.length?this.search="":this.open=!1},onSearchBlur:function(){if(!this.mousedown||this.searching){var e=this.clearSearchOnSelect,a=this.multiple;return this.clearSearchOnBlur({clearSearchOnSelect:e,multiple:a})&&(this.search=""),void this.closeSearchOptions()}this.mousedown=!1,this.search.length!==0||this.options.length!==0||this.closeSearchOptions()},onSearchFocus:function(){this.open=!0,this.$emit("search:focus")},onMousedown:function(){this.mousedown=!0},onMouseUp:function(){this.mousedown=!1},onMouseMove:function(e,a){this.isKeyboardNavigation=!1,this.selectable(e)&&(this.typeAheadPointer=a)},onSearchKeyDown:function(e){var a=this,l=function(v){if(v.preventDefault(),a.open)return!a.isComposing&&a.typeAheadSelect();a.open=!0},d={8:function(v){return a.maybeDeleteValue()},9:function(v){return a.onTab()},27:function(v){return a.onEscape()},38:function(v){if(v.preventDefault(),a.isKeyboardNavigation=!0,a.open)return a.typeAheadUp();a.open=!0},40:function(v){if(v.preventDefault(),a.isKeyboardNavigation=!0,a.open)return a.typeAheadDown();a.open=!0}};this.selectOnKeyCodes.forEach(function(v){return d[v]=l});var w=this.mapKeydown(d,this);if(typeof w[e.keyCode]=="function")return w[e.keyCode](e)},onSearchKeyPress:function(e){this.open||e.keyCode!==32||(e.preventDefault(),this.open=!0)}}},function(){var e=this,a=e.$createElement,l=e._self._c||a;return l("div",{staticClass:"v-select",class:e.stateClasses,attrs:{id:"v-select-"+e.uid,dir:e.dir}},[e._t("header",null,null,e.scope.header),e._v(" "),l("div",{ref:"toggle",staticClass:"vs__dropdown-toggle"},[l("div",{ref:"selectedOptions",staticClass:"vs__selected-options",on:{mousedown:e.toggleDropdown}},[e._l(e.selectedValue,function(d,w){return e._t("selected-option-container",[l("span",{key:e.getOptionKey(d),staticClass:"vs__selected"},[e._t("selected-option",[e._v(`
`+e._s(e.getOptionLabel(d))+`
`)],null,e.normalizeOptionForSlot(d)),e._v(" "),e.multiple?l("button",{ref:"deselectButtons",refInFor:!0,staticClass:"vs__deselect",attrs:{disabled:e.disabled,type:"button",title:e.ariaLabelDeselectOption(e.getOptionLabel(d)),"aria-label":e.ariaLabelDeselectOption(e.getOptionLabel(d))},on:{mousedown:function(v){return v.stopPropagation(),e.deselect(d)},keydown:function(v){return!v.type.indexOf("key")&&e._k(v.keyCode,"enter",13,v.key,"Enter")?null:e.keyboardDeselect(d,w)}}},[l(e.childComponents.Deselect,{tag:"component"})],1):e._e()],2)],{option:e.normalizeOptionForSlot(d),deselect:e.deselect,multiple:e.multiple,disabled:e.disabled})}),e._v(" "),e._t("search",[l("input",e._g(e._b({staticClass:"vs__search"},"input",e.scope.search.attributes,!1),e.scope.search.events))],null,e.scope.search)],2),e._v(" "),l("div",{ref:"actions",staticClass:"vs__actions"},[l("button",{directives:[{name:"show",rawName:"v-show",value:e.showClearButton,expression:"showClearButton"}],ref:"clearButton",staticClass:"vs__clear",attrs:{disabled:e.disabled,type:"button",title:e.ariaLabelClearSelected,"aria-label":e.ariaLabelClearSelected},on:{click:e.clearSelection}},[l(e.childComponents.Deselect,{tag:"component"})],1),e._v(" "),e.noDrop?e._e():l("button",{ref:"openIndicatorButton",staticClass:"vs__open-indicator-button",attrs:{type:"button",tabindex:"-1","aria-labelledby":"vs-"+e.uid+"__listbox","aria-controls":"vs-"+e.uid+"__listbox","aria-expanded":e.dropdownOpen.toString()},on:{mousedown:e.toggleDropdown}},[e._t("open-indicator",[l(e.childComponents.OpenIndicator,e._b({tag:"component"},"component",e.scope.openIndicator.attributes,!1))],null,e.scope.openIndicator)],2),e._v(" "),e._t("spinner",[l("div",{directives:[{name:"show",rawName:"v-show",value:e.mutableLoading,expression:"mutableLoading"}],staticClass:"vs__spinner"},[e._v("Loading...")])],null,e.scope.spinner)],2)]),e._v(" "),l("transition",{attrs:{name:e.transition}},[e.dropdownOpen?l("ul",{directives:[{name:"append-to-body",rawName:"v-append-to-body"}],key:"vs-"+e.uid+"__listbox",ref:"dropdownMenu",staticClass:"vs__dropdown-menu",attrs:{id:"vs-"+e.uid+"__listbox",role:"listbox","aria-label":e.ariaLabelListbox,"aria-multiselectable":e.multiple,tabindex:"-1"},on:{mousedown:function(d){return d.preventDefault(),e.onMousedown(d)},mouseup:e.onMouseUp}},[e._t("list-header",null,null,e.scope.listHeader),e._v(" "),e._l(e.filteredOptions,function(d,w){return l("li",{key:e.getOptionKey(d),staticClass:"vs__dropdown-option",class:{"vs__dropdown-option--deselect":e.isOptionDeselectable(d)&&w===e.typeAheadPointer,"vs__dropdown-option--selected":e.isOptionSelected(d),"vs__dropdown-option--highlight":w===e.typeAheadPointer,"vs__dropdown-option--kb-focus":e.hasKeyboardFocusBorder(w),"vs__dropdown-option--disabled":!e.selectable(d)},attrs:{id:"vs-"+e.uid+"__option-"+w,role:"option","aria-selected":e.optionAriaSelected(d)},on:{mousemove:function(v){return e.onMouseMove(d,w)},click:function(v){v.preventDefault(),v.stopPropagation(),e.selectable(d)&&e.select(d)}}},[e._t("option",[e._v(`
`+e._s(e.getOptionLabel(d))+`
`)],null,e.normalizeOptionForSlot(d))],2)}),e._v(" "),e.filteredOptions.length===0?l("li",{staticClass:"vs__no-options"},[e._t("no-options",[e._v(`
Sorry, no matching options.
`)],null,e.scope.noOptions)],2):e._e(),e._v(" "),e._t("list-footer",null,null,e.scope.listFooter)],2):l("ul",{staticStyle:{display:"none",visibility:"hidden"},attrs:{id:"vs-"+e.uid+"__listbox",role:"listbox","aria-label":e.ariaLabelListbox}})]),e._v(" "),e._t("footer",null,null,e.scope.footer)],2)},[]).exports,X={ajax:b,pointer:m,pointerScroll:g},Y=T})(),u})()})}(at)),at.exports}var j=Zt();function ot(t){return t.split("-")[1]}function _t(t){return t==="y"?"height":"width"}function $(t){return t.split("-")[0]}function J(t){return["top","bottom"].includes($(t))?"x":"y"}function gt(t,n,o){let{reference:i,floating:c}=t;const u=i.x+i.width/2-c.width/2,s=i.y+i.height/2-c.height/2,r=J(n),p=_t(r),h=i[p]/2-c[p]/2,y=r==="x";let f;switch($(n)){case"top":f={x:u,y:i.y-c.height};break;case"bottom":f={x:u,y:i.y+i.height};break;case"right":f={x:i.x+i.width,y:s};break;case"left":f={x:i.x-c.width,y:s};break;default:f={x:i.x,y:i.y}}switch(ot(n)){case"start":f[r]-=h*(o&&y?-1:1);break;case"end":f[r]+=h*(o&&y?-1:1)}return f}const Gt=async(t,n,o)=>{const{placement:i="bottom",strategy:c="absolute",middleware:u=[],platform:s}=o,r=u.filter(Boolean),p=await(s.isRTL==null?void 0:s.isRTL(n));let h=await s.getElementRects({reference:t,floating:n,strategy:c}),{x:y,y:f}=gt(h,i,p),g=i,m={},b=0;for(let x=0;x<r.length;x++){const{name:S,fn:_}=r[x],{x:O,y:L,data:C,reset:A}=await _({x:y,y:f,initialPlacement:i,placement:g,strategy:c,middlewareData:m,rects:h,platform:s,elements:{reference:t,floating:n}});y=O??y,f=L??f,m={...m,[S]:{...m[S],...C}},A&&b<=50&&(b++,typeof A=="object"&&(A.placement&&(g=A.placement),A.rects&&(h=A.rects===!0?await s.getElementRects({reference:t,floating:n,strategy:c}):A.rects),{x:y,y:f}=gt(h,g,p)),x=-1)}return{x:y,y:f,placement:g,strategy:c,middlewareData:m}};function te(t){return typeof t!="number"?function(n){return{top:0,right:0,bottom:0,left:0,...n}}(t):{top:t,right:t,bottom:t,left:t}}function tt(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}async function Ot(t,n){var o;n===void 0&&(n={});const{x:i,y:c,platform:u,rects:s,elements:r,strategy:p}=t,{boundary:h="clippingAncestors",rootBoundary:y="viewport",elementContext:f="floating",altBoundary:g=!1,padding:m=0}=n,b=te(m),x=r[g?f==="floating"?"reference":"floating":f],S=tt(await u.getClippingRect({element:(o=await(u.isElement==null?void 0:u.isElement(x)))==null||o?x:x.contextElement||await(u.getDocumentElement==null?void 0:u.getDocumentElement(r.floating)),boundary:h,rootBoundary:y,strategy:p})),_=f==="floating"?{...s.floating,x:i,y:c}:s.reference,O=await(u.getOffsetParent==null?void 0:u.getOffsetParent(r.floating)),L=await(u.isElement==null?void 0:u.isElement(O))&&await(u.getScale==null?void 0:u.getScale(O))||{x:1,y:1},C=tt(u.convertOffsetParentRelativeRectToViewportRelativeRect?await u.convertOffsetParentRelativeRectToViewportRelativeRect({rect:_,offsetParent:O,strategy:p}):_);return{top:(S.top-C.top+b.top)/L.y,bottom:(C.bottom-S.bottom+b.bottom)/L.y,left:(S.left-C.left+b.left)/L.x,right:(C.right-S.right+b.right)/L.x}}const ee=Math.min,ne=Math.max;function mt(t,n,o){return ne(t,ee(n,o))}const oe=["top","right","bottom","left"];oe.reduce((t,n)=>t.concat(n,n+"-start",n+"-end"),[]);const ie={left:"right",right:"left",bottom:"top",top:"bottom"};function et(t){return t.replace(/left|right|bottom|top/g,n=>ie[n])}function se(t,n,o){o===void 0&&(o=!1);const i=ot(t),c=J(t),u=_t(c);let s=c==="x"?i===(o?"end":"start")?"right":"left":i==="start"?"bottom":"top";return n.reference[u]>n.floating[u]&&(s=et(s)),{main:s,cross:et(s)}}const re={start:"end",end:"start"};function rt(t){return t.replace(/start|end/g,n=>re[n])}const ae=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(n){var o;const{placement:i,middlewareData:c,rects:u,initialPlacement:s,platform:r,elements:p}=n,{mainAxis:h=!0,crossAxis:y=!0,fallbackPlacements:f,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:b=!0,...x}=t,S=$(i),_=$(s)===s,O=await(r.isRTL==null?void 0:r.isRTL(p.floating)),L=f||(_||!b?[et(s)]:function(a){const l=et(a);return[rt(a),l,rt(l)]}(s));f||m==="none"||L.push(...function(a,l,d,w){const v=ot(a);let B=function(F,z,E){const Q=["left","right"],pt=["right","left"],Ft=["top","bottom"],Et=["bottom","top"];switch(F){case"top":case"bottom":return E?z?pt:Q:z?Q:pt;case"left":case"right":return z?Ft:Et;default:return[]}}($(a),d==="start",w);return v&&(B=B.map(F=>F+"-"+v),l&&(B=B.concat(B.map(rt)))),B}(s,b,m,O));const C=[s,...L],A=await Ot(n,x),P=[];let T=((o=c.flip)==null?void 0:o.overflows)||[];if(h&&P.push(A[S]),y){const{main:a,cross:l}=se(i,u,O);P.push(A[a],A[l])}if(T=[...T,{placement:i,overflows:P}],!P.every(a=>a<=0)){var X,Y;const a=(((X=c.flip)==null?void 0:X.index)||0)+1,l=C[a];if(l)return{data:{index:a,overflows:T},reset:{placement:l}};let d=(Y=T.filter(w=>w.overflows[0]<=0).sort((w,v)=>w.overflows[1]-v.overflows[1])[0])==null?void 0:Y.placement;if(!d)switch(g){case"bestFit":{var e;const w=(e=T.map(v=>[v.placement,v.overflows.filter(B=>B>0).reduce((B,F)=>B+F,0)]).sort((v,B)=>v[1]-B[1])[0])==null?void 0:e[0];w&&(d=w);break}case"initialPlacement":d=s}if(i!==d)return{reset:{placement:d}}}return{}}}},le=function(t){return{name:"offset",options:t,async fn(n){const{x:o,y:i}=n,c=await async function(u,s){const{placement:r,platform:p,elements:h}=u,y=await(p.isRTL==null?void 0:p.isRTL(h.floating)),f=$(r);ot(r);const g=J(r)==="x",m=["left","top"].includes(f)?-1:1,b=y&&g?-1:1,x=s;let{mainAxis:S,crossAxis:_}={mainAxis:x,crossAxis:0};return g?{x:_*b,y:S*m}:{x:S*m,y:_*b}}(n,t);return{x:o+c.x,y:i+c.y,data:c}}}};function Lt(t){return t==="x"?"y":"x"}const ce=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(n){const{x:o,y:i,placement:c}=n,{mainAxis:u=!0,crossAxis:s=!1,limiter:r={fn:S=>{let{x:_,y:O}=S;return{x:_,y:O}}},...p}=t,h={x:o,y:i},y=await Ot(n,p),f=J($(c)),g=Lt(f);let m=h[f],b=h[g];if(u){const S=f==="y"?"bottom":"right";m=mt(m+y[f==="y"?"top":"left"],m,m-y[S])}if(s){const S=g==="y"?"bottom":"right";b=mt(b+y[g==="y"?"top":"left"],b,b-y[S])}const x=r.fn({...n,[f]:m,[g]:b});return{...x,data:{x:x.x-o,y:x.y-i}}}}},ue=function(t){return t===void 0&&(t={}),{options:t,fn(n){const{x:o,y:i,placement:c,rects:u,middlewareData:s}=n,{offset:r=0,mainAxis:p=!0,crossAxis:h=!0}=t,y={x:o,y:i},f=J(c),g=Lt(f);let m=y[f],b=y[g];const x=typeof r=="function"?r(n):r,S=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:0,crossAxis:0,...x};if(p){const L=f==="y"?"height":"width",C=u.reference[f]-u.floating[L]+S.mainAxis,A=u.reference[f]+u.reference[L]-S.mainAxis;m<C?m=C:m>A&&(m=A)}if(h){var _,O;const L=f==="y"?"width":"height",C=["top","left"].includes($(c)),A=u.reference[g]-u.floating[L]+(C&&((_=s.offset)==null?void 0:_[g])||0)+(C?0:S.crossAxis),P=u.reference[g]+u.reference[L]+(C?0:((O=s.offset)==null?void 0:O[g])||0)-(C?S.crossAxis:0);b<A?b=A:b>P&&(b=P)}return{[f]:m,[g]:b}}}};function N(t){var n;return((n=t.ownerDocument)==null?void 0:n.defaultView)||window}function k(t){return N(t).getComputedStyle(t)}function Ct(t){return t instanceof N(t).Node}function I(t){return Ct(t)?(t.nodeName||"").toLowerCase():""}let G;function At(){if(G)return G;const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?(G=t.brands.map(n=>n.brand+"/"+n.version).join(" "),G):navigator.userAgent}function D(t){return t instanceof N(t).HTMLElement}function V(t){return t instanceof N(t).Element}function yt(t){return typeof ShadowRoot>"u"?!1:t instanceof N(t).ShadowRoot||t instanceof ShadowRoot}function it(t){const{overflow:n,overflowX:o,overflowY:i,display:c}=k(t);return/auto|scroll|overlay|hidden|clip/.test(n+i+o)&&!["inline","contents"].includes(c)}function pe(t){return["table","td","th"].includes(I(t))}function lt(t){const n=/firefox/i.test(At()),o=k(t),i=o.backdropFilter||o.WebkitBackdropFilter;return o.transform!=="none"||o.perspective!=="none"||!!i&&i!=="none"||n&&o.willChange==="filter"||n&&!!o.filter&&o.filter!=="none"||["transform","perspective"].some(c=>o.willChange.includes(c))||["paint","layout","strict","content"].some(c=>{const u=o.contain;return u!=null&&u.includes(c)})}function ct(){return/^((?!chrome|android).)*safari/i.test(At())}function ut(t){return["html","body","#document"].includes(I(t))}const bt=Math.min,H=Math.max,nt=Math.round;function Bt(t){const n=k(t);let o=parseFloat(n.width),i=parseFloat(n.height);const c=D(t),u=c?t.offsetWidth:o,s=c?t.offsetHeight:i,r=nt(o)!==u||nt(i)!==s;return r&&(o=u,i=s),{width:o,height:i,fallback:r}}function Pt(t){return V(t)?t:t.contextElement}const Nt={x:1,y:1};function K(t){const n=Pt(t);if(!D(n))return Nt;const o=n.getBoundingClientRect(),{width:i,height:c,fallback:u}=Bt(n);let s=(u?nt(o.width):o.width)/i,r=(u?nt(o.height):o.height)/c;return s&&Number.isFinite(s)||(s=1),r&&Number.isFinite(r)||(r=1),{x:s,y:r}}function M(t,n,o,i){var c,u;n===void 0&&(n=!1),o===void 0&&(o=!1);const s=t.getBoundingClientRect(),r=Pt(t);let p=Nt;n&&(i?V(i)&&(p=K(i)):p=K(t));const h=r?N(r):window,y=ct()&&o;let f=(s.left+(y&&((c=h.visualViewport)==null?void 0:c.offsetLeft)||0))/p.x,g=(s.top+(y&&((u=h.visualViewport)==null?void 0:u.offsetTop)||0))/p.y,m=s.width/p.x,b=s.height/p.y;if(r){const x=N(r),S=i&&V(i)?N(i):i;let _=x.frameElement;for(;_&&i&&S!==x;){const O=K(_),L=_.getBoundingClientRect(),C=getComputedStyle(_);L.x+=(_.clientLeft+parseFloat(C.paddingLeft))*O.x,L.y+=(_.clientTop+parseFloat(C.paddingTop))*O.y,f*=O.x,g*=O.y,m*=O.x,b*=O.y,f+=L.x,g+=L.y,_=N(_).frameElement}}return tt({width:m,height:b,x:f,y:g})}function R(t){return((Ct(t)?t.ownerDocument:t.document)||window.document).documentElement}function st(t){return V(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Vt(t){return M(R(t)).left+st(t).scrollLeft}function q(t){if(I(t)==="html")return t;const n=t.assignedSlot||t.parentNode||yt(t)&&t.host||R(t);return yt(n)?n.host:n}function Dt(t){const n=q(t);return ut(n)?n.ownerDocument.body:D(n)&&it(n)?n:Dt(n)}function W(t,n){var o;n===void 0&&(n=[]);const i=Dt(t),c=i===((o=t.ownerDocument)==null?void 0:o.body),u=N(i);return c?n.concat(u,u.visualViewport||[],it(i)?i:[]):n.concat(i,W(i))}function vt(t,n,o){let i;if(n==="viewport")i=function(s,r){const p=N(s),h=R(s),y=p.visualViewport;let f=h.clientWidth,g=h.clientHeight,m=0,b=0;if(y){f=y.width,g=y.height;const x=ct();(!x||x&&r==="fixed")&&(m=y.offsetLeft,b=y.offsetTop)}return{width:f,height:g,x:m,y:b}}(t,o);else if(n==="document")i=function(s){const r=R(s),p=st(s),h=s.ownerDocument.body,y=H(r.scrollWidth,r.clientWidth,h.scrollWidth,h.clientWidth),f=H(r.scrollHeight,r.clientHeight,h.scrollHeight,h.clientHeight);let g=-p.scrollLeft+Vt(s);const m=-p.scrollTop;return k(h).direction==="rtl"&&(g+=H(r.clientWidth,h.clientWidth)-y),{width:y,height:f,x:g,y:m}}(R(t));else if(V(n))i=function(s,r){const p=M(s,!0,r==="fixed"),h=p.top+s.clientTop,y=p.left+s.clientLeft,f=D(s)?K(s):{x:1,y:1};return{width:s.clientWidth*f.x,height:s.clientHeight*f.y,x:y*f.x,y:h*f.y}}(n,o);else{const s={...n};if(ct()){var c,u;const r=N(t);s.x-=((c=r.visualViewport)==null?void 0:c.offsetLeft)||0,s.y-=((u=r.visualViewport)==null?void 0:u.offsetTop)||0}i=s}return tt(i)}function wt(t,n){return D(t)&&k(t).position!=="fixed"?n?n(t):t.offsetParent:null}function xt(t,n){const o=N(t);if(!D(t))return o;let i=wt(t,n);for(;i&&pe(i)&&k(i).position==="static";)i=wt(i,n);return i&&(I(i)==="html"||I(i)==="body"&&k(i).position==="static"&&!lt(i))?o:i||function(c){let u=q(c);for(;D(u)&&!ut(u);){if(lt(u))return u;u=q(u)}return null}(t)||o}function he(t,n,o){const i=D(n),c=R(n),u=M(t,!0,o==="fixed",n);let s={scrollLeft:0,scrollTop:0};const r={x:0,y:0};if(i||!i&&o!=="fixed")if((I(n)!=="body"||it(c))&&(s=st(n)),D(n)){const p=M(n,!0);r.x=p.x+n.clientLeft,r.y=p.y+n.clientTop}else c&&(r.x=Vt(c));return{x:u.left+s.scrollLeft-r.x,y:u.top+s.scrollTop-r.y,width:u.width,height:u.height}}const de={getClippingRect:function(t){let{element:n,boundary:o,rootBoundary:i,strategy:c}=t;const u=o==="clippingAncestors"?function(h,y){const f=y.get(h);if(f)return f;let g=W(h).filter(S=>V(S)&&I(S)!=="body"),m=null;const b=k(h).position==="fixed";let x=b?q(h):h;for(;V(x)&&!ut(x);){const S=k(x),_=lt(x);S.position==="fixed"&&(m=null),(b?_||m:_||S.position!=="static"||!m||!["absolute","fixed"].includes(m.position))?m=S:g=g.filter(O=>O!==x),x=q(x)}return y.set(h,g),g}(n,this._c):[].concat(o),s=[...u,i],r=s[0],p=s.reduce((h,y)=>{const f=vt(n,y,c);return h.top=H(f.top,h.top),h.right=bt(f.right,h.right),h.bottom=bt(f.bottom,h.bottom),h.left=H(f.left,h.left),h},vt(n,r,c));return{width:p.right-p.left,height:p.bottom-p.top,x:p.left,y:p.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:n,offsetParent:o,strategy:i}=t;const c=D(o),u=R(o);if(o===u)return n;let s={scrollLeft:0,scrollTop:0},r={x:1,y:1};const p={x:0,y:0};if((c||!c&&i!=="fixed")&&((I(o)!=="body"||it(u))&&(s=st(o)),D(o))){const h=M(o);r=K(o),p.x=h.x+o.clientLeft,p.y=h.y+o.clientTop}return{width:n.width*r.x,height:n.height*r.y,x:n.x*r.x-s.scrollLeft*r.x+p.x,y:n.y*r.y-s.scrollTop*r.y+p.y}},isElement:V,getDimensions:function(t){return Bt(t)},getOffsetParent:xt,getDocumentElement:R,getScale:K,async getElementRects(t){let{reference:n,floating:o,strategy:i}=t;const c=this.getOffsetParent||xt,u=this.getDimensions;return{reference:he(n,await c(o),i),floating:{x:0,y:0,...await u(o)}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>k(t).direction==="rtl"};function fe(t,n,o,i){i===void 0&&(i={});const{ancestorScroll:c=!0,ancestorResize:u=!0,elementResize:s=!0,animationFrame:r=!1}=i,p=c&&!r,h=p||u?[...V(t)?W(t):t.contextElement?W(t.contextElement):[],...W(n)]:[];h.forEach(m=>{p&&m.addEventListener("scroll",o,{passive:!0}),u&&m.addEventListener("resize",o)});let y,f=null;s&&(f=new ResizeObserver(()=>{o()}),V(t)&&!r&&f.observe(t),V(t)||!t.contextElement||r||f.observe(t.contextElement),f.observe(n));let g=r?M(t):null;return r&&function m(){const b=M(t);!g||b.x===g.x&&b.y===g.y&&b.width===g.width&&b.height===g.height||o(),g=b,y=requestAnimationFrame(m)}(),o(),()=>{var m;h.forEach(b=>{p&&b.removeEventListener("scroll",o),u&&b.removeEventListener("resize",o)}),(m=f)==null||m.disconnect(),f=null,r&&cancelAnimationFrame(y)}}const ge=(t,n,o)=>{const i=new Map,c={platform:de,...o},u={...c.platform,_c:i};return Gt(t,n,{...c,platform:u})},kt=(t,n)=>{const o=[];let i=0,c=t.toLowerCase().indexOf(n.toLowerCase(),i),u=0;for(;c>-1&&u<t.length;)i=c+n.length,o.push({start:c,end:i}),c=t.toLowerCase().indexOf(n.toLowerCase(),i),u++;return o},me={name:"NcHighlight",props:{text:{type:String,default:""},search:{type:String,default:""},highlight:{type:Array,default:()=>[]}},computed:{ranges(){let t=[];return!this.search&&this.highlight.length===0||(this.highlight.length>0?t=this.highlight:t=kt(this.text,this.search),t.forEach((n,o)=>{n.end<n.start&&(t[o]={start:n.end,end:n.start})}),t=t.reduce((n,o)=>(o.start<this.text.length&&o.end>0&&n.push({start:o.start<0?0:o.start,end:o.end>this.text.length?this.text.length:o.end}),n),[]),t.sort((n,o)=>n.start-o.start),t=t.reduce((n,o)=>{if(!n.length)n.push(o);else{const i=n.length-1;n[i].end>=o.start?n[i]={start:n[i].start,end:Math.max(n[i].end,o.end)}:n.push(o)}return n},[])),t},chunks(){if(this.ranges.length===0)return[{start:0,end:this.text.length,highlight:!1,text:this.text}];const t=[];let n=0,o=0;for(;n<this.text.length;){const i=this.ranges[o];if(i.start===n){t.push({...i,highlight:!0,text:this.text.slice(i.start,i.end)}),o++,n=i.end,o>=this.ranges.length&&n<this.text.length&&(t.push({start:n,end:this.text.length,highlight:!1,text:this.text.slice(n)}),n=this.text.length);continue}t.push({start:n,end:i.start,highlight:!1,text:this.text.slice(n,i.start)}),n=i.start}return t}},render(t){return this.ranges.length?t("span",{},this.chunks.map(n=>n.highlight?t("strong",{},n.text):n.text)):t("span",{},this.text)}},ye=null,be=null;var ve=U(me,ye,be,!1,null,null);const Tt=ve.exports,we={name:"NcEllipsisedOption",components:{NcHighlight:Tt},props:{name:{type:String,default:""},search:{type:String,default:""}},computed:{needsTruncate(){return this.name&&this.name.length>=10},split(){return this.name.length-Math.min(Math.floor(this.name.length/2),10)},part1(){return this.needsTruncate?this.name.slice(0,this.split):this.name},part2(){return this.needsTruncate?this.name.slice(this.split):""},highlight1(){return this.search?kt(this.name,this.search):[]},highlight2(){return this.highlight1.map(t=>({start:t.start-this.split,end:t.end-this.split}))}}};var xe=function(){var t=this,n=t._self._c;return n("span",{staticClass:"name-parts",attrs:{dir:"auto",title:t.name}},[n("NcHighlight",{staticClass:"name-parts__first",attrs:{text:t.part1,search:t.search,highlight:t.highlight1}}),t.part2?n("NcHighlight",{staticClass:"name-parts__last",attrs:{text:t.part2,search:t.search,highlight:t.highlight2}}):t._e()],1)},Se=[],_e=U(we,xe,Se,!1,null,"f6384352");const Oe=_e.exports,Le=8,St=32,Ce={name:"NcListItemIcon",components:{NcAvatar:Ht,NcHighlight:Tt,NcIconSvgWrapper:$t},mixins:[Kt],props:{name:{type:String,required:!0},subname:{type:String,default:""},icon:{type:String,default:""},iconSvg:{type:String,default:""},iconName:{type:String,default:""},search:{type:String,default:""},avatarSize:{type:Number,default:St},noMargin:{type:Boolean,default:!1},displayName:{type:String,default:null},isNoUser:{type:Boolean,default:!1},id:{type:String,default:null}},setup(){return{margin:Le,defaultSize:St}},computed:{hasIcon(){return this.icon!==""},hasIconSvg(){return this.iconSvg!==""},isValidSubname(){return this.subname?.trim?.()!==""},isSizeBigEnough(){return this.avatarSize>=26},cssVars(){const t=this.noMargin?0:this.margin;return{"--height":this.avatarSize+2*t+"px","--margin":this.margin+"px"}},searchParts(){const t=/^([^<]*)<([^>]+)>?$/,n=this.search.match(t);return this.isNoUser||!n?[this.search,this.search]:[n[1].trim(),n[2]]}},beforeMount(){!this.isNoUser&&!this.subname&&this.fetchUserStatus(this.user)}};var Ae=function(){var t=this,n=t._self._c;return n("span",t._g({staticClass:"option",class:{"option--compact":t.avatarSize<t.defaultSize},style:t.cssVars,attrs:{id:t.id}},t.$listeners),[n("NcAvatar",t._b({staticClass:"option__avatar",attrs:{"disable-menu":!0,"disable-tooltip":!0,"display-name":t.displayName||t.name,"is-no-user":t.isNoUser,size:t.avatarSize}},"NcAvatar",t.$attrs,!1)),n("div",{staticClass:"option__details"},[n("NcHighlight",{staticClass:"option__lineone",attrs:{text:t.name,search:t.searchParts[0]}}),t.isValidSubname&&t.isSizeBigEnough?n("NcHighlight",{staticClass:"option__linetwo",attrs:{text:t.subname,search:t.searchParts[1]}}):t.hasStatus?n("span",[n("span",[t._v(t._s(t.userStatus.icon))]),n("span",[t._v(t._s(t.userStatus.message))])]):t._e()],1),t._t("default",function(){return[t.hasIconSvg?n("NcIconSvgWrapper",{staticClass:"option__icon",attrs:{svg:t.iconSvg,name:t.iconName}}):t.hasIcon?n("span",{staticClass:"icon option__icon",class:t.icon,attrs:{"aria-label":t.iconName}}):t._e()]})],2)},Be=[],Pe=U(Ce,Ae,Be,!1,null,"a0f4d73a");const Ne=Pe.exports;Rt(jt,It);const Ve={name:"NcSelect",components:{ChevronDown:Yt,NcEllipsisedOption:Oe,NcListItemIcon:Ne,NcLoadingIcon:Mt,VueSelect:j.VueSelect},model:{prop:"modelValue",event:"update:modelValue"},props:{...j.VueSelect.props,...j.VueSelect.mixins.reduce((t,n)=>({...t,...n.props}),{}),ariaLabelClearSelected:{type:String,default:Z("Clear selected")},ariaLabelCombobox:{type:String,default:null},ariaLabelListbox:{type:String,default:Z("Options")},ariaLabelDeselectOption:{type:Function,default:t=>Z("Deselect {option}",{option:t})},appendToBody:{type:Boolean,default:!0},calculatePosition:{type:Function,default:null},closeOnSelect:{type:Boolean,default:!0},keepOpen:{type:Boolean,default:!1},components:{type:Object,default:()=>({Deselect:{render:t=>t(zt,{props:{size:20,fillColor:"var(--vs-controls-color)"},style:{cursor:"pointer"}})}})},limit:{type:Number,default:null},disabled:{type:Boolean,default:!1},dropdownShouldOpen:{type:Function,default:({noDrop:t,open:n})=>t?!1:n},filterBy:{type:Function,default:null},inputClass:{type:[String,Object],default:null},inputId:{type:String,default:()=>`select-input-${dt()}`},inputLabel:{type:String,default:null},labelOutside:{type:Boolean,default:!1},keyboardFocusBorder:{type:Boolean,default:!0},label:{type:String,default:null},loading:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},noWrap:{type:Boolean,default:!1},options:{type:Array,default:()=>[]},placeholder:{type:String,default:""},mapKeydown:{type:Function,default(t,n){return{...t,27:o=>{n.open&&o.stopPropagation(),t[27](o)}}}},uid:{type:String,default:()=>dt()},placement:{type:String,default:"bottom"},resetFocusOnOptionsChange:{type:Boolean,default:!0},userSelect:{type:Boolean,default:!1},value:{type:[String,Number,Object,Array],default:void 0},modelValue:{type:[String,Number,Object,Array],default:null},required:{type:Boolean,default:!1}," ":{}},emits:[" ","input","update:modelValue","update:model-value"],setup(){const t=Number.parseInt(window.getComputedStyle(document.body).getPropertyValue("--default-clickable-area")),n=Number.parseInt(window.getComputedStyle(document.body).getPropertyValue("--default-grid-baseline")),o=t-2*n,i=Wt("value","input");return{avatarSize:o,model:i}},data(){return{search:""}},computed:{inputRequired(){return this.required?this.model===null||Array.isArray(this.model)&&this.model.length===0:null},localCalculatePosition(){return this.calculatePosition!==null?this.calculatePosition:(t,n,{width:o})=>{t.style.width=o;const i={name:"addClass",fn(s){return t.classList.add("vs__dropdown-menu--floating"),{}}},c={name:"togglePlacementClass",fn({placement:s}){return n.$el.classList.toggle("select--drop-up",s==="top"),t.classList.toggle("vs__dropdown-menu--floating-placement-top",s==="top"),{}}},u=()=>{ge(n.$refs.toggle,t,{placement:this.placement,middleware:[le(-1),i,c,ae(),ce({limiter:ue()})]}).then(({x:s,y:r})=>{Object.assign(t.style,{left:`${s}px`,top:`${r}px`,width:`${n.$refs.toggle.getBoundingClientRect().width}px`})})};return fe(n.$refs.toggle,t,u)}},localFilterBy(){const t=/[^<]*<([^>]+)/;return this.filterBy!==null?this.filterBy:this.userSelect?(n,o,i)=>{const c=i.match(t);return c&&n.subname?.toLocaleLowerCase?.()?.indexOf(c[1].toLocaleLowerCase())>-1||`${o} ${n.subname}`.toLocaleLowerCase().indexOf(i.toLocaleLowerCase())>-1}:j.VueSelect.props.filterBy.default},localLabel(){return this.label!==null?this.label:this.userSelect?"displayName":j.VueSelect.props.label.default},propsToForward(){const t=[...Object.keys(j.VueSelect.props),...j.VueSelect.mixins.flatMap(n=>Object.keys(n.props??{}))];return{...Object.fromEntries(Object.entries(this.$props).filter(([n,o])=>t.includes(n))),value:this.model,calculatePosition:this.localCalculatePosition,closeOnSelect:this.closeOnSelect&&!this.keepOpen,filterBy:this.localFilterBy,label:this.localLabel}},listenersToForward(){return{...this.$listeners,input:t=>{this.model=t}}}},mounted(){!this.labelOutside&&!this.inputLabel&&!this.ariaLabelCombobox&&ht.util.warn("[NcSelect] An `inputLabel` or `ariaLabelCombobox` should be set. If an external label is used, `labelOutside` should be set to `true`."),this.inputLabel&&this.ariaLabelCombobox&&ht.util.warn("[NcSelect] Only one of `inputLabel` or `ariaLabelCombobox` should to be set.")},methods:{t:Z}};var De=function(){var t=this,n=t._self._c;return n("VueSelect",t._g(t._b({staticClass:"select",class:{"select--no-wrap":t.noWrap,"user-select":t.userSelect},on:{search:o=>t.search=o},scopedSlots:t._u([!t.labelOutside&&t.inputLabel?{key:"header",fn:function(){return[n("label",{staticClass:"select__label",attrs:{for:t.inputId}},[t._v(" "+t._s(t.inputLabel)+" ")])]},proxy:!0}:null,{key:"search",fn:function({attributes:o,events:i}){return[n("input",t._g(t._b({class:["vs__search",t.inputClass],attrs:{required:t.inputRequired,dir:"auto"}},"input",o,!1),i))]}},{key:"open-indicator",fn:function({attributes:o}){return[n("ChevronDown",t._b({style:{cursor:t.disabled?null:"pointer"},attrs:{"fill-color":"var(--vs-controls-color)",size:26}},"ChevronDown",o,!1))]}},{key:"option",fn:function(o){return[t._t("option",function(){return[t.userSelect?n("NcListItemIcon",t._b({attrs:{"avatar-size":32,name:o[t.localLabel],search:t.search}},"NcListItemIcon",o,!1)):n("NcEllipsisedOption",{attrs:{name:String(o[t.localLabel]),search:t.search}})]},null,o)]}},{key:"selected-option",fn:function(o){return[t._t("selected-option",function(){return[t.userSelect?n("NcListItemIcon",t._b({attrs:{"avatar-size":t.avatarSize,name:o[t.localLabel],"no-margin":"",search:t.search}},"NcListItemIcon",o,!1)):n("NcEllipsisedOption",{attrs:{name:String(o[t.localLabel]),search:t.search}})]},{vBind:o})]}},{key:"spinner",fn:function(o){return[o.loading?n("NcLoadingIcon"):t._e()]}},{key:"no-options",fn:function(){return[t._v(" "+t._s(t.t("No results"))+" ")]},proxy:!0},t._l(t.$scopedSlots,function(o,i){return{key:i,fn:function(c){return[t._t(i,null,null,c)]}}})],null,!0)},"VueSelect",t.propsToForward,!1),t.listenersToForward))},ke=[],Te=U(Ve,De,ke,!1,null,null);const je=Te.exports;export{Yt as C,je as N,Ne as a};
//# sourceMappingURL=NcSelect-CjUzohn5-BzxyFHzp.chunk.mjs.map