|<\/p>)/gi,""),this.$emit("input",this.html)):this.$emit("input",this.list="")}}},(function(){var t=this;return(0,t._self._c)("k-writer",t._b({ref:"input",staticClass:"k-list-input",attrs:{extensions:t.listExtensions,value:t.list},on:{input:t.onInput}},"k-writer",t.$props,!1))}),[],!1,null,null,null,null).exports;const Kn=at({mixins:[Pe,Fe,Hn],inheritAttrs:!1,methods:{focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t._self._c;return e("k-field",t._b({staticClass:"k-list-field",attrs:{input:t._uid,counter:!1}},"k-field",t.$props,!1),[e("k-input",t._b({ref:"input",attrs:{id:t._uid,type:"list",theme:"field"},on:{input:function(e){return t.$emit("input",e)}}},"k-input",t.$props,!1))],1)}),[],!1,null,null,null,null).exports,Wn={mixins:[H,K,G,Me],inheritAttrs:!1,props:{draggable:{default:!0,type:Boolean},layout:String,max:Number,min:Number,sort:{default:!1,type:Boolean},value:{default:()=>[],type:Array}}};const Jn=at({mixins:[Wn],data:()=>({editing:null,tags:[]}),computed:{dragOptions(){return{delay:1,disabled:!this.isDraggable,draggable:".k-tag",handle:".k-tag-text"}},isDraggable(){return!0!==this.sort&&!1!==this.draggable&&0!==this.tags.length&&!0!==this.disabled},isFull(){return!!this.max&&this.tags.length>=this.max},replacable(){return this.options.filter((t=>{var e;return!1===this.value.includes(t.value)||t.value===(null==(e=this.editing)?void 0:e.tag.value)}))},selectable(){return this.options.filter((t=>!1===this.value.includes(t.value)))},selectorOptions(){return{accept:this.accept,disabled:this.disabled,ignore:this.value,search:this.search}},showAddSelector(){return!0!==this.disabled&&(!0!==this.isFull&&("all"===this.accept||0!==this.selectable.length))}},watch:{value:{handler(){!0===this.sort?this.tags=this.sortByOptions(this.value):this.tags=this.value.map(this.tag).filter((t=>t))},immediate:!0}},methods:{add(t){return t=this.tag(t),!0!==this.isFull&&(!1!==this.isAllowed(t)&&(this.tags.push(t),void this.save()))},edit(t,e,i){return this.editing={index:t,tag:e},this.$refs.editor.open(i.target.closest(".k-tag"))},focus(t="last"){this.$refs.navigation.move(t)},index(t){return this.tags.findIndex((e=>e.value===t.value))},isAllowed(t){return"object"==typeof t&&0!==t.value.length&&(!("options"===this.accept&&!this.option(t))&&!0!==this.isDuplicate(t))},isDuplicate(t){return!0===this.value.includes(t.value)},navigate(t){this.focus(t)},remove(t){this.tags.splice(t,1),0===this.tags.length?this.navigate("last"):this.navigate("prev"),this.save()},replace(t){const{index:e}=this.editing,i=this.tag(t);if(!1===this.isAllowed(i))return!1;this.$set(this.tags,e,i),this.save(),this.navigate(e),this.editing=null},open(){this.$refs.selector?(this.$refs.toggle.focus(),this.$refs.selector.open(this.$refs.toggle)):this.focus()},option(t){return this.options.find((e=>e.value===t.value))},select(){this.focus()},save(){this.$emit("input",this.tags.map((t=>t.value)))},sortByOptions(t){t=this.$helper.object.clone(t);const e=[];for(const i of this.options){const n=t.indexOf(i.value);-1!==n&&(e.push(i),t.splice(n,1))}for(const i of t)e.push(this.tag(i));return e},tag(t){"object"!=typeof t&&(t={value:t});const e=this.option(t);return"options"===this.accept?e:e||{text:this.$helper.string.escapeHTML(t.text??t.value),value:t.value}},toggle(t){if(t.metaKey||t.altKey||t.ctrlKey)return!1;String.fromCharCode(t.keyCode).match(/(\w)/g)&&this.$refs.selector.open()}}},(function(){var t=this,e=t._self._c;return e("k-navigate",{ref:"navigation",attrs:{axis:"list"===t.layout?"y":"x"}},[e("k-draggable",{staticClass:"k-tags",attrs:{list:t.tags,options:t.dragOptions,"data-layout":t.layout},on:{end:t.save},scopedSlots:t._u([{key:"footer",fn:function(){var i;return[t.showAddSelector?e("k-selector-dropdown",t._b({ref:"selector",attrs:{options:t.selectable},on:{create:function(e){return t.add(e)},select:function(e){return t.add(e)}}},"k-selector-dropdown",t.selectorOptions,!1),[e("k-button",{ref:"toggle",staticClass:"k-tags-toggle",attrs:{id:t.id,autofocus:t.autofocus,icon:"add",size:"xs"},nativeOn:{click:function(e){return t.$refs.selector.open()},keydown:[function(e){return t.toggle.apply(null,arguments)},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"delete",[8,46],e.key,["Backspace","Delete","Del"])?null:t.navigate(t.tags.length-1)}]}})],1):t._e(),e("k-selector-dropdown",t._b({ref:"editor",attrs:{options:t.replacable,value:null==(i=t.editing)?void 0:i.tag.text},on:{create:function(e){return t.replace(e)},select:function(e){return t.replace(e)}}},"k-selector-dropdown",t.selectorOptions,!1))]},proxy:!0}])},t._l(t.tags,(function(i,n){return e("k-tag",{key:n,attrs:{disabled:t.disabled,image:i.image,removable:!t.disabled,name:"tag"},on:{remove:function(e){return t.remove(n,i)}},nativeOn:{click:function(t){t.stopPropagation()},keypress:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.edit(n,i,e)},dblclick:function(e){return t.edit(n,i,e)}}},[e("span",{domProps:{innerHTML:t._s(i.text)}})])})),1)],1)}),[],!1,null,null,null,null).exports,Gn={mixins:[it,lt,Wn]};const Xn=at({mixins:[Ii,Gn],watch:{value:{handler(){this.$emit("invalid",this.$v.$invalid,this.$v)},immediate:!0}},methods:{focus(){this.$refs.tags.open()}},validations(){return{value:{required:!this.required||t.required,minLength:!this.min||t.minLength(this.min),maxLength:!this.max||t.maxLength(this.max)}}}},(function(){var t=this,e=t._self._c;return e("div",{staticClass:"k-tags-input"},[e("k-tags",t._b({ref:"tags",on:{input:function(e){return t.$emit("input",e)}},nativeOn:{click:function(t){t.stopPropagation()}}},"k-tags",t.$props,!1))],1)}),[],!1,null,null,null,null).exports;const Zn=at({mixins:[Pe,Fe,Gn,Li],inheritAttrs:!1,computed:{hasNoOptions(){return 0===this.options.length&&"options"===this.accept}},methods:{focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t._self._c;return e("k-field",t._b({staticClass:"k-tags-field",attrs:{input:t._uid,counter:t.counterOptions}},"k-field",t.$props,!1),[t.hasNoOptions?e("k-empty",{attrs:{icon:t.icon,text:t.$t("options.none")}}):e("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"tags"}},"k-input",t.$props,!1),t.$listeners))],1)}),[],!1,null,null,null,null).exports;const Qn=at({extends:Zn,inheritAttrs:!1},(function(){var t=this,e=t._self._c;return e("k-field",t._b({staticClass:"k-multiselect-field",attrs:{input:t._uid,counter:t.counterOptions}},"k-field",t.$props,!1),[t.hasNoOptions?e("k-empty",{attrs:{icon:t.icon,text:t.$t("options.none")}}):e("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"multiselect"}},"k-input",t.$props,!1),t.$listeners))],1)}),[],!1,null,null,null,null).exports,ts={mixins:[ji,ot],props:{max:Number,min:Number,name:[Number,String],preselect:Boolean,step:[Number,String],value:{type:[Number,String],default:""}}};const es=at({mixins:[Ii,ts],data(){return{number:this.format(this.value),stepNumber:this.format(this.step),timeout:null,listeners:{...this.$listeners,input:t=>this.onInput(t.target.value),blur:this.onBlur}}},watch:{value(t){this.number=t},number:{immediate:!0,handler(){this.onInvalid()}}},mounted(){this.$props.autofocus&&this.focus(),this.$props.preselect&&this.select()},methods:{decimals(){const t=Number(this.step??0);return Math.floor(t)===t?0:-1!==t.toString().indexOf("e")?parseInt(t.toFixed(16).split(".")[1].split("").reverse().join("")).toString().length:t.toString().split(".")[1].length??0},format(t){if(isNaN(t)||""===t)return"";const e=this.decimals();return t=e?parseFloat(t).toFixed(e):Number.isInteger(this.step)?parseInt(t):parseFloat(t)},clean(){this.number=this.format(this.number)},emit(t){t=parseFloat(t),isNaN(t)&&(t=""),t!==this.value&&this.$emit("input",t)},onInvalid(){this.$emit("invalid",this.$v.$invalid,this.$v)},onInput(t){this.number=t,this.emit(t)},onBlur(){this.clean(),this.emit(this.number)},select(){this.$refs.input.select()}},validations(){return{value:{required:!this.required||t.required,min:!this.min||t.minValue(this.min),max:!this.max||t.maxValue(this.max)}}}},(function(){var t=this;return(0,t._self._c)("input",t._g(t._b({ref:"input",staticClass:"k-number-input",attrs:{step:t.stepNumber,type:"number"},domProps:{value:t.number},on:{keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"s",void 0,e.key,void 0)?null:e.ctrlKey?t.clean.apply(null,arguments):null},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"s",void 0,e.key,void 0)?null:e.metaKey?t.clean.apply(null,arguments):null}]}},"input",{autofocus:t.autofocus,disabled:t.disabled,id:t.id,max:t.max,min:t.min,name:t.name,placeholder:t.placeholder,required:t.required},!1),t.listeners))}),[],!1,null,null,null,null).exports;const is=at({mixins:[Pe,Fe,ts],inheritAttrs:!1,methods:{focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t._self._c;return e("k-field",t._b({staticClass:"k-number-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[e("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"number"}},"k-input",t.$props,!1),t.$listeners))],1)}),[],!1,null,null,null,null).exports;const ns=at({mixins:[Pe,Fe],props:{empty:String,fields:[Object,Array],value:[String,Object]},data:()=>({object:{}}),computed:{hasFields(){return this.$helper.object.length(this.fields)>0},isEmpty(){return null===this.object||0===this.$helper.object.length(this.object)},isInvalid(){return!0===this.required&&this.isEmpty}},watch:{value:{handler(t){this.object=this.valueToObject(t)},immediate:!0}},methods:{add(){this.object=this.$helper.field.form(this.fields),this.save(),this.open()},cell(t,e){this.$set(this.object,t,e),this.save()},form(t){const e=this.$helper.field.subfields(this,this.fields);if(t)for(const i in e)e[i].autofocus=i===t;return e},remove(){this.object={},this.save()},open(t){if(this.disabled)return!1;this.$panel.drawer.open({component:"k-form-drawer",props:{breadcrumb:[],icon:"box",tab:"object",tabs:{object:{fields:this.form(t)}},title:this.label,value:this.object},on:{input:t=>{for(const e in t)this.$set(this.object,e,t[e]);this.save()}}})},save(){this.$emit("input",this.object)},valueToObject:t=>"object"!=typeof t?{}:t}},(function(){var t=this,e=t._self._c;return e("k-field",t._b({staticClass:"k-object-field",scopedSlots:t._u([!t.disabled&&t.hasFields?{key:"options",fn:function(){return[t.isEmpty?e("k-button",{attrs:{icon:"add",size:"xs",variant:"filled"},on:{click:t.add}}):e("k-button",{attrs:{icon:"remove",size:"xs",variant:"filled"},on:{click:t.remove}})]},proxy:!0}:null],null,!0)},"k-field",t.$props,!1),[t.hasFields?[t.isEmpty?e("k-empty",{attrs:{"data-invalid":t.isInvalid,icon:"box"},on:{click:t.add}},[t._v(" "+t._s(t.empty??t.$t("field.object.empty"))+" ")]):e("table",{staticClass:"k-table k-object-field-table",attrs:{"data-invalid":t.isInvalid}},[e("tbody",[t._l(t.fields,(function(i){return[i.saveable&&t.$helper.field.isVisible(i,t.value)?e("tr",{key:i.name,on:{click:function(e){return t.open(i.name)}}},[e("th",{attrs:{"data-has-button":"","data-mobile":"true"}},[e("button",{attrs:{type:"button"}},[t._v(t._s(i.label))])]),e("k-table-cell",{attrs:{column:i,field:i,mobile:!0,value:t.object[i.name]},on:{input:function(e){return t.cell(i.name,e)}}})],1):t._e()]}))],2)])]:[e("k-empty",{attrs:{icon:"box"}},[t._v(t._s(t.$t("fields.empty")))])]],2)}),[],!1,null,null,null,null).exports;const ss=at({extends:Ji,type:"pages",computed:{emptyProps(){return{icon:"page",text:this.empty??this.$t("field.pages.empty")}}}},null,null,!1,null,null,null,null).exports,os={mixins:[Ui],props:{autocomplete:{type:String,default:"new-password"},type:{type:String,default:"password"}}};const ls=at({extends:Hi,mixins:[os]},null,null,!1,null,null,null,null).exports;const rs=at({mixins:[Pe,Fe,os,Li],inheritAttrs:!1,props:{minlength:{type:Number,default:8},icon:{type:String,default:"key"}},methods:{focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t._self._c;return e("k-field",t._b({staticClass:"k-password-field",attrs:{input:t._uid,counter:t.counterOptions},scopedSlots:t._u([{key:"options",fn:function(){return[t._t("options")]},proxy:!0}],null,!0)},"k-field",t.$props,!1),[e("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"password"}},"k-input",t.$props,!1),t.$listeners))],1)}),[],!1,null,null,null,null).exports,as={mixins:[ji,nt],props:{columns:Number,reset:{default:!0,type:Boolean},theme:String,value:[String,Number,Boolean]}};const us=at({mixins:[Ii,as],computed:{choices(){return this.options.map(((t,e)=>({autofocus:this.autofocus&&0===e,checked:this.value===t.value,disabled:this.disabled||t.disabled,info:t.info,label:t.text,name:this.name??this.id,type:"radio",value:t.value})))}},watch:{value:{handler(){this.validate()},immediate:!0}},methods:{focus(){var t;null==(t=this.$el.querySelector("input"))||t.focus()},select(){this.focus()},toggle(t){t===this.value&&this.reset&&!this.required&&this.$emit("input","")},validate(){this.$emit("invalid",this.$v.$invalid,this.$v)}},validations(){return{value:{required:!this.required||t.required}}}},(function(){var t=this,e=t._self._c;return e("ul",{staticClass:"k-radio-input k-grid",style:"--columns:"+t.columns,attrs:{"data-variant":"choices"}},t._l(t.choices,(function(i,n){return e("li",{key:n},[e("k-choice-input",t._b({on:{input:function(e){return t.$emit("input",i.value)}},nativeOn:{click:function(e){return e.stopPropagation(),t.toggle(i.value)}}},"k-choice-input",i,!1))],1)})),0)}),[],!1,null,null,null,null).exports;const cs=at({mixins:[Pe,Fe,as],inheritAttrs:!1,methods:{focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t._self._c;return e("k-field",t._b({staticClass:"k-radio-field"},"k-field",t.$props,!1),[e("k-radio-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field"}},"k-radio-input",t.$props,!1),t.$listeners))],1)}),[],!1,null,null,null,null).exports,ds={mixins:[ji],props:{default:[Number,String],max:{type:Number,default:100},min:{type:Number,default:0},step:{type:[Number,String],default:1},tooltip:{type:[Boolean,Object],default:()=>({before:null,after:null})},value:[Number,String]}};const ps=at({mixins:[Ii,ds],computed:{baseline(){return this.min<0?0:this.min},label(){return this.required||this.value||0===this.value?this.format(this.position):"–"},position(){return this.value||0===this.value?this.value:this.default??this.baseline}},watch:{position(){this.onInvalid()}},mounted(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{focus(){var t;null==(t=this.$el.querySelector("input"))||t.focus()},format(t){const e=document.lang?document.lang.replace("_","-"):"en",i=this.step.toString().split("."),n=i.length>1?i[1].length:0;return new Intl.NumberFormat(e,{minimumFractionDigits:n}).format(t)},onInvalid(){this.$emit("invalid",this.$v.$invalid,this.$v)},onInput(t){this.$emit("input",t)}},validations(){return{position:{required:!this.required||t.required,min:!this.min||t.minValue(this.min),max:!this.max||t.maxValue(this.max)}}}},(function(){var t=this,e=t._self._c;return e("div",{staticClass:"k-range-input",attrs:{"data-disabled":t.disabled}},[e("input",t._b({ref:"range",attrs:{type:"range"},domProps:{value:t.position},on:{input:function(e){return t.$emit("input",e.target.valueAsNumber)}}},"input",{autofocus:t.autofocus,disabled:t.disabled,id:t.id,max:t.max,min:t.min,name:t.name,required:t.required,step:t.step},!1)),t.tooltip?e("output",{staticClass:"k-range-input-tooltip",attrs:{for:t.id}},[t.tooltip.before?e("span",{staticClass:"k-range-input-tooltip-before"},[t._v(t._s(t.tooltip.before))]):t._e(),e("span",{staticClass:"k-range-input-tooltip-text"},[t._v(t._s(t.label))]),t.tooltip.after?e("span",{staticClass:"k-range-input-tooltip-after"},[t._v(t._s(t.tooltip.after))]):t._e()]):t._e()])}),[],!1,null,null,null,null).exports;const hs=at({mixins:[Fe,Pe,ds],inheritAttrs:!1,methods:{focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t._self._c;return e("k-field",t._b({staticClass:"k-range-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[e("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"range"}},"k-input",t.$props,!1),t.$listeners))],1)}),[],!1,null,null,null,null).exports,ms={mixins:[ji,nt,ot],props:{ariaLabel:String,default:String,empty:{type:[Boolean,String],default:!0},value:{type:[String,Number,Boolean],default:""}}};const fs=at({mixins:[Ii,ms],data(){return{selected:this.value,listeners:{...this.$listeners,click:t=>this.onClick(t),change:t=>this.onInput(t.target.value),input:()=>{}}}},computed:{emptyOption(){return this.placeholder??"—"},hasEmptyOption(){return!1!==this.empty&&!(this.required&&this.default)},isEmpty(){return null===this.selected||void 0===this.selected||""===this.selected},label(){const t=this.text(this.selected);return""===this.selected||null===this.selected||null===t?this.emptyOption:t}},watch:{value(t){this.selected=t,this.onInvalid()}},mounted(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{focus(){this.$refs.input.focus()},onClick(t){t.stopPropagation(),this.$emit("click",t)},onInvalid(){this.$emit("invalid",this.$v.$invalid,this.$v)},onInput(t){this.selected=t,this.$emit("input",this.selected)},select(){this.focus()},text(t){let e=null;for(const i of this.options)i.value==t&&(e=i.text);return e}},validations(){return{selected:{required:!this.required||t.required}}}},(function(){var t=this,e=t._self._c;return e("span",{staticClass:"k-select-input",attrs:{"data-disabled":t.disabled,"data-empty":t.isEmpty}},[e("select",t._g({ref:"input",staticClass:"k-select-input-native",attrs:{id:t.id,autofocus:t.autofocus,"aria-label":t.ariaLabel,disabled:t.disabled,name:t.name,required:t.required},domProps:{value:t.selected}},t.listeners),[t.hasEmptyOption?e("option",{attrs:{disabled:t.required,value:""}},[t._v(" "+t._s(t.emptyOption)+" ")]):t._e(),t._l(t.options,(function(i){return e("option",{key:i.value,attrs:{disabled:i.disabled},domProps:{value:i.value}},[t._v(" "+t._s(i.text)+" ")])}))],2),t._v(" "+t._s(t.label)+" ")])}),[],!1,null,null,null,null).exports;const gs=at({mixins:[Pe,Fe,ms],inheritAttrs:!1,props:{icon:{type:String,default:"angle-down"}},methods:{focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t._self._c;return e("k-field",t._b({staticClass:"k-select-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[e("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"select"}},"k-input",t.$props,!1),t.$listeners))],1)}),[],!1,null,null,null,null).exports,ks={mixins:[Ui],props:{allow:{type:String,default:""},formData:{type:Object,default:()=>({})},sync:{type:String}}};const bs=at({extends:Hi,mixins:[ks],data(){return{slug:this.sluggify(this.value),slugs:this.$panel.language.rules??this.$panel.system.slugs,syncValue:null}},watch:{formData:{handler(t){return!this.disabled&&(!(!this.sync||void 0===t[this.sync])&&(t[this.sync]!=this.syncValue&&(this.syncValue=t[this.sync],void this.onInput(this.sluggify(this.syncValue)))))},deep:!0,immediate:!0},value(t){(t=this.sluggify(t))!==this.slug&&(this.slug=t,this.$emit("input",this.slug))}},methods:{sluggify(t){return this.$helper.slug(t,[this.slugs,this.$panel.system.ascii],this.allow)},onInput(t){this.slug=this.sluggify(t),this.$emit("input",this.slug)}}},(function(){var t=this;return(0,t._self._c)("input",t._g(t._b({directives:[{name:"direction",rawName:"v-direction"}],ref:"input",staticClass:"k-text-input",attrs:{autocomplete:"off",spellcheck:"false",type:"text"},domProps:{value:t.slug}},"input",{autofocus:t.autofocus,disabled:t.disabled,id:t.id,minlength:t.minlength,name:t.name,pattern:t.pattern,placeholder:t.placeholder,required:t.required},!1),t.listeners))}),[],!1,null,null,null,null).exports;const vs=at({mixins:[Pe,Fe,ks],inheritAttrs:!1,props:{icon:{type:String,default:"url"},path:{type:String},wizard:{type:[Boolean,Object],default:!1}},data(){return{slug:this.value}},computed:{preview(){return void 0!==this.help?this.help:void 0!==this.path?this.path+this.value:null}},watch:{value(){this.slug=this.value}},methods:{focus(){this.$refs.input.focus()},onWizard(){var t;this.formData[null==(t=this.wizard)?void 0:t.field]&&(this.slug=this.formData[this.wizard.field])}}},(function(){var t=this,e=t._self._c;return e("k-field",t._b({staticClass:"k-slug-field",attrs:{input:t._uid,help:t.preview},scopedSlots:t._u([t.wizard&&t.wizard.text?{key:"options",fn:function(){return[e("k-button",{attrs:{text:t.wizard.text,icon:"sparkling"},on:{click:t.onWizard}})]},proxy:!0}:null],null,!0)},"k-field",t.$props,!1),[e("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,value:t.slug,theme:"field",type:"slug"}},"k-input",t.$props,!1),t.$listeners))],1)}),[],!1,null,null,null,null).exports;const ys=at({mixins:[Pe],inheritAttrs:!1,props:{autofocus:Boolean,columns:Object,duplicate:{type:Boolean,default:!0},empty:String,fields:[Array,Object],limit:Number,max:Number,min:Number,prepend:{type:Boolean,default:!1},sortable:{type:Boolean,default:!0},sortBy:String,value:{type:Array,default:()=>[]}},data:()=>({items:[],page:1}),computed:{dragOptions(){return{disabled:!this.isSortable,fallbackClass:"k-sortable-row-fallback"}},index(){return this.limit?(this.page-1)*this.limit+1:1},more(){return!0!==this.disabled&&!(this.max&&this.items.length>=this.max)},hasFields(){return this.$helper.object.length(this.fields)>0},isInvalid(){return!0!==this.disabled&&(!!(this.min&&this.items.lengththis.max))},isSortable(){return!this.sortBy&&(!this.limit&&(!0!==this.disabled&&(!(this.items.length<=1)&&!1!==this.sortable)))},pagination(){let t=0;return this.limit&&(t=(this.page-1)*this.limit),{page:this.page,offset:t,limit:this.limit,total:this.items.length,align:"center",details:!0}},options(){if(this.disabled)return[];let t=[],e=this.duplicate&&this.more;return t.push({icon:"edit",text:this.$t("edit"),click:"edit"}),t.push({disabled:!e,icon:"copy",text:this.$t("duplicate"),click:"duplicate"}),t.push("-"),t.push({icon:"trash",text:e?this.$t("delete"):null,click:"remove"}),t},paginatedItems(){return this.limit?this.items.slice(this.pagination.offset,this.pagination.offset+this.limit):this.items}},watch:{value:{handler(t){t!==this.items&&(this.items=this.toItems(t))},immediate:!0}},methods:{add(t=null){if(!1===this.more)return!1;(t=t??this.$helper.field.form(this.fields))._id=t._id??this.$helper.uuid(),!0===this.prepend?this.items.unshift(t):this.items.push(t),this.save(),this.open(t)},close(){this.$panel.drawer.close(this._uid)},focus(){var t,e;null==(e=null==(t=this.$refs.add)?void 0:t.focus)||e.call(t)},form(t){const e=this.$helper.field.subfields(this,this.fields);if(t)for(const i in e)e[i].autofocus=i===t;return e},findIndex(t){return this.items.findIndex((e=>e._id===t._id))},navigate(t,e){const i=this.findIndex(t);!0!==this.disabled&&-1!==i&&this.open(this.items[i+e],null,!0)},open(t,e,i=!1){const n=this.findIndex(t);if(!0===this.disabled||-1===n)return!1;this.$panel.drawer.open({component:"k-structure-drawer",id:this._uid,props:{icon:this.icon??"list-bullet",next:this.items[n+1],prev:this.items[n-1],tabs:{content:{fields:this.form(e)}},title:this.label,value:t},replace:i,on:{input:e=>{const i=this.findIndex(t);this.$panel.drawer.props.next=this.items[i+1],this.$panel.drawer.props.prev=this.items[i-1],this.$set(this.items,i,e),this.save()},next:()=>{this.navigate(t,1)},prev:()=>{this.navigate(t,-1)},remove:()=>{this.remove(t)}}})},option(t,e){switch(t){case"remove":this.remove(e);break;case"duplicate":this.add({...e,_id:this.$helper.uuid()});break;case"edit":this.open(e)}},paginate({page:t}){this.page=t},remove(t){const e=this.findIndex(t);this.disabled||-1===e||this.$panel.dialog.open({component:"k-remove-dialog",props:{text:this.$t("field.structure.delete.confirm")},on:{submit:()=>{this.items.splice(e,1),this.save(),this.$panel.dialog.close(),this.close(),0===this.paginatedItems.length&&this.page>1&&this.page--}}})},removeAll(){this.$panel.dialog.open({component:"k-remove-dialog",props:{text:this.$t("field.structure.delete.confirm.all")},on:{submit:()=>{this.page=1,this.items=[],this.save(),this.$panel.dialog.close()}}})},save(t=this.items){this.$emit("input",t)},sort(t){return this.sortBy?t.sortBy(this.sortBy):t},toItems(t){return!1===Array.isArray(t)?[]:(t=t.map((t=>({_id:t._id??this.$helper.uuid(),...t}))),this.sort(t))}}},(function(){var t=this,e=t._self._c;return e("k-field",t._b({staticClass:"k-structure-field",nativeOn:{click:function(t){t.stopPropagation()}},scopedSlots:t._u([t.hasFields&&!t.disabled?{key:"options",fn:function(){return[e("k-button-group",{attrs:{layout:"collapsed"}},[e("k-button",{attrs:{autofocus:t.autofocus,disabled:!t.more,responsive:!0,text:t.$t("add"),icon:"add",variant:"filled",size:"xs"},on:{click:function(e){return t.add()}}}),e("k-button",{attrs:{icon:"dots",size:"xs",variant:"filled"},on:{click:function(e){return t.$refs.options.toggle()}}}),e("k-dropdown-content",{ref:"options",attrs:{options:[{click:()=>t.add(),disabled:!t.more,icon:"add",text:t.$t("add")},{click:()=>t.removeAll(),disabled:0===t.items.length||t.disabled,icon:"trash",text:t.$t("delete.all")}],"align-x":"end"}})],1)]},proxy:!0}:null],null,!0)},"k-field",t.$props,!1),[t.hasFields?[0===t.items.length?e("k-empty",{attrs:{"data-invalid":t.isInvalid,icon:"list-bullet"},on:{click:function(e){return t.add()}}},[t._v(" "+t._s(t.empty??t.$t("field.structure.empty"))+" ")]):[e("k-table",{attrs:{columns:t.columns,disabled:t.disabled,fields:t.fields,empty:t.$t("field.structure.empty"),index:t.index,options:t.options,pagination:!!t.limit&&t.pagination,rows:t.paginatedItems,sortable:t.isSortable,"data-invalid":t.isInvalid},on:{cell:function(e){return t.open(e.row,e.columnIndex)},input:t.save,option:t.option,paginate:t.paginate}}),t.more?e("footer",{staticClass:"k-bar",attrs:{"data-align":"center"}},[e("k-button",{attrs:{title:t.$t("add"),icon:"add",size:"xs",variant:"filled"},on:{click:function(e){return t.add()}}})],1):t._e()]]:[e("k-empty",{attrs:{icon:"list-bullet"}},[t._v(t._s(t.$t("fields.empty")))])]],2)}),[],!1,null,null,null,null).exports,$s={mixins:[Ui],props:{autocomplete:{default:"tel"},placeholder:{default:()=>window.panel.$t("tel.placeholder")},type:{default:"tel"}}};const ws=at({extends:Hi,mixins:[$s]},null,null,!1,null,null,null,null).exports;const xs=at({mixins:[Pe,Fe,$s],inheritAttrs:!1,props:{icon:{type:String,default:"phone"}},methods:{focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t._self._c;return e("k-field",t._b({staticClass:"k-tel-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[e("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"tel"}},"k-input",t.$props,!1),t.$listeners))],1)}),[],!1,null,null,null,null).exports;const _s=at({mixins:[Pe,Fe,Ui,Li],inheritAttrs:!1,computed:{inputType(){return this.$helper.isComponent(`k-${this.type}-input`)?this.type:"text"}},methods:{focus(){this.$refs.input.focus()},select(){this.$refs.input.select()}}},(function(){var t=this,e=t._self._c;return e("k-field",t._b({staticClass:"k-text-field",attrs:{input:t._uid,counter:t.counterOptions},scopedSlots:t._u([{key:"options",fn:function(){return[t._t("options")]},proxy:!0}],null,!0)},"k-field",t.$props,!1),[e("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,type:t.inputType,theme:"field"}},"k-input",t.$props,!1),t.$listeners))],1)}),[],!1,null,null,null,null).exports,Ss={props:{buttons:{type:[Array,Boolean],default:!0},uploads:[Boolean,Object,Array]}};const Cs=at({mixins:[Ss],computed:{commands(){return{headlines:{label:this.$t("toolbar.button.headings"),icon:"title",dropdown:[{label:this.$t("toolbar.button.heading.1"),icon:"h1",click:()=>this.command("prepend","#")},{label:this.$t("toolbar.button.heading.2"),icon:"h2",click:()=>this.command("prepend","##")},{label:this.$t("toolbar.button.heading.3"),icon:"h3",click:()=>this.command("prepend","###")}]},bold:{label:this.$t("toolbar.button.bold"),icon:"bold",click:()=>this.command("toggle","**"),shortcut:"b"},italic:{label:this.$t("toolbar.button.italic"),icon:"italic",click:()=>this.command("toggle","*"),shortcut:"i"},link:{label:this.$t("toolbar.button.link"),icon:"url",click:()=>this.command("dialog","link"),shortcut:"k"},email:{label:this.$t("toolbar.button.email"),icon:"email",click:()=>this.command("dialog","email"),shortcut:"e"},file:{label:this.$t("toolbar.button.file"),icon:"attachment",click:()=>this.command("file"),dropdown:this.uploads?[{label:this.$t("toolbar.button.file.select"),icon:"check",click:()=>this.command("file")},{label:this.$t("toolbar.button.file.upload"),icon:"upload",click:()=>this.command("upload")}]:void 0},code:{label:this.$t("toolbar.button.code"),icon:"code",click:()=>this.command("toggle","`")},ul:{label:this.$t("toolbar.button.ul"),icon:"list-bullet",click:()=>this.command("insert",((t,e)=>e.split("\n").map((t=>"- "+t)).join("\n")))},ol:{label:this.$t("toolbar.button.ol"),icon:"list-numbers",click:()=>this.command("insert",((t,e)=>e.split("\n").map(((t,e)=>e+1+". "+t)).join("\n")))}}},default:()=>["headlines","|","bold","italic","code","|","link","email","file","|","ul","ol"],layout(){var t;if(!1===this.buttons)return[];const e=[],i=Array.isArray(this.buttons)?this.buttons:this.default,n={...this.commands,...window.panel.plugins.textareaButtons??{}};for(const s of i)if("|"===s)e.push("|");else if(n[s]){const i=n[s];i.click=null==(t=i.click)?void 0:t.bind(this),e.push(i)}return e}},methods:{close(){this.$refs.toolbar.close()},command(t,...e){this.$emit("command",t,...e)},shortcut(t,e){var i;const n=this.layout.find((e=>e.shortcut===t));n&&(e.preventDefault(),null==(i=n.click)||i.call(n))}}},(function(){return(0,this._self._c)("k-toolbar",{ref:"toolbar",staticClass:"k-textarea-toolbar",attrs:{buttons:this.layout}})}),[],!1,null,null,null,null).exports,Os={mixins:[Ss,ji,W,tt,et,ot,rt],props:{endpoints:Object,preselect:Boolean,size:String,theme:String,value:String}};const As=at({mixins:[Ii,Os],data:()=>({over:!1}),computed:{uploadOptions(){const t=this.restoreSelectionCallback();return{url:this.$panel.urls.api+"/"+this.endpoints.field+"/upload",multiple:!1,on:{cancel:t,done:e=>{t((()=>this.insertUpload(e)))}}}}},watch:{value(){this.onInvalid()}},mounted(){this.onInvalid(),this.$props.autofocus&&this.focus(),this.$props.preselect&&this.select()},methods:{dialog(t){const e=this.restoreSelectionCallback();this.$panel.dialog.open({component:"k-toolbar-"+t+"-dialog",props:{value:this.parseSelection()},on:{cancel:e,submit:t=>{this.$panel.dialog.close(),e((()=>this.insert(t)))}}})},file(){const t=this.restoreSelectionCallback();this.$panel.dialog.open({component:"k-files-dialog",props:{endpoint:this.endpoints.field+"/files",multiple:!1},on:{cancel:t,submit:e=>{t((()=>this.insertFile(e))),this.$panel.dialog.close()}}})},focus(){this.$refs.input.focus()},insert(t){const e=this.$refs.input,i=e.value;"function"==typeof t&&(t=t(this.$refs.input,this.selection())),setTimeout((()=>{if(e.focus(),document.execCommand("insertText",!1,t),e.value===i){const i=e.selectionStart,n=e.selectionEnd,s=i===n?"end":"select";e.setRangeText(t,i,n,s)}this.$emit("input",e.value)}))},insertFile(t){(null==t?void 0:t.length)>0&&this.insert(t.map((t=>t.dragText)).join("\n\n"))},insertUpload(t){this.insertFile(t),this.$events.emit("model.update")},onCommand(t,...e){if("function"!=typeof this[t])return console.warn(t+" is not a valid command");this[t](...e)},onDrop(t){if(this.uploads&&this.$helper.isUploadEvent(t))return this.$panel.upload.open(t.dataTransfer.files,this.uploadOptions);"text"===this.$panel.drag.type&&(this.focus(),this.insert(this.$panel.drag.data))},onFocus(t){this.$emit("focus",t)},onInput(t){this.$emit("input",t.target.value)},onInvalid(){this.$emit("invalid",this.$v.$invalid,this.$v)},onOut(){this.$refs.input.blur(),this.over=!1},onOver(t){if(this.uploads&&this.$helper.isUploadEvent(t))return t.dataTransfer.dropEffect="copy",this.focus(),void(this.over=!0);"text"===this.$panel.drag.type&&(t.dataTransfer.dropEffect="copy",this.focus(),this.over=!0)},onShortcut(t){var e;!1!==this.buttons&&"Meta"!==t.key&&"Control"!==t.key&&(null==(e=this.$refs.toolbar)||e.shortcut(t.key,t))},onSubmit(t){return this.$emit("submit",t)},parseSelection(){const t=this.selection();if(0===(null==t?void 0:t.length))return{href:null,title:null};let e;e=this.$panel.config.kirbytext?/^\(link:\s*(?.*?)(?:\s*text:\s*(?.*?))?\)$/is:/^(\[(?.*?)\]\((?.*?)\))|(<(?.*?)>)$/is;const i=e.exec(t);return null!==i?{href:i.groups.url??i.groups.link,title:i.groups.text??null}:{href:null,title:t}},prepend(t){this.insert(t+" "+this.selection())},restoreSelectionCallback(){const t=this.$refs.input.selectionStart,e=this.$refs.input.selectionEnd;return i=>{setTimeout((()=>{this.$refs.input.setSelectionRange(t,e),i&&i()}))}},select(){this.$refs.select()},selection(){return this.$refs.input.value.substring(this.$refs.input.selectionStart,this.$refs.input.selectionEnd)},toggle(t,e){e=e??t;const i=this.selection();return i.startsWith(t)&&i.endsWith(e)?this.insert(i.slice(t.length).slice(0,i.length-t.length-e.length)):this.wrap(t,e)},upload(){this.$panel.upload.pick(this.uploadOptions)},wrap(t,e){this.insert(t+this.selection()+(e??t))}},validations(){return{value:{required:!this.required||t.required,minLength:!this.minlength||t.minLength(this.minlength),maxLength:!this.maxlength||t.maxLength(this.maxlength)}}}},(function(){var t=this,e=t._self._c;return e("div",{staticClass:"k-textarea-input",attrs:{"data-over":t.over,"data-size":t.size}},[e("div",{staticClass:"k-textarea-input-wrapper"},[t.buttons&&!t.disabled?e("k-textarea-toolbar",{ref:"toolbar",attrs:{buttons:t.buttons,disabled:t.disabled,uploads:t.uploads},on:{command:t.onCommand},nativeOn:{mousedown:function(t){t.preventDefault()}}}):t._e(),e("k-autosize",[e("textarea",t._b({directives:[{name:"direction",rawName:"v-direction"}],ref:"input",staticClass:"k-textarea-input-native",attrs:{"data-font":t.font},on:{click:function(e){var i;null==(i=t.$refs.toolbar)||i.close()},focus:t.onFocus,input:t.onInput,keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:e.metaKey?t.onSubmit.apply(null,arguments):null},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:e.ctrlKey?t.onSubmit.apply(null,arguments):null},function(e){return e.metaKey?e.ctrlKey||e.shiftKey||e.altKey?null:t.onShortcut.apply(null,arguments):null},function(e){return e.ctrlKey?e.shiftKey||e.altKey||e.metaKey?null:t.onShortcut.apply(null,arguments):null}],dragover:t.onOver,dragleave:t.onOut,drop:t.onDrop}},"textarea",{autofocus:t.autofocus,disabled:t.disabled,id:t.id,minlength:t.minlength,name:t.name,placeholder:t.placeholder,required:t.required,spellcheck:t.spellcheck,value:t.value},!1))])],1)])}),[],!1,null,null,null,null).exports;const Ms=at({mixins:[Pe,Fe,Os,Li],inheritAttrs:!1,methods:{focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t._self._c;return e("k-field",t._b({staticClass:"k-textarea-field",attrs:{input:t._uid,counter:t.counterOptions}},"k-field",t.$props,!1),[e("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,type:"textarea",theme:"field"}},"k-input",t.$props,!1),t.$listeners))],1)}),[],!1,null,null,null,null).exports,js={props:{display:{type:String,default:"HH:mm"},max:String,min:String,step:{type:Object,default:()=>({size:5,unit:"minute"})},type:{type:String,default:"time"},value:String}};const Is=at({mixins:[Ri,js],computed:{inputType:()=>"time"}},null,null,!1,null,null,null,null).exports;const Ts=at({mixins:[Pe,Fe,js],inheritAttrs:!1,props:{icon:{type:String,default:"clock"},times:{type:Boolean,default:!0}},methods:{focus(){this.$refs.input.focus()},select(t){var e;this.$emit("input",t),null==(e=this.$refs.times)||e.close()}}},(function(){var t=this,e=t._self._c;return e("k-field",t._b({staticClass:"k-time-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[e("k-input",t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"time"},on:{input:function(e){return t.$emit("input",e??"")}},scopedSlots:t._u([t.times?{key:"icon",fn:function(){return[e("k-button",{staticClass:"k-input-icon-button",attrs:{disabled:t.disabled,icon:t.icon??"clock",title:t.$t("time.select")},on:{click:function(e){return t.$refs.times.toggle()}}}),e("k-dropdown-content",{ref:"times",attrs:{"align-x":"end"}},[e("k-timeoptions-input",{attrs:{display:t.display,value:t.value},on:{input:t.select}})],1)]},proxy:!0}:null],null,!0)},"k-input",t.$props,!1))],1)}),[],!1,null,null,null,null).exports,Es={props:{autofocus:Boolean,disabled:Boolean,id:[Number,String],text:{type:[Array,String]},required:Boolean,value:Boolean}};const Ls=at({mixins:[Ii,Es],computed:{label(){const t=this.text??[this.$t("off"),this.$t("on")];return Array.isArray(t)?this.value?t[1]:t[0]:t}},watch:{value(){this.onInvalid()}},mounted(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{onEnter(t){"Enter"===t.key&&this.$refs.input.click()},onInput(t){this.$emit("input",t)},onInvalid(){this.$emit("invalid",this.$v.$invalid,this.$v)},select(){this.$refs.input.focus()}},validations(){return{value:{required:!this.required||t.required}}}},(function(){var t=this;return(0,t._self._c)("k-choice-input",{ref:"input",staticClass:"k-toggle-input",attrs:{id:t.id,checked:t.value,disabled:t.disabled,label:t.label,type:"checkbox",variant:"toggle"},on:{input:function(e){return t.$emit("input",e)}}})}),[],!1,null,null,null,null).exports;const Ds=at({mixins:[Pe,Fe,Es],inheritAttrs:!1,methods:{focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t._self._c;return e("k-field",t._b({staticClass:"k-toggle-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[e("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"toggle"}},"k-input",t.$props,!1),t.$listeners))],1)}),[],!1,null,null,null,null).exports,Bs={mixins:[ji],props:{columns:Number,grow:Boolean,labels:Boolean,options:Array,reset:Boolean,value:[String,Number,Boolean]}};const qs=at({mixins:[Ii,Bs],watch:{value(){this.onInvalid()}},mounted(){this.onInvalid(),this.$props.autofocus&&this.focus()},methods:{focus(){var t;null==(t=this.$el.querySelector("input[checked]")||this.$el.querySelector("input"))||t.focus()},onClick(t){t===this.value&&this.reset&&!this.required&&this.$emit("input","")},onInput(t){this.$emit("input",t)},onInvalid(){this.$emit("invalid",this.$v.$invalid,this.$v)},select(){this.focus()}},validations(){return{value:{required:!this.required||t.required}}}},(function(){var t=this,e=t._self._c;return t.options.length?e("ul",{staticClass:"k-toggles-input",style:"--options:"+(t.columns??t.options.length),attrs:{"data-invalid":t.$v.$invalid,"data-labels":t.labels}},t._l(t.options,(function(i,n){return e("li",{key:n,attrs:{"data-disabled":t.disabled}},[e("input",{staticClass:"input-hidden",attrs:{id:t.id+"-"+n,"aria-label":i.text,disabled:t.disabled,name:t.id,type:"radio"},domProps:{value:i.value,checked:t.value===i.value},on:{click:function(e){return t.onClick(i.value)},change:function(e){return t.onInput(i.value)}}}),e("label",{attrs:{for:t.id+"-"+n,title:i.text}},[i.icon?e("k-icon",{attrs:{type:i.icon}}):t._e(),t.labels||!i.icon?e("span",{staticClass:"k-toggles-text",domProps:{innerHTML:t._s(i.text)}}):t._e()],1)])})),0):e("k-empty",{attrs:{icon:"info",theme:"info"}},[t._v(t._s(t.$t("options.none")))])}),[],!1,null,null,null,null).exports;const Ps=at({mixins:[Pe,Fe,Bs],inheritAttrs:!1,methods:{focus(){this.$refs.input.focus()},onInput(t){this.$emit("input",t)}}},(function(){var t=this,e=t._self._c;return e("k-field",t._b({staticClass:"k-toggles-field"},"k-field",t.$props,!1),[e("k-input",t._g(t._b({ref:"input",class:{grow:t.grow},attrs:{id:t._uid,theme:"field",type:"toggles"}},"k-input",t.$props,!1),t.$listeners))],1)}),[],!1,null,null,null,null).exports,Ns={mixins:[Ui],props:{autocomplete:{type:String,default:"url"},placeholder:{type:String,default:()=>window.panel.$t("url.placeholder")},type:{type:String,default:"url"}}};const zs=at({extends:Hi,mixins:[Ns]},null,null,!1,null,null,null,null).exports;const Fs=at({mixins:[Pe,Fe,Ns],inheritAttrs:!1,props:{link:{type:Boolean,default:!0},icon:{type:String,default:"url"}},methods:{focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t._self._c;return e("k-field",t._b({staticClass:"k-url-field",attrs:{input:t._uid}},"k-field",t.$props,!1),[e("k-input",t._g(t._b({ref:"input",attrs:{id:t._uid,theme:"field",type:"url"},scopedSlots:t._u([{key:"icon",fn:function(){return[t.link?e("k-button",{staticClass:"k-input-icon-button",attrs:{icon:t.icon,link:t.value,title:t.$t("open"),tabindex:"-1",target:"_blank"}}):t._e()]},proxy:!0}])},"k-input",t.$props,!1),t.$listeners))],1)}),[],!1,null,null,null,null).exports;const Rs=at({extends:Ji,type:"users",computed:{emptyProps(){return{icon:"users",text:this.empty??this.$t("field.users.empty")}}}},null,null,!1,null,null,null,null).exports;const Ys=at({mixins:[Pe,Fe,Rn,Li],inheritAttrs:!1,methods:{focus(){this.$refs.input.focus()}}},(function(){var t=this,e=t._self._c;return e("k-field",t._b({staticClass:"k-writer-field",attrs:{input:t._uid,counter:t.counterOptions}},"k-field",t.$props,!1),[e("k-input",t._b({ref:"input",attrs:{after:t.after,before:t.before,icon:t.icon,theme:"field",type:"writer"},on:{input:function(e){return t.$emit("input",e)}}},"k-input",t.$props,!1))],1)}),[],!1,null,null,null,null).exports,Us={install(t){t.component("k-blocks-field",Mi),t.component("k-checkboxes-field",Di),t.component("k-color-field",zi),t.component("k-date-field",Yi),t.component("k-email-field",Wi),t.component("k-files-field",Gi),t.component("k-gap-field",Xi),t.component("k-headline-field",Zi),t.component("k-info-field",Qi),t.component("k-layout-field",tn),t.component("k-line-field",en),t.component("k-link-field",nn),t.component("k-list-field",Kn),t.component("k-multiselect-field",Qn),t.component("k-number-field",is),t.component("k-object-field",ns),t.component("k-pages-field",ss),t.component("k-password-field",rs),t.component("k-radio-field",cs),t.component("k-range-field",hs),t.component("k-select-field",gs),t.component("k-slug-field",vs),t.component("k-structure-field",ys),t.component("k-tags-field",Zn),t.component("k-text-field",_s),t.component("k-textarea-field",Ms),t.component("k-tel-field",xs),t.component("k-time-field",Ts),t.component("k-toggle-field",Ds),t.component("k-toggles-field",Ps),t.component("k-url-field",Fs),t.component("k-users-field",Rs),t.component("k-writer-field",Ys)}},Hs={mixins:[ds],props:{max:{default:1,type:Number},min:{default:0,type:Number},step:{default:.01,type:Number},tooltip:{default:!1,type:[Boolean,Object]}}};const Vs=at({mixins:[ps,Hs]},(function(){var t=this;return(0,t._self._c)("k-range-input",t._b({staticClass:"k-alpha-input",on:{input:function(e){return t.$emit("input",e)}}},"k-range-input",t.$props,!1))}),[],!1,null,null,null,null).exports;const Ks=at({mixins:[ji],props:{max:String,min:String,value:{default:"",type:String}},data(){return{maxdate:null,mindate:null,month:null,selected:null,today:this.$library.dayjs(),year:null}},computed:{numberOfDays(){return this.toDate().daysInMonth()},firstWeekday(){const t=this.toDate().day();return t>0?t:7},weekdays(){return["mon","tue","wed","thu","fri","sat","sun"].map((t=>this.$t("days."+t)))},weeks(){const t=this.firstWeekday-1;return Math.ceil((this.numberOfDays+t)/7)},monthnames(){return["january","february","march","april","may","june","july","august","september","october","november","december"].map((t=>this.$t("months."+t)))},months(){var t=[];return this.monthnames.forEach(((e,i)=>{t.push({value:i,text:e})})),t},years(){const t=this.year-20,e=this.year+20;return this.toOptions(t,e)}},watch:{max:{handler(t,e){t!==e&&(this.maxdate=this.$library.dayjs.interpret(t,"date"))},immediate:!0},min:{handler(t,e){t!==e&&(this.mindate=this.$library.dayjs.interpret(t,"date"))},immediate:!0},value:{handler(t,e){t!==e&&(this.selected=this.$library.dayjs.interpret(t,"date"),this.show(this.selected))},immediate:!0}},methods:{days(t){let e=[];const i=7*(t-1)+1,n=i+7;for(let s=i;sthis.numberOfDays;e.push(i?"":t)}return e},isDisabled(t){const e=this.toDate(t);return this.disabled||e.isBefore(this.mindate,"day")||e.isAfter(this.maxdate,"day")},isSelected(t){return this.toDate(t).isSame(this.selected,"day")},isToday(t){return this.toDate(t).isSame(this.today,"day")},onNext(){const t=this.toDate().add(1,"month");this.show(t)},onPrev(){const t=this.toDate().subtract(1,"month");this.show(t)},select(t){this.$emit("input",(null==t?void 0:t.toISO("date"))??null)},show(t){this.month=(t??this.today).month(),this.year=(t??this.today).year()},toDate(t=1,e=this.month){return this.$library.dayjs(`${this.year}-${e+1}-${t}`)},toOptions(t,e){for(var i=[],n=t;n<=e;n++)i.push({value:n,text:this.$helper.pad(n)});return i}}},(function(){var t=this,e=t._self._c;return e("fieldset",{staticClass:"k-calendar-input"},[e("legend",{staticClass:"sr-only"},[t._v(t._s(t.$t("date.select")))]),e("nav",[e("k-button",{attrs:{title:t.$t("prev"),icon:"angle-left"},on:{click:t.onPrev}}),e("span",{staticClass:"k-calendar-selects"},[e("k-select-input",{attrs:{"aria-label":t.$t("month"),autofocus:t.autofocus,options:t.months,empty:!1,required:!0,value:t.month},on:{input:function(e){t.month=Number(e)}}}),e("k-select-input",{attrs:{"aria-label":t.$t("year"),options:t.years,empty:!1,required:!0,value:t.year},on:{input:function(e){t.year=Number(e)}}})],1),e("k-button",{attrs:{title:t.$t("next"),icon:"angle-right"},on:{click:t.onNext}})],1),e("table",{key:t.year+"-"+t.month,staticClass:"k-calendar-table"},[e("thead",[e("tr",t._l(t.weekdays,(function(i){return e("th",{key:"weekday_"+i},[t._v(" "+t._s(i)+" ")])})),0)]),e("tbody",t._l(t.weeks,(function(i){return e("tr",{key:"week_"+i},t._l(t.days(i),(function(i,n){return e("td",{key:"day_"+n,staticClass:"k-calendar-day",attrs:{"aria-current":!!t.isToday(i)&&"date","aria-selected":!!t.isSelected(i)&&"date"}},[i?e("k-button",{attrs:{disabled:t.isDisabled(i),text:i},on:{click:function(e){t.select(t.toDate(i))}}}):t._e()],1)})),0)})),0),e("tfoot",[e("tr",[e("td",{staticClass:"k-calendar-today",attrs:{colspan:"7"}},[e("k-button",{attrs:{disabled:t.disabled,text:t.$t("today")},on:{click:function(e){return t.select(t.today)}}})],1)])])]),e("input",{staticClass:"sr-only",attrs:{id:t.id,disabled:t.disabled,min:t.min,max:t.max,name:t.name,required:t.required,tabindex:"-1",type:"date"},domProps:{value:t.value}})])}),[],!1,null,null,null,null).exports;const Ws=at({mixins:[Ii,{mixins:[ji],props:{checked:{type:Boolean},info:{type:String},label:{type:String},type:{default:"checkbox",type:String},value:{type:[Boolean,Number,String]},variant:{type:String}}}]},(function(){var t=this,e=t._self._c;return e("label",{staticClass:"k-choice-input",attrs:{"aria-disabled":t.disabled}},[e("input",t._b({class:{"sr-only":"invisible"===t.variant},attrs:{"data-variant":t.variant},on:{input:function(e){return t.$emit("input",e.target.checked)}}},"input",{autofocus:t.autofocus,id:t.id,checked:t.checked,disabled:t.disabled,name:t.name,required:t.required,type:t.type,value:t.value},!1)),t.label||t.info?e("span",{staticClass:"k-choice-input-label"},[e("span",{staticClass:"k-choice-input-label-text",domProps:{innerHTML:t._s(t.label)}}),t.info?e("span",{staticClass:"k-choice-input-label-info",domProps:{innerHTML:t._s(t.info)}}):t._e()]):t._e()])}),[],!1,null,null,null,null).exports;const Js=at({extends:Ws},null,null,!1,null,null,null,null).exports;const Gs=at({mixins:[us,{mixins:[as],props:{format:{type:String,default:"hex",validator:t=>["hex","rgb","hsl"].includes(t)},value:{type:String}}}],computed:{choices(){return this.options.map((t=>({...t,title:t.text??t.value,value:this.colorToString(t.value)})))}},methods:{colorToString(t){try{return this.$library.colors.toString(t,this.format)}catch{return t}}}},(function(){var t=this,e=t._self._c;return t.choices.length?e("fieldset",{staticClass:"k-coloroptions-input",attrs:{disabled:t.disabled}},[e("legend",{staticClass:"sr-only"},[t._v(t._s(t.$t("options")))]),e("ul",t._l(t.choices,(function(i,n){return e("li",{key:n},[e("label",{attrs:{title:i.title}},[e("input",{staticClass:"input-hidden",attrs:{autofocus:t.autofocus&&0===n,disabled:t.disabled,name:t.name??t._uid,required:t.required,type:"radio"},domProps:{checked:i.value===t.value,value:i.value},on:{click:function(e){return t.toggle(i.value)},input:function(e){return t.$emit("input",i.value)}}}),e("k-color-frame",{attrs:{color:i.value}})],1)])})),0)]):t._e()}),[],!1,null,null,null,null).exports;const Xs=at({mixins:[Ii,{mixins:[ji,nt],props:{alpha:{default:!0,type:Boolean},format:{default:"hex",type:String,validator:t=>["hex","rgb","hsl"].includes(t)},value:{type:[Object,String]}}}],data:()=>({color:{h:0,s:0,v:1,a:1},formatted:null}),computed:{coords(){return this.value?{x:100*this.color.s,y:100*(1-this.color.v)}:null},hsl(){try{const t=this.$library.colors.convert(this.color,"hsl");return{h:t.h,s:(100*t.s).toFixed()+"%",l:(100*t.l).toFixed()+"%",a:t.a}}catch{return{h:0,s:"0%",l:"0%",a:1}}}},watch:{value:{handler(t,e){if(t===e||t===this.formatted)return;const i=this.$library.colors.parseAs(t??"","hsv");i?(this.formatted=this.$library.colors.toString(i,this.format),this.color=i):(this.formatted=null,this.color={h:0,s:0,v:1,a:1})},immediate:!0}},methods:{between:(t,e,i)=>Math.min(Math.max(t,e),i),emit(){return this.formatted=this.$library.colors.toString(this.color,this.format),this.$emit("input",this.formatted)},focus(){this.$refs.coords.focus()},setAlpha(t){this.color.a=this.alpha?this.between(Number(t),0,1):1,this.emit()},setCoords(t){if(!t)return this.$emit("input","");const e=Math.round(t.x),i=Math.round(t.y);this.color.s=this.between(e/100,0,1),this.color.v=this.between(1-i/100,0,1),this.emit()},setHue(t){this.color.h=this.between(Number(t),0,360),this.emit()}}},(function(){var t=this,e=t._self._c;return e("fieldset",{staticClass:"k-colorpicker-input",style:{"--h":t.hsl.h,"--s":t.hsl.s,"--l":t.hsl.l,"--a":t.hsl.a}},[e("legend",{staticClass:"sr-only"},[t._v(t._s(t.$t("color")))]),e("k-coords-input",{ref:"coords",attrs:{autofocus:t.autofocus,disabled:t.disabled,required:t.required,value:t.coords},on:{input:function(e){return t.setCoords(e)}}}),e("label",{attrs:{"aria-label":t.$t("hue")}},[e("k-hue-input",{attrs:{disabled:t.disabled,required:t.required,value:t.color.h},on:{input:function(e){return t.setHue(e)}}})],1),t.alpha?e("label",{attrs:{"aria-label":t.$t("alpha")}},[e("k-alpha-input",{attrs:{disabled:t.disabled,required:t.required,value:t.color.a},on:{input:function(e){return t.setAlpha(e)}}})],1):t._e(),e("k-coloroptions-input",{attrs:{disabled:t.disabled,format:t.format,options:t.options,required:t.required,value:t.value},on:{input:function(e){return t.$emit("input",e)}}}),e("input",{staticClass:"input-hidden",attrs:{name:t.name,required:t.required,tabindex:"-1",type:"text"},domProps:{value:t.formatted}})],1)}),[],!1,null,null,null,null).exports;const Zs=at({mixins:[Ii,{mixins:[ji],props:{reset:{default:!0,type:Boolean},value:{default:()=>({x:0,y:0}),type:Object}}}],data:()=>({x:0,y:0}),watch:{value:{handler(t){const e=this.parse(t);this.x=(null==e?void 0:e.x)??0,this.y=(null==e?void 0:e.y)??0},immediate:!0}},methods:{focus(){var t;null==(t=this.$el.querySelector("button"))||t.focus()},getCoords:(t,e)=>({x:Math.min(Math.max(t.clientX-e.left,0),e.width),y:Math.min(Math.max(t.clientY-e.top,0),e.height)}),onDelete(){this.reset&&!this.required&&this.$emit("input",null)},onDrag(t){if(0!==t.button)return;const e=t=>this.onMove(t),i=()=>{window.removeEventListener("mousemove",e),window.removeEventListener("mouseup",i)};window.addEventListener("mousemove",e),window.addEventListener("mouseup",i)},onEnter(){var t;null==(t=this.$el.form)||t.requestSubmit()},onInput(t,e){if(t.preventDefault(),t.stopPropagation(),this.disabled)return!1;this.x=Math.min(Math.max(parseFloat(e.x??this.x??0),0),100),this.y=Math.min(Math.max(parseFloat(e.y??this.y??0),0),100),this.$emit("input",{x:this.x,y:this.y})},onKeys(t){const e=t.shiftKey?10:1,i={ArrowUp:{y:this.y-e},ArrowDown:{y:this.y+e},ArrowLeft:{x:this.x-e},ArrowRight:{x:this.x+e}};i[t.key]&&this.onInput(t,i[t.key])},async onMove(t){const e=this.$el.getBoundingClientRect(),i=this.getCoords(t,e),n=i.x/e.width*100,s=i.y/e.height*100;this.onInput(t,{x:n,y:s}),await this.$nextTick(),this.focus()},parse(t){if("object"==typeof t)return t;const e={"top left":{x:0,y:0},"top center":{x:50,y:0},"top right":{x:100,y:0},"center left":{x:0,y:50},center:{x:50,y:50},"center center":{x:50,y:50},"center right":{x:100,y:50},"bottom left":{x:0,y:100},"bottom center":{x:50,y:100},"bottom right":{x:100,y:100}};if(e[t])return e[t];const i=t.split(",").map((t=>t.trim()));return{x:i[0],y:i[1]??0}}}},(function(){var t=this,e=t._self._c;return e("div",{staticClass:"k-coords-input",attrs:{"aria-disabled":t.disabled,"data-empty":!t.value},on:{mousedown:t.onDrag,click:t.onMove,keydown:t.onKeys}},[t._t("default"),e("button",{staticClass:"k-coords-input-thumb",style:{left:`${t.x}%`,top:`${t.y}%`},attrs:{id:t.id,autofocus:t.autofocus,disabled:t.disabled},on:{keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:(e.preventDefault(),t.onEnter.apply(null,arguments))},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"delete",[8,46],e.key,["Backspace","Delete","Del"])?null:t.onDelete.apply(null,arguments)}]}}),e("input",{staticClass:"input-hidden",attrs:{name:t.name,required:t.required,tabindex:"-1",type:"text"},domProps:{value:t.value?[t.value.x,t.value.y]:null}})],2)}),[],!1,null,null,null,null).exports,Qs={mixins:[ds],props:{max:{default:360,type:Number},min:{default:0,type:Number},step:{default:1,type:Number},tooltip:{default:!1,type:[Boolean,Object]}}};const to=at({mixins:[ps,Qs]},(function(){var t=this;return(0,t._self._c)("k-range-input",t._b({staticClass:"k-hue-input",on:{input:function(e){return t.$emit("input",e)}}},"k-range-input",t.$props,!1))}),[],!1,null,null,null,null).exports;const eo=at({extends:Xn,mixins:[{mixins:[Gn],props:{accept:{default:"string",type:String}}}]},(function(){var t=this,e=t._self._c;return e("div",{staticClass:"k-multiselect-input"},[e("k-tags",t._b({ref:"tags",on:{input:function(e){return t.$emit("input",e)}},nativeOn:{click:function(t){t.stopPropagation()}}},"k-tags",t.$props,!1))],1)}),[],!1,null,null,null,null).exports;const io=at({mixins:[qi,{mixins:[Bi],props:{autocomplete:{default:"off"},placeholder:{default:()=>window.panel.$t("search")+" …",type:String},spellcheck:{default:!1}}}]},(function(){var t=this;return(0,t._self._c)("k-string-input",t._b({staticClass:"k-search-input",attrs:{type:"search"},on:{input:function(e){return t.$emit("input",e)}}},"k-string-input",t.$props,!1))}),[],!1,null,null,null,null).exports;const no=at({mixins:[Ii,{mixins:[ji]}],props:{display:{type:String,default:"HH:mm"},value:String},computed:{day(){return this.formatTimes([6,7,8,9,10,11,"-",12,13,14,15,16,17])},night(){return this.formatTimes([18,19,20,21,22,23,"-",0,1,2,3,4,5])}},methods:{focus(){this.$el.querySelector("button").focus()},formatTimes(t){return t.map((t=>{if("-"===t)return t;const e=this.$library.dayjs(t+":00","H:mm");return{display:e.format(this.display),select:e.toISO("time")}}))},select(t){this.$emit("input",t)}}},(function(){var t=this,e=t._self._c;return e("div",{staticClass:"k-timeoptions-input"},[e("div",[e("h3",[e("k-icon",{attrs:{type:"sun"}}),t._v(" "),e("span",{staticClass:"sr-only"},[t._v(t._s(t.$t("day")))])],1),e("ul",t._l(t.day,(function(i,n){return e("li",{key:i.select},["-"===i?e("hr"):e("k-button",{attrs:{autofocus:t.autofocus&&0===n,disabled:t.disabled,selected:i.select===t.value&&"time"},on:{click:function(e){return t.select(i.select)}}},[t._v(" "+t._s(i.display)+" ")])],1)})),0)]),e("div",[e("h3",[e("k-icon",{attrs:{type:"moon"}}),t._v(" "),e("span",{staticClass:"sr-only"},[t._v(t._s(t.$t("night")))])],1),e("ul",t._l(t.night,(function(i){return e("li",{key:i.select},["-"===i?e("hr"):e("k-button",{attrs:{disabled:t.disabled,selected:i.select===t.value&&"time"},on:{click:function(e){return t.select(i.select)}}},[t._v(" "+t._s(i.display)+" ")])],1)})),0)])])}),[],!1,null,null,null,null).exports,so={install(t){t.component("k-alpha-input",Vs),t.component("k-calendar-input",Ks),t.component("k-checkbox-input",Js),t.component("k-checkboxes-input",Ei),t.component("k-choice-input",Ws),t.component("k-colorname-input",Ni),t.component("k-coloroptions-input",Gs),t.component("k-colorpicker-input",Xs),t.component("k-coords-input",Zs),t.component("k-date-input",Ri),t.component("k-email-input",Ki),t.component("k-hue-input",to),t.component("k-list-input",Vn),t.component("k-multiselect-input",eo),t.component("k-number-input",es),t.component("k-password-input",ls),t.component("k-radio-input",us),t.component("k-range-input",ps),t.component("k-search-input",io),t.component("k-select-input",fs),t.component("k-slug-input",bs),t.component("k-string-input",qi),t.component("k-tags-input",Xn),t.component("k-tel-input",ws),t.component("k-text-input",Hi),t.component("k-textarea-input",As),t.component("k-time-input",Is),t.component("k-timeoptions-input",no),t.component("k-toggle-input",Ls),t.component("k-toggles-input",qs),t.component("k-url-input",zs),t.component("k-writer-input",Yn),t.component("k-calendar",Ks),t.component("k-times",no)}};const oo=at({props:{attrs:[Array,Object],columns:Array,disabled:Boolean,endpoints:Object,fieldsetGroups:Object,fieldsets:Object,id:String,isSelected:Boolean,layouts:Array,settings:Object},computed:{options(){return[{click:()=>this.$emit("prepend"),icon:"angle-up",text:this.$t("insert.before")},{click:()=>this.$emit("append"),icon:"angle-down",text:this.$t("insert.after")},"-",{click:()=>this.openSettings(),icon:"settings",text:this.$t("settings"),when:!1===this.$helper.object.isEmpty(this.settings)},{click:()=>this.$emit("duplicate"),icon:"copy",text:this.$t("duplicate")},{click:()=>this.$emit("change"),disabled:1===this.layouts.length,icon:"dashboard",text:this.$t("field.layout.change")},"-",{click:()=>this.$emit("copy"),icon:"template",text:this.$t("copy")},{click:()=>this.$emit("paste"),icon:"download",text:this.$t("paste.after")},"-",{click:()=>this.remove(),icon:"trash",text:this.$t("field.layout.delete")}]},tabs(){let t=this.settings.tabs;for(const[e,i]of Object.entries(t))for(const n in i.fields)t[e].fields[n].endpoints={field:this.endpoints.field+"/fields/"+n,section:this.endpoints.section,model:this.endpoints.model};return t}},methods:{openSettings(){this.$panel.drawer.open({component:"k-form-drawer",props:{icon:"settings",tabs:this.tabs,title:this.$t("settings"),value:this.attrs},on:{input:t=>this.$emit("updateAttrs",t)}})},remove(){this.$panel.dialog.open({component:"k-remove-dialog",props:{text:this.$t("field.layout.delete.confirm")},on:{submit:()=>{this.$emit("remove"),this.$panel.dialog.close()}}})}}},(function(){var t=this,e=t._self._c;return e("section",{staticClass:"k-layout",attrs:{"data-selected":t.isSelected,tabindex:"0"},on:{click:function(e){return t.$emit("select")}}},[e("k-grid",{staticClass:"k-layout-columns"},t._l(t.columns,(function(i,n){return e("k-layout-column",t._b({key:i.id,attrs:{endpoints:t.endpoints,"fieldset-groups":t.fieldsetGroups,fieldsets:t.fieldsets},on:{input:function(e){return t.$emit("updateColumn",{column:i,columnIndex:n,blocks:e})}}},"k-layout-column",i,!1))})),1),t.disabled?t._e():e("nav",{staticClass:"k-layout-toolbar"},[t.settings?e("k-button",{staticClass:"k-layout-toolbar-button",attrs:{title:t.$t("settings"),icon:"settings"},on:{click:t.openSettings}}):t._e(),e("k-button",{staticClass:"k-layout-toolbar-button",attrs:{icon:"angle-down"},on:{click:function(e){return t.$refs.options.toggle()}}}),e("k-dropdown-content",{ref:"options",attrs:{options:t.options,"align-x":"end"}}),e("k-sort-handle")],1)],1)}),[],!1,null,null,null,null).exports;const lo=at({props:{blocks:Array,endpoints:Object,fieldsetGroups:Object,fieldsets:Object,id:String,isSelected:Boolean,width:{type:String,default:"1/1"}}},(function(){var t=this,e=t._self._c;return e("div",{staticClass:"k-column k-layout-column",style:"--width: "+t.width,attrs:{id:t.id,tabindex:"0"},on:{dblclick:function(e){return t.$refs.blocks.choose(t.blocks.length)}}},[e("k-blocks",{ref:"blocks",attrs:{endpoints:t.endpoints,"fieldset-groups":t.fieldsetGroups,fieldsets:t.fieldsets,value:t.blocks,group:"layout"},on:{input:function(e){return t.$emit("input",e)}},nativeOn:{dblclick:function(t){t.stopPropagation()}}})],1)}),[],!1,null,null,null,null).exports;const ro=at({props:{disabled:Boolean,empty:String,endpoints:Object,fieldsetGroups:Object,fieldsets:Object,layouts:Array,max:Number,selector:Object,settings:Object,value:Array},data(){return{current:null,nextIndex:null,rows:this.value,selected:null}},computed:{draggableOptions(){return{id:this._uid,handle:!0,list:this.rows}}},watch:{value(){this.rows=this.value}},methods:{copy(t,e){if(0===this.rows.length)return!1;const i=void 0!==e?this.rows[e]:this.rows;this.$helper.clipboard.write(JSON.stringify(i),t),this.$panel.notification.success({message:this.$t("copy.success",{count:i.length??1}),icon:"template"})},change(t,e){const i=e.columns.map((t=>t.width)),n=this.layouts.findIndex((t=>t.toString()===i.toString()));this.$panel.dialog.open({component:"k-layout-selector",props:{label:this.$t("field.layout.change"),layouts:this.layouts,selector:this.selector,value:this.layouts[n]},on:{submit:i=>{this.onChange(i,n,{rowIndex:t,layoutIndex:n,layout:e}),this.$panel.dialog.close()}}})},duplicate(t,e){const i=this.$helper.clone(e),n=this.updateIds(i);this.rows.splice(t+1,0,...n),this.save()},async onAdd(t){let e=await this.$api.post(this.endpoints.field+"/layout",{columns:t});this.rows.splice(this.nextIndex,0,e),this.save()},async onChange(t,e,i){if(e===this.layouts[i.layoutIndex])return;const n=i.layout,s=await this.$api.post(this.endpoints.field+"/layout",{attrs:n.attrs,columns:t}),o=n.columns.filter((t=>{var e;return(null==(e=null==t?void 0:t.blocks)?void 0:e.length)>0})),l=[];if(0===o.length)l.push(s);else{const t=Math.ceil(o.length/s.columns.length)*s.columns.length;for(let e=0;e{var n;return t.blocks=(null==(n=o[i+e])?void 0:n.blocks)??[],t})),t.columns.filter((t=>{var e;return null==(e=null==t?void 0:t.blocks)?void 0:e.length})).length&&l.push(t)}}this.rows.splice(i.rowIndex,1,...l),this.save()},async paste(t,e=this.rows.length){let i=await this.$api.post(this.endpoints.field+"/layout/paste",{json:this.$helper.clipboard.read(t)});i.length&&(this.rows.splice(e,0,...i),this.save()),this.$panel.notification.success({message:this.$t("paste.success",{count:i.length}),icon:"download"})},pasteboard(t){this.$panel.dialog.open({component:"k-block-pasteboard",on:{paste:e=>this.paste(e,t)}})},remove(t){const e=this.rows.findIndex((e=>e.id===t.id));-1!==e&&this.$delete(this.rows,e),this.save()},removeAll(){this.$panel.dialog.open({component:"k-remove-dialog",props:{text:this.$t("field.layout.delete.confirm.all")},on:{submit:()=>{this.rows=[],this.save(),this.$panel.dialog.close()}}})},save(){this.$emit("input",this.rows)},select(t){if(this.nextIndex=t,1===this.layouts.length)return this.onAdd(this.layouts[0]);this.$panel.dialog.open({component:"k-layout-selector",props:{layouts:this.layouts,selector:this.selector,value:null},on:{submit:t=>{this.onAdd(t),this.$panel.dialog.close()}}})},updateAttrs(t,e){this.rows[t].attrs=e,this.save()},updateColumn(t){this.rows[t.index].columns[t.columnIndex].blocks=t.blocks,this.save()},updateIds(t){return!1===Array.isArray(t)&&(t=[t]),t.map((t=>(t.id=this.$helper.uuid(),t.columns=t.columns.map((t=>(t.id=this.$helper.uuid(),t.blocks=t.blocks.map((t=>(t.id=this.$helper.uuid(),t))),t))),t)))}}},(function(){var t=this,e=t._self._c;return e("div",[t.rows.length?[e("k-draggable",t._b({staticClass:"k-layouts",on:{sort:t.save}},"k-draggable",t.draggableOptions,!1),t._l(t.rows,(function(i,n){return e("k-layout",t._b({key:i.id,attrs:{disabled:t.disabled,endpoints:t.endpoints,"fieldset-groups":t.fieldsetGroups,fieldsets:t.fieldsets,"is-selected":t.selected===i.id,layouts:t.layouts,settings:t.settings},on:{append:function(e){return t.select(n+1)},change:function(e){return t.change(n,i)},copy:function(e){return t.copy(e,n)},duplicate:function(e){return t.duplicate(n,i)},paste:function(e){return t.pasteboard(n+1)},prepend:function(e){return t.select(n)},remove:function(e){return t.remove(i)},select:function(e){t.selected=i.id},updateAttrs:function(e){return t.updateAttrs(n,e)},updateColumn:function(e){return t.updateColumn({layout:i,index:n,...e})}}},"k-layout",i,!1))})),1)]:e("k-empty",{staticClass:"k-layout-empty",attrs:{icon:"dashboard"},on:{click:function(e){return t.select(0)}}},[t._v(" "+t._s(t.empty??t.$t("field.layout.empty"))+" ")])],2)}),[],!1,null,null,null,null).exports;const ao=at({mixins:[Et],inheritAttrs:!1,props:{cancelButton:{default:!1},label:{default(){return this.$t("field.layout.select")},type:String},layouts:{type:Array},selector:Object,submitButton:{default:!1},value:{type:Array}}},(function(){var t,e,i=this,n=i._self._c;return n("k-dialog",i._b({staticClass:"k-layout-selector",attrs:{size:(null==(t=i.selector)?void 0:t.size)??"medium"},on:{cancel:function(t){return i.$emit("cancel")},submit:function(t){return i.$emit("submit",i.value)}}},"k-dialog",i.$props,!1),[n("h3",{staticClass:"k-label"},[i._v(i._s(i.label))]),n("k-navigate",{staticClass:"k-layout-selector-options",style:"--columns:"+Number((null==(e=i.selector)?void 0:e.columns)??3),attrs:{axis:"x"}},i._l(i.layouts,(function(t,e){return n("button",{key:e,staticClass:"k-layout-selector-option",attrs:{"aria-current":i.value===t,"aria-label":t.join(","),value:t},on:{click:function(e){return i.$emit("input",t)}}},[n("k-grid",{attrs:{"aria-hidden":""}},i._l(t,(function(t,e){return n("k-column",{key:e,attrs:{width:t}})})),1)],1)})),0)],1)}),[],!1,null,null,null,null).exports,uo={install(t){t.component("k-layout",oo),t.component("k-layout-column",lo),t.component("k-layouts",ro),t.component("k-layout-selector",ao)}},co={inheritAttrs:!1,props:{column:{default:()=>({}),type:Object},field:{default:()=>({}),type:Object},value:{}}},po={props:{html:{type:Boolean}}};const ho=at({mixins:[po],inheritAttrs:!1,props:{bubbles:[Array,String]},computed:{items(){let t=this.bubbles;return"string"==typeof t&&(t=t.split(",")),t.map((t=>"string"===t?{text:t}:t))}}},(function(){var t=this,e=t._self._c;return e("ul",{staticClass:"k-bubbles"},t._l(t.items,(function(i,n){return e("li",{key:n},[e("k-bubble",t._b({attrs:{html:t.html}},"k-bubble",i,!1))],1)})),0)}),[],!1,null,null,null,null).exports;const mo=at({mixins:[co,po],props:{value:{default:()=>[],type:[Array,String]}},computed:{bubbles(){let t=this.value;const e=this.column.options??this.field.options??[];return"string"==typeof t&&(t=t.split(",")),(t??[]).map((t=>{"string"==typeof t&&(t={value:t,text:t});for(const i of e)i.value===t.value&&(t.text=i.text);return t}))}}},(function(){var t=this,e=t._self._c;return e("div",{staticClass:"k-bubbles-field-preview",class:t.$options.class},[e("k-bubbles",{attrs:{bubbles:t.bubbles,html:t.html}})],1)}),[],!1,null,null,null,null).exports;const fo=at({extends:mo,inheritAttrs:!1,class:"k-array-field-preview",computed:{bubbles(){return[{text:1===this.value.length?`1 ${this.$t("entry")}`:`${this.value.length} ${this.$t("entries")}`}]}}},null,null,!1,null,null,null,null).exports;const go=at({mixins:[co],props:{value:String},computed:{text(){var t;if(!this.value)return;const e=this.$library.colors.toString(this.value,this.field.format,this.field.alpha),i=null==(t=this.field.options)?void 0:t.find((t=>this.$library.colors.toString(t.value,this.field.format,this.field.alpha)===e));return i?i.text:null}}},(function(){var t=this,e=t._self._c;return e("div",{staticClass:"k-color-field-preview"},[e("k-color-frame",{attrs:{color:t.value}}),t.text?[t._v(" "+t._s(t.text)+" ")]:t._e()],2)}),[],!1,null,null,null,null).exports;const ko=at({mixins:[co],inheritAttrs:!1,computed:{text(){return this.value}}},(function(){var t=this;return(0,t._self._c)("p",{staticClass:"k-text-field-preview",class:t.$options.class},[t._v(" "+t._s(t.column.before)+" "),t._t("default",(function(){return[t._v(t._s(t.text))]})),t._v(" "+t._s(t.column.after)+" ")],2)}),[],!1,null,null,null,null).exports;const bo=at({extends:ko,props:{value:String},class:"k-date-field-preview",computed:{display(){return this.column.display??this.field.display},format(){var t;let e=this.display??"YYYY-MM-DD";return(null==(t=this.time)?void 0:t.display)&&(e+=" "+this.time.display),e},parsed(){return this.$library.dayjs(this.value)},text(){var t;return null==(t=this.parsed)?void 0:t.format(this.format)},time(){return this.column.time??this.field.time}}},null,null,!1,null,null,null,null).exports;const vo=at({mixins:[co],props:{value:[String,Object]},computed:{link(){return"object"==typeof this.value?this.value.href:this.value},text(){return"object"==typeof this.value?this.value.text:this.link}}},(function(){var t=this,e=t._self._c;return e("p",{staticClass:"k-url-field-preview",class:t.$options.class,attrs:{"data-link":t.link}},[t._v(" "+t._s(t.column.before)+" "),e("k-link",{attrs:{to:t.link},nativeOn:{click:function(t){t.stopPropagation()}}},[e("span",[t._v(t._s(t.text))])]),t._v(" "+t._s(t.column.after)+" ")],1)}),[],!1,null,null,null,null).exports;const yo=at({extends:vo,class:"k-email-field-preview"},null,null,!1,null,null,null,null).exports;const $o=at({extends:mo,class:"k-files-field-preview",props:{html:{type:Boolean,default:!0}},computed:{bubbles(){return this.value.map((t=>({text:t.filename,link:t.link,image:t.image})))}}},null,null,!1,null,null,null,null).exports;const wo=at({mixins:[co],props:{value:Object},computed:{status(){var t;return{...this.$helper.page.status(null==(t=this.value)?void 0:t.status),...this.value}}}},(function(){var t=this,e=t._self._c;return t.value?e("k-button",t._b({staticClass:"k-flag-field-preview",attrs:{size:"md"}},"k-button",t.status,!1)):t._e()}),[],!1,null,null,null,null).exports;const xo=at({mixins:[co],props:{value:String},computed:{html(){return this.value}}},(function(){var t=this,e=t._self._c;return e("div",{staticClass:"k-html-field-preview",class:t.$options.class},[t._v(" "+t._s(t.column.before)+" "),e("k-text",{attrs:{html:t.html}}),t._v(" "+t._s(t.column.after)+" ")],1)}),[],!1,null,null,null,null).exports;const _o=at({mixins:[co],props:{value:[Object]}},(function(){var t=this,e=t._self._c;return t.value?e("k-item-image",{staticClass:"k-image-field-preview",attrs:{image:t.value}}):t._e()}),[],!1,null,null,null,null).exports;const So=at({extends:mo,class:"k-object-field-preview",props:{value:[Array,Object]},computed:{bubbles(){return this.value?[{text:"{ ... }"}]:[]}}},null,null,!1,null,null,null,null).exports;const Co=at({extends:mo,inheritAttrs:!1,class:"k-pages-field-preview",props:{html:{type:Boolean,default:!0}}},null,null,!1,null,null,null,null).exports;const Oo=at({extends:bo,class:"k-time-field-preview",computed:{format(){return this.display??"HH:mm"},parsed(){return this.$library.dayjs.iso(this.value,"time")},text(){var t;return null==(t=this.parsed)?void 0:t.format(this.format)}}},null,null,!1,null,null,null,null).exports;const Ao=at({mixins:[co],computed:{text(){return!1!==this.column.text?this.field.text:null}}},(function(){var t=this,e=t._self._c;return e("div",{staticClass:"k-toggle-field-preview"},[e("k-toggle-input",{attrs:{text:t.text,value:t.value},on:{input:function(e){return t.$emit("input",e)}},nativeOn:{click:function(t){t.stopPropagation()}}})],1)}),[],!1,null,null,null,null).exports;const Mo=at({extends:mo,class:"k-users-field-preview",computed:{bubble(){return this.value.map((t=>({text:t.username,link:t.link,image:t.image})))}}},null,null,!1,null,null,null,null).exports,jo={install(t){t.component("k-array-field-preview",fo),t.component("k-bubbles-field-preview",mo),t.component("k-color-field-preview",go),t.component("k-date-field-preview",bo),t.component("k-email-field-preview",yo),t.component("k-files-field-preview",$o),t.component("k-flag-field-preview",wo),t.component("k-html-field-preview",xo),t.component("k-image-field-preview",_o),t.component("k-object-field-preview",So),t.component("k-pages-field-preview",Co),t.component("k-text-field-preview",ko),t.component("k-toggle-field-preview",Ao),t.component("k-time-field-preview",Oo),t.component("k-url-field-preview",vo),t.component("k-users-field-preview",Mo),t.component("k-list-field-preview",xo),t.component("k-writer-field-preview",xo),t.component("k-checkboxes-field-preview",mo),t.component("k-multiselect-field-preview",mo),t.component("k-radio-field-preview",mo),t.component("k-select-field-preview",mo),t.component("k-tags-field-preview",mo),t.component("k-toggles-field-preview",mo)}};const Io=at({mixins:[{props:{buttons:{type:Array,default:()=>[]},theme:{type:String,default:"light"}}}],methods:{close(){for(const t in this.$refs){const e=this.$refs[t][0];"function"==typeof(null==e?void 0:e.close)&&e.close()}}}},(function(){var t=this,e=t._self._c;return e("nav",{staticClass:"k-toolbar",attrs:{"data-theme":t.theme}},[t._l(t.buttons,(function(i,n){var s;return["|"===i?e("hr",{key:n}):i.when??1?e("k-button",{key:n,class:["k-toolbar-button",i.class],attrs:{current:i.current,disabled:i.disabled,icon:i.icon,title:i.label,tabindex:"0"},on:{click:function(e){var s,o;(null==(s=i.dropdown)?void 0:s.length)?t.$refs[n+"-dropdown"][0].toggle():null==(o=i.click)||o.call(i,e)}},nativeOn:{keydown:function(t){var e;null==(e=i.key)||e.call(i,t)}}}):t._e(),(i.when??1)&&(null==(s=i.dropdown)?void 0:s.length)?e("k-dropdown-content",{key:n+"-dropdown",ref:n+"-dropdown",refInFor:!0,attrs:{options:i.dropdown,theme:"dark"===t.theme?"light":"dark"}}):t._e()]}))],2)}),[],!1,null,null,null,null).exports;const To=at({extends:Bt,methods:{submit(){const t=this.values.href??"",e=this.values.title??"";return this.$panel.config.kirbytext?(null==e?void 0:e.length)>0?this.$emit("submit",`(email: ${t} text: ${e})`):this.$emit("submit",`(email: ${t})`):(null==e?void 0:e.length)>0?this.$emit("submit",`[${e}](mailto:${t})`):this.$emit("submit",`<${t}>`)}}},null,null,!1,null,null,null,null).exports;const Eo=at({extends:Vt,props:{fields:{default:()=>({href:{label:window.panel.$t("link"),type:"link",placeholder:window.panel.$t("url.placeholder"),icon:"url"},title:{label:window.panel.$t("link.text"),type:"text",icon:"title"}})}},methods:{submit(){const t=this.values.href??"",e=this.values.title??"";return this.$panel.config.kirbytext?(null==e?void 0:e.length)>0?this.$emit("submit",`(link: ${t} text: ${e})`):this.$emit("submit",`(link: ${t})`):(null==e?void 0:e.length)>0?this.$emit("submit",`[${e}](${t})`):this.$emit("submit",`<${t}>`)}}},null,null,!1,null,null,null,null).exports,Lo={install(t){t.component("k-toolbar",Io),t.component("k-textarea-toolbar",Cs),t.component("k-toolbar-email-dialog",To),t.component("k-toolbar-link-dialog",Eo)}};const Do=at({props:{editor:{required:!0,type:Object},inline:{default:!0,type:Boolean},marks:{default:()=>["bold","italic","underline","strike","code","|","link","email","|","clear"],type:[Array,Boolean]},nodes:{default:!0,type:[Array,Boolean]}},data:()=>({isOpen:!1,position:{x:0,y:0}}),computed:{activeNode(){return Object.values(this.nodeButtons).find((t=>this.isNodeActive(t)))??!1},buttons(){var t,e,i;const n=[];if(this.hasNodes){const s=[];let o=0;for(const n in this.nodeButtons){const l=this.nodeButtons[n];s.push({current:(null==(t=this.activeNode)?void 0:t.id)===l.id,disabled:!1===(null==(i=null==(e=this.activeNode)?void 0:e.when)?void 0:i.includes(l.name)),icon:l.icon,label:l.label,click:()=>this.command(l.command??n)}),!0===l.separator&&o!==Object.keys(this.nodeButtons).length-1&&s.push("-"),o++}n.push({current:Boolean(this.activeNode),icon:this.activeNode.icon??"title",dropdown:s})}if(this.hasNodes&&this.hasMarks&&n.push("|"),this.hasMarks)for(const s in this.markButtons){const t=this.markButtons[s];"|"!==t?n.push({current:this.editor.activeMarks.includes(s),icon:t.icon,label:t.label,click:e=>this.command(t.command??s,e)}):n.push("|")}return n},hasMarks(){return this.$helper.object.length(this.markButtons)>0},hasNodes(){return this.$helper.object.length(this.nodeButtons)>1},markButtons(){const t=this.editor.buttons("mark");if(!1===this.marks||0===this.$helper.object.length(t))return{};if(!0===this.marks)return t;const e={};for(const[i,n]of this.marks.entries())"|"===n?e["divider"+i]="|":t[n]&&(e[n]=t[n]);return e},nodeButtons(){const t=this.editor.buttons("node");if(!1===this.nodes||0===this.$helper.object.length(t))return{};if("block+"!==this.editor.nodes.doc.content&&t.paragraph&&delete t.paragraph,!0===this.nodes)return t;const e={};for(const i of this.nodes)t[i]&&(e[i]=t[i]);return e}},methods:{close(t){t&&!1!==this.$el.contains(t.relatedTarget)||(this.isOpen=!1)},command(t,...e){this.$emit("command",t,...e)},isNodeActive(t){if(!1===this.editor.activeNodes.includes(t.name))return!1;if("paragraph"===t.name)return!1===this.editor.activeNodes.includes("listItem")&&!1===this.editor.activeNodes.includes("quote");if(t.attrs){if(void 0===Object.values(this.editor.activeNodeAttrs).find((e=>JSON.stringify(e)===JSON.stringify(t.attrs))))return!1}return!0},open(){this.isOpen=!0,this.inline&&this.$nextTick(this.setPosition)},setPosition(){const t=this.$el.getBoundingClientRect(),e=this.editor.element.getBoundingClientRect(),i=document.querySelector(".k-panel-menu").getBoundingClientRect(),{from:n,to:s}=this.editor.selection,o=this.editor.view.coordsAtPos(n),l=this.editor.view.coordsAtPos(s,!0),r=new DOMRect(o.left,o.top,l.right-o.left,l.bottom-o.top);let a=r.x-e.x+r.width/2-t.width/2,u=r.y-e.y-t.height-5;if(t.widthe.width&&(a=e.width-t.width);else{const n=e.x+a,s=n+t.width,o=i.width+20,l=20;nwindow.innerWidth-l&&(a-=s-(window.innerWidth-l))}this.position={x:a,y:u}}}},(function(){var t=this,e=t._self._c;return t.isOpen||!t.inline?e("k-toolbar",{ref:"toolbar",staticClass:"k-writer-toolbar",style:{top:t.position.y+"px",left:t.position.x+"px"},attrs:{buttons:t.buttons,"data-inline":t.inline,theme:t.inline?"dark":"light"}}):t._e()}),[],!1,null,null,null,null).exports,Bo={install(t){t.component("k-writer-toolbar",Do),t.component("k-writer",Fn)}},qo={install(t){customElements.define("k-autosize",Ee),t.component("k-counter",De),t.component("k-autocomplete",Le),t.component("k-form",Be),t.component("k-form-buttons",qe),t.component("k-field",Ne),t.component("k-fieldset",ze),t.component("k-input",Re),t.component("k-login",Ye),t.component("k-login-code",Ue),t.component("k-selector",je),t.component("k-upload",He),t.component("k-login-alert",Ve),t.component("k-structure-form",Ke),t.use(Ai),t.use(so),t.use(Us),t.use(uo),t.use(jo),t.use(Lo),t.use(Bo)}},Po=()=>F((()=>import("./IndexView.min.js")),["./IndexView.min.js","./vendor.min.js"],import.meta.url),No=()=>F((()=>import("./DocsView.min.js")),["./DocsView.min.js","./Docs.min.js","./vendor.min.js"],import.meta.url),zo=()=>F((()=>import("./PlaygroundView.min.js")),["./PlaygroundView.min.js","./Docs.min.js","./vendor.min.js"],import.meta.url),Fo={install(t){t.component("k-lab-index-view",Po),t.component("k-lab-docs-view",No),t.component("k-lab-playground-view",zo)}};const Ro=at({props:{cover:Boolean,ratio:String},computed:{ratioPadding(){return this.$helper.ratio(this.ratio)}},created(){window.panel.deprecated(" will be removed in a future version. Use the instead.")}},(function(){var t=this;return(0,t._self._c)("span",{staticClass:"k-aspect-ratio",style:{"padding-bottom":t.ratioPadding},attrs:{"data-cover":t.cover}},[t._t("default")],2)}),[],!1,null,null,null,null).exports;const Yo=at({props:{align:{type:String,default:"start"}},mounted(){(this.$slots.left||this.$slots.center||this.$slots.right)&&window.panel.deprecated(": left/centre/right slots will be removed in a future version. Use with default slot only instead.")}},(function(){var t=this,e=t._self._c;return e("div",{staticClass:"k-bar",attrs:{"data-align":t.align}},[t.$slots.left||t.$slots.center||t.$slots.right?[t.$slots.left?e("div",{staticClass:"k-bar-slot",attrs:{"data-position":"left"}},[t._t("left")],2):t._e(),t.$slots.center?e("div",{staticClass:"k-bar-slot",attrs:{"data-position":"center"}},[t._t("center")],2):t._e(),t.$slots.right?e("div",{staticClass:"k-bar-slot",attrs:{"data-position":"right"}},[t._t("right")],2):t._e()]:t._t("default")],2)}),[],!1,null,null,null,null).exports;const Uo=at({props:{align:{type:String,default:"start"},button:Boolean,height:String,icon:String,theme:{type:String},text:String,html:{type:Boolean}},computed:{element(){return this.button?"button":"div"},type(){return this.button?"button":null}}},(function(){var t=this,e=t._self._c;return e(t.element,{tag:"component",staticClass:"k-box",style:t.height?"--box-height: "+t.height:null,attrs:{"data-align":t.align,"data-theme":t.theme,type:t.type}},[t.icon?e("k-icon",{attrs:{type:t.icon}}):t._e(),t._t("default",(function(){return[t.html?e("k-text",{attrs:{html:t.text}}):e("k-text",[t._v(" "+t._s(t.text)+" ")])]}),null,{html:t.html,text:t.text})],2)}),[],!1,null,null,null,null).exports;const Ho=at({inheritAttrs:!1,props:{back:String,color:String,element:{type:String,default:"li"},html:{type:Boolean},image:Object,link:String,text:String},created(){this.back&&window.panel.deprecated(": `back` prop will be removed in a future version. Use the `--bubble-back` CSS property instead."),this.color&&window.panel.deprecated(": `color` prop will be removed in a future version. Use the `--bubble-text` CSS property instead.")}},(function(){var t=this,e=t._self._c;return e(t.link?"k-link":"p",{tag:"component",staticClass:"k-bubble",style:{color:t.$helper.color(t.color),background:t.$helper.color(t.back)},attrs:{to:t.link,"data-has-text":Boolean(t.text)},nativeOn:{click:function(t){t.stopPropagation()}}},[t._t("image",(function(){var i;return[(null==(i=t.image)?void 0:i.src)?e("k-image-frame",t._b({},"k-image-frame",t.image,!1)):t.image?e("k-icon-frame",t._b({},"k-icon-frame",t.image,!1)):e("span")]})),t.text?[t.html?e("span",{staticClass:"k-bubble-text",domProps:{innerHTML:t._s(t.text)}}):e("span",{staticClass:"k-bubble-text"},[t._v(t._s(t.text))])]:t._e()],2)}),[],!1,null,null,null,null).exports;const Vo=at({props:{width:{type:String,default:"1/1"},sticky:Boolean}},(function(){var t=this,e=t._self._c;return e("div",{staticClass:"k-column",style:"--width:"+t.width,attrs:{"data-sticky":t.sticky}},[t.sticky?e("div",[t._t("default")],2):t._t("default")],2)}),[],!1,null,null,null,null).exports,Ko={props:{element:{type:String,default:"div"},fit:String,ratio:String,cover:Boolean,back:String,theme:String}};const Wo=at({mixins:[Ko],inheritAttrs:!1,computed:{background(){return this.$helper.color(this.back)}}},(function(){var t=this;return(0,t._self._c)(t.element,{tag:"compontent",staticClass:"k-frame",style:{"--fit":t.fit??(t.cover?"cover":"contain"),"--ratio":t.ratio,"--back":t.background},attrs:{"data-theme":t.theme}},[t._t("default")],2)}),[],!1,null,null,null,null).exports;const Jo=at({mixins:[{mixins:[Ko],props:{color:String}}],inheritAttrs:!1},(function(){var t=this;return(0,t._self._c)("k-frame",t._b({staticClass:"k-color-frame",style:`color: ${t.color}`},"k-frame",t.$props,!1),[t._t("default")],2)}),[],!1,null,null,null,null).exports;const Go=at({props:{disabled:{type:Boolean}},emits:["drop"],data:()=>({files:[],dragging:!1,over:!1}),methods:{cancel(){this.reset()},reset(){this.dragging=!1,this.over=!1},onDrop(t){return!0===this.disabled||!1===this.$helper.isUploadEvent(t)?this.reset():(this.$events.emit("dropzone.drop"),this.files=t.dataTransfer.files,this.$emit("drop",this.files),void this.reset())},onEnter(t){!1===this.disabled&&this.$helper.isUploadEvent(t)&&(this.dragging=!0)},onLeave(){this.reset()},onOver(t){!1===this.disabled&&this.$helper.isUploadEvent(t)&&(t.dataTransfer.dropEffect="copy",this.over=!0)}}},(function(){var t=this;return(0,t._self._c)("div",{staticClass:"k-dropzone",attrs:{"data-dragging":t.dragging,"data-over":t.over},on:{dragenter:t.onEnter,dragleave:t.onLeave,dragover:t.onOver,drop:t.onDrop}},[t._t("default")],2)}),[],!1,null,null,null,null).exports;const Xo=at({props:{gutter:String,variant:String},created(){this.gutter&&window.panel.deprecated(': the `gutter` prop will be removed in a future version. Use `style="gap: "` or `variant` prop instead.')}},(function(){var t=this;return(0,t._self._c)("div",{staticClass:"k-grid",attrs:{"data-gutter":t.gutter,"data-variant":t.variant}},[t._t("default")],2)}),[],!1,null,null,null,null).exports;const Zo=at({props:{editable:{type:Boolean}},created(){(this.$slots.left||this.$slots.right)&&window.panel.deprecated(": left/right slots will be removed in a future version. Use `buttons` slot instead.")}},(function(){var t=this,e=t._self._c;return e("header",{staticClass:"k-header",attrs:{"data-has-buttons":Boolean(t.$slots.buttons||t.$slots.left||t.$slots.right)}},[e("h1",{staticClass:"k-header-title"},[t.editable?e("button",{staticClass:"k-header-title-button",attrs:{type:"button"},on:{click:function(e){return t.$emit("edit")}}},[e("span",{staticClass:"k-header-title-text"},[t._t("default")],2),e("span",{staticClass:"k-header-title-icon"},[e("k-icon",{attrs:{type:"edit"}})],1)]):e("span",{staticClass:"k-header-title-text"},[t._t("default")],2)]),t.$slots.buttons||t.$slots.left||t.$slots.right?e("div",{staticClass:"k-header-buttons"},[t._t("buttons"),t._t("left"),t._t("right")],2):t._e()])}),[],!1,null,null,null,null).exports,Qo={props:{alt:String,color:String,type:String}};const tl=at({mixins:[Qo]},(function(){var t=this,e=t._self._c;return e("svg",{staticClass:"k-icon",style:{color:t.$helper.color(t.color)},attrs:{"aria-label":t.alt,role:t.alt?"img":null,"aria-hidden":!t.alt,"data-type":t.type}},[e("use",{attrs:{"xlink:href":"#icon-"+t.type}})])}),[],!1,null,null,null,null).exports;const el=at({mixins:[{mixins:[Ko,Qo],props:{type:null,icon:String}}],inheritAttrs:!1,computed:{isEmoji(){return this.$helper.string.hasEmoji(this.icon)}}},(function(){var t=this,e=t._self._c;return e("k-frame",t._b({staticClass:"k-icon-frame",attrs:{element:"figure"}},"k-frame",t.$props,!1),[t.isEmoji?e("span",{attrs:{"data-type":"emoji"}},[t._v(t._s(t.icon))]):e("k-icon",t._b({},"k-icon",{color:t.color,type:t.icon,alt:t.alt},!1))],1)}),[],!1,null,null,null,null).exports;const il=at({mixins:[{mixins:[Ko],props:{alt:String,sizes:String,src:String,srcset:String}}],inheritAttrs:!1},(function(){var t=this,e=t._self._c;return e("k-frame",t._g(t._b({staticClass:"k-image-frame k-image",attrs:{element:"figure"}},"k-frame",t.$props,!1),t.$listeners),[t.src?e("img",{key:t.src,attrs:{alt:t.alt??"",src:t.src,srcset:t.srcset,sizes:t.sizes},on:{dragstart:function(t){t.preventDefault()}}}):t._e()])}),[],!1,null,null,null,null).exports;const nl=at({mixins:[{props:{autofocus:{default:!0,type:Boolean},nested:{default:!1,type:Boolean},type:{default:"overlay",type:String},visible:{default:!1,type:Boolean}}}],inheritAttrs:!0,watch:{visible(t,e){t!==e&&this.toggle()}},mounted(){this.toggle()},methods:{cancel(){this.$emit("cancel"),this.close()},close(){if(!1!==this.$refs.overlay.open)return this.nested?this.onClose():void this.$refs.overlay.close()},focus(){this.$helper.focus(this.$refs.overlay)},onCancel(t){this.nested&&(t.preventDefault(),this.cancel())},onClick(t){t.target.matches(".k-portal")&&this.cancel()},onClose(){this.$emit("close")},open(){!0!==this.$refs.overlay.open&&this.$refs.overlay.showModal(),setTimeout((()=>{!0===this.autofocus&&this.focus(),this.$emit("open")}))},toggle(){!0===this.visible?this.open():this.close()}}},(function(){var t=this;return(0,t._self._c)("dialog",{ref:"overlay",staticClass:"k-overlay",attrs:{"data-type":t.type},on:{cancel:t.onCancel,mousedown:t.onClick,touchdown:t.onClick,close:t.onClose}},[t._t("default")],2)}),[],!1,null,null,null,null).exports;const sl=at({props:{label:{type:String},value:{type:String},info:{type:String},theme:{type:String},link:{type:String},click:{type:Function},dialog:{type:[String,Object]}},computed:{component(){return null!==this.target?"k-link":"div"},target(){return this.link?this.link:this.click?this.click:this.dialog?()=>this.$dialog(this.dialog):null}}},(function(){var t=this,e=t._self._c;return e(t.component,{tag:"component",staticClass:"k-stat",attrs:{"data-theme":t.theme,to:t.target}},[t.label?e("dt",{staticClass:"k-stat-label"},[t._v(t._s(t.label))]):t._e(),t.value?e("dd",{staticClass:"k-stat-value"},[t._v(t._s(t.value))]):t._e(),t.info?e("dd",{staticClass:"k-stat-info"},[t._v(t._s(t.info))]):t._e()])}),[],!1,null,null,null,null).exports;const ol=at({props:{reports:{type:Array,default:()=>[]},size:{type:String,default:"large"}},methods:{component(t){return null!==this.target(t)?"k-link":"div"},target(t){return t.link?t.link:t.click?t.click:t.dialog?()=>this.$dialog(t.dialog):null}}},(function(){var t=this,e=t._self._c;return e("dl",{staticClass:"k-stats",attrs:{"data-size":t.size}},t._l(t.reports,(function(i,n){return e("k-stat",t._b({key:n},"k-stat",i,!1))})),1)}),[],!1,null,null,null,null).exports;const ll=at({inheritAttrs:!1,props:{columns:{type:Object,default:()=>({})},disabled:Boolean,fields:{type:Object,default:()=>({})},empty:String,index:{type:[Number,Boolean],default:1},rows:Array,options:{default:()=>[],type:[Array,Function]},pagination:[Object,Boolean],sortable:Boolean},data(){return{values:this.rows}},computed:{colspan(){let t=this.columnsCount;return this.hasIndexColumn&&t++,this.hasOptions&&t++,t},columnsCount(){return this.$helper.object.length(this.columns)},dragOptions(){return{disabled:!this.sortable,fallbackClass:"k-table-row-fallback",ghostClass:"k-table-row-ghost"}},hasIndexColumn(){return this.sortable||!1!==this.index},hasOptions(){var t;return this.$scopedSlots.options||(null==(t=this.options)?void 0:t.length)>0||Object.values(this.values).filter((t=>null==t?void 0:t.options)).length>0}},watch:{rows(){this.values=this.rows}},methods:{isColumnEmpty(t){return 0===this.rows.filter((e=>!1===this.$helper.object.isEmpty(e[t]))).length},label(t,e){return t.label??this.$helper.string.ucfirst(e)},onChange(t){this.$emit("change",t)},onCell(t){this.$emit("cell",t)},onCellUpdate({columnIndex:t,rowIndex:e,value:i}){this.values[e][t]=i,this.$emit("input",this.values)},onHeader(t){this.$emit("header",t)},onOption(t,e,i){this.$emit("option",t,e,i)},onSort(){this.$emit("input",this.values),this.$emit("sort",this.values)},width(t){return"string"!=typeof t?"auto":!1===t.includes("/")?t:this.$helper.ratio(t,"auto",!1)}}},(function(){var t=this,e=t._self._c;return e("div",{staticClass:"k-table",attrs:{"aria-disabled":t.disabled}},[e("table",{attrs:{"data-disabled":t.disabled,"data-indexed":t.hasIndexColumn}},[e("thead",[e("tr",[t.hasIndexColumn?e("th",{staticClass:"k-table-index-column",attrs:{"data-mobile":""}},[t._v(" # ")]):t._e(),t._l(t.columns,(function(i,n){return e("th",{key:n+"-header",staticClass:"k-table-column",style:"width:"+t.width(i.width),attrs:{"data-align":i.align,"data-mobile":i.mobile},on:{click:function(e){return t.onHeader({column:i,columnIndex:n})}}},[t._t("header",(function(){return[t._v(" "+t._s(t.label(i,n))+" ")]}),null,{column:i,columnIndex:n,label:t.label(i,n)})],2)})),t.hasOptions?e("th",{staticClass:"k-table-options-column",attrs:{"data-mobile":""}}):t._e()],2)]),e("k-draggable",{attrs:{list:t.values,options:t.dragOptions,handle:!0,element:"tbody"},on:{change:t.onChange,end:t.onSort}},[0===t.rows.length?e("tr",[e("td",{staticClass:"k-table-empty",attrs:{colspan:t.colspan}},[t._v(" "+t._s(t.empty)+" ")])]):t._l(t.values,(function(i,n){return e("tr",{key:n},[t.hasIndexColumn?e("td",{staticClass:"k-table-index-column",attrs:{"data-sortable":t.sortable&&!1!==i.sortable,"data-mobile":""}},[t._t("index",(function(){return[e("div",{staticClass:"k-table-index",domProps:{textContent:t._s(t.index+n)}})]}),null,{row:i,rowIndex:n}),t.sortable&&!1!==i.sortable?e("k-sort-handle",{staticClass:"k-table-sort-handle"}):t._e()],2):t._e(),t._l(t.columns,(function(s,o){return e("k-table-cell",{key:n+"-"+o,staticClass:"k-table-column",style:"width:"+t.width(s.width),attrs:{column:s,field:t.fields[o],row:i,mobile:s.mobile,value:i[o]},on:{input:function(e){return t.onCellUpdate({columnIndex:o,rowIndex:n,value:e})}},nativeOn:{click:function(e){return t.onCell({row:i,rowIndex:n,column:s,columnIndex:o})}}})})),t.hasOptions?e("td",{staticClass:"k-table-options-column",attrs:{"data-mobile":""}},[t._t("options",(function(){return[e("k-options-dropdown",{attrs:{options:i.options??t.options,text:(i.options??t.options).length>1},on:{option:function(e){return t.onOption(e,i,n)}}})]}),null,{row:i,rowIndex:n})],2):t._e()],2)}))],2)],1),t.pagination?e("k-pagination",t._b({staticClass:"k-table-pagination",on:{paginate:function(e){return t.$emit("paginate",e)}}},"k-pagination",t.pagination,!1)):t._e()],1)}),[],!1,null,null,null,null).exports;const rl=at({inheritAttrs:!1,props:{column:Object,field:Object,mobile:{type:Boolean,default:!1},row:Object,value:{default:""}},computed:{component(){return this.$helper.isComponent(`k-${this.type}-field-preview`)?`k-${this.type}-field-preview`:this.$helper.isComponent(`k-table-${this.type}-cell`)?`k-table-${this.type}-cell`:Array.isArray(this.value)?"k-array-field-preview":"object"==typeof this.value?"k-object-field-preview":"k-text-field-preview"},type(){var t;return this.column.type??(null==(t=this.field)?void 0:t.type)}}},(function(){var t=this,e=t._self._c;return e("td",{staticClass:"k-table-cell",attrs:{"data-align":t.column.align,"data-mobile":t.mobile}},[!1===t.$helper.object.isEmpty(t.value)?e(t.component,{tag:"component",attrs:{column:t.column,field:t.field,row:t.row,value:t.value},on:{input:function(e){return t.$emit("input",e)}}}):t._e()],1)}),[],!1,null,null,null,null).exports;const al=at({props:{tab:String,tabs:{type:Array,default:()=>[]},theme:String},data(){return{observer:null,visible:this.tabs,invisible:[]}},computed:{current(){const t=this.tabs.find((t=>t.name===this.tab))??this.tabs[0];return null==t?void 0:t.name},dropdown(){return this.invisible.map(this.button)}},watch:{tabs:{async handler(){var t;null==(t=this.observer)||t.disconnect(),await this.$nextTick(),this.$el instanceof Element&&(this.observer=new ResizeObserver(this.resize),this.observer.observe(this.$el))},immediate:!0}},destroyed(){var t;null==(t=this.observer)||t.disconnect()},methods:{button(t){return{link:t.link,current:t.name===this.current,icon:t.icon,title:t.label,text:t.label??t.text??t.name}},async resize(){const t=this.$el.offsetWidth;this.visible=this.tabs,this.invisible=[],await this.$nextTick();const e=[...this.$refs.visible].map((t=>t.$el.offsetWidth));let i=32;for(let n=0;nt)return this.visible=this.tabs.slice(0,n),void(this.invisible=this.tabs.slice(n))}}},(function(){var t=this,e=t._self._c;return t.tabs.length>1?e("nav",{staticClass:"k-tabs"},[t._l(t.visible,(function(i){return e("k-button",t._b({key:i.name,ref:"visible",refInFor:!0,staticClass:"k-tab-button",attrs:{variant:"dimmed"}},"k-button",i=t.button(i),!1),[t._v(" "+t._s(i.text)+" "),i.badge?e("span",{staticClass:"k-tabs-badge",attrs:{"data-theme":t.theme}},[t._v(" "+t._s(i.badge)+" ")]):t._e()])})),t.invisible.length?[e("k-button",{staticClass:"k-tab-button k-tabs-dropdown-button",attrs:{current:!!t.invisible.find((e=>t.tab===e.name)),title:t.$t("more"),icon:"dots",variant:"dimmed"},on:{click:function(e){return e.stopPropagation(),t.$refs.more.toggle()}}}),e("k-dropdown-content",{ref:"more",staticClass:"k-tabs-dropdown",attrs:{options:t.dropdown,"align-x":"end"}})]:t._e()],2):t._e()}),[],!1,null,null,null,null).exports;const ul=at({props:{align:String},created(){window.panel.deprecated(" will be removed in a future version.")}},(function(){var t=this;return(0,t._self._c)("div",{staticClass:"k-view",attrs:{"data-align":t.align}},[t._t("default")],2)}),[],!1,null,null,null,null).exports,cl={install(t){t.component("k-aspect-ratio",Ro),t.component("k-bar",Yo),t.component("k-box",Uo),t.component("k-bubble",Ho),t.component("k-bubbles",ho),t.component("k-color-frame",Jo),t.component("k-column",Vo),t.component("k-dropzone",Go),t.component("k-frame",Wo),t.component("k-grid",Xo),t.component("k-header",Zo),t.component("k-icon-frame",el),t.component("k-image-frame",il),t.component("k-image",il),t.component("k-overlay",nl),t.component("k-stat",sl),t.component("k-stats",ol),t.component("k-table",ll),t.component("k-table-cell",rl),t.component("k-tabs",al),t.component("k-view",ul)}};const dl=at({components:{draggable:()=>F((()=>import("./vuedraggable.min.js")),[],import.meta.url)},props:{data:Object,element:{type:String,default:"div"},handle:[String,Boolean],list:[Array,Object],move:Function,options:Object},emits:["change","end","sort","start"],computed:{dragOptions(){let t=this.handle;return!0===t&&(t=".k-sort-handle"),{fallbackClass:"k-sortable-fallback",fallbackOnBody:!0,forceFallback:!0,ghostClass:"k-sortable-ghost",handle:t,scroll:document.querySelector(".k-panel-main"),...this.options}}},methods:{onStart(t){this.$panel.drag.start("data",{}),this.$emit("start",t)},onEnd(t){this.$panel.drag.stop(),this.$emit("end",t)}}},(function(){var t=this;return(0,t._self._c)("draggable",t._b({staticClass:"k-draggable",attrs:{"component-data":t.data,tag:t.element,list:t.list,move:t.move},on:{change:function(e){return t.$emit("change",e)},end:t.onEnd,sort:function(e){return t.$emit("sort",e)},start:t.onStart},scopedSlots:t._u([{key:"footer",fn:function(){return[t._t("footer")]},proxy:!0}],null,!0)},"draggable",t.dragOptions,!1),[t._t("default")],2)}),[],!1,null,null,null,null).exports;const pl=at({data:()=>({error:null}),errorCaptured(t){return this.$panel.debug&&window.console.warn(t),this.error=t,!1},render(){return this.error?this.$slots.error?this.$slots.error[0]:this.$scopedSlots.error?this.$scopedSlots.error({error:this.error}):Vue.h("k-box",{attrs:{theme:"negative"}},this.error.message??this.error):this.$slots.default[0]}},null,null,!1,null,null,null,null).exports;const hl=at({props:{html:String},mounted(){try{let t=this.$refs.iframe.contentWindow.document;t.open(),t.write(this.html),t.close()}catch(t){console.error(t)}}},(function(){var t=this,e=t._self._c;return e("k-overlay",{staticClass:"k-fatal",attrs:{visible:!0}},[e("div",{staticClass:"k-fatal-box"},[e("div",{staticClass:"k-notification",attrs:{"data-theme":"negative"}},[e("p",[t._v("The JSON response could not be parsed")]),e("k-button",{attrs:{icon:"cancel"},on:{click:function(e){return e.stopPropagation(),t.$panel.notification.close()}}})],1),e("iframe",{ref:"iframe",staticClass:"k-fatal-iframe"})])])}),[],!1,null,null,null,null).exports;const ml=at({icons:window.panel.plugins.icons,methods:{viewbox(t,e){const i=document.createElementNS("http://www.w3.org/2000/svg","svg");i.innerHTML=e,document.body.appendChild(i);const n=i.getBBox(),s=(n.width+2*n.x+(n.height+2*n.y))/2,o=Math.abs(s-16),l=Math.abs(s-24);return document.body.removeChild(i),o element with the corresponding viewBox attribute.`),"0 0 16 16"):"0 0 24 24"}}},(function(){var t=this,e=t._self._c;return e("svg",{staticClass:"k-icons",attrs:{"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",overflow:"hidden"}},[e("defs",t._l(t.$options.icons,(function(i,n){return e("symbol",{key:n,attrs:{id:"icon-"+n,viewBox:t.viewbox(n,i)},domProps:{innerHTML:t._s(i)}})})),0)])}),[],!1,null,null,null,null).exports;const fl=at({created(){window.panel.deprecated(' will be removed in a future version. Use instead.')}},(function(){var t=this._self._c;return t("span",{staticClass:"k-loader"},[t("k-icon",{staticClass:"k-loader-icon",attrs:{type:"loader"}})],1)}),[],!1,null,null,null,null).exports;const gl=at({},(function(){var t=this,e=t._self._c;return t.$panel.notification.isOpen?e("div",{staticClass:"k-notification",attrs:{"data-theme":t.$panel.notification.theme}},[e("p",[t._v(t._s(t.$panel.notification.message))]),e("k-button",{attrs:{icon:"cancel"},on:{click:function(e){return t.$panel.notification.close()}}})],1):t._e()}),[],!1,null,null,null,null).exports;const kl=at({},(function(){var t=this,e=t._self._c;return t.$panel.isOffline?e("div",{staticClass:"k-offline-warning"},[e("p",[e("k-icon",{attrs:{type:"bolt"}}),t._v(" "+t._s(t.$t("error.offline")))],1)]):t._e()}),[],!1,null,null,null,null).exports,bl=(t,e=!1)=>{if(t>=0&&t<=100)return!0;if(e)throw new Error("value has to be between 0 and 100");return!1};const vl=at({props:{value:{type:Number,default:0,validator:bl}},data(){return{state:this.value}},watch:{value(t){this.state=t}},methods:{set(t){window.panel.deprecated(": `set` method will be removed in a future version. Use the `value` prop instead."),bl(t,!0),this.state=t}}},(function(){var t=this;return(0,t._self._c)("progress",{staticClass:"k-progress",attrs:{max:"100"},domProps:{value:t.state}},[t._v(t._s(t.state)+"%")])}),[],!1,null,null,null,null).exports;const yl=at({},(function(){return(0,this._self._c)("k-button",{staticClass:"k-sort-handle k-sort-button",attrs:{title:this.$t("sort.drag"),icon:"sort","aria-hidden":"true"}})}),[],!1,null,null,null,null).exports,$l={install(t){t.component("k-draggable",dl),t.component("k-error-boundary",pl),t.component("k-fatal",hl),t.component("k-icon",tl),t.component("k-icons",ml),t.component("k-loader",fl),t.component("k-notification",gl),t.component("k-offline-warning",kl),t.component("k-progress",vl),t.component("k-sort-handle",yl)}};const wl=at({props:{crumbs:{type:Array,default:()=>[]},label:{type:String,default:"Breadcrumb"},view:Object},computed:{dropdown(){return this.segments.map((t=>({...t,text:t.label,icon:"angle-right"})))},segments(){const t=[];return this.view&&t.push({link:this.view.link,label:this.view.label??this.view.breadcrumbLabel,icon:this.view.icon,loading:this.$panel.isLoading}),[...t,...this.crumbs]}},created(){this.view&&window.panel.deprecated(": `view` prop will be removed in a future version. Use `crumbs` instead.")}},(function(){var t=this,e=t._self._c;return e("nav",{staticClass:"k-breadcrumb",attrs:{"aria-label":t.label}},[t.segments.length>1?e("div",{staticClass:"k-breadcrumb-dropdown"},[e("k-button",{attrs:{icon:"home"},on:{click:function(e){return t.$refs.dropdown.toggle()}}}),e("k-dropdown-content",{ref:"dropdown",attrs:{options:t.dropdown}})],1):t._e(),e("ol",t._l(t.segments,(function(i,n){return e("li",{key:n},[e("k-button",{staticClass:"k-breadcrumb-link",attrs:{icon:i.loading?"loader":i.icon,link:i.link,disabled:!i.link,text:i.text??i.label,title:i.text??i.label,current:n===t.segments.length-1&&"page",variant:"dimmed",size:"sm"}})],1)})),0)])}),[],!1,null,null,null,null).exports;const xl=at({props:{items:{type:Array},name:{default:"items",type:String},selected:{type:String},type:{default:"radio",type:String}}},(function(){var t=this,e=t._self._c;return e("nav",{staticClass:"k-browser"},[e("div",{staticClass:"k-browser-items"},t._l(t.items,(function(i){return e("label",{key:i.value,staticClass:"k-browser-item",attrs:{"aria-selected":t.selected===i.value}},[e("input",{attrs:{name:t.name,type:t.type},domProps:{checked:t.selected===i.value},on:{change:function(e){return t.$emit("select",i)}}}),i.image?e("k-item-image",{staticClass:"k-browser-item-image",attrs:{image:{...i.image,cover:!0,back:"black"}}}):t._e(),e("span",{staticClass:"k-browser-item-info"},[t._v(" "+t._s(i.label)+" ")])],1)})),0)])}),[],!1,null,null,null,null).exports;const _l=at({inheritAttrs:!1,props:{autofocus:Boolean,click:{type:Function,default:()=>{}},current:[String,Boolean],dialog:String,disabled:Boolean,drawer:String,dropdown:Boolean,element:String,icon:String,id:[String,Number],link:String,responsive:[Boolean,String],rel:String,role:String,selected:[String,Boolean],size:String,target:String,tabindex:String,text:[String,Number],theme:String,title:String,tooltip:String,type:{type:String,default:"button"},variant:String},computed:{attrs(){const t={"aria-current":this.current,"aria-disabled":this.disabled,"aria-selected":this.selected,"data-responsive":this.responsive,"data-size":this.size,"data-theme":this.theme,"data-variant":this.variant,id:this.id,tabindex:this.tabindex,title:this.title??this.tooltip};return"k-link"===this.component?(t.disabled=this.disabled,t.to=this.link,t.rel=this.rel,t.role=this.role,t.target=this.target):"button"===this.component&&(t.autofocus=this.autofocus,t.type=this.type),this.dropdown&&(t["aria-haspopup"]="menu",t["data-dropdown"]=this.dropdown),t},component(){return this.element?this.element:this.link?"k-link":"button"}},created(){this.tooltip&&window.panel.deprecated(": the `tooltip` prop will be removed in a future version. Use the `title` prop instead.")},methods:{focus(){var t,e;null==(e=(t=this.$el).focus)||e.call(t)},onClick(t){var e;return this.disabled?(t.preventDefault(),!1):this.dialog?this.$dialog(this.dialog):this.drawer?this.$drawer(this.drawer):(null==(e=this.click)||e.call(this,t),void this.$emit("click",t))}}},(function(){var t=this,e=t._self._c;return e(t.component,t._b({tag:"component",staticClass:"k-button",attrs:{"data-has-icon":Boolean(t.icon),"data-has-text":Boolean(t.text||t.$slots.default)},on:{click:t.onClick}},"component",t.attrs,!1),[t.icon?e("span",{staticClass:"k-button-icon"},[e("k-icon",{attrs:{type:t.icon}})],1):t._e(),t.text||t.$slots.default?e("span",{staticClass:"k-button-text"},[t._t("default",(function(){return[t._v(" "+t._s(t.text)+" ")]}))],2):t._e(),t.dropdown&&(t.text||t.$slots.default)?e("span",{staticClass:"k-button-arrow"},[e("k-icon",{attrs:{type:"angle-down"}})],1):t._e()])}),[],!1,null,null,null,null).exports;const Sl=at({props:{buttons:Array,layout:String,variant:String,theme:String,size:String,responsive:Boolean}},(function(){var t=this,e=t._self._c;return e("div",{staticClass:"k-button-group",attrs:{"data-layout":t.layout}},[t.$slots.default?t._t("default"):t._l(t.buttons,(function(i,n){return e("k-button",t._b({key:n},"k-button",{variant:t.variant,theme:t.theme,size:t.size,responsive:t.responsive,...i},!1))}))],2)}),[],!1,null,null,null,null).exports;const Cl=at({props:{selected:{type:String}},data:()=>({files:[],page:null,view:"tree"}),methods:{selectFile(t){this.$emit("select",t)},async selectPage(t){this.page=t;const e="/"===t.id?"/site/files":"/pages/"+this.$api.pages.id(t.id)+"/files",{data:i}=await this.$api.get(e,{select:"filename,id,panelImage,url,uuid"});this.files=i.map((t=>({label:t.filename,image:t.panelImage,id:t.id,url:t.url,uuid:t.uuid,value:t.uuid??t.url}))),this.view="files"},async togglePage(){await this.$nextTick(),this.$refs.tree.scrollIntoView({behaviour:"smooth",block:"nearest",inline:"nearest"})}}},(function(){var t,e,i=this,n=i._self._c;return n("div",{staticClass:"k-file-browser",attrs:{"data-view":i.view}},[n("div",{staticClass:"k-file-browser-layout"},[n("aside",{ref:"tree",staticClass:"k-file-browser-tree"},[n("k-page-tree",{attrs:{current:null==(t=i.page)?void 0:t.value},on:{select:i.selectPage,toggleBranch:i.togglePage}})],1),n("div",{ref:"items",staticClass:"k-file-browser-items"},[n("k-button",{staticClass:"k-file-browser-back-button",attrs:{icon:"angle-left",text:null==(e=i.page)?void 0:e.label},on:{click:function(t){i.view="tree"}}}),i.files.length?n("k-browser",{attrs:{items:i.files,selected:i.selected},on:{select:i.selectFile}}):i._e()],1)])])}),[],!1,null,null,null,null).exports;const Ol=at({props:{disabled:Boolean,rel:String,tabindex:[String,Number],target:String,title:String,to:[String,Function]},emits:["click"],computed:{href(){return"function"==typeof this.to?"":"/"!==this.to[0]||this.target?!0===this.to.includes("@")&&!1===this.to.includes("/")&&!1===this.to.startsWith("mailto:")?"mailto:"+this.to:this.to:this.$url(this.to)},relAttr(){return"_blank"===this.target?"noreferrer noopener":this.rel}},methods:{isRoutable(t){if(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)return!1;if(t.defaultPrevented)return!1;if(void 0!==t.button&&0!==t.button)return!1;if(this.target)return!1;if("string"==typeof this.href){if(this.href.includes("://")||this.href.startsWith("//"))return!1;if(this.href.includes("mailto:"))return!1}return!0},onClick(t){if(!0===this.disabled)return t.preventDefault(),!1;"function"==typeof this.to&&(t.preventDefault(),this.to()),this.isRoutable(t)&&(t.preventDefault(),this.$go(this.to)),this.$emit("click",t)}}},(function(){var t=this,e=t._self._c;return t.to&&!t.disabled?e("a",{ref:"link",staticClass:"k-link",attrs:{href:t.href,rel:t.relAttr,tabindex:t.tabindex,target:t.target,title:t.title},on:{click:t.onClick}},[t._t("default")],2):e("span",{staticClass:"k-link",attrs:{title:t.title,"aria-disabled":""}},[t._t("default")],2)}),[],!1,null,null,null,null).exports;const Al=at({props:{tab:String,tabs:{type:Array,default:()=>[]}},computed:{withBadges(){const t=Object.keys(this.$store.getters["content/changes"]());return this.tabs.map((e=>{const i=[];for(const t in e.columns)for(const n in e.columns[t].sections)if("fields"===e.columns[t].sections[n].type)for(const s in e.columns[t].sections[n].fields)i.push(s);return e.badge=i.filter((e=>t.includes(e.toLowerCase()))).length,e}))}}},(function(){var t=this;return(0,t._self._c)("k-tabs",{staticClass:"k-model-tabs",attrs:{tab:t.tab,tabs:t.withBadges,theme:"notice"}})}),[],!1,null,null,null,null).exports;const Ml=at({props:{axis:String,disabled:Boolean,element:{type:String,default:"div"},select:{type:String,default:":where(button, a):not(:disabled)"}},computed:{keys(){switch(this.axis){case"x":return{ArrowLeft:this.prev,ArrowRight:this.next};case"y":return{ArrowUp:this.prev,ArrowDown:this.next};default:return{ArrowLeft:this.prev,ArrowRight:this.next,ArrowUp:this.prev,ArrowDown:this.next}}}},mounted(){this.$el.addEventListener("keydown",this.keydown)},destroyed(){this.$el.removeEventListener("keydown",this.keydown)},methods:{focus(t=0,e){this.move(t,e)},keydown(t){var e;if(this.disabled)return!1;null==(e=this.keys[t.key])||e.apply(this,[t])},move(t=0,e){var i;const n=[...this.$el.querySelectorAll(this.select)];let s=n.findIndex((t=>t===document.activeElement||t.contains(document.activeElement)));switch(-1===s&&(s=0),t){case"first":t=0;break;case"next":t=s+1;break;case"last":t=n.length-1;break;case"prev":t=s-1}t<0?this.$emit("prev"):t>=n.length?this.$emit("next"):null==(i=n[t])||i.focus(),null==e||e.preventDefault()},next(t){this.move("next",t)},prev(t){this.move("prev",t)}}},(function(){var t=this;return(0,t._self._c)(t.element,{tag:"component",staticClass:"k-navigate"},[t._t("default")],2)}),[],!1,null,null,null,null).exports;const jl=at({name:"k-tree",inheritAttrs:!1,props:{element:{type:String,default:"k-tree"},current:{type:String},items:{type:[Array,Object]},level:{default:0,type:Number}},data(){return{state:this.items}},methods:{arrow:t=>!0===t.loading?"loader":t.open?"angle-down":"angle-right",close(t){this.$set(t,"open",!1),this.$emit("close",t)},open(t){this.$set(t,"open",!0),this.$emit("open",t)},select(t){this.$emit("select",t)},toggle(t){this.$emit("toggle",t),!0===t.open?this.close(t):this.open(t)}}},(function(){var t=this,e=t._self._c;return e("ul",{staticClass:"k-tree",class:t.$options.name,style:{"--tree-level":t.level}},t._l(t.state,(function(i,n){return e("li",{key:n,attrs:{"aria-expanded":i.open,"aria-current":i.value===t.current}},[e("p",{staticClass:"k-tree-branch",attrs:{"data-has-subtree":i.hasChildren&&i.open}},[e("button",{staticClass:"k-tree-toggle",attrs:{disabled:!i.hasChildren,type:"button"},on:{click:function(e){return t.toggle(i)}}},[e("k-icon",{attrs:{type:t.arrow(i)}})],1),e("button",{staticClass:"k-tree-folder",attrs:{disabled:i.disabled,type:"button"},on:{click:function(e){return t.select(i)},dblclick:function(e){return t.toggle(i)}}},[e("k-icon-frame",{attrs:{icon:i.icon??"folder"}}),e("span",{staticClass:"k-tree-folder-label"},[t._v(t._s(i.label))])],1)]),i.hasChildren&&i.open?[e(t.$options.name,t._b({tag:"component",attrs:{items:i.children,level:t.level+1},on:{close:function(e){return t.$emit("close",e)},open:function(e){return t.$emit("open",e)},select:function(e){return t.$emit("select",e)},toggle:function(e){return t.$emit("toggle",e)}}},"component",t.$props,!1))]:t._e()],2)})),0)}),[],!1,null,null,null,null).exports;const Il=at({name:"k-page-tree",extends:jl,inheritAttrs:!1,props:{root:{default:!0,type:Boolean},current:{type:String},move:{type:String}},data:()=>({state:[]}),async created(){if(this.items)this.state=this.items;else{const t=await this.load(null);await this.open(t[0]),this.state=this.root?t:t[0].children}},methods:{async load(t){return await this.$panel.get("site/tree",{query:{move:this.move??null,parent:t}})},async open(t){if(!1===t.hasChildren)return!1;this.$set(t,"loading",!0),"string"==typeof t.children&&(t.children=await this.load(t.children)),this.$set(t,"open",!0),this.$set(t,"loading",!1)}}},null,null,!1,null,null,null,null).exports;const Tl=at({props:{details:Boolean,limit:{type:Number,default:10},page:{type:Number,default:1},total:{type:Number,default:0},validate:{type:Function,default:()=>Promise.resolve()}},computed:{end(){return Math.min(this.start-1+this.limit,this.total)},detailsText(){return 1===this.limit?this.start:this.start+"-"+this.end},offset(){return this.start-1},pages(){return Math.ceil(this.total/this.limit)},start(){return(this.page-1)*this.limit+1}},methods:{async goTo(t){var e;try{await this.validate(t),null==(e=this.$refs.dropdown)||e.close();const i=((t=Math.max(1,Math.min(t,this.pages)))-1)*this.limit+1;this.$emit("paginate",{page:t,start:i,end:Math.min(i-1+this.limit,this.total),limit:this.limit,offset:i-1,total:this.total})}catch(i){}},prev(){this.goTo(this.page-1)},next(){this.goTo(this.page+1)}}},(function(){var t=this,e=t._self._c;return t.pages>1?e("k-button-group",{staticClass:"k-pagination",attrs:{layout:"collapsed"},nativeOn:{keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"left",37,e.key,["Left","ArrowLeft"])||"button"in e&&0!==e.button?null:t.prev.apply(null,arguments)},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"right",39,e.key,["Right","ArrowRight"])||"button"in e&&2!==e.button?null:t.next.apply(null,arguments)}]}},[e("k-button",{attrs:{disabled:t.start<=1,title:t.$t("prev"),icon:"angle-left",size:"xs",variant:"filled"},on:{click:t.prev}}),t.details?[e("k-button",{staticClass:"k-pagination-details",attrs:{disabled:t.total<=t.limit,text:t.total>1?`${t.detailsText} / ${t.total}`:t.total,size:"xs",variant:"filled"},on:{click:function(e){return t.$refs.dropdown.toggle()}}}),e("k-dropdown-content",{ref:"dropdown",staticClass:"k-pagination-selector",attrs:{"align-x":"end"},nativeOn:{keydown:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"left",37,e.key,["Left","ArrowLeft"])||"button"in e&&0!==e.button?null:void e.stopPropagation()},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"right",39,e.key,["Right","ArrowRight"])||"button"in e&&2!==e.button?null:void e.stopPropagation()}]}},[e("form",{attrs:{method:"dialog"},on:{submit:function(e){return t.goTo(t.$refs.page.value)}}},[e("label",{attrs:{for:t._uid}},[t._v(t._s(t.$t("pagination.page"))+":")]),e("select",{ref:"page",attrs:{id:t._uid,autofocus:!0}},t._l(t.pages,(function(i){return e("option",{key:i,domProps:{selected:t.page===i,value:i}},[t._v(" "+t._s(i)+" ")])})),0),e("k-button",{attrs:{type:"submit",icon:"check"}})],1)])]:t._e(),e("k-button",{attrs:{disabled:t.end>=t.total,title:t.$t("next"),icon:"angle-right",size:"xs",variant:"filled"},on:{click:t.next}})],2):t._e()}),[],!1,null,null,null,null).exports;const El=at({props:{prev:{type:[Boolean,Object],default:!1},next:{type:[Boolean,Object],default:!1}},computed:{buttons(){return[{...this.button(this.prev),icon:"angle-left"},{...this.button(this.next),icon:"angle-right"}]},isFullyDisabled(){return 0===this.buttons.filter((t=>!t.disabled)).length}},methods:{button:t=>t||{disabled:!0,link:"#"}}},(function(){var t=this,e=t._self._c;return t.isFullyDisabled?t._e():e("k-button-group",{staticClass:"k-prev-next",attrs:{buttons:t.buttons,layout:"collapsed",size:"xs"}})}),[],!1,null,null,null,null).exports;const Ll=at({props:{disabled:Boolean,image:{type:Object},removable:Boolean},computed:{isRemovable(){return this.removable&&!this.disabled}},methods:{remove(){this.isRemovable&&this.$emit("remove")},focus(){this.$refs.button.focus()}}},(function(){var t=this,e=t._self._c;return e("button",{ref:"button",staticClass:"k-tag",attrs:{"aria-disabled":t.disabled,"data-has-image":Boolean(t.image),"data-has-toggle":t.isRemovable,type:"button"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"delete",[8,46],e.key,["Backspace","Delete","Del"])?null:(e.preventDefault(),t.remove.apply(null,arguments))}}},[t._t("image",(function(){var i;return[(null==(i=t.image)?void 0:i.src)?e("k-image-frame",t._b({staticClass:"k-tag-image"},"k-image-frame",t.image,!1)):t.image?e("k-icon-frame",t._b({staticClass:"k-tag-image"},"k-icon-frame",t.image,!1)):t._e()]})),t.$slots.default?e("span",{staticClass:"k-tag-text"},[t._t("default")],2):t._e(),t.isRemovable?e("k-icon-frame",{staticClass:"k-tag-toggle",attrs:{icon:"cancel-small"},nativeOn:{click:function(e){return e.stopPropagation(),t.remove.apply(null,arguments)}}}):t._e()],2)}),[],!1,null,null,null,null).exports;const Dl=at({inheritAttrs:!1,props:{icon:String,id:[String,Number],responsive:Boolean,theme:String,tooltip:String},created(){window.panel.deprecated(' will be removed in a future version. Use instead.')}},(function(){var t=this,e=t._self._c;return e("span",{staticClass:"k-button",attrs:{id:t.id,"data-disabled":!0,"data-responsive":t.responsive,"data-theme":t.theme,title:t.tooltip}},[t.icon?e("k-icon",{staticClass:"k-button-icon",attrs:{type:t.icon,alt:t.tooltip}}):t._e(),t.$slots.default?e("span",{staticClass:"k-button-text"},[t._t("default")],2):t._e()],1)}),[],!1,null,null,null,null).exports;const Bl=at({inheritAttrs:!1,props:{autofocus:Boolean,current:[String,Boolean],icon:String,id:[String,Number],link:String,rel:String,responsive:Boolean,role:String,target:String,tabindex:String,theme:String,tooltip:String},created(){window.panel.deprecated(' will be removed in a future version. Use instead.')},methods:{focus(){this.$el.focus()}}},(function(){var t=this,e=t._self._c;return e("k-link",{staticClass:"k-button",attrs:{id:t.id,"aria-current":t.current,autofocus:t.autofocus,"data-theme":t.theme,"data-responsive":t.responsive,rel:t.rel,role:t.role,tabindex:t.tabindex,target:t.target,title:t.tooltip,to:t.link}},[t.icon?e("k-icon",{staticClass:"k-button-icon",attrs:{type:t.icon,alt:t.tooltip}}):t._e(),t.$slots.default?e("span",{staticClass:"k-button-text"},[t._t("default")],2):t._e()],1)}),[],!1,null,null,null,null).exports;const ql=at({inheritAttrs:!1,props:{autofocus:Boolean,click:{type:Function,default:()=>{}},current:[String,Boolean],icon:String,id:[String,Number],responsive:Boolean,role:String,tabindex:String,theme:String,tooltip:String,type:{type:String,default:"button"}},created(){window.panel.deprecated(" will be removed in a future version. Use instead.")}},(function(){var t=this,e=t._self._c;return e("button",{staticClass:"k-button",attrs:{id:t.id,"aria-current":t.current,autofocus:t.autofocus,"data-theme":t.theme,"data-responsive":t.responsive,role:t.role,tabindex:t.tabindex,title:t.tooltip,type:t.type},on:{click:t.click}},[t.icon?e("k-icon",{staticClass:"k-button-icon",attrs:{type:t.icon,alt:t.tooltip}}):t._e(),t.$slots.default?e("span",{staticClass:"k-button-text"},[t._t("default")],2):t._e()],1)}),[],!1,null,null,null,null).exports,Pl={install(t){t.component("k-breadcrumb",wl),t.component("k-browser",xl),t.component("k-button",_l),t.component("k-button-group",Sl),t.component("k-file-browser",Cl),t.component("k-link",Ol),t.component("k-model-tabs",Al),t.component("k-navigate",Ml),t.component("k-page-tree",Il),t.component("k-pagination",Tl),t.component("k-prev-next",El),t.component("k-tag",Ll),t.component("k-tags",Jn),t.component("k-tree",jl),t.component("k-button-disabled",Dl),t.component("k-button-link",Bl),t.component("k-button-native",ql)}};const Nl=at({props:{buttons:Array,headline:String,invalid:Boolean,link:String,required:Boolean}},(function(){var t=this,e=t._self._c;return e("section",{staticClass:"k-section",attrs:{"data-invalid":t.invalid}},[t.headline||t.buttons?e("header",{staticClass:"k-bar k-section-header"},[e("k-label",{attrs:{invalid:t.invalid,link:t.link,required:t.required,type:"section"}},[t._v(" "+t._s(t.headline)+" ")]),t.buttons?e("k-button-group",{attrs:{buttons:t.buttons,size:"xs",variant:"filled"}}):t._e()],1):t._e(),t._t("default")],2)}),[],!1,null,null,null,null).exports;const zl=at({props:{empty:String,blueprint:String,lock:[Boolean,Object],parent:String,tab:Object},computed:{content(){return this.$store.getters["content/values"]()}},methods:{exists(t){return this.$helper.isComponent(`k-${t}-section`)}}},(function(){var t=this,e=t._self._c;return 0===t.tab.columns.length?e("k-box",{attrs:{html:!0,text:t.empty,theme:"info"}}):e("k-grid",{staticClass:"k-sections",attrs:{variant:"columns"}},t._l(t.tab.columns,(function(i,n){return e("k-column",{key:t.parent+"-column-"+n,attrs:{width:i.width,sticky:i.sticky}},[t._l(i.sections,(function(s,o){return[t.$helper.field.isVisible(s,t.content)?[t.exists(s.type)?e("k-"+s.type+"-section",t._b({key:t.parent+"-column-"+n+"-section-"+o+"-"+t.blueprint,tag:"component",class:"k-section-name-"+s.name,attrs:{column:i.width,lock:t.lock,name:s.name,parent:t.parent,timestamp:t.$panel.view.timestamp},on:{submit:function(e){return t.$emit("submit",e)}}},"component",s,!1)):[e("k-box",{key:t.parent+"-column-"+n+"-section-"+o,attrs:{text:t.$t("error.section.type.invalid",{type:s.type}),icon:"alert",theme:"negative"}})]]:t._e()]}))],2)})),1)}),[],!1,null,null,null,null).exports,Fl={props:{blueprint:String,lock:[Boolean,Object],help:String,name:String,parent:String,timestamp:Number},methods:{load(){return this.$api.get(this.parent+"/sections/"+this.name)}}};const Rl=at({mixins:[Fl],inheritAttrs:!1,data:()=>({fields:{},isLoading:!0,issue:null}),computed:{values(){return this.$store.getters["content/values"]()}},watch:{timestamp(){this.fetch()}},created(){this.onInput=Nt(this.onInput,50),this.fetch()},methods:{async fetch(){try{const t=await this.load();this.fields=t.fields;for(const e in this.fields)this.fields[e].section=this.name,this.fields[e].endpoints={field:this.parent+"/fields/"+e,section:this.parent+"/sections/"+this.name,model:this.parent}}catch(t){this.issue=t}finally{this.isLoading=!1}},onInput(t,e,i){this.$store.dispatch("content/update",[i,t[i]])},onSubmit(t){this.$store.dispatch("content/update",[null,t]),this.$events.emit("keydown.cmd.s",t)}}},(function(){var t=this,e=t._self._c;return t.isLoading?t._e():e("k-section",{staticClass:"k-fields-section",attrs:{headline:t.issue?"Error":null}},[t.issue?e("k-box",{attrs:{text:t.issue.message,html:!1,icon:"alert",theme:"negative"}}):t._e(),e("k-form",{attrs:{fields:t.fields,validate:!0,value:t.values,disabled:t.lock&&"lock"===t.lock.state},on:{input:t.onInput,submit:t.onSubmit}})],1)}),[],!1,null,null,null,null).exports;const Yl=at({inheritAttrs:!1,props:{blueprint:String,column:String,parent:String,name:String,timestamp:Number},data:()=>({data:[],error:null,isLoading:!1,isProcessing:!1,options:{columns:{},empty:null,headline:null,help:null,layout:"list",link:null,max:null,min:null,size:null,sortable:null},pagination:{page:null},searchterm:null,searching:!1}),computed:{addIcon:()=>"add",buttons(){let t=[];return this.canSearch&&t.push({icon:"filter",text:this.$t("filter"),click:this.onSearchToggle,responsive:!0}),this.canAdd&&t.push({icon:this.addIcon,text:this.$t("add"),click:this.onAdd,responsive:!0}),t},canAdd:()=>!0,canDrop:()=>!1,canSearch(){return this.options.search},collection(){return{columns:this.options.columns,empty:this.emptyPropsWithSearch,layout:this.options.layout,help:this.options.help,items:this.items,pagination:this.pagination,sortable:!this.isProcessing&&this.options.sortable,size:this.options.size}},emptyProps(){return{icon:"page",text:this.$t("pages.empty")}},emptyPropsWithSearch(){return{...this.emptyProps,text:this.searching?this.$t("search.results.none"):this.options.empty??this.emptyProps.text}},items(){return this.data},isInvalid(){var t;return!((null==(t=this.searchterm)?void 0:t.length)>0)&&(!!(this.options.min&&this.data.lengththis.options.max))},paginationId(){return"kirby$pagination$"+this.parent+"/"+this.name},type:()=>"models"},watch:{searchterm(){this.search()},timestamp(){this.reload()}},created(){this.search=Nt(this.search,200),this.load()},methods:{async load(t){this.isProcessing=!0,t||(this.isLoading=!0);const e=this.pagination.page??localStorage.getItem(this.paginationId)??1;try{const t=await this.$api.get(this.parent+"/sections/"+this.name,{page:e,searchterm:this.searchterm});this.options=t.options,this.pagination=t.pagination,this.data=t.data}catch(i){this.error=i.message}finally{this.isProcessing=!1,this.isLoading=!1}},onAction(){},onAdd(){},onChange(){},onDrop(){},onSort(){},onPaginate(t){localStorage.setItem(this.paginationId,t.page),this.pagination=t,this.reload()},onSearchToggle(){this.searching=!this.searching,this.searchterm=null},async reload(){await this.load(!0)},async search(){this.pagination.page=0,await this.reload()},update(){this.reload(),this.$events.emit("model.update")}}},(function(){var t=this,e=t._self._c;return!1===t.isLoading?e("k-section",{class:`k-models-section k-${t.type}-section`,attrs:{buttons:t.buttons,"data-processing":t.isProcessing,headline:t.options.headline??" ",invalid:t.isInvalid,link:t.options.link,required:Boolean(t.options.min)}},[t.error?e("k-box",{attrs:{icon:"alert",theme:"negative"}},[e("k-text",{attrs:{size:"small"}},[e("strong",[t._v(" "+t._s(t.$t("error.section.notLoaded",{name:t.name}))+": ")]),t._v(" "+t._s(t.error)+" ")])],1):[e("k-dropzone",{attrs:{disabled:!t.canDrop},on:{drop:t.onDrop}},[t.searching&&t.options.search?e("k-input",{staticClass:"k-models-section-search",attrs:{autofocus:!0,placeholder:t.$t("filter")+" …",value:t.searchterm,icon:"search",type:"text"},on:{input:function(e){t.searchterm=e},keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"esc",27,e.key,["Esc","Escape"])?null:t.onSearchToggle.apply(null,arguments)}}}):t._e(),e("k-collection",t._g(t._b({on:{action:t.onAction,change:t.onChange,sort:t.onSort,paginate:t.onPaginate}},"k-collection",t.collection,!1),t.canAdd?{empty:t.onAdd}:{}))],1)]],2):t._e()}),[],!1,null,null,null,null).exports;const Ul=at({extends:Yl,computed:{addIcon:()=>"upload",canAdd(){return this.$panel.permissions.files.create&&!1!==this.options.upload},canDrop(){return!1!==this.canAdd},emptyProps(){return{icon:"image",text:this.$t("files.empty")}},items(){return this.data.map((t=>(t.sortable=this.options.sortable,t.column=this.column,t.options=this.$dropdown(t.link,{query:{view:"list",update:this.options.sortable,delete:this.data.length>this.options.min}}),t.data={"data-id":t.id,"data-template":t.template},t)))},type:()=>"files",uploadOptions(){return{...this.options.upload,url:this.$panel.urls.api+"/"+this.options.upload.api,on:{complete:()=>{this.$panel.notification.success({context:"view"})}}}}},created(){this.$events.on("model.update",this.reload),this.$events.on("file.sort",this.reload)},destroyed(){this.$events.off("model.update",this.reload),this.$events.off("file.sort",this.reload)},methods:{onAction(t,e){"replace"===t&&this.replace(e)},onAdd(){this.canAdd&&this.$panel.upload.pick(this.uploadOptions)},onDrop(t){this.canAdd&&this.$panel.upload.open(t,this.uploadOptions)},async onSort(t){if(!1===this.options.sortable)return!1;this.isProcessing=!0;try{await this.$api.patch(this.options.apiUrl+"/files/sort",{files:t.map((t=>t.id)),index:this.pagination.offset}),this.$panel.notification.success(),this.$events.emit("file.sort")}catch(e){this.$panel.error(e),this.reload()}finally{this.isProcessing=!1}},replace(t){this.$panel.upload.replace(t,this.uploadOptions)}}},null,null,!1,null,null,null,null).exports;const Hl=at({mixins:[Fl],inheritAttrs:!1,data:()=>({icon:null,label:null,text:null,theme:null}),async created(){const t=await this.load();this.icon=t.icon,this.label=t.label,this.text=t.text,this.theme=t.theme??"info"}},(function(){var t=this,e=t._self._c;return e("k-section",{staticClass:"k-info-section",attrs:{headline:t.label}},[e("k-box",{attrs:{html:!0,icon:t.icon,text:t.text,theme:t.theme}})],1)}),[],!1,null,null,null,null).exports;const Vl=at({extends:Yl,computed:{canAdd(){return this.options.add&&this.$panel.permissions.pages.create},items(){return this.data.map((t=>{const e=!1===t.permissions.changeStatus,i=this.$helper.page.status(t.status,e);return i.click=()=>this.$dialog(t.link+"/changeStatus"),t.flag={status:t.status,disabled:e,click:()=>this.$dialog(t.link+"/changeStatus")},t.sortable=t.permissions.sort&&this.options.sortable,t.deletable=this.data.length>this.options.min,t.column=this.column,t.buttons=[i,...t.buttons??[]],t.options=this.$dropdown(t.link,{query:{view:"list",delete:t.deletable,sort:t.sortable}}),t.data={"data-id":t.id,"data-status":t.status,"data-template":t.template},t}))},type:()=>"pages"},created(){this.$events.on("page.changeStatus",this.reload),this.$events.on("page.sort",this.reload)},destroyed(){this.$events.off("page.changeStatus",this.reload),this.$events.off("page.sort",this.reload)},methods:{onAdd(){this.canAdd&&this.$dialog("pages/create",{query:{parent:this.options.link??this.parent,view:this.parent,section:this.name}})},async onChange(t){let e=null;if(t.added&&(e="added"),t.moved&&(e="moved"),e){this.isProcessing=!0;const n=t[e].element,s=t[e].newIndex+1+this.pagination.offset;try{await this.$api.pages.changeStatus(n.id,"listed",s),this.$panel.notification.success(),this.$events.emit("page.sort",n)}catch(i){this.$panel.error({message:i.message,details:i.details}),await this.reload()}finally{this.isProcessing=!1}}}}},null,null,!1,null,null,null,null).exports;const Kl=at({mixins:[Fl],data:()=>({headline:null,isLoading:!0,reports:null,size:null}),async created(){const t=await this.load();this.isLoading=!1,this.headline=t.headline,this.reports=t.reports,this.size=t.size},methods:{}},(function(){var t=this,e=t._self._c;return!1===t.isLoading?e("k-section",{staticClass:"k-stats-section",attrs:{headline:t.headline}},[t.reports.length>0?e("k-stats",{attrs:{reports:t.reports,size:t.size}}):e("k-empty",{attrs:{icon:"chart"}},[t._v(" "+t._s(t.$t("stats.empty")))])],1):t._e()}),[],!1,null,null,null,null).exports,Wl={install(t){t.component("k-section",Nl),t.component("k-sections",zl),t.component("k-fields-section",Rl),t.component("k-files-section",Ul),t.component("k-info-section",Hl),t.component("k-pages-section",Vl),t.component("k-stats-section",Kl)}};const Jl=at({components:{"k-highlight":()=>F((()=>import("./Highlight.min.js")),["./Highlight.min.js","./vendor.min.js"],import.meta.url)},props:{language:{type:String}}},(function(){var t=this,e=t._self._c;return e("k-highlight",[e("div",[e("pre",{staticClass:"k-code",attrs:{"data-language":t.language}},[e("code",{key:t.$slots.default[0].text+"-"+t.language,class:t.language?`language-${t.language}`:null},[t._t("default")],2)])])])}),[],!1,null,null,null,null).exports;const Gl=at({props:{link:String,size:{type:String},tag:{type:String,default:"h2"},theme:{type:String}},emits:["click"],created(){this.size&&window.panel.deprecated(": the `size` prop will be removed in a future version. Use the `tag` prop instead."),this.theme&&window.panel.deprecated(": the `theme` prop will be removed in a future version.")}},(function(){var t=this,e=t._self._c;return e(t.tag,{tag:"component",staticClass:"k-headline",attrs:{"data-theme":t.theme,"data-size":t.size},on:{click:function(e){return t.$emit("click",e)}}},[t.link?e("k-link",{attrs:{to:t.link}},[t._t("default")],2):t._t("default")],2)}),[],!1,null,null,null,null).exports;const Xl=at({props:{input:{type:[String,Number]},invalid:{type:Boolean},link:{type:String},required:{default:!1,type:Boolean},type:{default:"field",type:String}},computed:{element(){return"section"===this.type?"h2":"label"}}},(function(){var t=this,e=t._self._c;return e(t.element,{tag:"component",staticClass:"k-label",class:"k-"+t.type+"-label",attrs:{for:t.input,"data-invalid":t.invalid}},[t.link?e("k-link",{attrs:{to:t.link}},[e("span",{staticClass:"k-label-text"},[t._t("default")],2)]):e("span",{staticClass:"k-label-text"},[t._t("default")],2),t.required&&!t.invalid?e("abbr",{attrs:{title:t.$t(t.type+".required")}},[t._v("✶")]):t._e(),e("abbr",{staticClass:"k-label-invalid",attrs:{title:t.$t(t.type+".invalid")}},[t._v("×")])],1)}),[],!1,null,null,null,null).exports;const Zl=at({props:{align:String,html:String,size:String,theme:String},computed:{attrs(){return{class:"k-text","data-align":this.align,"data-size":this.size,"data-theme":this.theme}}},created(){this.theme&&window.panel.deprecated(': the `theme` prop will be removed in a future version. For help text, add `.k-help "` CSS class instead.')}},(function(){var t=this,e=t._self._c;return t.html?e("div",t._b({domProps:{innerHTML:t._s(t.html)}},"div",t.attrs,!1)):e("div",t._b({},"div",t.attrs,!1),[t._t("default")],2)}),[],!1,null,null,null,null).exports,Ql={install(t){t.component("k-code",Jl),t.component("k-headline",Gl),t.component("k-label",Xl),t.component("k-text",Zl)}};const tr=at({computed:{notification(){return"view"!==this.$panel.notification.context||this.$panel.notification.isFatal?null:this.$panel.notification}}},(function(){var t=this,e=t._self._c;return e("k-panel",{staticClass:"k-panel-inside"},[e("k-panel-menu"),e("main",{staticClass:"k-panel-main"},[e("k-topbar",{attrs:{breadcrumb:t.$panel.view.breadcrumb,view:t.$panel.view}},[t._t("topbar")],2),t._t("default")],2),t.notification&&"error"!==t.notification.type?e("k-button",{staticClass:"k-panel-notification",attrs:{icon:t.notification.icon,text:t.notification.message,theme:t.notification.theme,variant:"filled"},on:{click:function(e){return t.notification.close()}}}):t._e()],1)}),[],!1,null,null,null,null).exports;const er=at({data:()=>({over:!1}),computed:{hasSearch(){return this.$helper.object.length(this.$panel.searches)>0},menus(){return this.$panel.menu.entries.split("-")}}},(function(){var t=this,e=t._self._c;return e("nav",{staticClass:"k-panel-menu",attrs:{"aria-label":t.$t("menu"),"data-hover":t.$panel.menu.hover},on:{mouseenter:function(e){t.$panel.menu.hover=!0},mouseleave:function(e){t.$panel.menu.hover=!1}}},[e("div",{staticClass:"k-panel-menu-body"},[t.hasSearch?e("k-button",{staticClass:"k-panel-menu-search k-panel-menu-button",attrs:{text:t.$t("search"),icon:"search"},on:{click:function(e){return t.$panel.search()}}}):t._e(),t._l(t.menus,(function(i,n){return e("menu",{key:n,staticClass:"k-panel-menu-buttons",attrs:{"data-second-last":n===t.menus.length-2}},t._l(i,(function(i){return e("k-button",t._b({key:i.id,staticClass:"k-panel-menu-button",attrs:{title:i.title??i.text}},"k-button",i,!1))})),1)}))],2),e("k-button",{staticClass:"k-panel-menu-toggle",attrs:{icon:t.$panel.menu.isOpen?"angle-left":"angle-right",title:t.$panel.menu.isOpen?t.$t("collapse"):t.$t("expand"),size:"xs"},on:{click:function(e){return t.$panel.menu.toggle()}}})],1)}),[],!1,null,null,null,null).exports;const ir=at({},(function(){return(0,this._self._c)("k-panel",{staticClass:"k-panel-outside",attrs:{tabindex:"0"}},[this._t("default")],2)}),[],!1,null,null,null,null).exports;const nr=at({},(function(){var t=this,e=t._self._c;return e("div",{staticClass:"k-panel",attrs:{"data-dragging":t.$panel.drag.isDragging,"data-loading":t.$panel.isLoading,"data-language":t.$panel.language.code,"data-language-default":t.$panel.language.isDefault,"data-menu":t.$panel.menu.isOpen?"true":"false","data-role":t.$panel.user.role,"data-translation":t.$panel.translation.code,"data-user":t.$panel.user.id,dir:t.$panel.direction}},[t._t("default"),t.$panel.dialog.isOpen&&!t.$panel.dialog.legacy?e("k-fiber-dialog"):t._e(),t.$panel.drawer.isOpen&&!t.$panel.drawer.legacy?e("k-fiber-drawer"):t._e(),t.$panel.notification.isFatal&&t.$panel.notification.isOpen?e("k-fatal",{attrs:{html:t.$panel.notification.message}}):t._e(),e("k-offline-warning"),e("k-icons"),e("k-overlay",{attrs:{nested:t.$panel.drawer.history.milestones.length>1,visible:t.$panel.drawer.isOpen,type:"drawer"},on:{close:function(e){return t.$panel.drawer.close()}}},[e("portal-target",{staticClass:"k-drawer-portal k-portal",attrs:{name:"drawer",multiple:""}})],1),e("k-overlay",{attrs:{visible:t.$panel.dialog.isOpen,type:"dialog"},on:{close:function(e){return t.$panel.dialog.close()}}},[e("portal-target",{staticClass:"k-dialog-portal k-portal",attrs:{name:"dialog",multiple:""}})],1),e("portal-target",{staticClass:"k-overlay-portal k-portal",attrs:{name:"overlay",multiple:""}})],2)}),[],!1,null,null,null,null).exports;const sr=at({props:{breadcrumb:Array,view:Object},computed:{crumbs(){return[{link:this.view.link,label:this.view.label??this.view.breadcrumbLabel,icon:this.view.icon,loading:this.$panel.isLoading},...this.breadcrumb]}}},(function(){var t=this,e=t._self._c;return e("div",{staticClass:"k-topbar"},[e("k-button",{staticClass:"k-panel-menu-proxy",attrs:{icon:"bars"},on:{click:function(e){return t.$panel.menu.toggle()}}}),e("k-breadcrumb",{staticClass:"k-topbar-breadcrumb",attrs:{crumbs:t.crumbs}}),e("div",{staticClass:"k-topbar-spacer"}),e("div",{staticClass:"k-topbar-signals"},[t._t("default")],2)],1)}),[],!1,null,null,null,null).exports,or={install(t){t.component("k-panel",nr),t.component("k-panel-inside",tr),t.component("k-panel-menu",er),t.component("k-panel-outside",ir),t.component("k-topbar",sr),t.component("k-inside",tr),t.component("k-outside",ir)}};const lr=at({props:{error:String,layout:String}},(function(){var t=this,e=t._self._c;return e(`k-panel-${t.layout}`,{tag:"component",staticClass:"k-error-view"},["outside"===t.layout?[e("div",[e("k-box",{attrs:{icon:"alert",theme:"negative"}},[t._v(t._s(t.error))])],1)]:[e("k-header",[t._v(t._s(t.$t("error")))]),e("k-box",{attrs:{icon:"alert",theme:"negative"}},[t._v(t._s(t.error))])]],2)}),[],!1,null,null,null,null).exports;const rr=at({mixins:[zt],props:{type:{default:"pages",type:String}},data:()=>({items:[],query:new URLSearchParams(window.location.search).get("query"),pagination:{}}),computed:{currentType(){return this.$panel.searches[this.type]??Object.values(this.$panel.searches)[0]},tabs(){const t=[];for(const e in this.$panel.searches){const i=this.$panel.searches[e];t.push({label:i.label,link:"/search/?type="+e+"&query="+this.query,name:e})}return t}},watch:{query:{handler(){this.search(1)},immediate:!0},type(){this.search()}},methods:{focus(){var t;null==(t=this.$refs.input)||t.focus()},onPaginate(t){this.search(t.page)},async search(t){this.$panel.isLoading=!0,t||(t=new URLSearchParams(window.location.search).get("page")??1);const e=this.$panel.url(window.location,{type:this.currentType.id,query:this.query,page:t});window.history.pushState("","",e.toString());try{if(null===this.query||this.query.length<2)throw Error("Empty query");const e=await this.$search(this.currentType.id,this.query,{page:t,limit:15});this.items=e.results,this.pagination=e.pagination}catch(i){this.items=[],this.pagination={}}finally{this.$panel.isLoading=!1}}}},(function(){var t=this,e=t._self._c;return e("k-panel-inside",{staticClass:"k-search-view"},[e("k-header",[t._v(" "+t._s(t.$t("search"))+" "),e("k-input",{ref:"input",staticClass:"k-search-view-input",attrs:{slot:"buttons","aria-label":t.$t("search"),autofocus:!0,placeholder:t.$t("search")+" …",spellcheck:!1,value:t.query,icon:"search",type:"text"},on:{input:function(e){t.query=e}},slot:"buttons"})],1),e("k-tabs",{attrs:{tab:t.currentType.id,tabs:t.tabs}}),e("div",{staticClass:"k-search-view-results"},[e("k-collection",{attrs:{items:t.items,empty:{icon:"search",text:t.$t("search.results.none")},pagination:t.pagination},on:{paginate:t.onPaginate}})],1)],1)}),[],!1,null,null,null,null).exports;const ar=at({props:{blueprint:String,next:Object,prev:Object,permissions:{type:Object,default:()=>({})},lock:{type:[Boolean,Object]},model:{type:Object,default:()=>({})},tab:{type:Object,default:()=>({columns:[]})},tabs:{type:Array,default:()=>[]}},computed:{id(){return this.model.link},isLocked(){var t;return"lock"===(null==(t=this.lock)?void 0:t.state)},protectedFields:()=>[]},watch:{"$panel.view.timestamp":{handler(){this.$store.dispatch("content/create",{id:this.id,api:this.id,content:this.model.content,ignore:this.protectedFields})},immediate:!0}},created(){this.$events.on("model.reload",this.$reload),this.$events.on("keydown.left",this.toPrev),this.$events.on("keydown.right",this.toNext)},destroyed(){this.$events.off("model.reload",this.$reload),this.$events.off("keydown.left",this.toPrev),this.$events.off("keydown.right",this.toNext)},methods:{toPrev(t){this.prev&&"body"===t.target.localName&&this.$go(this.prev.link)},toNext(t){this.next&&"body"===t.target.localName&&this.$go(this.next.link)}}},null,null,!1,null,null,null,null).exports;const ur=at({extends:ar,props:{preview:Object},computed:{focus(){const t=this.$store.getters["content/values"]().focus;if(!t)return;const[e,i]=t.replaceAll("%","").split(" ");return{x:parseFloat(e),y:parseFloat(i)}},isFocusable(){return!this.isLocked&&this.preview.image.src&&this.permissions.update&&(!window.panel.multilang||0===window.panel.languages.length||window.panel.language.default)}},methods:{action(t){if("replace"===t)return this.$panel.upload.replace({...this.preview,...this.model})},setFocus(t){!0===this.$helper.object.isObject(t)&&(t=`${t.x}% ${t.y}%`),this.$store.dispatch("content/update",["focus",t])}}},(function(){var t=this,e=t._self._c;return e("k-panel-inside",{staticClass:"k-file-view",attrs:{"data-has-tabs":t.tabs.length>1,"data-id":t.model.id,"data-locked":t.isLocked,"data-template":t.blueprint},scopedSlots:t._u([{key:"topbar",fn:function(){return[e("k-prev-next",{attrs:{prev:t.prev,next:t.next}})]},proxy:!0}])},[e("k-header",{staticClass:"k-file-view-header",attrs:{editable:t.permissions.changeName&&!t.isLocked},on:{edit:function(e){return t.$dialog(t.id+"/changeName")}},scopedSlots:t._u([{key:"buttons",fn:function(){return[e("k-button-group",[e("k-button",{staticClass:"k-file-view-options",attrs:{link:t.preview.url,responsive:!0,title:t.$t("open"),icon:"open",size:"sm",target:"_blank",variant:"filled"}}),e("k-button",{staticClass:"k-file-view-options",attrs:{disabled:t.isLocked,dropdown:!0,title:t.$t("settings"),icon:"cog",size:"sm",variant:"filled"},on:{click:function(e){return t.$refs.settings.toggle()}}}),e("k-dropdown-content",{ref:"settings",attrs:{options:t.$dropdown(t.id),"align-x":"end"},on:{action:t.action}}),e("k-languages-dropdown")],1),e("k-form-buttons",{attrs:{lock:t.lock}})]},proxy:!0}])},[t._v(" "+t._s(t.model.filename)+" ")]),e("k-file-preview",t._b({attrs:{focus:t.focus},on:{focus:t.setFocus}},"k-file-preview",t.preview,!1)),e("k-model-tabs",{attrs:{tab:t.tab.name,tabs:t.tabs}}),e("k-sections",{attrs:{blueprint:t.blueprint,empty:t.$t("file.blueprint",{blueprint:t.$esc(t.blueprint)}),lock:t.lock,parent:t.id,tab:t.tab}})],1)}),[],!1,null,null,null,null).exports;const cr=at({props:{details:{default:()=>[],type:Array},focus:{type:Object},focusable:Boolean,image:{default:()=>({}),type:Object},url:String},computed:{options(){return[{icon:"open",text:this.$t("open"),link:this.url,target:"_blank"},{icon:"cancel",text:this.$t("file.focus.reset"),click:()=>this.$refs.focus.reset(),when:this.focusable&&this.focus},{icon:"preview",text:this.$t("file.focus.placeholder"),click:()=>this.$refs.focus.set(),when:this.focusable&&!this.focus}]}},methods:{setFocus(t){if(!t)return this.$emit("focus",null);this.$emit("focus",{x:t.x.toFixed(1),y:t.y.toFixed(1)})}}},(function(){var t=this,e=t._self._c;return e("div",{staticClass:"k-file-preview",attrs:{"data-has-focus":Boolean(t.focus)}},[e("div",{staticClass:"k-file-preview-thumb-column"},[e("div",{staticClass:"k-file-preview-thumb"},[t.image.src?[e("k-coords-input",{attrs:{disabled:!t.focusable,value:t.focus},on:{input:function(e){return t.setFocus(e)}}},[e("img",t._b({on:{dragstart:function(t){t.preventDefault()}}},"img",t.image,!1))]),e("k-button",{staticStyle:{color:"var(--color-gray-500)"},attrs:{icon:"dots",size:"xs"},on:{click:function(e){return t.$refs.dropdown.toggle()}}}),e("k-dropdown-content",{ref:"dropdown",attrs:{options:t.options,theme:"light"}})]:e("k-icon",{staticClass:"k-item-icon",attrs:{color:t.$helper.color(t.image.color),type:t.image.icon}})],2)]),e("div",{staticClass:"k-file-preview-details"},[e("dl",[t._l(t.details,(function(i){return e("div",{key:i.title},[e("dt",[t._v(t._s(i.title))]),e("dd",[i.link?e("k-link",{attrs:{to:i.link,tabindex:"-1",target:"_blank"}},[t._v(" /"+t._s(i.text)+" ")]):[t._v(" "+t._s(i.text)+" ")]],2)])})),t.image.src?e("div",{staticClass:"k-file-preview-focus-info"},[e("dt",[t._v(t._s(t.$t("file.focus.title")))]),e("dd",[t.focusable?e("k-file-focus-button",{ref:"focus",attrs:{focus:t.focus},on:{set:t.setFocus}}):t.focus?[t._v(" "+t._s(t.focus.x)+"% "+t._s(t.focus.y)+"% ")]:[t._v("–")]],2)]):t._e()],2)])])}),[],!1,null,null,null,null).exports;const dr=at({props:{focus:Object},methods:{set(){this.$emit("set",{x:50,y:50})},reset(){this.$emit("set",void 0)}}},(function(){var t=this;return(0,t._self._c)("k-button",{attrs:{icon:t.focus?"cancel-small":"preview",title:t.focus?t.$t("file.focus.reset"):void 0,size:"xs",variant:"filled"},on:{click:function(e){t.focus?t.reset():t.set()}}},[t.focus?[t._v(t._s(t.focus.x)+"% "+t._s(t.focus.y)+"%")]:[t._v(t._s(t.$t("file.focus.placeholder")))]],2)}),[],!1,null,null,null,null).exports;const pr=at({props:{languages:{type:Array,default:()=>[]},variables:{type:Boolean,default:!0}},computed:{languagesCollection(){return this.languages.map((t=>({...t,image:{back:"black",color:"gray",icon:"translate"},link:()=>{if(!1===this.variables)return null;this.$go(`languages/${t.id}`)},options:[{icon:"edit",text:this.$t("edit"),disabled:!1===this.variables,click:()=>this.$go(`languages/${t.id}`)},{icon:"cog",text:this.$t("settings"),click:()=>this.$dialog(`languages/${t.id}/update`)},{icon:"trash",text:this.$t("delete"),disabled:!1===t.deletable,click:()=>this.$dialog(`languages/${t.id}/delete`)}]})))},primaryLanguage(){return this.languagesCollection.filter((t=>t.default))},secondaryLanguages(){return this.languagesCollection.filter((t=>!1===t.default))}}},(function(){var t=this,e=t._self._c;return e("k-panel-inside",{staticClass:"k-languages-view"},[e("k-header",[t._v(" "+t._s(t.$t("view.languages"))+" "),e("k-button-group",{attrs:{slot:"buttons"},slot:"buttons"},[e("k-button",{attrs:{text:t.$t("language.create"),icon:"add",size:"sm",variant:"filled"},on:{click:function(e){return t.$dialog("languages/create")}}})],1)],1),t.languages.length>0?[e("k-section",{attrs:{headline:t.$t("languages.default")}},[e("k-collection",{attrs:{items:t.primaryLanguage}})],1),e("k-section",{attrs:{headline:t.$t("languages.secondary")}},[t.secondaryLanguages.length?e("k-collection",{attrs:{items:t.secondaryLanguages}}):e("k-empty",{attrs:{icon:"translate"},on:{click:function(e){return t.$dialog("languages/create")}}},[t._v(" "+t._s(t.$t("languages.secondary.empty"))+" ")])],1)]:0===t.languages.length?[e("k-empty",{attrs:{icon:"translate"},on:{click:function(e){return t.$dialog("languages/create")}}},[t._v(" "+t._s(t.$t("languages.empty"))+" ")])]:t._e()],2)}),[],!1,null,null,null,null).exports;const hr=at({props:{code:String,deletable:Boolean,direction:String,id:String,info:Array,next:Object,name:String,prev:Object,translations:Array,url:String},methods:{createTranslation(){this.$dialog(`languages/${this.id}/translations/create`)},option(t,e){this.$dialog(`languages/${this.id}/translations/${window.btoa(encodeURIComponent(e.key))}/${t}`)},remove(){this.$dialog(`languages/${this.id}/delete`)},update(t){this.$dialog(`languages/${this.id}/update`,{on:{ready:()=>{this.$panel.dialog.focus(t)}}})},updateTranslation({row:t}){this.$dialog(`languages/${this.id}/translations/${window.btoa(encodeURIComponent(t.key))}/update`)}}},(function(){var t=this,e=t._self._c;return e("k-panel-inside",{staticClass:"k-language-view",scopedSlots:t._u([{key:"topbar",fn:function(){return[e("k-prev-next",{attrs:{prev:t.prev,next:t.next}})]},proxy:!0}])},[e("k-header",{attrs:{editable:!0},on:{edit:function(e){return t.update()}}},[t._v(" "+t._s(t.name)+" "),e("k-button-group",{attrs:{slot:"buttons"},slot:"buttons"},[e("k-button",{attrs:{link:t.url,title:t.$t("open"),icon:"open",size:"sm",target:"_blank",variant:"filled"}}),e("k-button",{attrs:{title:t.$t("settings"),icon:"cog",size:"sm",variant:"filled"},on:{click:function(e){return t.update()}}}),t.deletable?e("k-button",{attrs:{title:t.$t("delete"),icon:"trash",size:"sm",variant:"filled"},on:{click:function(e){return t.remove()}}}):t._e()],1)],1),e("k-section",{attrs:{headline:t.$t("language.settings")}},[e("k-stats",{attrs:{reports:t.info,size:"small"}})],1),e("k-section",{attrs:{buttons:[{click:t.createTranslation,icon:"add",text:t.$t("add")}],headline:t.$t("language.variables")}},[t.translations.length?[e("k-table",{attrs:{columns:{key:{label:t.$t("language.variable.key"),mobile:!0,width:"1/4"},value:{label:t.$t("language.variable.value"),mobile:!0}},rows:t.translations},on:{cell:t.updateTranslation,option:t.option}})]:[e("k-empty",{attrs:{icon:"translate"},on:{click:t.createTranslation}},[t._v(" "+t._s(t.$t("language.variables.empty"))+" ")])]],2)],1)}),[],!1,null,null,null,null).exports;const mr=at({components:{"k-login-plugin":window.panel.plugins.login??Ye},props:{methods:Array,pending:Object},data:()=>({issue:""}),computed:{form(){return this.pending.email?"code":"login"},viewClass(){return"code"===this.form?"k-login-code-view":"k-login-view"}},created(){this.$store.dispatch("content/clear")},methods:{async onError(t){null!==t?(!0===t.details.challengeDestroyed&&await this.$reload({globals:["$system"]}),this.issue=t.message):this.issue=null}}},(function(){var t=this,e=t._self._c;return e("k-panel-outside",{class:t.viewClass},[e("div",{staticClass:"k-dialog k-login-dialog"},[e("h1",{staticClass:"sr-only"},[t._v(" "+t._s(t.$t("login"))+" ")]),t.issue?e("k-login-alert",{nativeOn:{click:function(e){t.issue=null}}},[t._v(" "+t._s(t.issue)+" ")]):t._e(),e("k-dialog-body",["code"===t.form?e("k-login-code",t._b({on:{error:t.onError}},"k-login-code",t.$props,!1)):e("k-login-plugin",{attrs:{methods:t.methods},on:{error:t.onError}})],1)],1)])}),[],!1,null,null,null,null).exports;const fr=at({props:{isInstallable:Boolean,isInstalled:Boolean,isOk:Boolean,requirements:Object,translations:Array},data(){return{user:{name:"",email:"",language:this.$panel.translation.code,password:"",role:"admin"}}},computed:{fields(){return{email:{label:this.$t("email"),type:"email",link:!1,autofocus:!0,required:!0},password:{label:this.$t("password"),type:"password",placeholder:this.$t("password")+" …",required:!0},language:{label:this.$t("language"),type:"select",options:this.translations,icon:"translate",empty:!1,required:!0}}},isReady(){return this.isOk&&this.isInstallable},isComplete(){return this.isOk&&this.isInstalled}},methods:{async install(){try{await this.$api.system.install(this.user),await this.$reload({globals:["$system","$translation"]}),this.$panel.notification.success({message:this.$t("welcome")+"!",icon:"smile"})}catch(t){this.$panel.error(t)}}}},(function(){var t=this,e=t._self._c;return e("k-panel-outside",{staticClass:"k-installation-view"},[e("div",{staticClass:"k-dialog k-installation-dialog"},[e("k-dialog-body",[t.isComplete?e("k-text",[e("k-headline",[t._v(t._s(t.$t("installation.completed")))]),e("k-link",{attrs:{to:"/login"}},[t._v(" "+t._s(t.$t("login"))+" ")])],1):t.isReady?e("form",{on:{submit:function(e){return e.preventDefault(),t.install.apply(null,arguments)}}},[e("h1",{staticClass:"sr-only"},[t._v(" "+t._s(t.$t("installation"))+" ")]),e("k-fieldset",{attrs:{fields:t.fields,novalidate:!0,value:t.user},on:{input:function(e){t.user=e}}}),e("k-button",{attrs:{text:t.$t("install"),icon:"check",size:"lg",theme:"positive",type:"submit",variant:"filled"}})],1):e("div",[e("k-headline",[t._v(" "+t._s(t.$t("installation.issues.headline"))+" ")]),e("ul",{staticClass:"k-installation-issues"},[!1===t.isInstallable?e("li",[e("k-icon",{attrs:{type:"alert"}}),e("span",{domProps:{innerHTML:t._s(t.$t("installation.disabled"))}})],1):t._e(),!1===t.requirements.php?e("li",[e("k-icon",{attrs:{type:"alert"}}),e("span",{domProps:{innerHTML:t._s(t.$t("installation.issues.php"))}})],1):t._e(),!1===t.requirements.server?e("li",[e("k-icon",{attrs:{type:"alert"}}),e("span",{domProps:{innerHTML:t._s(t.$t("installation.issues.server"))}})],1):t._e(),!1===t.requirements.mbstring?e("li",[e("k-icon",{attrs:{type:"alert"}}),e("span",{domProps:{innerHTML:t._s(t.$t("installation.issues.mbstring"))}})],1):t._e(),!1===t.requirements.curl?e("li",[e("k-icon",{attrs:{type:"alert"}}),e("span",{domProps:{innerHTML:t._s(t.$t("installation.issues.curl"))}})],1):t._e(),!1===t.requirements.accounts?e("li",[e("k-icon",{attrs:{type:"alert"}}),e("span",{domProps:{innerHTML:t._s(t.$t("installation.issues.accounts"))}})],1):t._e(),!1===t.requirements.content?e("li",[e("k-icon",{attrs:{type:"alert"}}),e("span",{domProps:{innerHTML:t._s(t.$t("installation.issues.content"))}})],1):t._e(),!1===t.requirements.media?e("li",[e("k-icon",{attrs:{type:"alert"}}),e("span",{domProps:{innerHTML:t._s(t.$t("installation.issues.media"))}})],1):t._e(),!1===t.requirements.sessions?e("li",[e("k-icon",{attrs:{type:"alert"}}),e("span",{domProps:{innerHTML:t._s(t.$t("installation.issues.sessions"))}})],1):t._e()]),e("k-button",{attrs:{text:t.$t("retry"),icon:"refresh",size:"lg",theme:"positive",variant:"filled"},on:{click:t.$reload}})],1)],1)],1)])}),[],!1,null,null,null,null).exports;const gr=at({data:()=>({isLoading:!1,values:{password:null,passwordConfirmation:null}}),computed:{fields(){return{password:{autofocus:!0,label:this.$t("user.changePassword.new"),icon:"key",type:"password",width:"1/2"},passwordConfirmation:{label:this.$t("user.changePassword.new.confirm"),icon:"key",type:"password",width:"1/2"}}}},mounted(){this.$panel.title=this.$t("view.resetPassword")},methods:{async submit(){if(!this.values.password||this.values.password.length<8)return this.$panel.notification.error(this.$t("error.user.password.invalid"));if(this.values.password!==this.values.passwordConfirmation)return this.$panel.notification.error(this.$t("error.user.password.notSame"));this.isLoading=!0;try{await this.$api.users.changePassword(this.$panel.user.id,this.values.password),this.$panel.notification.success(),this.$go("/")}catch(t){this.$panel.notification.error(t)}finally{this.isLoading=!1}}}},(function(){var t=this,e=t._self._c;return e("k-panel-inside",{staticClass:"k-password-reset-view"},[e("form",{on:{submit:function(e){return e.preventDefault(),t.submit.apply(null,arguments)}}},[e("k-header",{scopedSlots:t._u([{key:"buttons",fn:function(){return[e("k-button",{attrs:{icon:"check",theme:"notice",type:"submit",variant:"filled",size:"sm"}},[t._v(" "+t._s(t.$t("change"))+" "),t.isLoading?[t._v(" … ")]:t._e()],2)]},proxy:!0}])},[t._v(" "+t._s(t.$t("view.resetPassword"))+" ")]),e("k-user-info",{attrs:{user:t.$panel.user}}),e("k-fieldset",{attrs:{fields:t.fields,value:t.values}})],1)])}),[],!1,null,null,null,null).exports;const kr=at({props:{user:[Object,String]}},(function(){var t=this,e=t._self._c;return e("div",{staticClass:"k-user-info"},[t.user.avatar?e("k-image-frame",{attrs:{cover:!0,src:t.user.avatar.url,ratio:"1/1"}}):e("k-icon-frame",{attrs:{color:"white",back:"black",icon:"user"}}),t._v(" "+t._s(t.user.name??t.user.email??t.user)+" ")],1)}),[],!1,null,null,null,null).exports;const br=at({extends:ar,props:{status:Object},computed:{protectedFields:()=>["title"],statusBtn(){return{...this.$helper.page.status.call(this,this.model.status,!this.permissions.changeStatus||this.isLocked),responsive:!0,size:"sm",text:this.status.label,variant:"filled"}}}},(function(){var t=this,e=t._self._c;return e("k-panel-inside",{staticClass:"k-page-view",attrs:{"data-has-tabs":t.tabs.length>1,"data-id":t.model.id,"data-locked":t.isLocked,"data-template":t.blueprint},scopedSlots:t._u([{key:"topbar",fn:function(){return[t.model.id?e("k-prev-next",{attrs:{prev:t.prev,next:t.next}}):t._e()]},proxy:!0}])},[e("k-header",{staticClass:"k-page-view-header",attrs:{editable:t.permissions.changeTitle&&!t.isLocked},on:{edit:function(e){return t.$dialog(t.id+"/changeTitle")}},scopedSlots:t._u([{key:"buttons",fn:function(){return[e("k-button-group",[t.permissions.preview&&t.model.previewUrl?e("k-button",{staticClass:"k-page-view-preview",attrs:{link:t.model.previewUrl,title:t.$t("open"),icon:"open",target:"_blank",variant:"filled",size:"sm"}}):t._e(),e("k-button",{staticClass:"k-page-view-options",attrs:{disabled:!0===t.isLocked,dropdown:!0,title:t.$t("settings"),icon:"cog",variant:"filled",size:"sm"},on:{click:function(e){return t.$refs.settings.toggle()}}}),e("k-dropdown-content",{ref:"settings",attrs:{options:t.$dropdown(t.id),"align-x":"end"}}),e("k-languages-dropdown"),t.status?e("k-button",t._b({staticClass:"k-page-view-status",attrs:{variant:"filled"},on:{click:function(e){return t.$dialog(t.id+"/changeStatus")}}},"k-button",t.statusBtn,!1)):t._e()],1),e("k-form-buttons",{attrs:{lock:t.lock}})]},proxy:!0}])},[t._v(" "+t._s(t.model.title)+" ")]),e("k-model-tabs",{attrs:{tab:t.tab.name,tabs:t.tabs}}),e("k-sections",{attrs:{blueprint:t.blueprint,empty:t.$t("page.blueprint",{blueprint:t.$esc(t.blueprint)}),lock:t.lock,parent:t.id,tab:t.tab}})],1)}),[],!1,null,null,null,null).exports;const vr=at({extends:ar,computed:{protectedFields:()=>["title"]}},(function(){var t=this,e=t._self._c;return e("k-panel-inside",{staticClass:"k-site-view",attrs:{"data-has-tabs":t.tabs.length>1,"data-locked":t.isLocked,"data-id":"/","data-template":"site"}},[e("k-header",{staticClass:"k-site-view-header",attrs:{editable:t.permissions.changeTitle&&!t.isLocked},on:{edit:function(e){return t.$dialog("site/changeTitle")}},scopedSlots:t._u([{key:"buttons",fn:function(){return[e("k-button-group",[e("k-button",{staticClass:"k-site-view-preview",attrs:{link:t.model.previewUrl,title:t.$t("open"),icon:"open",target:"_blank",variant:"filled",size:"sm"}}),e("k-languages-dropdown")],1),e("k-form-buttons",{attrs:{lock:t.lock}})]},proxy:!0}])},[t._v(" "+t._s(t.model.title)+" ")]),e("k-model-tabs",{attrs:{tab:t.tab.name,tabs:t.tabs}}),e("k-sections",{attrs:{blueprint:t.blueprint,empty:t.$t("site.blueprint"),lock:t.lock,tab:t.tab,parent:"site"},on:{submit:function(e){return t.$emit("submit",e)}}})],1)}),[],!1,null,null,null,null).exports;const yr=at({components:{Plugins:at({props:{plugins:Array}},(function(){var t=this,e=t._self._c;return t.plugins.length?e("k-section",{attrs:{headline:t.$t("plugins"),link:"https://getkirby.com/plugins"}},[e("k-table",{attrs:{index:!1,columns:{name:{label:t.$t("name"),type:"url",mobile:!0},author:{label:t.$t("author")},license:{label:t.$t("license")},version:{label:t.$t("version"),type:"update-status",mobile:!0,width:"10rem"}},rows:t.plugins}})],1):t._e()}),[],!1,null,null,null,null).exports,Security:at({props:{exceptions:Array,security:Array,urls:Object},data(){return{issues:bt(this.security)}},async created(){console.info("Running system health checks for the Panel system view; failed requests in the following console output are expected behavior.");const t=(Promise.allSettled??Promise.all).bind(Promise),e=Object.entries(this.urls).map(this.check);await t(e),console.info(`System health checks ended. ${this.issues.length-this.security.length} issues with accessible files/folders found (see the security list in the system view).`)},methods:{async check([t,e]){if(!e)return;const{status:i}=await fetch(e,{cache:"no-store"});i<400&&this.issues.push({id:t,text:this.$t("system.issues."+t),link:"https://getkirby.com/security/"+t,icon:"folder"})},retry(){this.$go(window.location.href)}}},(function(){var t=this,e=t._self._c;return t.issues.length?e("k-section",{attrs:{headline:t.$t("security"),buttons:[{title:t.$t("retry"),icon:"refresh",click:t.retry}]}},[e("k-items",{attrs:{items:t.issues.map((t=>({image:{back:"var(--color-red-200)",icon:t.icon??"alert",color:"var(--color-red)"},target:"_blank",...t})))}})],1):t._e()}),[],!1,null,null,null,null).exports},props:{environment:Array,exceptions:Array,plugins:Array,security:Array,urls:Object},created(){this.exceptions.length>0&&(console.info("The following errors occurred during the update check of Kirby and/or plugins:"),this.exceptions.map((t=>console.warn(t))),console.info("End of errors from the update check."))}},(function(){var t=this,e=t._self._c;return e("k-panel-inside",{staticClass:"k-system-view"},[e("k-header",[t._v(" "+t._s(t.$t("view.system"))+" ")]),e("k-section",{attrs:{headline:t.$t("environment")}},[e("k-stats",{staticClass:"k-system-info",attrs:{reports:t.environment,size:"medium"}})],1),e("security",{attrs:{security:t.security,urls:t.urls}}),e("plugins",{attrs:{plugins:t.plugins}})],1)}),[],!1,null,null,null,null).exports;const $r=at({props:{value:[String,Object]}},(function(){var t=this,e=t._self._c;return e("div",{staticClass:"k-table-update-status-cell"},["string"==typeof t.value?e("span",{staticClass:"k-table-update-status-cell-version"},[t._v(" "+t._s(t.value)+" ")]):[e("k-button",{staticClass:"k-table-update-status-cell-button",attrs:{dropdown:!0,icon:t.value.icon,href:t.value.url,text:t.value.currentVersion,theme:t.value.theme,size:"xs",variant:"filled"},on:{click:function(e){return e.stopPropagation(),t.$refs.dropdown.toggle()}}}),e("k-dropdown-content",{ref:"dropdown",attrs:{"align-x":"end"}},[e("dl",{staticClass:"k-plugin-info"},[e("dt",[t._v(t._s(t.$t("plugin")))]),e("dd",[t._v(t._s(t.value.pluginName))]),e("dt",[t._v(t._s(t.$t("version.current")))]),e("dd",[t._v(t._s(t.value.currentVersion))]),e("dt",[t._v(t._s(t.$t("version.latest")))]),e("dd",[t._v(t._s(t.value.latestVersion))]),e("dt",[t._v(t._s(t.$t("system.updateStatus")))]),e("dd",{attrs:{"data-theme":t.value.theme}},[t._v(t._s(t.value.label))])]),t.value.url?[e("hr"),e("k-button",{attrs:{icon:"open",link:t.value.url}},[t._v(" "+t._s(t.$t("versionInformation"))+" ")])]:t._e()],2)]],2)}),[],!1,null,null,null,null).exports;const wr=at({extends:ar},(function(){var t=this,e=t._self._c;return e("k-panel-inside",{staticClass:"k-user-view",attrs:{"data-has-tabs":t.tabs.length>1,"data-id":t.model.id,"data-locked":t.isLocked,"data-template":t.blueprint},scopedSlots:t._u([{key:"topbar",fn:function(){return[t.model.account?e("k-prev-next",{attrs:{prev:t.prev,next:t.next}}):t._e()]},proxy:!0}])},[e("k-header",{staticClass:"k-user-view-header",attrs:{editable:t.permissions.changeName&&!t.isLocked},on:{edit:function(e){return t.$dialog(t.id+"/changeName")}},scopedSlots:t._u([{key:"buttons",fn:function(){return[e("k-button-group",[e("k-button",{staticClass:"k-user-view-options",attrs:{disabled:t.isLocked,dropdown:!0,title:t.$t("settings"),icon:"cog",size:"sm",variant:"filled"},on:{click:function(e){return t.$refs.settings.toggle()}}}),e("k-dropdown-content",{ref:"settings",attrs:{"align-x":"end",options:t.$dropdown(t.id)}}),e("k-languages-dropdown")],1),e("k-form-buttons",{attrs:{lock:t.lock}})]},proxy:!0}])},[t.model.name&&0!==t.model.name.length?[t._v(" "+t._s(t.model.name)+" ")]:e("span",{staticClass:"k-user-name-placeholder"},[t._v(" "+t._s(t.$t("name"))+" … ")])],2),e("k-user-profile",{attrs:{"is-locked":t.isLocked,model:t.model,permissions:t.permissions}}),e("k-model-tabs",{attrs:{tab:t.tab.name,tabs:t.tabs}}),e("k-sections",{attrs:{blueprint:t.blueprint,empty:t.$t("user.blueprint",{blueprint:t.$esc(t.blueprint)}),lock:t.lock,parent:t.id,tab:t.tab}})],1)}),[],!1,null,null,null,null).exports;const xr=at({extends:wr,prevnext:!1},null,null,!1,null,null,null,null).exports;const _r=at({props:{model:Object},methods:{async deleteAvatar(){await this.$api.users.deleteAvatar(this.model.id),this.$panel.notification.success(),this.$reload()},uploadAvatar(){this.$panel.upload.pick({url:this.$panel.urls.api+"/"+this.model.link+"/avatar",accept:"image/*",immediate:!0,multiple:!1})}}},(function(){var t=this,e=t._self._c;return e("div",[e("k-button",{staticClass:"k-user-view-image",attrs:{title:t.$t("avatar"),variant:"filled"},on:{click:function(e){t.model.avatar?t.$refs.avatar.toggle():t.uploadAvatar()}}},[t.model.avatar?e("k-image-frame",{attrs:{cover:!0,src:t.model.avatar}}):e("k-icon-frame",{attrs:{icon:"user"}})],1),t.model.avatar?e("k-dropdown-content",{ref:"avatar",attrs:{options:[{icon:"upload",text:t.$t("change"),click:t.uploadAvatar},{icon:"trash",text:t.$t("delete"),click:t.deleteAvatar}]}}):t._e()],1)}),[],!1,null,null,null,null).exports;const Sr=at({props:{isLocked:Boolean,model:Object,permissions:Object}},(function(){var t=this,e=t._self._c;return e("div",{staticClass:"k-user-profile"},[e("k-user-avatar",{attrs:{model:t.model,"aria-disabled":t.isLocked}}),e("k-button-group",{attrs:{buttons:[{icon:"email",text:`${t.model.email}`,title:`${t.$t("email")}: ${t.model.email}`,disabled:!t.permissions.changeEmail||t.isLocked,click:()=>t.$dialog(t.model.link+"/changeEmail")},{icon:"bolt",text:`${t.model.role}`,title:`${t.$t("role")}: ${t.model.role}`,disabled:!t.permissions.changeRole||t.isLocked,click:()=>t.$dialog(t.model.link+"/changeRole")},{icon:"translate",text:`${t.model.language}`,title:`${t.$t("language")}: ${t.model.language}`,disabled:!t.permissions.changeLanguage||t.isLocked,click:()=>t.$dialog(t.model.link+"/changeLanguage")}]}})],1)}),[],!1,null,null,null,null).exports;const Cr=at({props:{role:Object,roles:Array,search:String,title:String,users:Object},computed:{empty(){return{icon:"users",text:this.$t("role.empty")}},items(){return this.users.data.map((t=>(t.options=this.$dropdown(t.link),t)))},tabs(){const t=[{name:"all",label:this.$t("role.all"),link:"/users"}];for(const e of this.roles)t.push({name:e.id,label:e.title,link:"/users?role="+e.id});return t}},methods:{create(){var t;this.$dialog("users/create",{query:{role:null==(t=this.role)?void 0:t.id}})},paginate(t){this.$reload({query:{page:t.page}})}}},(function(){var t,e=this,i=e._self._c;return i("k-panel-inside",{staticClass:"k-users-view"},[i("k-header",{staticClass:"k-users-view-header",scopedSlots:e._u([{key:"buttons",fn:function(){return[i("k-button",{attrs:{disabled:!e.$panel.permissions.users.create,text:e.$t("user.create"),icon:"add",size:"sm",variant:"filled"},on:{click:e.create}})]},proxy:!0}])},[e._v(" "+e._s(e.$t("view.users"))+" ")]),i("k-tabs",{attrs:{tab:(null==(t=e.role)?void 0:t.id)??"all",tabs:e.tabs}}),i("k-collection",{attrs:{empty:e.empty,items:e.items,pagination:e.users.pagination},on:{paginate:e.paginate}})],1)}),[],!1,null,null,null,null).exports;const Or=at({props:{id:String},created(){window.panel.deprecated(" will be removed in a future version.")}},(function(){var t=this._self._c;return t("k-panel-inside",[t("k-"+this.id+"-plugin-view",{tag:"component"})],1)}),[],!1,null,null,null,null).exports,Ar={install(t){t.component("k-error-view",lr),t.component("k-search-view",rr),t.component("k-file-view",ur),t.component("k-file-preview",cr),t.component("k-file-focus-button",dr),t.component("k-languages-view",pr),t.component("k-language-view",hr),t.component("k-login-view",mr),t.component("k-installation-view",fr),t.component("k-reset-password-view",gr),t.component("k-user-info",kr),t.component("k-page-view",br),t.component("k-site-view",vr),t.component("k-system-view",yr),t.component("k-table-update-status-cell",$r),t.component("k-account-view",xr),t.component("k-user-avatar",_r),t.component("k-user-profile",Sr),t.component("k-user-view",wr),t.component("k-users-view",Cr),t.component("k-plugin-view",Or)}},Mr={install(t){t.use(gt),t.use(ne),t.use(we),t.use(Te),t.use(qo),t.use(Fo),t.use(cl),t.use($l),t.use(Pl),t.use(Ql),t.use(Wl),t.use(Ql),t.use(or),t.use(Ar),t.use(L)}},jr={install(t){window.onunhandledrejection=t=>{t.preventDefault(),window.panel.error(t.reason)},t.config.errorHandler=window.panel.error.bind(window.panel)}},Ir=(t={})=>{var e=t.desc?-1:1,i=-e,n=/^0/,s=/\s+/g,o=/^\s+|\s+$/g,l=/[^\x00-\x80]/,r=/^0x[0-9a-f]+$/i,a=/(0x[\da-fA-F]+|(^[\+\-]?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?(?=\D|\s|$))|\d+)/g,u=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,c=t.insensitive?function(t){return function(t){if(t.toLocaleLowerCase)return t.toLocaleLowerCase();return t.toLowerCase()}(""+t).replace(o,"")}:function(t){return(""+t).replace(o,"")};function d(t){return t.replace(a,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0")}function p(t,e){return(!t.match(n)||1===e)&&parseFloat(t)||t.replace(s," ").replace(o,"")||0}return function(t,n){var s=c(t),o=c(n);if(!s&&!o)return 0;if(!s&&o)return i;if(s&&!o)return e;var a=d(s),h=d(o),m=parseInt(s.match(r),16)||1!==a.length&&Date.parse(s),f=parseInt(o.match(r),16)||m&&o.match(u)&&Date.parse(o)||null;if(f){if(mf)return e}for(var g=a.length,k=h.length,b=0,v=Math.max(g,k);b0)return e;if(w<0)return i;if(b===v-1)return 0}else{if(y<$)return i;if(y>$)return e}}return 0}};RegExp.escape=function(t){return t.replace(new RegExp("[-/\\\\^$*+?.()[\\]{}]","gu"),"\\$&")},Array.fromObject=function(t){return Array.isArray(t)?t:Object.values(t??{})};Array.prototype.sortBy=function(t){const e=t.split(" "),i=e[0],n=e[1]??"asc",s=Ir({desc:"desc"===n,insensitive:!0});return this.sort(((t,e)=>{const n=String(t[i]??""),o=String(e[i]??"");return s(n,o)}))},Array.prototype.split=function(t){return this.reduce(((e,i)=>(i===t?e.push([]):e[e.length-1].push(i),e)),[[]])},Array.wrap=function(t){return Array.isArray(t)?t:[t]};const Tr={search:(t,e,i={})=>{if((e??"").length<=(i.min??0))return t;const n=new RegExp(RegExp.escape(e),"ig"),s=i.field??"text",o=t.filter((t=>!!t[s]&&null!==t[s].match(n)));return i.limit?o.slice(0,i.limit):o}};const Er={read:function(t,e=!1){if(!t)return null;if("string"==typeof t)return t;if(t instanceof ClipboardEvent){if(t.preventDefault(),!0===e)return t.clipboardData.getData("text/plain");const i=t.clipboardData.getData("text/html")||t.clipboardData.getData("text/plain")||null;if(i)return i.replace(/\u00a0/g," ")}return null},write:function(t,e){if("string"!=typeof t&&(t=JSON.stringify(t,null,2)),e&&e instanceof ClipboardEvent)return e.preventDefault(),e.clipboardData.setData("text/plain",t),!0;const i=document.createElement("textarea");if(i.value=t,document.body.append(i),navigator.userAgent.match(/ipad|ipod|iphone/i)){i.contentEditable=!0,i.readOnly=!0;const t=document.createRange();t.selectNodeContents(i);const e=window.getSelection();e.removeAllRanges(),e.addRange(t),i.setSelectionRange(0,999999)}else i.select();return document.execCommand("copy"),i.remove(),!0}};function Lr(t){if("string"==typeof t){if("pattern"===(t=t.toLowerCase()))return"var(--pattern)";if(!1===t.startsWith("#")&&!1===t.startsWith("var(")){const e="--color-"+t;if(window.getComputedStyle(document.documentElement).getPropertyValue(e))return`var(${e})`}return t}}function Dr(t,e=!1){if(!t.match("youtu"))return!1;let i=null;try{i=new URL(t)}catch(d){return!1}const n=i.pathname.split("/").filter((t=>""!==t)),s=n[0],o=n[1],l="https://"+(!0===e?"www.youtube-nocookie.com":i.host)+"/embed",r=t=>!!t&&null!==t.match(/^[a-zA-Z0-9_-]+$/);let a=i.searchParams,u=null;switch(n.join("/")){case"embed/videoseries":case"playlist":r(a.get("list"))&&(u=l+"/videoseries");break;case"watch":r(a.get("v"))&&(u=l+"/"+a.get("v"),a.has("t")&&a.set("start",a.get("t")),a.delete("v"),a.delete("t"));break;default:i.host.includes("youtu.be")&&r(s)?(u=!0===e?"https://www.youtube-nocookie.com/embed/"+s:"https://www.youtube.com/embed/"+s,a.has("t")&&a.set("start",a.get("t")),a.delete("t")):["embed","shorts"].includes(s)&&r(o)&&(u=l+"/"+o)}if(!u)return!1;const c=a.toString();return c.length&&(u+="?"+c),u}function Br(t,e=!1){let i=null;try{i=new URL(t)}catch(a){return!1}const n=i.pathname.split("/").filter((t=>""!==t));let s=i.searchParams,o=null;switch(!0===e&&s.append("dnt",1),i.host){case"vimeo.com":case"www.vimeo.com":o=n[0];break;case"player.vimeo.com":o=n[1]}if(!o||!o.match(/^[0-9]*$/))return!1;let l="https://player.vimeo.com/video/"+o;const r=s.toString();return r.length&&(l+="?"+r),l}const qr={youtube:Dr,vimeo:Br,video:function(t,e=!1){return!0===t.includes("youtu")?Dr(t,e):!0===t.includes("vimeo")&&Br(t,e)}};function Pr(t){if(void 0!==t.default)return bt(t.default);const e=window.panel.app.$options.components[`k-${t.type}-field`],i=null==e?void 0:e.options.props.value;if(void 0===i)return;const n=null==i?void 0:i.default;return"function"==typeof n?n():void 0!==n?n:null}const Nr={defaultValue:Pr,form:function(t){const e={};for(const i in t){const n=Pr(t[i]);void 0!==n&&(e[i]=n)}return e},isVisible:function(t,e){if("hidden"===t.type||!0===t.hidden)return!1;if(!t.when)return!0;for(const i in t.when){const n=e[i.toLowerCase()],s=t.when[i];if((void 0!==n||""!==s&&s!==[])&&n!==s)return!1}return!0},subfields:function(t,e){let i={};for(const n in e){const s=e[n];s.section=t.name,t.endpoints&&(s.endpoints={field:t.endpoints.field+"+"+n,section:t.endpoints.section,model:t.endpoints.model}),i[n]=s}return i}},zr=t=>t.split(".").slice(-1).join(""),Fr=t=>t.split(".").slice(0,-1).join("."),Rr=t=>Intl.NumberFormat("en",{notation:"compact",style:"unit",unit:"byte",unitDisplay:"narrow"}).format(t),Yr={extension:zr,name:Fr,niceSize:Rr};function Ur(t,e){if("string"==typeof t&&(t=document.querySelector(t)),!t)return!1;if(!e&&t.contains(document.activeElement)&&t!==document.activeElement)return!1;const i=["[autofocus]","[data-autofocus]","input","textarea","select","[contenteditable=true]","[type=submit]","button"];e&&i.unshift(`[name="${e}"]`);const n=function(t,e){for(const i of e){const e=t.querySelector(i);if(!0===Hr(e))return e}return null}(t,i);return n?(n.focus(),n):!0===Hr(t)&&(t.focus(),t)}function Hr(t){return!!t&&(!t.matches("[disabled], [aria-disabled], input[type=hidden]")&&(!t.closest("[aria-disabled]")&&!t.closest("[disabled]")&&"function"==typeof t.focus))}const Vr=t=>"function"==typeof window.Vue.options.components[t],Kr=t=>!!t.dataTransfer&&(!!t.dataTransfer.types&&(!0===t.dataTransfer.types.includes("Files")&&!1===t.dataTransfer.types.includes("text/plain")));const Wr={metaKey:function(){return window.navigator.userAgent.indexOf("Mac")>-1?"cmd":"ctrl"}};const Jr={status:function(t,e=!1){const i={class:"k-status-icon",icon:"status-"+t,title:window.panel.$t("page.status")+": "+window.panel.$t("page.status."+t),disabled:e,size:"xs",style:"--icon-size: 15px"};return e&&(i.title+=` (${window.panel.$t("disabled")})`),i.theme="draft"===t?"negative":"unlisted"===t?"info":"positive",i}},Gr=(t="3/2",e="100%",i=!0)=>{const n=String(t).split("/");if(2!==n.length)return e;const s=Number(n[0]),o=Number(n[1]);let l=100;return 0!==s&&0!==o&&(l=i?l/s*o:l/o*s,l=parseFloat(String(l)).toFixed(2)),l+"%"},Xr={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};function Zr(t){return String(t).replace(/[&<>"'`=/]/g,(t=>Xr[t]))}function Qr(t){return!t||0===String(t).length}function ta(t){const e=String(t);return e.charAt(0).toLowerCase()+e.slice(1)}function ea(t="",e=""){const i=new RegExp(`^(${e})+`,"g");return t.replace(i,"")}function ia(t="",e=""){const i=new RegExp(`(${e})+$`,"g");return t.replace(i,"")}function na(t,e={}){const i=(t,e={})=>{const n=e[Zr(t.shift())]??"…";return"…"===n||0===t.length?n:i(t,n)},n="[{]{1,2}[\\s]?",s="[\\s]?[}]{1,2}";return(t=t.replace(new RegExp(`${n}(.*?)${s}`,"gi"),((t,n)=>i(n.split("."),e)))).replace(new RegExp(`${n}.*${s}`,"gi"),"…")}function sa(t){const e=String(t);return e.charAt(0).toUpperCase()+e.slice(1)}function oa(){let t,e,i="";for(t=0;t<32;t++)e=16*Math.random()|0,8!=t&&12!=t&&16!=t&&20!=t||(i+="-"),i+=(12==t?4:16==t?3&e|8:e).toString(16);return i}const la={camelToKebab:function(t){return t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()},escapeHTML:Zr,hasEmoji:function(t){if("string"!=typeof t)return!1;const e=t.match(/(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff]|[\u0023-\u0039]\ufe0f?\u20e3|\u3299|\u3297|\u303d|\u3030|\u24c2|\ud83c[\udd70-\udd71]|\ud83c[\udd7e-\udd7f]|\ud83c\udd8e|\ud83c[\udd91-\udd9a]|\ud83c[\udde6-\uddff]|[\ud83c\ude01-\ude02]|\ud83c\ude1a|\ud83c\ude2f|[\ud83c\ude32-\ude3a]|[\ud83c\ude50-\ude51]|\u203c|\u2049|[\u25aa-\u25ab]|\u25b6|\u25c0|[\u25fb-\u25fe]|\u00a9|\u00ae|\u2122|\u2139|\ud83c\udc04|[\u2600-\u26FF]|\u2b05|\u2b06|\u2b07|\u2b1b|\u2b1c|\u2b50|\u2b55|\u231a|\u231b|\u2328|\u23cf|[\u23e9-\u23f3]|[\u23f8-\u23fa]|\ud83c\udccf|\u2934|\u2935|[\u2190-\u21ff])/i);return null!==e&&null!==e.length},isEmpty:Qr,lcfirst:ta,ltrim:ea,pad:function(t,e=2){t=String(t);let i="";for(;i.length]+)>)/gi,"")},template:na,ucfirst:sa,ucwords:function(t){return String(t).split(/ /g).map((t=>sa(t))).join(" ")},unescapeHTML:function(t){for(const e in Xr)t=String(t).replaceAll(Xr[e],e);return t},uuid:oa},ra=async(t,e)=>new Promise(((i,n)=>{const s={url:"/",field:"file",method:"POST",filename:t.name,headers:{},attributes:{},complete:()=>{},error:()=>{},success:()=>{},progress:()=>{}},o=Object.assign(s,e),l=new XMLHttpRequest,r=new FormData;r.append(o.field,t,o.filename);for(const t in o.attributes)r.append(t,o.attributes[t]);const a=e=>{if(e.lengthComputable&&o.progress){const i=Math.max(0,Math.min(100,Math.ceil(e.loaded/e.total*100)));o.progress(l,t,i)}};l.upload.addEventListener("loadstart",a),l.upload.addEventListener("progress",a),l.addEventListener("load",(e=>{let s=null;try{s=JSON.parse(e.target.response)}catch(r){s={status:"error",message:"The file could not be uploaded"}}"error"===s.status?(o.error(l,t,s),n(s)):(o.progress(l,t,100),o.success(l,t,s),i(s))})),l.addEventListener("error",(e=>{const i=JSON.parse(e.target.response);o.progress(l,t,100),o.error(l,t,i),n(i)})),l.open(o.method,o.url,!0);for(const t in o.headers)l.setRequestHeader(t,o.headers[t]);l.send(r)}));function aa(){var t;return new URL((null==(t=document.querySelector("base"))?void 0:t.href)??window.location.origin)}function ua(t={},e={}){e instanceof URL&&(e=e.search);const i=new URLSearchParams(e);for(const[n,s]of Object.entries(t))null!==s&&i.set(n,s);return i}function ca(t="",e={},i){return(t=fa(t,i)).search=ua(e,t.search),t}function da(t){return null!==String(t).match(/^https?:\/\//)}function pa(t){return fa(t).origin===window.location.origin}function ha(t){if(t instanceof URL||t instanceof Location)return!0;if("string"!=typeof t)return!1;try{return new URL(t,window.location),!0}catch(e){return!1}}function ma(t,e){return!0===da(t)?t:(e=e??aa(),(e=String(e).replaceAll(/\/$/g,""))+"/"+(t=String(t).replaceAll(/^\//g,"")))}function fa(t,e){return t instanceof URL?t:new URL(ma(t,e))}const ga={base:aa,buildUrl:ca,buildQuery:ua,isAbsolute:da,isSameOrigin:pa,isUrl:ha,makeAbsolute:ma,toObject:fa},ka={install(t){t.prototype.$helper={array:Tr,clipboard:Er,clone:wt.clone,color:Lr,embed:qr,focus:Ur,isComponent:Vr,isUploadEvent:Kr,debounce:Nt,field:Nr,file:Yr,keyboard:Wr,object:wt,page:Jr,pad:la.pad,ratio:Gr,slug:la.slug,sort:Ir,string:la,upload:ra,url:ga,uuid:la.uuid},t.prototype.$esc=la.escapeHTML}},ba={install(t){t.directive("direction",{inserted(t,e,i){!0!==i.context.disabled?t.dir=window.panel.translation.direction:t.dir=null}})}},va={install(t){window.panel.redirect=window.panel.redirect.bind(window.panel),window.panel.reload=window.panel.reload.bind(window.panel),window.panel.request=window.panel.request.bind(window.panel),window.panel.search=window.panel.search.bind(window.panel);const e=["api","config","direction","events","language","languages","license","menu","multilang","permissions","search","searches","system","t","translation","url","urls","user","view"];for(const i of e){const e=`$${i}`;t.prototype[e]=window.panel[e]=window.panel[i]}window.panel.$vue=window.panel.app}},ya=/^#([\da-f]{3}){1,2}$/i,$a=/^#([\da-f]{4}){1,2}$/i,wa=/^rgba?\(\s*(\d{1,3})(%?)(?:,|\s)+(\d{1,3})(%?)(?:,|\s)+(\d{1,3})(%?)(?:,|\s|\/)*(\d*(?:\.\d+)?)(%?)\s*\)?$/i,xa=/^hsla?\(\s*(\d{1,3}\.?\d*)(deg|rad|grad|turn)?(?:,|\s)+(\d{1,3})%(?:,|\s)+(\d{1,3})%(?:,|\s|\/)*(\d*(?:\.\d+)?)(%?)\s*\)?$/i;function _a(t){return"string"==typeof t&&(ya.test(t)||$a.test(t))}function Sa(t){return vt(t)&&"r"in t&&"g"in t&&"b"in t}function Ca(t){return vt(t)&&"h"in t&&"s"in t&&"l"in t}function Oa({h:t,s:e,v:i,a:n}){if(0===i)return{h:t,s:0,l:0,a:n};if(0===e&&1===i)return{h:t,s:1,l:1,a:n};const s=i*(2-e)/2;return{h:t,s:e=i*e/(1-Math.abs(2*s-1)),l:s,a:n}}function Aa({h:t,s:e,l:i,a:n}){const s=e*(i<.5?i:1-i);return{h:t,s:e=0===s?0:2*s/(i+s),v:i+s,a:n}}function Ma(t){if(!0===ya.test(t)){3===(t=t.slice(1)).length&&(t=t.split("").reduce(((t,e)=>t+e+e),""));const e=parseInt(t,16);return{r:e>>16,g:e>>8&255,b:255&e,a:1}}if(!0===$a.test(t)){4===(t=t.slice(1)).length&&(t=t.split("").reduce(((t,e)=>t+e+e),""));const e=parseInt(t,16);return{r:e>>24&255,g:e>>16&255,b:e>>8&255,a:Math.round((255&e)/255*100)/100}}throw new Error(`unknown hex color: ${t}`)}function ja({r:t,g:e,b:i,a:n=1}){let s="#"+(1<<24|t<<16|e<<8|i).toString(16).slice(1);return n<1&&(s+=(256|Math.round(255*n)).toString(16).slice(1)),s}function Ia({h:t,s:e,l:i,a:n}){const s=e*Math.min(i,1-i),o=(e,n=(e+t/30)%12)=>i-s*Math.max(Math.min(n-3,9-n,1),-1);return{r:255*o(0),g:255*o(8),b:255*o(4),a:n}}function Ta({r:t,g:e,b:i,a:n}){t/=255,e/=255,i/=255;const s=Math.max(t,e,i),o=s-Math.min(t,e,i),l=1-Math.abs(s+s-o-1);let r=o&&(s==t?(e-i)/o:s==e?2+(i-t)/o:4+(t-e)/o);return r=60*(r<0?r+6:r),{h:r,s:l?o/l:0,l:(s+s-o)/2,a:n}}function Ea(t){return ja(Ia(t))}function La(t){return Ta(Ma(t))}function Da(t,e){return t=Number(t),"grad"===e?t*=.9:"rad"===e?t*=180/Math.PI:"turn"===e&&(t*=360),parseInt(t%360)}function Ba(t,e){if(!0===_a(t))switch(e){case"hex":return t;case"rgb":return Ma(t);case"hsl":return La(t);case"hsv":return Aa(La(t))}if(!0===Sa(t))switch(e){case"hex":return ja(t);case"rgb":return t;case"hsl":return Ta(t);case"hsv":return function({r:t,g:e,b:i,a:n}){t/=255,e/=255,i/=255;const s=Math.max(t,e,i),o=s-Math.min(t,e,i);let l=o&&(s==t?(e-i)/o:s==e?2+(i-t)/o:4+(t-e)/o);return l=60*(l<0?l+6:l),{h:l,s:s&&o/s,v:s,a:n}}(t)}if(!0===Ca(t))switch(e){case"hex":return Ea(t);case"rgb":return Ia(t);case"hsl":return t;case"hsv":return Aa(t)}if(!0===function(t){return vt(t)&&"h"in t&&"s"in t&&"v"in t}(t))switch(e){case"hex":return Ea(Oa(t));case"rgb":return function({h:t,s:e,v:i,a:n}){const s=(n,s=(n+t/60)%6)=>i-i*e*Math.max(Math.min(s,4-s,1),0);return{r:255*s(5),g:255*s(3),b:255*s(1),a:n}}(t);case"hsl":return Oa(t);case"hsv":return t}throw new Error(`Invalid color conversion: ${JSON.stringify(t)} -> ${e}`)}function qa(t){let e;if(!t||"string"!=typeof t)return!1;if(_a(t))return t;if(e=t.match(wa)){const t={r:Number(e[1]),g:Number(e[3]),b:Number(e[5]),a:Number(e[7]||1)};return"%"===e[2]&&(t.r=Math.ceil(2.55*t.r)),"%"===e[4]&&(t.g=Math.ceil(2.55*t.g)),"%"===e[6]&&(t.b=Math.ceil(2.55*t.b)),"%"===e[8]&&(t.a=t.a/100),t}if(e=t.match(xa)){let[t,i,n,s,o]=e.slice(1);const l={h:Da(t,i),s:Number(n)/100,l:Number(s)/100,a:Number(o||1)};return"%"===e[6]&&(l.a=l.a/100),l}return null}const Pa={convert:Ba,parse:qa,parseAs:function(t,e){const i=qa(t);return i&&e?Ba(i,e):i},toString:function(t,e,i=!0){var n,s;let o=t;if("string"==typeof o&&(o=qa(t)),o&&e&&(o=Ba(o,e)),!0===_a(o))return!0!==i&&(5===o.length?o=o.slice(0,4):o.length>7&&(o=o.slice(0,7))),o.toLowerCase();if(!0===Sa(o)){const t=o.r.toFixed(),e=o.g.toFixed(),s=o.b.toFixed(),l=null==(n=o.a)?void 0:n.toFixed(2);return i&&l&&l<1?`rgb(${t} ${e} ${s} / ${l})`:`rgb(${t} ${e} ${s})`}if(!0===Ca(o)){const t=o.h.toFixed(),e=(100*o.s).toFixed(),n=(100*o.l).toFixed(),l=null==(s=o.a)?void 0:s.toFixed(2);return i&&l&&l<1?`hsl(${t} ${e}% ${n}% / ${l})`:`hsl(${t} ${e}% ${n}%)`}throw new Error(`Unsupported color: ${JSON.stringify(t)}`)}};D.extend(B),D.extend(((t,e,i)=>{i.interpret=(t,e="date")=>{const n={date:{"YYYY-MM-DD":!0,"YYYY-MM-D":!0,"YYYY-MM-":!0,"YYYY-MM":!0,"YYYY-M-DD":!0,"YYYY-M-D":!0,"YYYY-M-":!0,"YYYY-M":!0,"YYYY-":!0,YYYYMMDD:!0,"MMM DD YYYY":!1,"MMM D YYYY":!1,"MMM DD YY":!1,"MMM D YY":!1,"MMM YYYY":!0,"MMM DD":!1,"MMM D":!1,"MM YYYY":!0,"M YYYY":!0,"DD MMMM YYYY":!1,"DD MMMM YY":!1,"DD MMMM":!1,"D MMMM YYYY":!1,"D MMMM YY":!1,"D MMMM":!1,"DD MMM YYYY":!1,"D MMM YYYY":!1,"DD MMM YY":!1,"D MMM YY":!1,"DD MMM":!1,"D MMM":!1,"DD MM YYYY":!1,"DD M YYYY":!1,"D MM YYYY":!1,"D M YYYY":!1,"DD MM YY":!1,"D MM YY":!1,"DD M YY":!1,"D M YY":!1,YYYY:!0,MMMM:!0,MMM:!0,"DD MM":!1,"DD M":!1,"D MM":!1,"D M":!1,DD:!1,D:!1},time:{"HH:mm:ss a":!1,"HH:mm:ss":!1,"HH:mm a":!1,"HH:mm":!1,"HH a":!1,HH:!1}};if("string"==typeof t&&""!==t)for(const s in n[e]){const o=i(t,s,n[e][s]);if(!0===o.isValid())return o}return null}})),D.extend(((t,e,i)=>{const n=t=>"date"===t?"YYYY-MM-DD":"time"===t?"HH:mm:ss":"YYYY-MM-DD HH:mm:ss";e.prototype.toISO=function(t="datetime"){return this.format(n(t))},i.iso=function(t,e="datetime"){const s=i(t,n(e));return s&&s.isValid()?s:null}})),D.extend(((t,e)=>{e.prototype.merge=function(t,e="date"){let i=this.clone();if(!t||!t.isValid())return this;if("string"==typeof e){const t={date:["year","month","date"],time:["hour","minute","second"]};if(!1===Object.hasOwn(t,e))throw new Error("Invalid merge unit alias");e=t[e]}for(const n of e)i=i.set(n,t.get(n));return i}})),D.extend(((t,e,i)=>{i.pattern=t=>new class{constructor(t,e){this.dayjs=t,this.pattern=e;const i={year:["YY","YYYY"],month:["M","MM","MMM","MMMM"],day:["D","DD"],hour:["h","hh","H","HH"],minute:["m","mm"],second:["s","ss"],meridiem:["a"]};this.parts=this.pattern.split(/\W/).map(((t,e)=>{const n=this.pattern.indexOf(t);return{index:e,unit:Object.keys(i)[Object.values(i).findIndex((e=>e.includes(t)))],start:n,end:n+(t.length-1)}}))}at(t,e=t){const i=this.parts.filter((i=>i.start<=t&&i.end>=e-1));return i[0]?i[0]:this.parts.filter((e=>e.start<=t)).pop()}format(t){return t&&t.isValid()?t.format(this.pattern):null}}(i,t)})),D.extend(((t,e)=>{e.prototype.round=function(t="date",e=1){const i=["second","minute","hour","date","month","year"];if("day"===t&&(t="date"),!1===i.includes(t))throw new Error("Invalid rounding unit");if(["date","month","year"].includes(t)&&1!==e||"hour"===t&&24%e!=0||["second","minute"].includes(t)&&60%e!=0)throw"Invalid rounding size for "+t;let n=this.clone();const s=i.indexOf(t),o=i.slice(0,s),l=o.pop();for(const r of o)n=n.startOf(r);if(l){const e={month:12,date:n.daysInMonth(),hour:24,minute:60,second:60}[l];Math.round(n.get(l)/e)*e===e&&(n=n.add(1,"date"===t?"day":t)),n=n.startOf(t)}return n=n.set(t,Math.round(n.get(t)/e)*e),n}})),D.extend(((t,e,i)=>{e.prototype.validate=function(t,e,n="day"){if(!this.isValid())return!1;if(!t)return!0;t=i.iso(t);const s={min:"isAfter",max:"isBefore"}[e];return this.isSame(t,n)||this[s](t,n)}}));const Na={install(t){t.prototype.$library={colors:Pa,dayjs:D}}},za=t=>({async changeName(e,i,n){return t.patch(this.url(e,i,"name"),{name:n})},async delete(e,i){return t.delete(this.url(e,i))},async get(e,i,n){let s=await t.get(this.url(e,i),n);return!0===Array.isArray(s.content)&&(s.content={}),s},id:t=>!0===t.startsWith("/@/file/")?t.replace("/@/file/","@"):!0===t.startsWith("file://")?t.replace("file://","@"):t,link(t,e,i){return"/"+this.url(t,e,i)},async update(e,i,n){return t.patch(this.url(e,i),n)},url(t,e,i){let n="files/"+this.id(e);return t&&(n=t+"/"+n),i&&(n+="/"+i),n}}),Fa=t=>({async blueprint(e){return t.get("pages/"+this.id(e)+"/blueprint")},async blueprints(e,i){return t.get("pages/"+this.id(e)+"/blueprints",{section:i})},async changeSlug(e,i){return t.patch("pages/"+this.id(e)+"/slug",{slug:i})},async changeStatus(e,i,n){return t.patch("pages/"+this.id(e)+"/status",{status:i,position:n})},async changeTemplate(e,i){return t.patch("pages/"+this.id(e)+"/template",{template:i})},async changeTitle(e,i){return t.patch("pages/"+this.id(e)+"/title",{title:i})},async children(e,i){return t.post("pages/"+this.id(e)+"/children/search",i)},async create(e,i){return null===e||"/"===e?t.post("site/children",i):t.post("pages/"+this.id(e)+"/children",i)},async delete(e,i){return t.delete("pages/"+this.id(e),i)},async duplicate(e,i,n){return t.post("pages/"+this.id(e)+"/duplicate",{slug:i,children:n.children??!1,files:n.files??!1})},async get(e,i){let n=await t.get("pages/"+this.id(e),i);return!0===Array.isArray(n.content)&&(n.content={}),n},id:t=>!0===t.startsWith("/@/page/")?t.replace("/@/page/","@"):!0===t.startsWith("page://")?t.replace("page://","@"):t.replace(/\//g,"+"),async files(e,i){return t.post("pages/"+this.id(e)+"/files/search",i)},link(t){return"/"+this.url(t)},async preview(t){return(await this.get(this.id(t),{select:"previewUrl"})).previewUrl},async search(e,i){return e?t.post("pages/"+this.id(e)+"/children/search?select=id,title,hasChildren",i):t.post("site/children/search?select=id,title,hasChildren",i)},async update(e,i){return t.patch("pages/"+this.id(e),i)},url(t,e){let i=null===t?"pages":"pages/"+String(t).replace(/\//g,"+");return e&&(i+="/"+e),i}});class Ra extends Error{constructor(t,{request:e,response:i,cause:n}){super(i.json.message??t,{cause:n}),this.request=e,this.response=i}state(){return this.response.json}}class Ya extends Ra{}class Ua extends Ra{state(){return{message:this.message,text:this.response.text}}}const Ha=t=>(window.location.href=ma(t),!1),Va=async(t,e={})=>{var i;(e={cache:"no-store",credentials:"same-origin",mode:"same-origin",...e}).body=((i=e.body)instanceof HTMLFormElement&&(i=new FormData(i)),i instanceof FormData&&(i=Object.fromEntries(i)),"object"==typeof i?JSON.stringify(i):i),e.headers=((t={},e={})=>{return{"content-type":"application/json","x-csrf":e.csrf??!1,"x-fiber":!0,"x-fiber-globals":(i=e.globals,!!i&&(!1===Array.isArray(i)?String(i):i.join(","))),"x-fiber-referrer":e.referrer??!1,...$t(t)};var i})(e.headers,e),e.url=ca(t,e.query);const n=new Request(e.url,e);return!1===pa(n.url)?Ha(n.url):await Ka(n,await fetch(n))},Ka=async(t,e)=>{var i;if(!1===e.headers.get("Content-Type").includes("application/json"))return Ha(e.url);try{e.text=await e.text(),e.json=JSON.parse(e.text)}catch(n){throw new Ua("Invalid JSON response",{cause:n,request:t,response:e})}if(401===e.status)throw new Ya("Unauthenticated",{request:t,response:e});if("error"===(null==(i=e.json)?void 0:i.status))throw e.json;if(!1===e.ok)throw new Ra(`The request to ${e.url} failed`,{request:t,response:e});return{request:t,response:e}},Wa=t=>({blueprint:async e=>t.get("users/"+e+"/blueprint"),blueprints:async(e,i)=>t.get("users/"+e+"/blueprints",{section:i}),changeEmail:async(e,i)=>t.patch("users/"+e+"/email",{email:i}),changeLanguage:async(e,i)=>t.patch("users/"+e+"/language",{language:i}),changeName:async(e,i)=>t.patch("users/"+e+"/name",{name:i}),changePassword:async(e,i)=>t.patch("users/"+e+"/password",{password:i}),changeRole:async(e,i)=>t.patch("users/"+e+"/role",{role:i}),create:async e=>t.post("users",e),delete:async e=>t.delete("users/"+e),deleteAvatar:async e=>t.delete("users/"+e+"/avatar"),link(t,e){return"/"+this.url(t,e)},async list(e){return t.post(this.url(null,"search"),e)},get:async(e,i)=>t.get("users/"+e,i),async roles(e){return(await t.get(this.url(e,"roles"))).data.map((t=>({info:t.description??`(${window.panel.$t("role.description.placeholder")})`,text:t.title,value:t.name})))},search:async e=>t.post("users/search",e),update:async(e,i)=>t.patch("users/"+e,i),url(t,e){let i=t?"users/"+t:"users";return e&&(i+="/"+e),i}}),Ja=t=>{const e={csrf:t.system.csrf,endpoint:ia(t.urls.api,"/"),methodOverwrite:!0,ping:null,requests:[],running:0},i=()=>{clearInterval(e.ping),e.ping=setInterval(e.auth.ping,3e5)};return e.request=async(n,s={},o=!1)=>{const l=n+"/"+JSON.stringify(s);e.requests.push(l),!1===o&&(t.isLoading=!0),e.language=t.language.code;try{return await(t=>async(e,i={})=>{i={cache:"no-store",credentials:"same-origin",mode:"same-origin",headers:{"content-type":"application/json","x-csrf":t.csrf,"x-language":t.language,...$t(i.headers??{})},...i},t.methodOverwrite&&"GET"!==i.method&&"POST"!==i.method&&(i.headers["x-http-method-override"]=i.method,i.method="POST"),i.url=ia(t.endpoint,"/")+"/"+ea(e,"/");const n=new Request(i.url,i),{response:s}=await Ka(n,await fetch(n));let o=s.json;return o.data&&"model"===o.type&&(o=o.data),o})(e)(n,s)}finally{i(),e.requests=e.requests.filter((t=>t!==l)),0===e.requests.length&&(t.isLoading=!1)}},e.auth=(t=>({async login(e){const i={long:e.remember??!1,email:e.email,password:e.password};return t.post("auth/login",i)},logout:async()=>t.post("auth/logout"),ping:async()=>t.post("auth/ping"),user:async e=>t.get("auth",e),verifyCode:async e=>t.post("auth/code",{code:e})}))(e),e.delete=(t=>async(e,i,n,s=!1)=>t.post(e,i,n,"DELETE",s))(e),e.files=za(e),e.get=(t=>async(e,i,n,s=!1)=>(i&&(e+="?"+Object.keys(i).filter((t=>void 0!==i[t]&&null!==i[t])).map((t=>t+"="+i[t])).join("&")),t.request(e,Object.assign(n??{},{method:"GET"}),s)))(e),e.languages=(t=>({create:async e=>t.post("languages",e),delete:async e=>t.delete("languages/"+e),get:async e=>t.get("languages/"+e),list:async()=>t.get("languages"),update:async(e,i)=>t.patch("languages/"+e,i)}))(e),e.pages=Fa(e),e.patch=(t=>async(e,i,n,s=!1)=>t.post(e,i,n,"PATCH",s))(e),e.post=(t=>async(e,i,n,s="POST",o=!1)=>t.request(e,Object.assign(n??{},{method:s,body:JSON.stringify(i)}),o))(e),e.roles=(t=>({list:async e=>t.get("roles",e),get:async e=>t.get("roles/"+e)}))(e),e.system=(t=>({get:async(e={view:"panel"})=>t.get("system",e),install:async e=>(await t.post("system/install",e)).user,register:async e=>t.post("system/register",e)}))(e),e.site=(t=>({blueprint:async()=>t.get("site/blueprint"),blueprints:async()=>t.get("site/blueprints"),changeTitle:async e=>t.patch("site/title",{title:e}),children:async e=>t.post("site/children/search",e),get:async(e={view:"panel"})=>t.get("site",e),update:async e=>t.post("site",e)}))(e),e.translations=(t=>({list:async()=>t.get("translations"),get:async e=>t.get("translations/"+e)}))(e),e.users=Wa(e),i(),e},Ga=()=>({addEventListener(t,e){"function"==typeof e&&(this.on[t]=e)},addEventListeners(t){if(!1!==vt(t))for(const e in t)this.addEventListener(e,t[e])},emit(t,...e){return this.hasEventListener(t)?this.on[t](...e):()=>{}},hasEventListener(t){return"function"==typeof this.on[t]},listeners(){return this.on},on:{}}),Xa=(t,e={})=>({...e,key:()=>t,defaults:()=>e,reset(){return this.set(this.defaults())},set(t){this.validateState(t);for(const e in this.defaults())this[e]=t[e]??this.defaults()[e];return this.state()},state(){const t={};for(const e in this.defaults())t[e]=this[e]??this.defaults()[e];return t},validateState(t){if(!1===vt(t))throw new Error(`Invalid ${this.key()} state`);return!0}}),Za=(t,e,i)=>{const n=Xa(e,i);return{...n,...Ga(),async load(e,i={}){return!0!==i.silent&&(this.isLoading=!0),await t.open(e,i),this.isLoading=!1,this.addEventListeners(i.on),this.state()},async open(t,e={}){return"function"==typeof e&&(e={on:{submit:e}}),!0===ha(t)?this.load(t,e):(this.set(t),this.addEventListeners(e.on),this.emit("open",t,e),this.state())},async post(e,i={}){var n;if(!this.path)throw new Error(`The ${this.key()} cannot be posted`);this.isLoading=!0,e=e??(null==(n=this.props)?void 0:n.value)??{};try{return await t.post(this.path,e,i)}catch(s){t.error(s)}finally{this.isLoading=!1}return!1},async refresh(e={}){e.url=e.url??this.url();const i=(await t.get(e.url,e))["$"+this.key()];if(i&&i.component===this.component)return this.props=i.props,this.state()},async reload(t={}){if(!this.path)return!1;this.open(this.url(),t)},set(t){return n.set.call(this,t),this.on={},this.addEventListeners(t.on??{}),this.state()},url(){return t.url(this.path,this.query)}}},Qa=(t,e,i)=>{const n=Za(t,e,i);return{...n,async cancel(){this.isOpen&&this.emit("cancel"),this.close()},async close(){!1!==this.isOpen&&(this.isOpen=!1,this.emit("close"),this.reset(),0===t.overlays().length&&(document.documentElement.removeAttribute("data-overlay"),document.documentElement.style.removeProperty("--scroll-top")))},focus(t){Ur(`.k-${this.key()}-portal`,t)},input(t){!1!==this.isOpen&&(Vue.set(this.props,"value",t),this.emit("input",t))},isOpen:!1,listeners(){return{...this.on,cancel:this.cancel.bind(this),close:this.close.bind(this),input:this.input.bind(this),submit:this.submit.bind(this),success:this.success.bind(this)}},async open(e,i){return!1===this.isOpen&&t.notification.close(),document.documentElement.setAttribute("data-overlay","true"),document.documentElement.style.setProperty("--scroll-top",window.scrollY+"px"),await n.open.call(this,e,i),this.isOpen=!0,this.state()},async submit(t,e={}){if(t=t??this.props.value,this.hasEventListener("submit"))return this.emit("submit",t,e);if(!this.path)return this.close();const i=await this.post(t,e);return!1===vt(i)?i:this.success(i["$"+this.key()]??{})},success(e){return this.hasEventListener("success")?this.emit("success",e):("string"==typeof e&&t.notification.success(e),this.close(),this.successNotification(e),this.successEvents(e),this.successDispatch(e),e.route||e.redirect?this.successRedirect(e):t.view.reload(e.reload),e)},successDispatch(e){if(!1!==vt(e.dispatch))for(const i in e.dispatch){const n=e.dispatch[i];t.app.$store.dispatch(i,!0===Array.isArray(n)?[...n]:n)}},successEvents(e){if(e.event){const i=Array.wrap(e.event);for(const n of i)"string"==typeof n&&t.events.emit(n,e)}!1!==e.emit&&t.events.emit("success",e)},successNotification(e){e.message&&t.notification.success(e.message)},successRedirect(e){const i=e.route??e.redirect;return!!i&&("string"==typeof i?t.open(i):t.open(i.url,i.options))},get value(){var t;return null==(t=this.props)?void 0:t.value}}},tu=t=>{t.events.on("dialog.save",(e=>{var i;null==(i=null==e?void 0:e.preventDefault)||i.call(e),t.dialog.submit()}));const e=Qa(t,"dialog",{component:null,isLoading:!1,on:{},path:null,props:{},query:{},referrer:null,timestamp:null,legacy:!1,ref:null});return{...e,async close(){this.ref&&(this.ref.visible=!1),e.close.call(this)},async open(t,i={}){return t instanceof window.Vue?this.openComponent(t):("string"==typeof t&&(t=`/dialogs/${t}`),e.open.call(this,t,i))},async openComponent(i){t.deprecated("Dialog components should no longer be used in your templates");const n=await e.open.call(this,{component:i.$options._componentTag,legacy:!0,props:{...i.$attrs,...i.$props},ref:i}),s=this.listeners();for(const t in s)i.$on(t,s[t]);return i.visible=!0,n}}},eu=()=>({...Xa("drag",{type:null,data:{}}),get isDragging(){return null!==this.type},start(t,e){this.type=t,this.data=e},stop(){this.type=null,this.data={}}}),iu=()=>({add(t){if(!t.id)throw new Error("The state needs an ID");!0!==this.has(t.id)&&this.milestones.push(t)},at(t){return this.milestones.at(t)},get(t=null){return null===t?this.milestones:this.milestones.find((e=>e.id===t))},goto(t){const e=this.index(t);if(-1!==e)return this.milestones=this.milestones.slice(0,e+1),this.milestones[e]},has(t){return void 0!==this.get(t)},index(t){return this.milestones.findIndex((e=>e.id===t))},isEmpty(){return 0===this.milestones.length},last(){return this.milestones.at(-1)},milestones:[],remove(t=null){return null===t?this.removeLast():this.milestones=this.milestones.filter((e=>e.id!==t))},removeLast(){return this.milestones=this.milestones.slice(0,-1)},replace(t,e){-1===t&&(t=this.milestones.length-1),Vue.set(this.milestones,t,e)}}),nu=t=>{const e=Qa(t,"drawer",{component:null,isLoading:!1,on:{},path:null,props:{},query:{},referrer:null,timestamp:null,id:null});return t.events.on("drawer.save",(e=>{e.preventDefault(),t.drawer.submit()})),{...e,get breadcrumb(){return this.history.milestones},async close(t){if(!1!==this.isOpen&&(void 0===t||t===this.id)){if(this.history.removeLast(),!0!==this.history.isEmpty())return this.open(this.history.last());e.close.call(this)}},goTo(t){const e=this.history.goto(t);void 0!==e&&this.open(e)},history:iu(),get icon(){return this.props.icon??"box"},input(t){Vue.set(this.props,"value",t),this.emit("input",this.props.value)},listeners(){return{...this.on,cancel:this.cancel.bind(this),close:this.close.bind(this),crumb:this.goTo.bind(this),input:this.input.bind(this),submit:this.submit.bind(this),success:this.success.bind(this),tab:this.tab.bind(this)}},async open(t,i={}){"string"==typeof t&&(t=`/drawers/${t}`),await e.open.call(this,t,i),this.tab(t.tab);const n=this.state();return!0===t.replace?this.history.replace(-1,n):this.history.add(n),this.focus(),n},set(t){return e.set.call(this,t),this.id=this.id??oa(),this.state()},tab(t){const e=this.props.tabs??{};if(!(t=t??Object.keys(e??{})[0]))return!1;Vue.set(this.props,"fields",e[t].fields),Vue.set(this.props,"tab",t),this.emit("tab",t),setTimeout((()=>{this.focus()}))}}},su=t=>{const e=Za(t,"dropdown",{component:null,isLoading:!1,on:{},path:null,props:{},query:{},referrer:null,timestamp:null});return{...e,close(){this.emit("close"),this.reset()},open(t,i={}){return"string"==typeof t&&(t=`/dropdowns/${t}`),e.open.call(this,t,i)},openAsync(t,e={}){return async i=>{await this.open(t,e);const n=this.options();if(0===n.length)throw Error("The dropdown is empty");i(n)}},options(){return!1===Array.isArray(this.props.options)?[]:this.props.options.map((e=>e.dialog?(e.click=()=>{const i="string"==typeof e.dialog?e.dialog:e.dialog.url,n="object"==typeof e.dialog?e.dialog:{};return t.app.$dialog(i,n)},e):e))},set(t){return t.options&&(t.props={options:t.options}),e.set.call(this,t)}}},ou=t=>{const e=q();e.on("online",(()=>{t.isOffline=!1})),e.on("offline",(()=>{t.isOffline=!0})),e.on("keydown.cmd.s",(i=>{e.emit(t.context+".save",i)})),e.on("keydown.cmd.shift.f",(()=>t.search())),e.on("keydown.cmd./",(()=>t.search()));const i={document:{blur:!0,click:!1,copy:!0,focus:!0,paste:!0},window:{dragenter:!1,dragexit:!1,dragleave:!1,dragover:!1,drop:!1,keydown:!1,keyup:!1,offline:!1,online:!1,popstate:!1}};return{blur(t){this.emit("blur",t)},click(t){this.emit("click",t)},copy(t){this.emit("copy",t)},dragenter(t){this.entered=t.target,this.prevent(t),this.emit("dragenter",t)},dragexit(t){this.prevent(t),this.entered=null,this.emit("dragexit",t)},dragleave(t){this.prevent(t),this.entered===t.target&&(this.entered=null,this.emit("dragleave",t))},dragover(t){this.prevent(t),this.emit("dragover",t)},drop(t){this.prevent(t),this.entered=null,this.emit("drop",t)},emit:e.emit,entered:null,focus(t){this.emit("focus",t)},keychain(t,e){let i=[t];(e.metaKey||e.ctrlKey)&&i.push("cmd"),!0===e.altKey&&i.push("alt"),!0===e.shiftKey&&i.push("shift");let n=e.key?ta(e.key):null;const s={escape:"esc",arrowUp:"up",arrowDown:"down",arrowLeft:"left",arrowRight:"right"};return s[n]&&(n=s[n]),n&&!1===["alt","control","shift","meta"].includes(n)&&i.push(n),i.join(".")},keydown(t){this.emit(this.keychain("keydown",t),t),this.emit("keydown",t)},keyup(t){this.emit(this.keychain("keyup",t),t),this.emit("keyup",t)},off:e.off,offline(t){this.emit("offline",t)},on:e.on,online(t){this.emit("online",t)},paste(t){this.emit("paste",t)},popstate(t){this.emit("popstate",t)},prevent(t){t.stopPropagation(),t.preventDefault()},subscribe(){for(const t in i.document)document.addEventListener(t,this[t].bind(this),i.document[t]);for(const t in i.window)window.addEventListener(t,this[t].bind(this),i.window[t])},unsubscribe(){for(const t in i.document)document.removeEventListener(t,this[t]);for(const t in i.window)window.removeEventListener(t,this[t])},$on(...t){window.panel.deprecated("`events.$on` will be removed in a future version. Use `events.on` instead."),e.on(...t)},$emit(...t){window.panel.deprecated("`events.$emit` will be removed in a future version. Use `events.emit` instead."),e.emit(...t)},$off(...t){window.panel.deprecated("`events.$off` will be removed in a future version. Use `events.off` instead."),e.off(...t)}}},lu={interval:null,start(t,e){this.stop(),t&&(this.interval=setInterval(e,t))},stop(){clearInterval(this.interval),this.interval=null}},ru=(t={})=>({...Xa("notification",{context:null,details:null,icon:null,isOpen:!1,message:null,timeout:null,type:null}),close(){return this.timer.stop(),this.reset(),this.state()},deprecated(t){console.warn("Deprecated: "+t)},error(e){if(e instanceof Ya&&t.user.id)return t.redirect("logout");if(e instanceof Ua)return this.fatal(e);if(e instanceof Ra){const t=Object.values(e.response.json).find((t=>"string"==typeof(null==t?void 0:t.error)));t&&(e.message=t.error)}return"string"==typeof e&&(e={message:e,type:"error"}),e={message:e.message??"Something went wrong",details:e.details??{}},"view"===t.context&&t.dialog.open({component:"k-error-dialog",props:e,type:"error"}),this.open({message:e.message,type:"error",icon:"alert"})},get isFatal(){return"fatal"===this.type},fatal(t){return"string"==typeof t?this.open({message:t,type:"fatal"}):t instanceof Ua?this.open({message:t.response.text,type:"fatal"}):this.open({message:t.message??"Something went wrong",type:"fatal"})},open(e){return this.timer.stop(),"string"==typeof e?this.success(e):(this.set({context:t.context,...e}),this.isOpen=!0,this.timer.start(this.timeout,(()=>this.close())),this.state())},success(t){return t||(t={}),"string"==typeof t&&(t={message:t}),this.open({timeout:4e3,type:"success",icon:"check",...t})},get theme(){return"error"===this.type?"negative":"positive"},timer:lu}),au=()=>({...Xa("language",{code:null,default:!1,direction:"ltr",name:null,rules:null}),get isDefault(){return this.default}}),uu=(t,e,i)=>{if(!i.template&&!i.render&&!i.extends)throw new Error(`Neither template nor render method provided. Nor extending a component when loading plugin component "${e}". The component has not been registered.`);return(i=cu(t,e,i)).template&&(i.render=null),i=du(i),!0===Vr(e)&&window.console.warn(`Plugin is replacing "${e}"`),t.component(e,i),i},cu=(t,e,i)=>"string"!=typeof(null==i?void 0:i.extends)?i:!1===Vr(i.extends)?(window.console.warn(`Problem with plugin trying to register component "${e}": cannot extend non-existent component "${i.extends}"`),i.extends=null,i):(i.extends=t.options.components[i.extends].extend({options:i,components:{...t.options.components,...i.components??{}}}),i),du=t=>{if(!1===Array.isArray(t.mixins))return t;const e={dialog:Et,drawer:me,section:Fl};return t.mixins=t.mixins.map((t=>"string"==typeof t?e[t]:t)),t},pu=(t,e={})=>((e={components:{},created:[],icons:{},login:null,textareaButtons:{},use:[],thirdParty:{},writerMarks:{},writerNodes:{},...e}).use=((t,e)=>{if(!1===Array.isArray(e))return[];for(const i of e)t.use(i);return e})(t,e.use),e.components=((t,e)=>{if(!1===vt(e))return;const i={};for(const[s,o]of Object.entries(e))try{i[s]=uu(t,s,o)}catch(n){window.console.warn(n.message)}return i})(t,e.components),e),hu=t=>{var e;const i=Xa("menu",{entries:[],hover:!1,isOpen:!1}),n=null==(e=window.matchMedia)?void 0:e.call(window,"(max-width: 60rem)"),s={...i,blur(t){if(!1===n.matches)return!1;const e=document.querySelector(".k-panel-menu");!1===document.querySelector(".k-panel-menu-proxy").contains(t.target)&&!1===e.contains(t.target)&&this.close()},close(){this.isOpen=!1,!1===n.matches&&localStorage.setItem("kirby$menu",!0)},escape(){if(!1===n.matches)return!1;this.close()},open(){this.isOpen=!0,!1===n.matches&&localStorage.removeItem("kirby$menu")},resize(){if(n.matches)return this.close();null!==localStorage.getItem("kirby$menu")?this.isOpen=!1:this.isOpen=!0},set(t){return this.entries=t,this.resize(),this.state()},toggle(){this.isOpen?this.close():this.open()}};return t.events.on("keydown.esc",s.escape.bind(s)),t.events.on("click",s.blur.bind(s)),null==n||n.addEventListener("change",s.resize.bind(s)),s},mu=()=>{const t=Xa("translation",{code:null,data:{},direction:"ltr",name:null});return{...t,set(e){return t.set.call(this,e),document.documentElement.lang=this.code,document.body.dir=this.direction,this.state()},translate(t,e,i=null){if("string"!=typeof t)return;const n=this.data[t]??i;return"string"!=typeof n?n:na(n,e)}}};const fu=t=>{const e=Xa("upload",{accept:"*",attributes:{},files:[],max:null,multiple:!0,replacing:null,url:null});return{...e,...Ga(),input:null,cancel(){this.emit("cancel"),this.completed.length>0&&(this.emit("complete",this.completed),t.view.reload()),this.reset()},get completed(){return this.files.filter((t=>t.completed)).map((t=>t.model))},done(){t.dialog.close(),this.completed.length>0&&(this.emit("done",this.completed),!1===t.drawer.isOpen&&(t.notification.success({context:"view"}),t.view.reload())),this.reset()},findDuplicate(t){return this.files.findLastIndex((e=>e.src.name===t.src.name&&e.src.type===t.src.type&&e.src.size===t.src.size&&e.src.lastModified===t.src.lastModified))},hasUniqueName(t){return this.files.filter((e=>e.name===t.name&&e.extension===t.extension)).length<2},file(t){const e=URL.createObjectURL(t);return{completed:!1,error:null,extension:zr(t.name),filename:t.name,id:oa(),model:null,name:Fr(t.name),niceSize:Rr(t.size),progress:0,size:t.size,src:t,type:t.type,url:e}},open(e,i){e instanceof FileList?(this.set(i),this.select(e)):this.set(e);const n={component:"k-upload-dialog",on:{cancel:()=>this.cancel(),submit:async()=>{t.dialog.isLoading=!0,await this.submit(),t.dialog.isLoading=!1}}};this.replacing&&(n.component="k-upload-replace-dialog",n.props={original:this.replacing}),t.dialog.open(n)},pick(t){this.set(t),this.input=document.createElement("input"),this.input.type="file",this.input.classList.add("sr-only"),this.input.value=null,this.input.accept=this.accept,this.input.multiple=this.multiple,this.input.click(),this.input.addEventListener("change",(e=>{!0===(null==t?void 0:t.immediate)?(this.set(t),this.select(e.target.files),this.submit()):this.open(e.target.files,t),this.input.remove()}))},remove(t){this.files=this.files.filter((e=>e.id!==t))},replace(e,i){this.pick({...i,url:t.urls.api+"/"+e.link,accept:"."+e.extension+","+e.mime,multiple:!1,replacing:e})},reset(){e.reset.call(this),this.files.splice(0)},select(t,e){if(this.set(e),t instanceof Event&&(t=t.target.files),t instanceof FileList==!1)throw new Error("Please provide a FileList");t=(t=[...t]).map((t=>this.file(t))),this.files=[...this.files,...t],this.files=this.files.filter(((t,e)=>this.findDuplicate(t)===e)),null!==this.max&&(this.files=this.files.slice(-1*this.max)),this.emit("select",this.files)},set(t){if(t)return e.set.call(this,t),this.on={},this.addEventListeners(t.on??{}),1===this.max&&(this.multiple=!1),!1===this.multiple&&(this.max=1),this.state()},async submit(){var e;if(!this.url)throw new Error("The upload URL is missing");const i=[];for(const n of this.files)!0!==n.completed&&(!1!==this.hasUniqueName(n)?(n.error=null,n.progress=0,i.push((async()=>await this.upload(n))),void 0!==(null==(e=this.attributes)?void 0:e.sort)&&this.attributes.sort++):n.error=t.t("error.file.name.unique"));if(await async function(t,e=20){let i=0,n=0;return new Promise((s=>{const o=e=>n=>{t[e]=n,i--,l()},l=()=>{if(i{e.progress=n}});e.completed=!0,e.model=i.data}catch(i){t.error(i,!1),e.error=i.message,e.progress=0}}}},gu=t=>{const e=Za(t,"view",{component:null,isLoading:!1,on:{},path:null,props:{},query:{},referrer:null,timestamp:null,breadcrumb:[],breadcrumbLabel:null,icon:null,id:null,link:null,search:"pages",title:null});return{...e,set(i){e.set.call(this,i),t.title=this.title;const n=this.url().toString();window.location.toString()!==n&&(window.history.pushState(null,null,n),window.scrollTo(0,0))},async submit(){throw new Error("Not yet implemented")}}},ku={config:{},languages:[],license:!1,multilang:!1,permissions:{},searches:{},urls:{}},bu=["dialog","drawer"],vu=["dropdown","language","menu","notification","system","translation","user"],yu={create(t={}){return this.isLoading=!1,this.isOffline=!1,this.drag=eu(),this.events=ou(this),this.upload=fu(this),this.language=au(),this.menu=hu(this),this.notification=ru(this),this.system=Xa("system",{ascii:{},csrf:null,isLocal:null,locales:{},slugs:[],title:null}),this.translation=mu(),this.user=Xa("user",{email:null,id:null,language:null,role:null,username:null}),this.dropdown=su(this),this.view=gu(this),this.drawer=nu(this),this.dialog=tu(this),this.redirect=Ha,this.reload=this.view.reload.bind(this.view),this.t=this.translation.translate.bind(this.translation),this.plugins=pu(window.Vue,t),this.set(window.fiber),this.api=Ja(this),Vue.reactive(this)},get context(){return this.dialog.isOpen?"dialog":this.drawer.isOpen?"drawer":"view"},get debug(){return!0===this.config.debug},deprecated(t){this.notification.deprecated(t)},get direction(){return this.translation.direction},error(t,e=!0){if(!0===this.debug&&console.error(t),!0===e)return this.notification.error(t)},async get(t,e={}){const{response:i}=await this.request(t,{method:"GET",...e});return(null==i?void 0:i.json)??{}},async open(t,e={}){try{if(!1===ha(t))this.set(t);else{this.isLoading=!0;const i=await this.get(t,e);this.set(i),this.isLoading=!1}return this.state()}catch(i){return this.error(i)}},overlays(){const t=[];return!0===this.drawer.isOpen&&t.push("drawer"),!0===this.dialog.isOpen&&t.push("dialog"),t},async post(t,e={},i={}){const{response:n}=await this.request(t,{method:"POST",body:e,...i});return n.json},async request(t,e={}){return Va(t,{referrer:this.view.path,csrf:this.system.csrf,...e})},async search(t,e,i){if(!t&&!e)return this.menu.escape(),this.dialog.open({component:"k-search-dialog"});const{$search:n}=await this.get(`/search/${t}`,{query:{query:e,...i}});return n},set(t={}){t=Object.fromEntries(Object.entries(t).map((([t,e])=>[t.replace("$",""),e])));for(const e in ku){const i=t[e]??this[e]??ku[e];typeof i==typeof ku[e]&&(this[e]=i)}for(const e of vu)(vt(t[e])||Array.isArray(t[e]))&&this[e].set(t[e]);for(const e of bu)!0===vt(t[e])?this[e].open(t[e]):void 0!==t[e]&&this[e].close();!0===vt(t.dropdown)?this.dropdown.open(t.dropdown):void 0!==t.dropdown&&this.dropdown.close(),!0===vt(t.view)&&this.view.open(t.view)},state(){const t={};for(const e in ku)t[e]=this[e]??ku[e];for(const e of vu)t[e]=this[e].state();for(const e of bu)t[e]=this[e].state();return t.dropdown=this.dropdown.state(),t.view=this.view.state(),t},get title(){return document.title},set title(t){!1===Qr(this.system.title)&&(t+=" | "+this.system.title),document.title=t},url:(t="",e={},i)=>ca(t,e,i)},$u=(t,e)=>{localStorage.setItem("kirby$content$"+t,JSON.stringify(e))},wu={namespaced:!0,state:{current:null,models:{},status:{enabled:!0}},getters:{exists:t=>e=>Object.hasOwn(t.models,e),hasChanges:(t,e)=>t=>yt(e.model(t).changes)>0,isCurrent:t=>e=>t.current===e,id:t=>e=>(e=e??t.current)+"?language="+window.panel.language.code,model:(t,e)=>i=>(i=i??t.current,!0===e.exists(i)?t.models[i]:{api:null,originals:{},values:{},changes:{}}),originals:(t,e)=>t=>bt(e.model(t).originals),values:(t,e)=>t=>({...e.originals(t),...e.changes(t)}),changes:(t,e)=>t=>bt(e.model(t).changes)},mutations:{CLEAR(t){for(const e in t.models)t.models[e].changes={};for(const e in localStorage)e.startsWith("kirby$content$")&&localStorage.removeItem(e)},CREATE(t,[e,i]){if(!i)return!1;let n=t.models[e]?t.models[e].changes:i.changes;Vue.set(t.models,e,{api:i.api,originals:i.originals,changes:n??{}})},CURRENT(t,e){t.current=e},MOVE(t,[e,i]){const n=bt(t.models[e]);Vue.del(t.models,e),Vue.set(t.models,i,n);const s=localStorage.getItem("kirby$content$"+e);localStorage.removeItem("kirby$content$"+e),localStorage.setItem("kirby$content$"+i,s)},REMOVE(t,e){Vue.del(t.models,e),localStorage.removeItem("kirby$content$"+e)},REVERT(t,e){t.models[e]&&(Vue.set(t.models[e],"changes",{}),localStorage.removeItem("kirby$content$"+e))},STATUS(t,e){Vue.set(t.status,"enabled",e)},UPDATE(t,[e,i,n]){if(!t.models[e])return!1;void 0===n&&(n=null),n=bt(n);const s=JSON.stringify(n);JSON.stringify(t.models[e].originals[i]??null)==s?Vue.del(t.models[e].changes,i):Vue.set(t.models[e].changes,i,n),$u(e,{api:t.models[e].api,originals:t.models[e].originals,changes:t.models[e].changes})}},actions:{init(t){for(const i in localStorage)if(i.startsWith("kirby$content$")){const e=i.split("kirby$content$")[1],n=localStorage.getItem("kirby$content$"+e);t.commit("CREATE",[e,JSON.parse(n)])}else if(i.startsWith("kirby$form$")){const n=i.split("kirby$form$")[1],s=localStorage.getItem("kirby$form$"+n);let o=null;try{o=JSON.parse(s)}catch(e){}if(!o||!o.api)return localStorage.removeItem("kirby$form$"+n),!1;const l={api:o.api,originals:o.originals,changes:o.values};t.commit("CREATE",[n,l]),$u(n,l),localStorage.removeItem("kirby$form$"+n)}},clear(t){t.commit("CLEAR")},create(t,e){const i=bt(e.content);if(Array.isArray(e.ignore))for(const s of e.ignore)delete i[s];e.id=t.getters.id(e.id);const n={api:e.api,originals:i,changes:{}};t.commit("CREATE",[e.id,n]),t.dispatch("current",e.id)},current(t,e){t.commit("CURRENT",e)},disable(t){t.commit("STATUS",!1)},enable(t){t.commit("STATUS",!0)},move(t,[e,i]){e=t.getters.id(e),i=t.getters.id(i),t.commit("MOVE",[e,i])},remove(t,e){t.commit("REMOVE",e),t.getters.isCurrent(e)&&t.commit("CURRENT",null)},revert(t,e){e=e??t.state.current,t.commit("REVERT",e)},async save(t,e){if(e=e??t.state.current,t.getters.isCurrent(e)&&!1===t.state.status.enabled)return!1;t.dispatch("disable");const i=t.getters.model(e),n={...i.originals,...i.changes};try{await window.panel.api.patch(i.api,n),t.commit("CREATE",[e,{...i,originals:n}]),t.dispatch("revert",e)}finally{t.dispatch("enable")}},update(t,[e,i,n]){if(n=n??t.state.current,null===e)for(const s in i)t.commit("UPDATE",[n,s,i[s]]);else t.commit("UPDATE",[n,e,i])}}},xu={namespaced:!0,actions:{close(t,e){window.panel.deprecated("`$store.drawer` will be removed in a future version. Use `$panel.drawer` instead."),window.panel.drawer.close(e)},goto(t,e){window.panel.deprecated("`$store.drawer` will be removed in a future version. Use `$panel.drawer` instead."),window.panel.drawer.goto(e)},open(t,e){window.panel.deprecated("`$store.drawer` will be removed in a future version. Use `$panel.drawer` instead."),window.panel.drawer.goto(e)}}},_u={namespaced:!0,actions:{close(){window.panel.deprecated("`$store.notification` will be removed in a future version. Use `$panel.notification` instead."),window.panel.notification.close()},deprecated(t,e){window.panel.deprecated("`$store.notification.deprecated` will be removed in a future version. Use `$panel.deprecated` instead."),window.panel.notification.deprecated(e)},error(t,e){window.panel.deprecated("`$store.notification` will be removed in a future version. Use `$panel.notification` instead."),window.panel.notification.error(e)},open(t,e){window.panel.deprecated("`$store.notification` will be removed in a future version. Use `$panel.notification` instead."),window.panel.notification.open(e)},success(t,e){window.panel.deprecated("`$store.notification` will be removed in a future version. Use `$panel.notification` instead."),window.panel.notification.success(e)}}};Vue.use(P);const Su=new P.Store({strict:!1,actions:{dialog(t,e){window.panel.deprecated("`$store.dialog` will be removed in a future version. Use `$panel.dialog.open()` instead."),window.panel.dialog.open(e)},drag(t,e){window.panel.deprecated("`$store.drag` will be removed in a future version. Use `$panel.drag.start(type, data)` instead."),window.panel.drag.start(...e)},fatal(t,e){window.panel.deprecated("`$store.fatal` will be removed in a future version. Use `$panel.notification.fatal()` instead."),window.panel.notification.fatal(e)},isLoading(t,e){window.panel.deprecated("`$store.isLoading` will be removed in a future version. Use `$panel.isLoading` instead."),window.panel.isLoading=e},navigate(){window.panel.deprecated("`$store.navigate` will be removed in a future version."),window.panel.dialog.close(),window.panel.drawer.close()}},modules:{content:wu,drawers:xu,notification:_u}});Vue.config.productionTip=!1,Vue.config.devtools=!0,Vue.use(ka),Vue.use(Na),Vue.use(N),Vue.use(Mr),window.panel=Vue.prototype.$panel=yu.create(window.panel.plugins),Vue.prototype.$dialog=window.panel.dialog.open.bind(window.panel.dialog),Vue.prototype.$drawer=window.panel.drawer.open.bind(window.panel.drawer),Vue.prototype.$dropdown=window.panel.dropdown.openAsync.bind(window.panel.dropdown),Vue.prototype.$go=window.panel.view.open.bind(window.panel.view),Vue.prototype.$reload=window.panel.reload.bind(window.panel),window.panel.app=new Vue({store:Su,render:()=>Vue.h(R)}),Vue.use(ba),Vue.use(jr),Vue.use(va),!1===CSS.supports("container","foo / inline-size")&&F((()=>import("./container-query-polyfill.modern.min.js")),[],import.meta.url),window.panel.app.$mount("#app");export{F as _,at as n};
diff --git a/panel/dist/ui/Autocomplete.json b/panel/dist/ui/Autocomplete.json
index 419c067019..508758093d 100644
--- a/panel/dist/ui/Autocomplete.json
+++ b/panel/dist/ui/Autocomplete.json
@@ -1 +1 @@
-{"description":"The Autocomplete component can be wrapped around any form of input to get an flexible starting point to provide an real-time autocomplete dropdown. We use it for our `TagsInput` component.","tags":{},"displayName":"Autocomplete","props":[{"name":"html","description":"If set to `true`, the text of the options is rendered as HTML","type":{"name":"boolean"},"defaultValue":{"value":"false"}},{"name":"limit","description":"Maximum number of displayed results","type":{"name":"number"},"defaultValue":{"value":"10"}},{"name":"skip","description":"You can pass an array of strings, which should be ignored in the search.","type":{"name":"array"},"defaultValue":{"value":"[]"}},{"name":"options","description":"Options for the autocomplete dropdown must be passed as an array of\nobjects. Each object can have as many items as you like, but a text\nitem is required to match agains the query","tags":{"example":[{"description":"[ { text: \"this will be searched\", id: \"anything else is optional\" }, ];","title":"example"}]},"type":{"name":"array"}},{"name":"query","description":"Term to filter options","type":{"name":"string"}}],"events":[{"name":"leave"},{"name":"search","type":{"names":["undefined"]},"description":"Search has been performed","properties":[{"type":{"names":["string"]},"name":"query"},{"type":{"names":["array"]},"name":"matches","description":"all options that match the search query"}]},{"name":"select","type":{"names":["undefined"]},"description":"New value has been selected","properties":[{"type":{"names":["object"]},"name":"item","description":"option item"}]}],"methods":[{"name":"search","description":"Opens the dropdown and filters the options","params":[{"name":"query","type":{"name":"string"},"description":"search term"}],"tags":{"access":[{"description":"public"}],"params":[{"title":"param","type":{"name":"string"},"name":"query","description":"search term"}]}}],"slots":[{"name":"default","description":"Use to insert your input"}],"component":"k-autocomplete","sourceFile":"src/components/Forms/Autocomplete.vue"}
\ No newline at end of file
+{"description":"The Autocomplete component can be wrapped around any form of input to get an flexible starting point to provide an real-time autocomplete dropdown. We use it for our `TagsInput` component.","tags":{"deprecated":[{"description":"4.0.0","title":"deprecated"}]},"displayName":"Autocomplete","props":[{"name":"html","description":"If set to `true`, the text of the options is rendered as HTML","type":{"name":"boolean"},"defaultValue":{"value":"false"}},{"name":"limit","description":"Maximum number of displayed results","type":{"name":"number"},"defaultValue":{"value":"10"}},{"name":"skip","description":"You can pass an array of strings, which should be ignored in the search.","type":{"name":"array"},"defaultValue":{"value":"[]"}},{"name":"options","description":"Options for the autocomplete dropdown must be passed as an array of\nobjects. Each object can have as many items as you like, but a text\nitem is required to match agains the query","tags":{"example":[{"description":"[ { text: \"this will be searched\", id: \"anything else is optional\" }, ];","title":"example"}]},"type":{"name":"array"}},{"name":"query","description":"Term to filter options","type":{"name":"string"}}],"events":[{"name":"leave"},{"name":"search","type":{"names":["undefined"]},"description":"Search has been performed","properties":[{"type":{"names":["string"]},"name":"query"},{"type":{"names":["array"]},"name":"matches","description":"all options that match the search query"}]},{"name":"select","type":{"names":["undefined"]},"description":"New value has been selected","properties":[{"type":{"names":["object"]},"name":"item","description":"option item"}]}],"methods":[{"name":"search","description":"Opens the dropdown and filters the options","params":[{"name":"query","type":{"name":"string"},"description":"search term"}],"tags":{"access":[{"description":"public"}],"params":[{"title":"param","type":{"name":"string"},"name":"query","description":"search term"}]}}],"slots":[{"name":"default","description":"Use to insert your input"}],"component":"k-autocomplete","sourceFile":"src/components/Forms/Autocomplete.vue"}
\ No newline at end of file
diff --git a/panel/dist/ui/Blocks.json b/panel/dist/ui/Blocks.json
index 892c897c1b..db2a50579b 100644
--- a/panel/dist/ui/Blocks.json
+++ b/panel/dist/ui/Blocks.json
@@ -1 +1 @@
-{"displayName":"Blocks","description":"","tags":{},"props":[{"name":"autofocus","type":{"name":"boolean"}},{"name":"empty","type":{"name":"string"}},{"name":"endpoints","type":{"name":"object"}},{"name":"fieldsets","type":{"name":"object"}},{"name":"fieldsetGroups","type":{"name":"object"}},{"name":"group","type":{"name":"string"}},{"name":"max","type":{"name":"number"},"defaultValue":{"value":"null"}},{"name":"value","type":{"name":"array"},"defaultValue":{"value":"[]"}}],"events":[{"name":"click","type":{"names":["undefined"]}},{"name":"input","type":{"names":["undefined"]}}],"component":"k-blocks","sourceFile":"src/components/Forms/Blocks/Blocks.vue"}
\ No newline at end of file
+{"displayName":"Blocks","description":"","tags":{},"props":[{"name":"autofocus","type":{"name":"boolean"}},{"name":"disabled","type":{"name":"boolean"}},{"name":"empty","type":{"name":"string"}},{"name":"endpoints","type":{"name":"object"}},{"name":"fieldsets","type":{"name":"object"}},{"name":"fieldsetGroups","type":{"name":"object"}},{"name":"group","type":{"name":"string"}},{"name":"max","type":{"name":"number"},"defaultValue":{"value":"null"}},{"name":"value","type":{"name":"array"},"defaultValue":{"value":"[]"}}],"events":[{"name":"input","type":{"names":["undefined"]}}],"component":"k-blocks","sourceFile":"src/components/Forms/Blocks/Blocks.vue"}
\ No newline at end of file
diff --git a/panel/dist/ui/Collection.json b/panel/dist/ui/Collection.json
index 75bafbabbf..10b533423d 100644
--- a/panel/dist/ui/Collection.json
+++ b/panel/dist/ui/Collection.json
@@ -1 +1 @@
-{"displayName":"Collection","description":"The `k-collection` component is a wrapper around `k-items`\nthat adds sortabilty and pagination to the items.","tags":{},"props":[{"name":"layout","description":"Display layout","tags":{},"values":["\"list\"","\"cards\"","\"cardlets\"","\"table\""],"type":{"name":"string"},"defaultValue":{"value":"\"list\""}},{"name":"columns","description":"Optional column settings for the table layout","type":{"name":"object|array"},"defaultValue":{"value":"() => ({})"}},{"name":"items","description":"Array of item definitions. See `k-item` for available options.","type":{"name":"array"},"defaultValue":{"value":"[]"}},{"name":"link","description":"Enable/disable that each item is a clickable link","type":{"name":"boolean"},"defaultValue":{"value":"true"}},{"name":"sortable","description":"Whether items are generally sortable.\nEach item can disable this individually.","type":{"name":"boolean"}},{"name":"size","description":"Card sizes","tags":{},"values":["\"tiny\"","\"small\"","\"medium\"","\"large\"","\"huge\""],"type":{"name":"string"},"defaultValue":{"value":"\"medium\""}},{"name":"empty","description":"Empty state, see `k-empty` for all options","type":{"name":"object"},"defaultValue":{"value":"{}"}},{"name":"help","description":"Help text to show below the collection","type":{"name":"string"}},{"name":"pagination","description":"Whether pagination should be shown, and if,\npagination options (see `k-pagination` for details)","type":{"name":"boolean|object"},"defaultValue":{"value":"false"}}],"events":[{"name":"change"},{"name":"item"},{"name":"sort"},{"name":"paginate","description":"Emitted when the pagination changes","properties":[{"type":{"names":["object"]},"name":"pagination"}]},{"name":"hover"},{"name":"empty"},{"name":"action","type":{"names":["undefined"]}},{"name":"option","type":{"names":["undefined"]}}],"slots":[{"name":"options","scoped":true,"bindings":[{"name":"item","title":"binding"},{"name":"index","title":"binding"}]},{"name":"default","scoped":true,"bindings":[{"name":"item","title":"binding"},{"name":"itemIndex","title":"binding"}]}],"component":"k-collection","sourceFile":"src/components/Collection/Collection.vue"}
\ No newline at end of file
+{"displayName":"Collection","description":"The `k-collection` component is a wrapper around `k-items`\nthat adds sortabilty and pagination to the items.","tags":{},"props":[{"name":"layout","description":"Display layout","tags":{},"values":["\"list\"","\"cards\"","\"cardlets\"","\"table\""],"type":{"name":"string"},"defaultValue":{"value":"\"list\""}},{"name":"columns","description":"Optional column settings for the table layout","type":{"name":"object|array"},"defaultValue":{"value":"() => ({})"}},{"name":"items","description":"Array of item definitions. See `k-item` for available options.","type":{"name":"array"},"defaultValue":{"value":"[]"}},{"name":"link","description":"Enable/disable that each item is a clickable link","type":{"name":"boolean"},"defaultValue":{"value":"true"}},{"name":"sortable","description":"Whether items are generally sortable.\nEach item can disable this individually.","type":{"name":"boolean"}},{"name":"size","description":"Card sizes","tags":{},"values":["\"tiny\"","\"small\"","\"medium\"","\"large\"","\"huge\"","\"full\""],"type":{"name":"string"},"defaultValue":{"value":"\"medium\""}},{"name":"empty","description":"Empty state, see `k-empty` for all options","type":{"name":"object"},"defaultValue":{"value":"{}"}},{"name":"help","description":"Help text to show below the collection","type":{"name":"string"}},{"name":"pagination","description":"Whether pagination should be shown, and if,\npagination options (see `k-pagination` for details)","type":{"name":"boolean|object"},"defaultValue":{"value":"false"}}],"events":[{"name":"change"},{"name":"item"},{"name":"sort"},{"name":"paginate","description":"Emitted when the pagination changes","properties":[{"type":{"names":["object"]},"name":"pagination"}]},{"name":"hover"},{"name":"empty"},{"name":"action","type":{"names":["undefined"]}},{"name":"option","type":{"names":["undefined"]}}],"slots":[{"name":"options","scoped":true,"bindings":[{"name":"item","title":"binding"},{"name":"index","title":"binding"}]},{"name":"default","scoped":true,"bindings":[{"name":"item","title":"binding"},{"name":"itemIndex","title":"binding"}]}],"component":"k-collection","sourceFile":"src/components/Collection/Collection.vue"}
\ No newline at end of file
diff --git a/panel/dist/ui/ColorField.json b/panel/dist/ui/ColorField.json
index 49d81edc8f..7a39752ac5 100644
--- a/panel/dist/ui/ColorField.json
+++ b/panel/dist/ui/ColorField.json
@@ -1 +1 @@
-{"displayName":"ColorField","description":"","tags":{"since":[{"description":"4.0.0","title":"since"}]},"props":[{"name":"disabled","description":"If `true`, the field is no longer editable and will not be saved","type":{"name":"boolean"}},{"name":"help","description":"Optional help text below the field","type":{"name":"string"}},{"name":"label","description":"A descriptive label for the field","type":{"name":"string"}},{"name":"name","description":"A unique name for the input","type":{"name":"number|string"}},{"name":"required","description":"If `true`, the field has to be filled in correctly to be submitted","type":{"name":"boolean"}},{"name":"counter","type":{"name":"boolean|object"}},{"name":"endpoints","type":{"name":"object"}},{"name":"input","type":{"name":"string|number"}},{"name":"translate","type":{"name":"boolean"}},{"name":"type","type":{"name":"string"}},{"name":"after","description":"Optional text that will be shown after the input","type":{"name":"string"}},{"name":"before","description":"Optional text that will be shown before the input","type":{"name":"string"}},{"name":"invalid","description":"Marks the field/input as invalid","type":{"name":"boolean"}},{"name":"autofocus","type":{"name":"boolean"}},{"name":"icon","type":{"name":"string"},"defaultValue":{"value":"\"pipette\""}},{"name":"novalidate","type":{"name":"boolean"},"defaultValue":{"value":"false"}},{"name":"value","type":{"name":"string"},"defaultValue":{"value":"null"}},{"name":"placeholder","description":"Custom placeholder text, when the field is empty","type":{"name":"number|string"}},{"name":"alpha","type":{"name":"boolean"},"defaultValue":{"value":"true"}},{"name":"format","tags":{},"values":["\"hex\"","\"rgb\"","\"hsl\""],"type":{"name":"string"},"defaultValue":{"value":"\"hex\""}},{"name":"mode","description":"Display mode","tags":{},"values":["\"picker\"","\"input\"","\"options\""],"type":{"name":"string"},"defaultValue":{"value":"\"picker\""}},{"name":"options","description":"Array of color options","type":{"name":"array"},"defaultValue":{"value":"[]"}}],"events":[{"name":"input"},{"name":"focus"},{"name":"blur"}],"slots":[{"name":"header"},{"name":"label"},{"name":"options"},{"name":"counter"},{"name":"default"},{"name":"footer"},{"name":"help"},{"name":"before"},{"name":"after"},{"name":"icon"}],"component":"k-color-field","sourceFile":"src/components/Forms/Field/ColorField.vue"}
\ No newline at end of file
+{"displayName":"ColorField","description":"","tags":{"since":[{"description":"4.0.0","title":"since"}]},"props":[{"name":"disabled","description":"If `true`, the field is no longer editable and will not be saved","type":{"name":"boolean"}},{"name":"help","description":"Optional help text below the field","type":{"name":"string"}},{"name":"label","description":"A descriptive label for the field","type":{"name":"string"}},{"name":"name","description":"A unique name for the input","type":{"name":"number|string"}},{"name":"required","description":"If `true`, the field has to be filled in correctly to be submitted","type":{"name":"boolean"}},{"name":"counter","type":{"name":"boolean|object"}},{"name":"endpoints","type":{"name":"object"}},{"name":"input","type":{"name":"string|number"}},{"name":"translate","type":{"name":"boolean"}},{"name":"type","type":{"name":"string"},"defaultValue":{"value":"\"text\""}},{"name":"after","description":"Optional text that will be shown after the input","type":{"name":"string"}},{"name":"before","description":"Optional text that will be shown before the input","type":{"name":"string"}},{"name":"invalid","description":"Marks the field/input as invalid","type":{"name":"boolean"}},{"name":"autofocus","type":{"name":"boolean"}},{"name":"icon","type":{"name":"string"},"defaultValue":{"value":"\"pipette\""}},{"name":"novalidate","type":{"name":"boolean"},"defaultValue":{"value":"false"}},{"name":"value","type":{"name":"string"},"defaultValue":{"value":"null"}},{"name":"autocomplete","description":"Sets the HTML5 autocomplete mode for the input","type":{"name":"string"},"defaultValue":{"value":"\"off\""}},{"name":"font","description":"Changes the font of the input to monospace or sans","type":{"name":"string"}},{"name":"maxlength","description":"Maximum number of allowed characters","type":{"name":"number"}},{"name":"minlength","description":"Minimum number of required characters","type":{"name":"number"}},{"name":"pattern","description":"A regular expression, which will be used to validate the input","type":{"name":"string"}},{"name":"placeholder","description":"Custom placeholder text, when the field is empty","type":{"name":"number|string"}},{"name":"spellcheck","description":"If false, spellchecking will be disabled","type":{"name":"boolean"},"defaultValue":{"value":"false"}},{"name":"ariaLabel","type":{"name":"string"}},{"name":"alpha","description":"Add the alpha value to the color name","type":{"name":"boolean"},"defaultValue":{"value":"true"}},{"name":"format","tags":{},"values":["\"hex\"","\"rgb\"","\"hsl\""],"type":{"name":"string"},"defaultValue":{"value":"\"hex\""}},{"name":"mode","description":"Display mode","tags":{},"values":["\"picker\"","\"input\"","\"options\""],"type":{"name":"string"},"defaultValue":{"value":"\"picker\""}},{"name":"options","description":"Array of color options","type":{"name":"array"},"defaultValue":{"value":"[]"}}],"events":[{"name":"input"},{"name":"focus"},{"name":"blur"}],"slots":[{"name":"header"},{"name":"label"},{"name":"options"},{"name":"counter"},{"name":"default"},{"name":"footer"},{"name":"help"},{"name":"before"},{"name":"after"},{"name":"icon"}],"component":"k-color-field","sourceFile":"src/components/Forms/Field/ColorField.vue"}
\ No newline at end of file
diff --git a/panel/dist/ui/ColorInput.json b/panel/dist/ui/ColorInput.json
deleted file mode 100644
index 7b42baef0d..0000000000
--- a/panel/dist/ui/ColorInput.json
+++ /dev/null
@@ -1 +0,0 @@
-{"displayName":"ColorInput","description":"","tags":{"since":[{"description":"4.0.0","title":"since"}]},"props":[{"name":"autofocus","description":"Sets the focus on this field when the form loads. Only the first field with this label gets","type":{"name":"boolean"}},{"name":"disabled","description":"If `true`, the field is no longer editable and will not be saved","type":{"name":"boolean"}},{"name":"id","description":"A unique ID. The component `_uid` will be used as default.","type":{"name":"number|string"},"defaultValue":{"value":"function() {\n return this._uid;\n}"}},{"name":"name","description":"A unique name for the input","type":{"name":"number|string"}},{"name":"required","description":"If `true`, the field has to be filled in correctly to be submitted","type":{"name":"boolean"}},{"name":"placeholder","description":"Custom placeholder text, when the field is empty","type":{"name":"number|string"}},{"name":"alpha","type":{"name":"boolean"},"defaultValue":{"value":"true"}},{"name":"format","tags":{},"values":["\"hex\"","\"rgb\"","\"hsl\""],"type":{"name":"string"},"defaultValue":{"value":"\"hex\""}},{"name":"value","type":{"name":"string"}}],"events":[{"name":"input","type":{"names":["undefined"]}},{"name":"invalid","type":{"names":["undefined"]},"properties":[{"type":{"names":["undefined"]},"name":""}]},{"name":"submit"}],"methods":[{"name":"focus","description":"Focuses the input element","tags":{"access":[{"description":"public"}]}}],"component":"k-color-input","sourceFile":"src/components/Forms/Input/ColorInput.vue"}
\ No newline at end of file
diff --git a/panel/dist/ui/ColornameInput.json b/panel/dist/ui/ColornameInput.json
index 20de8fdd48..8d73f2d2c4 100644
--- a/panel/dist/ui/ColornameInput.json
+++ b/panel/dist/ui/ColornameInput.json
@@ -1 +1 @@
-{"displayName":"ColornameInput","description":"","tags":{"since":[{"description":"4.0.0","title":"since"}],"examples":[{"title":"example","content":""}]},"props":[{"name":"autofocus","description":"Sets the focus on this field when the form loads. Only the first field with this label gets","type":{"name":"boolean"}},{"name":"disabled","description":"If `true`, the field is no longer editable and will not be saved","type":{"name":"boolean"}},{"name":"id","description":"A unique ID. The component `_uid` will be used as default.","type":{"name":"number|string"},"defaultValue":{"value":"function() {\n return this._uid;\n}"}},{"name":"name","description":"A unique name for the input","type":{"name":"number|string"}},{"name":"required","description":"If `true`, the field has to be filled in correctly to be submitted","type":{"name":"boolean"}},{"name":"autocomplete","description":"Sets the HTML5 autocomplete mode for the input","type":{"name":"string"},"defaultValue":{"value":"\"off\""}},{"name":"font","description":"Changes the font of the input to monospace or sans","type":{"name":"string"}},{"name":"maxlength","description":"Maximum number of allowed characters","type":{"name":"number"}},{"name":"minlength","description":"Minimum number of required characters","type":{"name":"number"}},{"name":"pattern","description":"A regular expression, which will be used to validate the input","type":{"name":"string"}},{"name":"placeholder","description":"Custom placeholder text, when the field is empty","type":{"name":"number|string"}},{"name":"spellcheck","description":"If false, spellchecking will be disabled","type":{"name":"string"},"defaultValue":{"value":"\"false\""}},{"name":"ariaLabel","type":{"name":"string"}},{"name":"type","type":{"name":"string"},"defaultValue":{"value":"\"text\""}},{"name":"value","type":{"name":"string"}},{"name":"alpha","description":"Add the alpha value to the color name","type":{"name":"boolean"},"defaultValue":{"value":"true"}},{"name":"format","tags":{},"values":["\"hex\"","\"rgb\"","\"hsl\""],"type":{"name":"string"},"defaultValue":{"value":"\"hex\""}}],"events":[{"name":"input","type":{"names":["undefined"]}}],"methods":[{"name":"focus","description":"Focuses the input element","tags":{"access":[{"description":"public"}]}}],"component":"k-colorname-input","sourceFile":"src/components/Forms/Input/ColornameInput.vue"}
\ No newline at end of file
+{"displayName":"ColornameInput","description":"","tags":{"since":[{"description":"4.0.0","title":"since"}],"examples":[{"title":"example","content":""}]},"props":[{"name":"autofocus","description":"Sets the focus on this field when the form loads. Only the first field with this label gets","type":{"name":"boolean"}},{"name":"disabled","description":"If `true`, the field is no longer editable and will not be saved","type":{"name":"boolean"}},{"name":"id","description":"A unique ID. The component `_uid` will be used as default.","type":{"name":"number|string"},"defaultValue":{"value":"function() {\n return this._uid;\n}"}},{"name":"name","description":"A unique name for the input","type":{"name":"number|string"}},{"name":"required","description":"If `true`, the field has to be filled in correctly to be submitted","type":{"name":"boolean"}},{"name":"autocomplete","description":"Sets the HTML5 autocomplete mode for the input","type":{"name":"string"},"defaultValue":{"value":"\"off\""}},{"name":"font","description":"Changes the font of the input to monospace or sans","type":{"name":"string"}},{"name":"maxlength","description":"Maximum number of allowed characters","type":{"name":"number"}},{"name":"minlength","description":"Minimum number of required characters","type":{"name":"number"}},{"name":"pattern","description":"A regular expression, which will be used to validate the input","type":{"name":"string"}},{"name":"placeholder","description":"Custom placeholder text, when the field is empty","type":{"name":"number|string"}},{"name":"spellcheck","description":"If false, spellchecking will be disabled","type":{"name":"boolean"},"defaultValue":{"value":"false"}},{"name":"ariaLabel","type":{"name":"string"}},{"name":"type","type":{"name":"string"},"defaultValue":{"value":"\"text\""}},{"name":"value","type":{"name":"string"}},{"name":"alpha","description":"Add the alpha value to the color name","type":{"name":"boolean"},"defaultValue":{"value":"true"}},{"name":"format","tags":{},"values":["\"hex\"","\"rgb\"","\"hsl\""],"type":{"name":"string"},"defaultValue":{"value":"\"hex\""}}],"events":[{"name":"input","type":{"names":["undefined"]}}],"methods":[{"name":"focus","description":"Focuses the input element","tags":{"access":[{"description":"public"}]}}],"component":"k-colorname-input","sourceFile":"src/components/Forms/Input/ColornameInput.vue"}
\ No newline at end of file
diff --git a/panel/dist/ui/ColoroptionsInput.json b/panel/dist/ui/ColoroptionsInput.json
index 6b686cddb9..de3a0552d3 100644
--- a/panel/dist/ui/ColoroptionsInput.json
+++ b/panel/dist/ui/ColoroptionsInput.json
@@ -1 +1 @@
-{"displayName":"ColoroptionsInput","description":"","tags":{"since":[{"description":"4.0.0","title":"since"}],"examples":[{"title":"example","content":""}]},"props":[{"name":"autofocus","description":"Sets the focus on this field when the form loads. Only the first field with this label gets","type":{"name":"boolean"}},{"name":"disabled","description":"If `true`, the field is no longer editable and will not be saved","type":{"name":"boolean"}},{"name":"id","description":"A unique ID. The component `_uid` will be used as default.","type":{"name":"number|string"},"defaultValue":{"value":"function() {\n return this._uid;\n}"}},{"name":"name","description":"A unique name for the input","type":{"name":"number|string"}},{"name":"required","description":"If `true`, the field has to be filled in correctly to be submitted","type":{"name":"boolean"}},{"name":"options","description":"An array of option objects `{ value, text, info }`","type":{"name":"array"},"defaultValue":{"value":"[]"}},{"name":"columns","type":{"name":"number"}},{"name":"reset","type":{"name":"boolean"},"defaultValue":{"value":"true"}},{"name":"theme","type":{"name":"string"}},{"name":"value","type":{"name":"string"}},{"name":"format","type":{"name":"string"},"defaultValue":{"value":"\"hex\""},"values":["hex","rgb","hsl"]}],"events":[{"name":"input","type":{"names":["undefined"]}},{"name":"invalid","type":{"names":["undefined"]},"properties":[{"type":{"names":["undefined"]},"name":""}]}],"methods":[{"name":"focus","description":"Focuses the input element","tags":{"access":[{"description":"public"}]}}],"component":"k-coloroptions-input","sourceFile":"src/components/Forms/Input/ColoroptionsInput.vue"}
\ No newline at end of file
+{"displayName":"ColoroptionsInput","description":"","tags":{"since":[{"description":"4.0.0","title":"since"}],"examples":[{"title":"example","content":""}]},"props":[{"name":"autofocus","description":"Sets the focus on this field when the form loads. Only the first field with this label gets","type":{"name":"boolean"}},{"name":"disabled","description":"If `true`, the field is no longer editable and will not be saved","type":{"name":"boolean"}},{"name":"id","description":"A unique ID. The component `_uid` will be used as default.","type":{"name":"number|string"},"defaultValue":{"value":"function() {\n return this._uid;\n}"}},{"name":"name","description":"A unique name for the input","type":{"name":"number|string"}},{"name":"required","description":"If `true`, the field has to be filled in correctly to be submitted","type":{"name":"boolean"}},{"name":"options","description":"An array of option objects `{ value, text, info }`","type":{"name":"array"},"defaultValue":{"value":"[]"}},{"name":"columns","type":{"name":"number"}},{"name":"reset","type":{"name":"boolean"},"defaultValue":{"value":"true"}},{"name":"theme","type":{"name":"string"}},{"name":"value","type":{"name":"string"}},{"name":"format","tags":{},"values":["\"hex\"","\"rgb\"","\"hsl\""],"type":{"name":"string"},"defaultValue":{"value":"\"hex\""}}],"events":[{"name":"input","type":{"names":["undefined"]}},{"name":"invalid","type":{"names":["undefined"]},"properties":[{"type":{"names":["undefined"]},"name":""}]}],"methods":[{"name":"focus","description":"Focuses the input element","tags":{"access":[{"description":"public"}]}}],"component":"k-coloroptions-input","sourceFile":"src/components/Forms/Input/ColoroptionsInput.vue"}
\ No newline at end of file
diff --git a/panel/dist/ui/ColorpickerInput.json b/panel/dist/ui/ColorpickerInput.json
index afbcab809b..4601ab8849 100644
--- a/panel/dist/ui/ColorpickerInput.json
+++ b/panel/dist/ui/ColorpickerInput.json
@@ -1 +1 @@
-{"displayName":"ColorpickerInput","description":"","tags":{"since":[{"description":"4.0.0","title":"since"}]},"props":[{"name":"autofocus","description":"Sets the focus on this field when the form loads. Only the first field with this label gets","type":{"name":"boolean"}},{"name":"disabled","description":"If `true`, the field is no longer editable and will not be saved","type":{"name":"boolean"}},{"name":"id","description":"A unique ID. The component `_uid` will be used as default.","type":{"name":"number|string"},"defaultValue":{"value":"function() {\n return this._uid;\n}"}},{"name":"name","description":"A unique name for the input","type":{"name":"number|string"}},{"name":"required","description":"If `true`, the field has to be filled in correctly to be submitted","type":{"name":"boolean"}},{"name":"options","description":"An array of option objects `{ value, text, info }`","type":{"name":"array"},"defaultValue":{"value":"[]"}},{"name":"alpha","type":{"name":"boolean"},"defaultValue":{"value":"true"}},{"name":"format","type":{"name":"string"},"defaultValue":{"value":"\"hex\""},"values":["hex","rgb","hsl"]},{"name":"value","type":{"name":"object|string"}}],"events":[{"name":"input","type":{"names":["undefined"]}}],"methods":[{"name":"focus","description":"Focuses the input element","tags":{"access":[{"description":"public"}]}}],"component":"k-colorpicker-input","sourceFile":"src/components/Forms/Input/ColorpickerInput.vue"}
\ No newline at end of file
+{"displayName":"ColorpickerInput","description":"","tags":{"since":[{"description":"4.0.0","title":"since"}]},"props":[{"name":"autofocus","description":"Sets the focus on this field when the form loads. Only the first field with this label gets","type":{"name":"boolean"}},{"name":"disabled","description":"If `true`, the field is no longer editable and will not be saved","type":{"name":"boolean"}},{"name":"id","description":"A unique ID. The component `_uid` will be used as default.","type":{"name":"number|string"},"defaultValue":{"value":"function() {\n return this._uid;\n}"}},{"name":"name","description":"A unique name for the input","type":{"name":"number|string"}},{"name":"required","description":"If `true`, the field has to be filled in correctly to be submitted","type":{"name":"boolean"}},{"name":"options","description":"An array of option objects `{ value, text, info }`","type":{"name":"array"},"defaultValue":{"value":"[]"}},{"name":"alpha","description":"Show the alpha tange input","type":{"name":"boolean"},"defaultValue":{"value":"true"}},{"name":"format","tags":{},"values":["\"hex\"","\"rgb\"","\"hsl\""],"type":{"name":"string"},"defaultValue":{"value":"\"hex\""}},{"name":"value","type":{"name":"object|string"}}],"events":[{"name":"input","type":{"names":["undefined"]}}],"methods":[{"name":"focus","description":"Focuses the input element","tags":{"access":[{"description":"public"}]}}],"component":"k-colorpicker-input","sourceFile":"src/components/Forms/Input/ColorpickerInput.vue"}
\ No newline at end of file
diff --git a/panel/dist/ui/Items.json b/panel/dist/ui/Items.json
index 35225dfc43..205ce955d6 100644
--- a/panel/dist/ui/Items.json
+++ b/panel/dist/ui/Items.json
@@ -1 +1 @@
-{"displayName":"Items","description":"Collection items that can be displayed in various layouts","tags":{},"props":[{"name":"layout","description":"Display layout","tags":{},"values":["\"list\"","\"cards\"","\"cardlets\"","\"table\""],"type":{"name":"string"},"defaultValue":{"value":"\"list\""}},{"name":"columns","description":"Optional column settings for the table layout","type":{"name":"object|array"},"defaultValue":{"value":"() => ({})"}},{"name":"items","description":"Array of item definitions. See `k-item` for available options.","type":{"name":"array"},"defaultValue":{"value":"[]"}},{"name":"link","description":"Enable/disable that each item is a clickable link","type":{"name":"boolean"},"defaultValue":{"value":"true"}},{"name":"sortable","description":"Whether items are generally sortable.\nEach item can disable this individually.","type":{"name":"boolean"}},{"name":"size","description":"Card sizes","tags":{},"values":["\"tiny\"","\"small\"","\"medium\"","\"large\"","\"huge\""],"type":{"name":"string"},"defaultValue":{"value":"\"medium\""}},{"name":"image","description":"Globale image/icon settings. Will be merged with the image settings of each item. See `k-item-image` for available options.","type":{"name":"object|boolean"},"defaultValue":{"value":"() => ({})"}}],"events":[{"name":"change"},{"name":"sort"},{"name":"item"},{"name":"hover"},{"name":"option","type":{"names":["undefined"]},"properties":[{"type":{"names":["undefined"]},"name":""},{"type":{"names":["undefined"]},"name":""}]}],"slots":[{"name":"options","scoped":true,"bindings":[{"name":"item","title":"binding"},{"name":"index","title":"binding"}]},{"name":"default","scoped":true,"bindings":[{"name":"item","title":"binding"},{"name":"itemIndex","title":"binding"}]}],"component":"k-items","sourceFile":"src/components/Collection/Items.vue"}
\ No newline at end of file
+{"displayName":"Items","description":"Collection items that can be displayed in various layouts","tags":{},"props":[{"name":"layout","description":"Display layout","tags":{},"values":["\"list\"","\"cards\"","\"cardlets\"","\"table\""],"type":{"name":"string"},"defaultValue":{"value":"\"list\""}},{"name":"columns","description":"Optional column settings for the table layout","type":{"name":"object|array"},"defaultValue":{"value":"() => ({})"}},{"name":"items","description":"Array of item definitions. See `k-item` for available options.","type":{"name":"array"},"defaultValue":{"value":"[]"}},{"name":"link","description":"Enable/disable that each item is a clickable link","type":{"name":"boolean"},"defaultValue":{"value":"true"}},{"name":"sortable","description":"Whether items are generally sortable.\nEach item can disable this individually.","type":{"name":"boolean"}},{"name":"size","description":"Card sizes","tags":{},"values":["\"tiny\"","\"small\"","\"medium\"","\"large\"","\"huge\"","\"full\""],"type":{"name":"string"},"defaultValue":{"value":"\"medium\""}},{"name":"image","description":"Globale image/icon settings. Will be merged with the image settings of each item. See `k-item-image` for available options.","type":{"name":"object|boolean"},"defaultValue":{"value":"() => ({})"}}],"events":[{"name":"change"},{"name":"sort"},{"name":"item"},{"name":"hover"},{"name":"option","type":{"names":["undefined"]},"properties":[{"type":{"names":["undefined"]},"name":""},{"type":{"names":["undefined"]},"name":""}]}],"slots":[{"name":"options","scoped":true,"bindings":[{"name":"item","title":"binding"},{"name":"index","title":"binding"}]},{"name":"default","scoped":true,"bindings":[{"name":"item","title":"binding"},{"name":"itemIndex","title":"binding"}]}],"component":"k-items","sourceFile":"src/components/Collection/Items.vue"}
\ No newline at end of file
diff --git a/panel/dist/ui/Navigate.json b/panel/dist/ui/Navigate.json
index 0b36321743..cb37b5e188 100644
--- a/panel/dist/ui/Navigate.json
+++ b/panel/dist/ui/Navigate.json
@@ -1 +1 @@
-{"description":"","tags":{"since":[{"description":"4.0.0","title":"since"}]},"displayName":"Navigate","props":[{"name":"axis","type":{"name":"string"}},{"name":"disabled","type":{"name":"boolean"}},{"name":"select","type":{"name":"string"}}],"slots":[{"name":"default"}],"component":"k-navigate","sourceFile":"src/components/Navigation/Navigate.vue"}
\ No newline at end of file
+{"description":"","tags":{"since":[{"description":"4.0.0","title":"since"}]},"displayName":"Navigate","props":[{"name":"axis","type":{"name":"string"}},{"name":"disabled","type":{"name":"boolean"}},{"name":"element","type":{"name":"string"},"defaultValue":{"value":"\"div\""}},{"name":"select","type":{"name":"string"},"defaultValue":{"value":"\":where(button, a):not(:disabled)\""}}],"events":[{"name":"prev"},{"name":"next"}],"slots":[{"name":"default"}],"component":"k-navigate","sourceFile":"src/components/Navigation/Navigate.vue"}
\ No newline at end of file
diff --git a/vendor/bin/yaml-lint b/vendor/bin/yaml-lint
index 388092f5b4..b5cdff984a 100755
--- a/vendor/bin/yaml-lint
+++ b/vendor/bin/yaml-lint
@@ -112,8 +112,9 @@ if (PHP_VERSION_ID < 80000) {
(function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true))
|| (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper'))
) {
- return include("phpvfscomposer://" . __DIR__ . '/..'.'/symfony/yaml/Resources/bin/yaml-lint');
+ include("phpvfscomposer://" . __DIR__ . '/..'.'/symfony/yaml/Resources/bin/yaml-lint');
+ exit(0);
}
}
-return include __DIR__ . '/..'.'/symfony/yaml/Resources/bin/yaml-lint';
+include __DIR__ . '/..'.'/symfony/yaml/Resources/bin/yaml-lint';
diff --git a/vendor/bin/yaml-lint.bat b/vendor/bin/yaml-lint.bat
deleted file mode 100644
index fbce06e043..0000000000
--- a/vendor/bin/yaml-lint.bat
+++ /dev/null
@@ -1,5 +0,0 @@
-@ECHO OFF
-setlocal DISABLEDELAYEDEXPANSION
-SET BIN_TARGET=%~dp0/yaml-lint
-SET COMPOSER_RUNTIME_BIN_DIR=%~dp0
-php "%BIN_TARGET%" %*
diff --git a/vendor/composer/ClassLoader.php b/vendor/composer/ClassLoader.php
index 7824d8f7ea..a72151c77c 100644
--- a/vendor/composer/ClassLoader.php
+++ b/vendor/composer/ClassLoader.php
@@ -45,34 +45,35 @@ class ClassLoader
/** @var \Closure(string):void */
private static $includeFile;
- /** @var string|null */
+ /** @var ?string */
private $vendorDir;
// PSR-4
/**
- * @var array>
+ * @var array[]
+ * @psalm-var array>
*/
private $prefixLengthsPsr4 = array();
/**
- * @var array>
+ * @var array[]
+ * @psalm-var array>
*/
private $prefixDirsPsr4 = array();
/**
- * @var list
+ * @var array[]
+ * @psalm-var array
*/
private $fallbackDirsPsr4 = array();
// PSR-0
/**
- * List of PSR-0 prefixes
- *
- * Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2')))
- *
- * @var array>>
+ * @var array[]
+ * @psalm-var array>
*/
private $prefixesPsr0 = array();
/**
- * @var list
+ * @var array[]
+ * @psalm-var array
*/
private $fallbackDirsPsr0 = array();
@@ -80,7 +81,8 @@ class ClassLoader
private $useIncludePath = false;
/**
- * @var array
+ * @var string[]
+ * @psalm-var array
*/
private $classMap = array();
@@ -88,20 +90,21 @@ class ClassLoader
private $classMapAuthoritative = false;
/**
- * @var array
+ * @var bool[]
+ * @psalm-var array
*/
private $missingClasses = array();
- /** @var string|null */
+ /** @var ?string */
private $apcuPrefix;
/**
- * @var array
+ * @var self[]
*/
private static $registeredLoaders = array();
/**
- * @param string|null $vendorDir
+ * @param ?string $vendorDir
*/
public function __construct($vendorDir = null)
{
@@ -110,7 +113,7 @@ public function __construct($vendorDir = null)
}
/**
- * @return array>
+ * @return string[]
*/
public function getPrefixes()
{
@@ -122,7 +125,8 @@ public function getPrefixes()
}
/**
- * @return array>
+ * @return array[]
+ * @psalm-return array>
*/
public function getPrefixesPsr4()
{
@@ -130,7 +134,8 @@ public function getPrefixesPsr4()
}
/**
- * @return list
+ * @return array[]
+ * @psalm-return array
*/
public function getFallbackDirs()
{
@@ -138,7 +143,8 @@ public function getFallbackDirs()
}
/**
- * @return list
+ * @return array[]
+ * @psalm-return array
*/
public function getFallbackDirsPsr4()
{
@@ -146,7 +152,8 @@ public function getFallbackDirsPsr4()
}
/**
- * @return array Array of classname => path
+ * @return string[] Array of classname => path
+ * @psalm-return array
*/
public function getClassMap()
{
@@ -154,7 +161,8 @@ public function getClassMap()
}
/**
- * @param array $classMap Class to filename map
+ * @param string[] $classMap Class to filename map
+ * @psalm-param array $classMap
*
* @return void
*/
@@ -171,25 +179,24 @@ public function addClassMap(array $classMap)
* Registers a set of PSR-0 directories for a given prefix, either
* appending or prepending to the ones previously set for this prefix.
*
- * @param string $prefix The prefix
- * @param list|string $paths The PSR-0 root directories
- * @param bool $prepend Whether to prepend the directories
+ * @param string $prefix The prefix
+ * @param string[]|string $paths The PSR-0 root directories
+ * @param bool $prepend Whether to prepend the directories
*
* @return void
*/
public function add($prefix, $paths, $prepend = false)
{
- $paths = (array) $paths;
if (!$prefix) {
if ($prepend) {
$this->fallbackDirsPsr0 = array_merge(
- $paths,
+ (array) $paths,
$this->fallbackDirsPsr0
);
} else {
$this->fallbackDirsPsr0 = array_merge(
$this->fallbackDirsPsr0,
- $paths
+ (array) $paths
);
}
@@ -198,19 +205,19 @@ public function add($prefix, $paths, $prepend = false)
$first = $prefix[0];
if (!isset($this->prefixesPsr0[$first][$prefix])) {
- $this->prefixesPsr0[$first][$prefix] = $paths;
+ $this->prefixesPsr0[$first][$prefix] = (array) $paths;
return;
}
if ($prepend) {
$this->prefixesPsr0[$first][$prefix] = array_merge(
- $paths,
+ (array) $paths,
$this->prefixesPsr0[$first][$prefix]
);
} else {
$this->prefixesPsr0[$first][$prefix] = array_merge(
$this->prefixesPsr0[$first][$prefix],
- $paths
+ (array) $paths
);
}
}
@@ -219,9 +226,9 @@ public function add($prefix, $paths, $prepend = false)
* Registers a set of PSR-4 directories for a given namespace, either
* appending or prepending to the ones previously set for this namespace.
*
- * @param string $prefix The prefix/namespace, with trailing '\\'
- * @param list|string $paths The PSR-4 base directories
- * @param bool $prepend Whether to prepend the directories
+ * @param string $prefix The prefix/namespace, with trailing '\\'
+ * @param string[]|string $paths The PSR-4 base directories
+ * @param bool $prepend Whether to prepend the directories
*
* @throws \InvalidArgumentException
*
@@ -229,18 +236,17 @@ public function add($prefix, $paths, $prepend = false)
*/
public function addPsr4($prefix, $paths, $prepend = false)
{
- $paths = (array) $paths;
if (!$prefix) {
// Register directories for the root namespace.
if ($prepend) {
$this->fallbackDirsPsr4 = array_merge(
- $paths,
+ (array) $paths,
$this->fallbackDirsPsr4
);
} else {
$this->fallbackDirsPsr4 = array_merge(
$this->fallbackDirsPsr4,
- $paths
+ (array) $paths
);
}
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
@@ -250,18 +256,18 @@ public function addPsr4($prefix, $paths, $prepend = false)
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
}
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
- $this->prefixDirsPsr4[$prefix] = $paths;
+ $this->prefixDirsPsr4[$prefix] = (array) $paths;
} elseif ($prepend) {
// Prepend directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge(
- $paths,
+ (array) $paths,
$this->prefixDirsPsr4[$prefix]
);
} else {
// Append directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge(
$this->prefixDirsPsr4[$prefix],
- $paths
+ (array) $paths
);
}
}
@@ -270,8 +276,8 @@ public function addPsr4($prefix, $paths, $prepend = false)
* Registers a set of PSR-0 directories for a given prefix,
* replacing any others previously set for this prefix.
*
- * @param string $prefix The prefix
- * @param list|string $paths The PSR-0 base directories
+ * @param string $prefix The prefix
+ * @param string[]|string $paths The PSR-0 base directories
*
* @return void
*/
@@ -288,8 +294,8 @@ public function set($prefix, $paths)
* Registers a set of PSR-4 directories for a given namespace,
* replacing any others previously set for this namespace.
*
- * @param string $prefix The prefix/namespace, with trailing '\\'
- * @param list|string $paths The PSR-4 base directories
+ * @param string $prefix The prefix/namespace, with trailing '\\'
+ * @param string[]|string $paths The PSR-4 base directories
*
* @throws \InvalidArgumentException
*
@@ -475,9 +481,9 @@ public function findFile($class)
}
/**
- * Returns the currently registered loaders keyed by their corresponding vendor directories.
+ * Returns the currently registered loaders indexed by their corresponding vendor directories.
*
- * @return array
+ * @return self[]
*/
public static function getRegisteredLoaders()
{
diff --git a/vendor/composer/InstalledVersions.php b/vendor/composer/InstalledVersions.php
index 51e734a774..c6b54af7ba 100644
--- a/vendor/composer/InstalledVersions.php
+++ b/vendor/composer/InstalledVersions.php
@@ -98,7 +98,7 @@ public static function isInstalled($packageName, $includeDevRequirements = true)
{
foreach (self::getInstalled() as $installed) {
if (isset($installed['versions'][$packageName])) {
- return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false;
+ return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
}
}
@@ -119,7 +119,7 @@ public static function isInstalled($packageName, $includeDevRequirements = true)
*/
public static function satisfies(VersionParser $parser, $packageName, $constraint)
{
- $constraint = $parser->parseConstraints((string) $constraint);
+ $constraint = $parser->parseConstraints($constraint);
$provided = $parser->parseConstraints(self::getVersionRanges($packageName));
return $provided->matches($constraint);
@@ -328,9 +328,7 @@ private static function getInstalled()
if (isset(self::$installedByVendor[$vendorDir])) {
$installed[] = self::$installedByVendor[$vendorDir];
} elseif (is_file($vendorDir.'/composer/installed.php')) {
- /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $required */
- $required = require $vendorDir.'/composer/installed.php';
- $installed[] = self::$installedByVendor[$vendorDir] = $required;
+ $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
self::$installed = $installed[count($installed) - 1];
}
@@ -342,17 +340,12 @@ private static function getInstalled()
// only require the installed.php file if this file is loaded from its dumped location,
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
if (substr(__DIR__, -8, 1) !== 'C') {
- /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array} $required */
- $required = require __DIR__ . '/installed.php';
- self::$installed = $required;
+ self::$installed = require __DIR__ . '/installed.php';
} else {
self::$installed = array();
}
}
-
- if (self::$installed !== array()) {
- $installed[] = self::$installed;
- }
+ $installed[] = self::$installed;
return $installed;
}
diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php
index 8cfb6680c8..42bfdc5b2f 100644
--- a/vendor/composer/autoload_classmap.php
+++ b/vendor/composer/autoload_classmap.php
@@ -115,6 +115,7 @@
'Kirby\\Cms\\Permissions' => $baseDir . '/src/Cms/Permissions.php',
'Kirby\\Cms\\Picker' => $baseDir . '/src/Cms/Picker.php',
'Kirby\\Cms\\Plugin' => $baseDir . '/src/Cms/Plugin.php',
+ 'Kirby\\Cms\\PluginAsset' => $baseDir . '/src/Cms/PluginAsset.php',
'Kirby\\Cms\\PluginAssets' => $baseDir . '/src/Cms/PluginAssets.php',
'Kirby\\Cms\\R' => $baseDir . '/src/Cms/R.php',
'Kirby\\Cms\\Responder' => $baseDir . '/src/Cms/Responder.php',
@@ -249,6 +250,7 @@
'Kirby\\Panel\\Home' => $baseDir . '/src/Panel/Home.php',
'Kirby\\Panel\\Json' => $baseDir . '/src/Panel/Json.php',
'Kirby\\Panel\\Lab\\Category' => $baseDir . '/src/Panel/Lab/Category.php',
+ 'Kirby\\Panel\\Lab\\Docs' => $baseDir . '/src/Panel/Lab/Docs.php',
'Kirby\\Panel\\Lab\\Example' => $baseDir . '/src/Panel/Lab/Example.php',
'Kirby\\Panel\\Lab\\Snippet' => $baseDir . '/src/Panel/Lab/Snippet.php',
'Kirby\\Panel\\Lab\\Template' => $baseDir . '/src/Panel/Lab/Template.php',
@@ -318,6 +320,7 @@
'Kirby\\Toolkit\\Properties' => $baseDir . '/src/Toolkit/Properties.php',
'Kirby\\Toolkit\\Silo' => $baseDir . '/src/Toolkit/Silo.php',
'Kirby\\Toolkit\\Str' => $baseDir . '/src/Toolkit/Str.php',
+ 'Kirby\\Toolkit\\SymmetricCrypto' => $baseDir . '/src/Toolkit/SymmetricCrypto.php',
'Kirby\\Toolkit\\Totp' => $baseDir . '/src/Toolkit/Totp.php',
'Kirby\\Toolkit\\Tpl' => $baseDir . '/src/Toolkit/Tpl.php',
'Kirby\\Toolkit\\V' => $baseDir . '/src/Toolkit/V.php',
diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php
index e1fd4782e3..2479e11d6f 100644
--- a/vendor/composer/autoload_static.php
+++ b/vendor/composer/autoload_static.php
@@ -236,6 +236,7 @@ class ComposerStaticInita8011b477bb239488e5d139cdeb7b31e
'Kirby\\Cms\\Permissions' => __DIR__ . '/../..' . '/src/Cms/Permissions.php',
'Kirby\\Cms\\Picker' => __DIR__ . '/../..' . '/src/Cms/Picker.php',
'Kirby\\Cms\\Plugin' => __DIR__ . '/../..' . '/src/Cms/Plugin.php',
+ 'Kirby\\Cms\\PluginAsset' => __DIR__ . '/../..' . '/src/Cms/PluginAsset.php',
'Kirby\\Cms\\PluginAssets' => __DIR__ . '/../..' . '/src/Cms/PluginAssets.php',
'Kirby\\Cms\\R' => __DIR__ . '/../..' . '/src/Cms/R.php',
'Kirby\\Cms\\Responder' => __DIR__ . '/../..' . '/src/Cms/Responder.php',
@@ -370,6 +371,7 @@ class ComposerStaticInita8011b477bb239488e5d139cdeb7b31e
'Kirby\\Panel\\Home' => __DIR__ . '/../..' . '/src/Panel/Home.php',
'Kirby\\Panel\\Json' => __DIR__ . '/../..' . '/src/Panel/Json.php',
'Kirby\\Panel\\Lab\\Category' => __DIR__ . '/../..' . '/src/Panel/Lab/Category.php',
+ 'Kirby\\Panel\\Lab\\Docs' => __DIR__ . '/../..' . '/src/Panel/Lab/Docs.php',
'Kirby\\Panel\\Lab\\Example' => __DIR__ . '/../..' . '/src/Panel/Lab/Example.php',
'Kirby\\Panel\\Lab\\Snippet' => __DIR__ . '/../..' . '/src/Panel/Lab/Snippet.php',
'Kirby\\Panel\\Lab\\Template' => __DIR__ . '/../..' . '/src/Panel/Lab/Template.php',
@@ -439,6 +441,7 @@ class ComposerStaticInita8011b477bb239488e5d139cdeb7b31e
'Kirby\\Toolkit\\Properties' => __DIR__ . '/../..' . '/src/Toolkit/Properties.php',
'Kirby\\Toolkit\\Silo' => __DIR__ . '/../..' . '/src/Toolkit/Silo.php',
'Kirby\\Toolkit\\Str' => __DIR__ . '/../..' . '/src/Toolkit/Str.php',
+ 'Kirby\\Toolkit\\SymmetricCrypto' => __DIR__ . '/../..' . '/src/Toolkit/SymmetricCrypto.php',
'Kirby\\Toolkit\\Totp' => __DIR__ . '/../..' . '/src/Toolkit/Totp.php',
'Kirby\\Toolkit\\Tpl' => __DIR__ . '/../..' . '/src/Toolkit/Tpl.php',
'Kirby\\Toolkit\\V' => __DIR__ . '/../..' . '/src/Toolkit/V.php',
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index c35e3b921d..bec6c1aada 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -1068,17 +1068,17 @@
},
{
"name": "symfony/yaml",
- "version": "v6.3.3",
- "version_normalized": "6.3.3.0",
+ "version": "v6.3.7",
+ "version_normalized": "6.3.7.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
- "reference": "e23292e8c07c85b971b44c1c4b87af52133e2add"
+ "reference": "9758b6c69d179936435d0ffb577c3708d57e38a8"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/yaml/zipball/e23292e8c07c85b971b44c1c4b87af52133e2add",
- "reference": "e23292e8c07c85b971b44c1c4b87af52133e2add",
+ "url": "https://api.github.com/repos/symfony/yaml/zipball/9758b6c69d179936435d0ffb577c3708d57e38a8",
+ "reference": "9758b6c69d179936435d0ffb577c3708d57e38a8",
"shasum": ""
},
"require": {
@@ -1092,7 +1092,7 @@
"require-dev": {
"symfony/console": "^5.4|^6.0"
},
- "time": "2023-07-31T07:08:24+00:00",
+ "time": "2023-10-28T23:31:00+00:00",
"bin": [
"Resources/bin/yaml-lint"
],
@@ -1123,7 +1123,7 @@
"description": "Loads and dumps YAML files",
"homepage": "https://symfony.com",
"support": {
- "source": "https://github.com/symfony/yaml/tree/v6.3.3"
+ "source": "https://github.com/symfony/yaml/tree/v6.3.7"
},
"funding": [
{
diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php
index c98221ff29..b3a98ed23e 100644
--- a/vendor/composer/installed.php
+++ b/vendor/composer/installed.php
@@ -1,8 +1,8 @@
array(
'name' => 'getkirby/cms',
- 'pretty_version' => '4.0.0-beta.2',
- 'version' => '4.0.0.0-beta2',
+ 'pretty_version' => '4.0.0-beta.3',
+ 'version' => '4.0.0.0-beta3',
'reference' => NULL,
'type' => 'kirby-cms',
'install_path' => __DIR__ . '/../../',
@@ -47,8 +47,8 @@
'dev_requirement' => false,
),
'getkirby/cms' => array(
- 'pretty_version' => '4.0.0-beta.2',
- 'version' => '4.0.0.0-beta2',
+ 'pretty_version' => '4.0.0-beta.3',
+ 'version' => '4.0.0.0-beta3',
'reference' => NULL,
'type' => 'kirby-cms',
'install_path' => __DIR__ . '/../../',
@@ -167,9 +167,9 @@
),
),
'symfony/yaml' => array(
- 'pretty_version' => 'v6.3.3',
- 'version' => '6.3.3.0',
- 'reference' => 'e23292e8c07c85b971b44c1c4b87af52133e2add',
+ 'pretty_version' => 'v6.3.7',
+ 'version' => '6.3.7.0',
+ 'reference' => '9758b6c69d179936435d0ffb577c3708d57e38a8',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/yaml',
'aliases' => array(),
diff --git a/vendor/symfony/yaml/Inline.php b/vendor/symfony/yaml/Inline.php
index c2a93bab6c..1bd2fe0c7a 100644
--- a/vendor/symfony/yaml/Inline.php
+++ b/vendor/symfony/yaml/Inline.php
@@ -57,6 +57,10 @@ public static function initialize(int $flags, int $parsedLineNumber = null, stri
*/
public static function parse(string $value = null, int $flags = 0, array &$references = []): mixed
{
+ if (null === $value) {
+ return '';
+ }
+
self::initialize($flags);
$value = trim($value);