@26lights/orcha 0.41.143 → 0.41.144
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/orcha.cjs.js +2 -2
- package/dist/orcha.es.js +1 -1
- package/dist/orcha.umd.js +1 -1
- package/package.json +1 -1
package/dist/orcha.es.js
CHANGED
|
@@ -11838,7 +11838,7 @@ const B9 = { class: "ao-card-feed__header" }, j9 = {
|
|
|
11838
11838
|
])) : E("", !0),
|
|
11839
11839
|
f("div", tm, [
|
|
11840
11840
|
A(de, {
|
|
11841
|
-
name: "
|
|
11841
|
+
name: "TimerOutline",
|
|
11842
11842
|
class: "ao-card-feed__timer",
|
|
11843
11843
|
size: "md",
|
|
11844
11844
|
onClick: ve(r, ["stop"])
|
package/dist/orcha.umd.js
CHANGED
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
* vue-color-kit v1.0.6
|
|
4
4
|
* (c) 2023
|
|
5
5
|
* @license MIT
|
|
6
|
-
*/function ot(a){let t={r:0,g:0,b:0,a:1};/#/.test(a)?t=Mf(a):/rgb/.test(a)?t=Tr(a):typeof a=="string"?t=Tr(`rgba(${a})`):Object.prototype.toString.call(a)==="[object Object]"&&(t=a);const{r:o,g:r,b:n,a:s}=t,{h:i,s:l,v:d}=Tf(t);return{r:o,g:r,b:n,a:s===void 0?1:s,h:i,s:l,v:d}}function oo(a){const t=document.createElement("canvas"),o=t.getContext("2d"),r=a*2;return t.width=r,t.height=r,o.fillStyle="#ffffff",o.fillRect(0,0,r,r),o.fillStyle="#ccd5db",o.fillRect(0,0,a,a),o.fillRect(a,a,a,a),t}function ro(a,t,o,r,n,s){const i=a==="l",l=t.createLinearGradient(0,0,i?o:0,i?0:r);l.addColorStop(.01,n),l.addColorStop(.99,s),t.fillStyle=l,t.fillRect(0,0,o,r)}function xf({r:a,g:t,b:o},r){const n=i=>("0"+Number(i).toString(16)).slice(-2),s=`#${n(a)}${n(t)}${n(o)}`;return r?s.toUpperCase():s}function Mf(a){a=a.slice(1);const t=o=>parseInt(o,16)||0;return{r:t(a.slice(0,2)),g:t(a.slice(2,4)),b:t(a.slice(4,6))}}function Tr(a){return typeof a=="string"?(a=(/rgba?\((.*?)\)/.exec(a)||["","0,0,0,1"])[1].split(","),{r:Number(a[0])||0,g:Number(a[1])||0,b:Number(a[2])||0,a:Number(a[3]?a[3]:1)}):a}function Tf({r:a,g:t,b:o}){a=a/255,t=t/255,o=o/255;const r=Math.max(a,t,o),n=Math.min(a,t,o),s=r-n;let i=0;r===n?i=0:r===a?t>=o?i=60*(t-o)/s:i=60*(t-o)/s+360:r===t?i=60*(o-a)/s+120:r===o&&(i=60*(a-t)/s+240),i=Math.floor(i);let l=parseFloat((r===0?0:1-n/r).toFixed(2)),d=parseFloat(r.toFixed(2));return{h:i,s:l,v:d}}var no=e.defineComponent({props:{color:{type:String,default:"#000000"},hsv:{type:Object,default:null},size:{type:Number,default:152}},emits:["selectSaturation"],data(){return{slideSaturationStyle:{}}},mounted(){this.renderColor(),this.renderSlide()},methods:{renderColor(){const a=this.$refs.canvasSaturation,t=this.size,o=a.getContext("2d");a.width=t,a.height=t,o.fillStyle=this.color,o.fillRect(0,0,t,t),ro("l",o,t,t,"#FFFFFF","rgba(255,255,255,0)"),ro("p",o,t,t,"rgba(0,0,0,0)","#000000")},renderSlide(){this.slideSaturationStyle={left:this.hsv.s*this.size-5+"px",top:(1-this.hsv.v)*this.size-5+"px"}},selectSaturation(a){const{top:t,left:o}=this.$el.getBoundingClientRect(),r=a.target.getContext("2d"),n=i=>{let l=i.clientX-o,d=i.clientY-t;l<0&&(l=0),d<0&&(d=0),l>this.size&&(l=this.size),d>this.size&&(d=this.size),this.slideSaturationStyle={left:l-5+"px",top:d-5+"px"};const p=r.getImageData(Math.min(l,this.size-1),Math.min(d,this.size-1),1,1),[c,f,m]=p.data;this.$emit("selectSaturation",{r:c,g:f,b:m})};n(a);const s=()=>{document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",s)};document.addEventListener("mousemove",n),document.addEventListener("mouseup",s)}}});const Af={ref:"canvasSaturation"};function Of(a,t,o,r,n,s){return e.openBlock(),e.createBlock("div",{class:"saturation",onMousedown:t[1]||(t[1]=e.withModifiers((...i)=>a.selectSaturation&&a.selectSaturation(...i),["prevent","stop"]))},[e.createVNode("canvas",Af,null,512),e.createVNode("div",{style:a.slideSaturationStyle,class:"slide"},null,4)],32)}no.render=Of,no.__file="src/color/Saturation.vue";var io=e.defineComponent({props:{hsv:{type:Object,default:null},width:{type:Number,default:15},height:{type:Number,default:152}},emits:["selectHue"],data(){return{slideHueStyle:{}}},mounted(){this.renderColor(),this.renderSlide()},methods:{renderColor(){const a=this.$refs.canvasHue,t=this.width,o=this.height,r=a.getContext("2d");a.width=t,a.height=o;const n=r.createLinearGradient(0,0,0,o);n.addColorStop(0,"#FF0000"),n.addColorStop(.17*1,"#FF00FF"),n.addColorStop(.17*2,"#0000FF"),n.addColorStop(.17*3,"#00FFFF"),n.addColorStop(.17*4,"#00FF00"),n.addColorStop(.17*5,"#FFFF00"),n.addColorStop(1,"#FF0000"),r.fillStyle=n,r.fillRect(0,0,t,o)},renderSlide(){this.slideHueStyle={top:(1-this.hsv.h/360)*this.height-2+"px"}},selectHue(a){const{top:t}=this.$el.getBoundingClientRect(),o=a.target.getContext("2d"),r=s=>{let i=s.clientY-t;i<0&&(i=0),i>this.height&&(i=this.height),this.slideHueStyle={top:i-2+"px"};const l=o.getImageData(0,Math.min(i,this.height-1),1,1),[d,p,c]=l.data;this.$emit("selectHue",{r:d,g:p,b:c})};r(a);const n=()=>{document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",n)};document.addEventListener("mousemove",r),document.addEventListener("mouseup",n)}}});const If={ref:"canvasHue"};function Lf(a,t,o,r,n,s){return e.openBlock(),e.createBlock("div",{class:"hue",onMousedown:t[1]||(t[1]=e.withModifiers((...i)=>a.selectHue&&a.selectHue(...i),["prevent","stop"]))},[e.createVNode("canvas",If,null,512),e.createVNode("div",{style:a.slideHueStyle,class:"slide"},null,4)],32)}io.render=Lf,io.__file="src/color/Hue.vue";var so=e.defineComponent({props:{color:{type:String,default:"#000000"},rgba:{type:Object,default:null},width:{type:Number,default:15},height:{type:Number,default:152}},emits:["selectAlpha"],data(){return{slideAlphaStyle:{},alphaSize:5}},watch:{color(){this.renderColor()},"rgba.a"(){this.renderSlide()}},mounted(){this.renderColor(),this.renderSlide()},methods:{renderColor(){const a=this.$refs.canvasAlpha,t=this.width,o=this.height,r=this.alphaSize,n=oo(r),s=a.getContext("2d");a.width=t,a.height=o,s.fillStyle=s.createPattern(n,"repeat"),s.fillRect(0,0,t,o),ro("p",s,t,o,"rgba(255,255,255,0)",this.color)},renderSlide(){this.slideAlphaStyle={top:this.rgba.a*this.height-2+"px"}},selectAlpha(a){const{top:t}=this.$el.getBoundingClientRect(),o=n=>{let s=n.clientY-t;s<0&&(s=0),s>this.height&&(s=this.height);let i=parseFloat((s/this.height).toFixed(2));this.$emit("selectAlpha",i)};o(a);const r=()=>{document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",r)};document.addEventListener("mousemove",o),document.addEventListener("mouseup",r)}}});const Df={ref:"canvasAlpha"};function jf(a,t,o,r,n,s){return e.openBlock(),e.createBlock("div",{class:"color-alpha",onMousedown:t[1]||(t[1]=e.withModifiers((...i)=>a.selectAlpha&&a.selectAlpha(...i),["prevent","stop"]))},[e.createVNode("canvas",Df,null,512),e.createVNode("div",{style:a.slideAlphaStyle,class:"slide"},null,4)],32)}so.render=jf,so.__file="src/color/Alpha.vue";var lo=e.defineComponent({props:{color:{type:String,default:"#000000"},width:{type:Number,default:100},height:{type:Number,default:30}},data(){return{alphaSize:5}},watch:{color(){this.renderColor()}},mounted(){this.renderColor()},methods:{renderColor(){const a=this.$el,t=this.width,o=this.height,r=this.alphaSize,n=oo(r),s=a.getContext("2d");a.width=t,a.height=o,s.fillStyle=s.createPattern(n,"repeat"),s.fillRect(0,0,t,o),s.fillStyle=this.color,s.fillRect(0,0,t,o)}}});function Pf(a,t,o,r,n,s){return e.openBlock(),e.createBlock("canvas")}lo.render=Pf,lo.__file="src/color/Preview.vue";var co=e.defineComponent({props:{suckerCanvas:{type:Object,default:null},suckerArea:{type:Array,default:()=>[]}},data(){return{isOpenSucker:!1,suckerPreview:null,isSucking:!1}},watch:{suckerCanvas(a){this.isSucking=!1,this.suckColor(a)}},methods:{openSucker(){this.isOpenSucker?this.keydownHandler({keyCode:27}):(this.isOpenSucker=!0,this.isSucking=!0,this.$emit("openSucker",!0),document.addEventListener("keydown",this.keydownHandler))},keydownHandler(a){a.keyCode===27&&(this.isOpenSucker=!1,this.isSucking=!1,this.$emit("openSucker",!1),document.removeEventListener("keydown",this.keydownHandler),document.removeEventListener("mousemove",this.mousemoveHandler),document.removeEventListener("mouseup",this.mousemoveHandler),this.suckerPreview&&(document.body.removeChild(this.suckerPreview),this.suckerPreview=null))},mousemoveHandler(a){const{clientX:t,clientY:o}=a,{top:r,left:n,width:s,height:i}=this.suckerCanvas.getBoundingClientRect(),l=t-n,d=o-r,c=this.suckerCanvas.getContext("2d").getImageData(Math.min(l,s-1),Math.min(d,i-1),1,1);let[f,m,u,h]=c.data;h=parseFloat((h/255).toFixed(2));const b=this.suckerPreview.style;Object.assign(b,{position:"absolute",left:t+20+"px",top:o-36+"px",width:"24px",height:"24px",borderRadius:"50%",border:"2px solid #fff",boxShadow:"0 0 8px 0 rgba(0, 0, 0, 0.16)",background:`rgba(${f}, ${m}, ${u}, ${h})`,zIndex:95}),this.suckerArea.length&&t>=this.suckerArea[0]&&o>=this.suckerArea[1]&&t<=this.suckerArea[2]&&o<=this.suckerArea[3]?b.display="":b.display="none"},suckColor(a){a&&a.tagName!=="CANVAS"||(this.suckerPreview=document.createElement("div"),this.suckerPreview&&document.body.appendChild(this.suckerPreview),document.addEventListener("mousemove",this.mousemoveHandler),document.addEventListener("mouseup",this.mousemoveHandler),a.addEventListener("click",t=>{const{clientX:o,clientY:r}=t,{top:n,left:s,width:i,height:l}=a.getBoundingClientRect(),d=o-s,p=r-n,f=a.getContext("2d").getImageData(Math.min(d,i-1),Math.min(p,l-1),1,1);let[m,u,h,b]=f.data;b=parseFloat((b/255).toFixed(2)),this.$emit("selectSucker",{r:m,g:u,b:h,a:b})}))}}});const zf=e.createVNode("path",{d:"M13.1,8.2l5.6,5.6c0.4,0.4,0.5,1.1,0.1,1.5s-1.1,0.5-1.5,0.1c0,0-0.1,0-0.1-0.1l-1.4-1.4l-7.7,7.7C7.9,21.9,7.6,22,7.3,22H3.1C2.5,22,2,21.5,2,20.9l0,0v-4.2c0-0.3,0.1-0.6,0.3-0.8l5.8-5.8C8.5,9.7,9.2,9.6,9.7,10s0.5,1.1,0.1,1.5c0,0,0,0.1-0.1,0.1l-5.5,5.5v2.7h2.7l7.4-7.4L8.7,6.8c-0.5-0.4-0.5-1-0.1-1.5s1.1-0.5,1.5-0.1c0,0,0.1,0,0.1,0.1l1.4,1.4l3.5-3.5c1.6-1.6,4.1-1.6,5.8-0.1c1.6,1.6,1.6,4.1,0.1,5.8L20.9,9l-3.6,3.6c-0.4,0.4-1.1,0.5-1.5,0.1"},null,-1),Hf={key:1,class:"sucker",viewBox:"-16 -16 68 68",xmlns:"http://www.w3.org/2000/svg",stroke:"#9099a4"},Rf=e.createVNode("g",{fill:"none","fill-rule":"evenodd"},[e.createVNode("g",{transform:"translate(1 1)","stroke-width":"4"},[e.createVNode("circle",{"stroke-opacity":".5",cx:"18",cy:"18",r:"18"}),e.createVNode("path",{d:"M36 18c0-9.94-8.06-18-18-18"},[e.createVNode("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"})])])],-1);function Uf(a,t,o,r,n,s){return e.openBlock(),e.createBlock("div",null,[a.isSucking?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createBlock("svg",{key:0,class:[{active:a.isOpenSucker},"sucker"],xmlns:"http://www.w3.org/2000/svg",viewBox:"-12 -12 48 48",onClick:t[1]||(t[1]=(...i)=>a.openSucker&&a.openSucker(...i))},[zf],2)),a.isSucking?(e.openBlock(),e.createBlock("svg",Hf,[Rf])):e.createCommentVNode("v-if",!0)])}co.render=Uf,co.__file="src/color/Sucker.vue";var po=e.defineComponent({props:{name:{type:String,default:""},color:{type:String,default:""}},emits:["inputColor","inputFocus","inputBlur"],setup(a,{emit:t}){return{modelColor:e.computed({get(){return a.color||""},set(s){t("inputColor",s)}}),handleFocus:s=>{t("inputFocus",s)},handleBlur:s=>{t("inputBlur",s)}}}});const Ff={class:"color-type"},Zf={class:"name"};function Wf(a,t,o,r,n,s){return e.openBlock(),e.createBlock("div",Ff,[e.createVNode("span",Zf,e.toDisplayString(a.name),1),e.withDirectives(e.createVNode("input",{"onUpdate:modelValue":t[1]||(t[1]=i=>a.modelColor=i),class:"value",onFocus:t[2]||(t[2]=(...i)=>a.handleFocus&&a.handleFocus(...i)),onBlur:t[3]||(t[3]=(...i)=>a.handleBlur&&a.handleBlur(...i))},null,544),[[e.vModelText,a.modelColor]])])}po.render=Wf,po.__file="src/color/Box.vue";var uo=e.defineComponent({name:"ColorPicker",props:{color:{type:String,default:"#000000"},colorsDefault:{type:Array,default:()=>[]},colorsHistoryKey:{type:String,default:""}},emits:["selectColor"],setup(a,{emit:t}){const o=e.ref(),r=e.ref([]),n=e.ref();a.colorsHistoryKey&&localStorage&&(r.value=JSON.parse(localStorage.getItem(a.colorsHistoryKey))||[]),n.value=oo(4).toDataURL(),e.onUnmounted(()=>{s(o.value)});function s(l){if(!l)return;const d=r.value||[],p=d.indexOf(l);p>=0&&d.splice(p,1),d.length>=8&&(d.length=7),d.unshift(l),r.value=d||[],localStorage&&a.colorsHistoryKey&&localStorage.setItem(a.colorsHistoryKey,JSON.stringify(d))}function i(l){t("selectColor",l)}return{setColorsHistory:s,colorsHistory:r,color:o,imgAlphaBase64:n,selectColor:i}}});const qf={class:"colors"},Yf={key:0,class:"colors history"};function Kf(a,t,o,r,n,s){return e.openBlock(),e.createBlock("div",null,[e.createVNode("ul",qf,[(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(a.colorsDefault,i=>(e.openBlock(),e.createBlock("li",{key:i,class:"item",onClick:l=>a.selectColor(i)},[e.createVNode("div",{style:{background:`url(${a.imgAlphaBase64})`},class:"alpha"},null,4),e.createVNode("div",{style:{background:i},class:"color"},null,4)],8,["onClick"]))),128))]),a.colorsHistory.length?(e.openBlock(),e.createBlock("ul",Yf,[(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(a.colorsHistory,i=>(e.openBlock(),e.createBlock("li",{key:i,class:"item",onClick:l=>a.selectColor(i)},[e.createVNode("div",{style:{background:`url(${a.imgAlphaBase64})`},class:"alpha"},null,4),e.createVNode("div",{style:{background:i},class:"color"},null,4)],8,["onClick"]))),128))])):e.createCommentVNode("v-if",!0)])}uo.render=Kf,uo.__file="src/color/Colors.vue";var vt=e.defineComponent({components:{Saturation:no,Hue:io,Alpha:so,Preview:lo,Sucker:co,Box:po,Colors:uo},emits:["changeColor","openSucker","inputFocus","inputBlur"],props:{color:{type:String,default:"#000000"},theme:{type:String,default:"dark"},suckerHide:{type:Boolean,default:!0},suckerCanvas:{type:null,default:null},suckerArea:{type:Array,default:()=>[]},colorsDefault:{type:Array,default:()=>["#000000","#FFFFFF","#FF1900","#F47365","#FFB243","#FFE623","#6EFF2A","#1BC7B1","#00BEFF","#2E81FF","#5D61FF","#FF89CF","#FC3CAD","#BF3DCE","#8E00A7","rgba(0,0,0,0)"]},colorsHistoryKey:{type:String,default:"vue-colorpicker-history"}},data(){return{hueWidth:15,hueHeight:152,previewHeight:30,modelRgba:"",modelHex:"",r:0,g:0,b:0,a:1,h:0,s:0,v:0}},computed:{isLightTheme(){return this.theme==="light"},totalWidth(){return this.hueHeight+(this.hueWidth+8)*2},previewWidth(){return this.totalWidth-(this.suckerHide?0:this.previewHeight)},rgba(){return{r:this.r,g:this.g,b:this.b,a:this.a}},hsv(){return{h:this.h,s:this.s,v:this.v}},rgbString(){return`rgb(${this.r}, ${this.g}, ${this.b})`},rgbaStringShort(){return`${this.r}, ${this.g}, ${this.b}, ${this.a}`},rgbaString(){return`rgba(${this.rgbaStringShort})`},hexString(){return xf(this.rgba,!0)}},created(){Object.assign(this,ot(this.color)),this.setText(),this.$watch("rgba",()=>{this.$emit("changeColor",{rgba:this.rgba,hsv:this.hsv,hex:this.modelHex})})},methods:{selectSaturation(a){const{r:t,g:o,b:r,h:n,s,v:i}=ot(a);Object.assign(this,{r:t,g:o,b:r,h:n,s,v:i}),this.setText()},handleFocus(a){this.$emit("inputFocus",a)},handleBlur(a){this.$emit("inputBlur",a)},selectHue(a){const{r:t,g:o,b:r,h:n,s,v:i}=ot(a);Object.assign(this,{r:t,g:o,b:r,h:n,s,v:i}),this.setText(),this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide()})},selectAlpha(a){this.a=a,this.setText()},inputHex(a){const{r:t,g:o,b:r,a:n,h:s,s:i,v:l}=ot(a);Object.assign(this,{r:t,g:o,b:r,a:n,h:s,s:i,v:l}),this.modelHex=a,this.modelRgba=this.rgbaStringShort,this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide(),this.$refs.hue.renderSlide()})},inputRgba(a){const{r:t,g:o,b:r,a:n,h:s,s:i,v:l}=ot(a);Object.assign(this,{r:t,g:o,b:r,a:n,h:s,s:i,v:l}),this.modelHex=this.hexString,this.modelRgba=a,this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide(),this.$refs.hue.renderSlide()})},setText(){this.modelHex=this.hexString,this.modelRgba=this.rgbaStringShort},openSucker(a){this.$emit("openSucker",a)},selectSucker(a){const{r:t,g:o,b:r,a:n,h:s,s:i,v:l}=ot(a);Object.assign(this,{r:t,g:o,b:r,a:n,h:s,s:i,v:l}),this.setText(),this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide(),this.$refs.hue.renderSlide()})},selectColor(a){const{r:t,g:o,b:r,a:n,h:s,s:i,v:l}=ot(a);Object.assign(this,{r:t,g:o,b:r,a:n,h:s,s:i,v:l}),this.setText(),this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide(),this.$refs.hue.renderSlide()})}}});const Gf={class:"color-set"};function Xf(a,t,o,r,n,s){const i=e.resolveComponent("Saturation"),l=e.resolveComponent("Hue"),d=e.resolveComponent("Alpha"),p=e.resolveComponent("Preview"),c=e.resolveComponent("Sucker"),f=e.resolveComponent("Box"),m=e.resolveComponent("Colors");return e.openBlock(),e.createBlock("div",{class:["hu-color-picker",{light:a.isLightTheme}],style:{width:a.totalWidth+"px"}},[e.createVNode("div",Gf,[e.createVNode(i,{ref:"saturation",color:a.rgbString,hsv:a.hsv,size:a.hueHeight,onSelectSaturation:a.selectSaturation},null,8,["color","hsv","size","onSelectSaturation"]),e.createVNode(l,{ref:"hue",hsv:a.hsv,width:a.hueWidth,height:a.hueHeight,onSelectHue:a.selectHue},null,8,["hsv","width","height","onSelectHue"]),e.createVNode(d,{ref:"alpha",color:a.rgbString,rgba:a.rgba,width:a.hueWidth,height:a.hueHeight,onSelectAlpha:a.selectAlpha},null,8,["color","rgba","width","height","onSelectAlpha"])]),e.createVNode("div",{style:{height:a.previewHeight+"px"},class:"color-show"},[e.createVNode(p,{color:a.rgbaString,width:a.previewWidth,height:a.previewHeight},null,8,["color","width","height"]),a.suckerHide?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createBlock(c,{key:0,"sucker-canvas":a.suckerCanvas,"sucker-area":a.suckerArea,onOpenSucker:a.openSucker,onSelectSucker:a.selectSucker},null,8,["sucker-canvas","sucker-area","onOpenSucker","onSelectSucker"]))],4),e.createVNode(f,{name:"HEX",color:a.modelHex,onInputColor:a.inputHex,onInputFocus:a.handleFocus,onInputBlur:a.handleBlur},null,8,["color","onInputColor","onInputFocus","onInputBlur"]),e.createVNode(f,{name:"RGBA",color:a.modelRgba,onInputColor:a.inputRgba,onInputFocus:a.handleFocus,onInputBlur:a.handleBlur},null,8,["color","onInputColor","onInputFocus","onInputBlur"]),e.createVNode(m,{color:a.rgbaString,"colors-default":a.colorsDefault,"colors-history-key":a.colorsHistoryKey,onSelectColor:a.selectColor},null,8,["color","colors-default","colors-history-key","onSelectColor"]),e.createCommentVNode(" custom options "),e.renderSlot(a.$slots,"default")],6)}vt.render=Xf,vt.__file="src/color/ColorPicker.vue",vt.install=a=>{a.component(vt.name,vt)};const Y4="",Qf={class:"color-picker-wrapper"},mo=e.defineComponent({__name:"AoColorPicker",props:{color:{}},emits:["update:color"],setup(a,{emit:t}){const o=a,r=e.ref(!1),n=e.ref(null),s=e.ref(null),i=e.ref(0),l=e.ref(0),d=async u=>{s.value=u,r.value=!0,await e.nextTick();const h=u.getBoundingClientRect(),b=n.value,g=(b==null?void 0:b.offsetHeight)||300,y=window.innerHeight-h.bottom,_=h.top,C=y<g&&_>g;console.log("pickerHeight = "+g),i.value=C?h.top-g-8:h.bottom+8,l.value=h.left,setTimeout(()=>{window.addEventListener("click",c)},0)},p=e.computed(()=>({position:"fixed",top:`${i.value}px`,left:`${l.value}px`,zIndex:1e3})),c=u=>{const h=u.target;n.value&&!n.value.contains(h)&&(r.value=!1,t("update:color",f.value),window.removeEventListener("click",c))};e.onBeforeUnmount(()=>{window.removeEventListener("click",c)}),e.watch(()=>o.color,u=>{r.value||(f.value=u)});const f=e.ref(o.color),m=u=>{const{r:h,g:b,b:g,a:y}=u.rgba;f.value=`rgba(${h}, ${b}, ${g}, ${y})`};return(u,h)=>(e.openBlock(),e.createElementBlock("div",Qf,[e.renderSlot(u.$slots,"clickable",{openPicker:d,bgColor:u.color}),r.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"pickerRef",ref:n,class:"color-picker",style:e.normalizeStyle(p.value)},[e.createVNode(e.unref(vt),{class:"color-picker-box",theme:"light",color:u.color,onChangeColor:m},null,8,["color"])],4)):e.createCommentVNode("",!0)]))}}),K4="",Jf={class:"ao-card-project-phase__header"},eh={class:"ao-card-project-item__title-line"},th={key:0,class:"ao-card-project-item-phase__estimation"},ah={class:"ao-card-project-phase__footer"},oh={key:0,class:"ao-card-project-phase__footer-row ao-card-project-phase__footer-row--progress"},rh={class:"ao-card-project-phase__subitem"},nh={class:"ao-card-project-phase__subitem"},ih={key:0,class:"ao-card-project-phase__secondary"},sh={class:"ao-card-project-phase__deadline ao-card-project-phase__deadline--readonly"},lh=e.defineComponent({__name:"AoCardProjectItemPhase",props:{id:{},projectName:{},name:{},milestones:{},isEditable:{type:Boolean},deadline:{},active:{type:Boolean},color:{},timeTrackingData:{}},emits:["update:title","update:deadline","archivePhase","unarchivePhase","updatePhase"],setup(a,{emit:t}){const o=a,r=u=>{t("update:title",u)},n=e.computed(()=>{var u;return((u=o.milestones)==null?void 0:u.reduce((h,b)=>{var g;return h+((g=b.activities)==null?void 0:g.reduce((y,_)=>y+(_.estimation||0),0))},0))||0}),s=e.computed(()=>!o.milestones||!o.timeTrackingData?0:o.milestones.reduce((u,h)=>{var b;return u+(((b=h.activities)==null?void 0:b.reduce((g,y)=>{var C;const _=(C=o.timeTrackingData)==null?void 0:C[y.id];return g+((_==null?void 0:_.timeSpent)||0)},0))||0)},0)),i=e.computed(()=>(s.value/60).toFixed(2)),l=e.computed(()=>{var u;return(u=o.milestones)==null?void 0:u.length}),d=e.computed(()=>{var u;return(u=o.milestones)==null?void 0:u.filter(h=>h.status===kt.done).length}),p=e.computed(()=>(d.value||0)/(l.value||1)),c=e.computed({get:()=>o.deadline??"",set:u=>t("update:deadline",u!=null&&u.length?u:null)}),f=e.computed({get:()=>o.color,set:u=>{t("updatePhase",{id:o.id,color:u})}}),m=(u,h)=>{const b=u.target;b.closest("button")||b.closest("input")||b.closest(".ao-title")||h(b)};return(u,h)=>(e.openBlock(),e.createBlock(mo,{color:f.value,"onUpdate:color":h[2]||(h[2]=b=>f.value=b)},{clickable:e.withCtx(({openPicker:b,bgColor:g})=>[e.createVNode(ba,{class:"ao-card-project-phase","is-clickable":u.isEditable,color:g,withLeftBorder:!0,onClick:y=>m(y,b)},e.createSlots({default:e.withCtx(()=>[e.createElementVNode("div",eh,[e.createVNode(ne,{id:u.id,class:"ao-card-project-phase__title",title:u.name||"",level:4,"is-editable":u.isEditable,"onUpdate:title":r},null,8,["id","title","is-editable"]),n.value||s.value?(e.openBlock(),e.createElementBlock("span",th," ("+e.toDisplayString(i.value)+"/"+e.toDisplayString(n.value)+")",1)):e.createCommentVNode("",!0)])]),footer:e.withCtx(()=>[e.createElementVNode("div",ah,[l.value?(e.openBlock(),e.createElementBlock("div",oh,[e.createElementVNode("div",rh,[e.createVNode(Q,{name:"MountainFlagOutlineRounded",size:"sm"}),e.createElementVNode("span",nh,e.toDisplayString(d.value)+" / "+e.toDisplayString(l.value),1)]),e.createVNode(ya,{percentages:p.value,class:"ao-card-project-phase__progress",color:u.color},null,8,["percentages","color"]),u.$slots.secondary?(e.openBlock(),e.createElementBlock("div",ih,[e.renderSlot(u.$slots,"secondary")])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["ao-card-project-phase__footer-row",c.value?"":"ao-card-project-phase__no_deadline"])},[u.isEditable?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,"onUpdate:modelValue":h[1]||(h[1]=y=>c.value=y),class:"ao-card-project-phase__deadline ao-card-project-phase__deadline--input",type:"date"},null,512)),[[e.vModelText,c.value,void 0,{lazy:!0}]]):e.createCommentVNode("",!0),e.createElementVNode("span",sh,e.toDisplayString(e.unref(ra)(u.deadline)),1)],2)])]),_:2},[u.isEditable?{name:"header",fn:e.withCtx(()=>[e.createElementVNode("div",Jf,[e.createVNode(Y,{class:"ao-card-project-phase__archive",color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:u.active?u.$t("archive"):u.$t("unarchive"),onClick:h[0]||(h[0]=e.withModifiers(()=>u.active?u.$emit("archivePhase",{id:u.id}):u.$emit("unarchivePhase",{id:u.id}),["stop"]))},null,8,["label"])])]),key:"0"}:void 0]),1032,["is-clickable","color","onClick"])]),_:3},8,["color"]))}}),G4="",ch=e.defineComponent({__name:"AoBadge",props:{color:{}},setup(a){return(t,o)=>(e.openBlock(),e.createElementBlock("span",{class:"aoBadge",style:e.normalizeStyle({backgroundColor:t.color})},null,4))}}),X4="",dh={class:"ao-card-project-milestone__default"},ph={class:"ao-title-with-badge-wrapper"},uh={class:"ao-card-project-item__title-line"},mh={key:0,class:"ao-card-project-item-milestone__estimation"},fh={key:0,class:"ao-card-project-milestone__archive"},hh={class:"ao-card-project-milestone__activities"},gh={class:"ao-card-project-milestone__activities-row"},_h={class:"ao-card-project-milestone__subitem"},vh={class:"ao-card-project-milestone__subitem"},Ch={key:1,class:"ao-card-project-milestone__secondary"},bh={class:"ao-card-project-milestone__footer"},yh={key:1,class:"ao-field ao-card-project-milestone__deadline"},wh={class:"ao-field__label"},kh={key:2,class:"ao-card-project-milestone__assignee"},$h=e.defineComponent({__name:"AoCardProjectItemMilestone",props:{id:{},name:{},color:{},phaseColor:{},activities:{},closedStatus:{},isEditable:{type:Boolean},deadline:{},active:{type:Boolean},isSelected:{type:Boolean},assignee:{},important:{type:Boolean},readonly:{type:Boolean},timeTrackingData:{}},emits:["updateMilestone","archiveMilestone","unarchiveMilestone"],setup(a,{emit:t}){const o=a,r=e.computed(()=>{var c;return((c=o.activities)==null?void 0:c.reduce((f,m)=>f+(m.estimation||0),0))||0}),n=e.computed(()=>!o.activities||!o.timeTrackingData?0:o.activities.reduce((c,f)=>{var u;const m=(u=o.timeTrackingData)==null?void 0:u[f.id];return c+((m==null?void 0:m.timeSpent)||0)},0)),s=e.computed(()=>(n.value/60).toFixed(2)),i=e.computed(()=>{var c;return(c=o.activities)==null?void 0:c.length}),l=e.computed(()=>{var c;return(c=o.activities)==null?void 0:c.filter(f=>Da(f,o.closedStatus)).length}),d=e.computed(()=>(l.value||0)/(i.value||1)),p=c=>{t("updateMilestone",{id:o.id,name:c})};return(c,f)=>(e.openBlock(),e.createBlock(ba,{class:e.normalizeClass(["ao-card-project-milestone"]),"is-clickable":!c.readonly,"tag-name":"li","is-selected":c.isSelected,color:c.phaseColor},{default:e.withCtx(()=>[e.createElementVNode("div",dh,[e.createElementVNode("div",ph,[e.createVNode(ch,{color:c.color||""},null,8,["color"]),e.createElementVNode("div",uh,[e.createVNode(ne,{id:c.id,title:c.name||"",level:5,"is-editable":!c.readonly&&c.isEditable,class:"ao-card-project-milestone__title","onUpdate:title":p},null,8,["id","title","is-editable"]),r.value||n.value?(e.openBlock(),e.createElementBlock("span",mh," ("+e.toDisplayString(s.value)+"/"+e.toDisplayString(r.value)+")",1)):e.createCommentVNode("",!0)])]),!c.readonly&&c.isEditable?(e.openBlock(),e.createElementBlock("div",fh,[e.createVNode(Y,{color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:c.active?c.$t("archive"):c.$t("unarchive"),onClick:f[0]||(f[0]=e.withModifiers(()=>c.active?c.$emit("archiveMilestone",{id:c.id}):c.$emit("unarchiveMilestone",{id:c.id}),["stop"]))},null,8,["label"])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",hh,[e.createElementVNode("div",gh,[i.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",_h,[e.createVNode(Q,{name:"SelectCheckBox",size:"sm"}),e.createElementVNode("span",vh,e.toDisplayString(l.value)+" / "+e.toDisplayString(i.value),1)]),e.createVNode(ya,{percentages:d.value,color:c.phaseColor,class:"ao-card-project-milestone__progress"},null,8,["percentages","color"])],64)):e.createCommentVNode("",!0),c.$slots.secondary?(e.openBlock(),e.createElementBlock("div",Ch,[e.renderSlot(c.$slots,"secondary")])):e.createCommentVNode("",!0)])])]),footer:e.withCtx(()=>[e.createElementVNode("div",bh,[c.important?(e.openBlock(),e.createBlock(Q,{key:0,name:"FlagRounded",class:e.normalizeClass(c.isSelected?"ao-card-project-milestone__important--selected":"ao-card-project-milestone__important"),size:"sm"},null,8,["class"])):e.createCommentVNode("",!0),c.deadline?(e.openBlock(),e.createElementBlock("label",yh,[e.createElementVNode("span",wh,e.toDisplayString(e.unref(ra)(c.deadline)),1)])):e.createCommentVNode("",!0),c.assignee?(e.openBlock(),e.createElementBlock("div",kh,[e.createVNode(ye,{"user-name":e.unref(er)(c.assignee),"avatar-url":c.assignee.avatarUrl,color:c.isSelected?"black":"primary",size:"sm"},null,8,["user-name","avatar-url","color"])])):e.createCommentVNode("",!0)])]),_:3},8,["is-clickable","is-selected","color"]))}}),Q4="",Eh={class:"ao-mapping-card-project-phase__header"},Bh={class:"ao-card-project-item__title-line"},Vh={key:0,class:"ao-card-project-item-phase__estimation"},Sh={class:"ao-mapping-card-project-phase__footer"},Nh={key:0,class:"ao-mapping-card-project-phase__footer-row ao-mapping-card-project-phase__footer-row--progress"},xh={class:"ao-mapping-card-project-phase__subitem"},Mh={class:"ao-mapping-card-project-phase__subitem"},Th={key:0,class:"ao-mapping-card-project-phase__secondary"},Ah={class:"ao-mapping-card-project-phase__deadline ao-mapping-card-project-phase__deadline--readonly"},Oh=e.defineComponent({__name:"AoCondensedCardProjectItemPhase",props:{id:{},projectName:{},name:{},milestones:{},isEditable:{type:Boolean},deadline:{},active:{type:Boolean},color:{},timeTrackingData:{}},emits:["update:title","update:deadline","archivePhase","updatePhase","unarchivePhase"],setup(a,{emit:t}){const o=a,r=u=>{t("update:title",u)},n=e.computed(()=>{var u;return((u=o.milestones)==null?void 0:u.reduce((h,b)=>{var g;return h+((g=b.activities)==null?void 0:g.reduce((y,_)=>y+(_.estimation||0),0))},0))||0}),s=e.computed(()=>!o.milestones||!o.timeTrackingData?0:o.milestones.reduce((u,h)=>{var b;return u+(((b=h.activities)==null?void 0:b.reduce((g,y)=>{var C;const _=(C=o.timeTrackingData)==null?void 0:C[y.id];return g+((_==null?void 0:_.timeSpent)||0)},0))||0)},0)),i=e.computed(()=>(s.value/60).toFixed(2)),l=e.computed(()=>{var u;return(u=o.milestones)==null?void 0:u.length}),d=e.computed(()=>{var u;return(u=o.milestones)==null?void 0:u.filter(h=>h.status===kt.done).length}),p=e.computed(()=>(d.value||0)/(l.value||1)),c=e.computed({get:()=>o.deadline??"",set:u=>t("update:deadline",u!=null&&u.length?u:null)}),f=e.computed({get:()=>o.color,set:u=>{t("updatePhase",{id:o.id,color:u})}}),m=(u,h)=>{const b=u.target;b.closest("button")||b.closest("input")||b.closest(".ao-title")||h()};return(u,h)=>(e.openBlock(),e.createBlock(mo,{color:f.value,"onUpdate:color":h[2]||(h[2]=b=>f.value=b)},{clickable:e.withCtx(({openPicker:b,bgColor:g})=>[e.createVNode(ba,{class:"ao-mapping-card-project-phase","is-clickable":u.isEditable,color:g,withLeftBorder:!0,onClick:y=>m(y,b)},e.createSlots({default:e.withCtx(()=>[e.createElementVNode("div",Bh,[e.createVNode(ne,{id:u.id,class:"ao-mapping-card-project-phase__title",title:u.name||"",level:4,"is-editable":u.isEditable,"onUpdate:title":r},null,8,["id","title","is-editable"]),n.value||s.value?(e.openBlock(),e.createElementBlock("span",Vh," ("+e.toDisplayString(i.value)+"/"+e.toDisplayString(n.value)+")",1)):e.createCommentVNode("",!0)])]),footer:e.withCtx(()=>[e.createElementVNode("div",Sh,[l.value?(e.openBlock(),e.createElementBlock("div",Nh,[e.createElementVNode("div",xh,[e.createVNode(Q,{name:"MountainFlagOutlineRounded",size:"sm"}),e.createElementVNode("span",Mh,e.toDisplayString(d.value)+" / "+e.toDisplayString(l.value),1)]),e.createVNode(ya,{percentages:p.value,class:"ao-mapping-card-project-phase__progress",color:f.value},null,8,["percentages","color"]),u.$slots.secondary?(e.openBlock(),e.createElementBlock("div",Th,[e.renderSlot(u.$slots,"secondary")])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["ao-mapping-card-project-phase__footer-row",c.value?"":"ao-mapping-card-project-phase__no_deadline"])},[u.isEditable?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,"onUpdate:modelValue":h[1]||(h[1]=y=>c.value=y),class:"ao-mapping-card-project-phase__deadline ao-mapping-card-project-phase__deadline--input",type:"date"},null,512)),[[e.vModelText,c.value,void 0,{lazy:!0}]]):e.createCommentVNode("",!0),e.createElementVNode("span",Ah,e.toDisplayString(e.unref(ra)(u.deadline)),1)],2)])]),_:2},[u.isEditable?{name:"header",fn:e.withCtx(()=>[e.createElementVNode("div",Eh,[e.createVNode(Y,{class:"ao-mapping-card-project-phase__archive",color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:u.active?u.$t("archive"):u.$t("unarchive"),onClick:h[0]||(h[0]=e.withModifiers(()=>u.active?u.$emit("archivePhase",{id:u.id}):u.$emit("unarchivePhase",{id:u.id}),["stop"]))},null,8,["label"])])]),key:"0"}:void 0]),1032,["is-clickable","color","onClick"])]),_:3},8,["color"]))}}),J4="",Ih={class:"ao-project-phase"},Lh={key:0,class:"ao-project-phase__drag ao-card__drag"},Dh={key:1,class:"ao-project-phase__col-phase"},jh={key:2,class:"ao-mapping-project-phase__col-phase"},Ph={key:0,class:"ao-project-phase__col-milestones"},zh={class:"ao-project-phase__milestones-list-footer"},Hh=e.defineComponent({__name:"AoProjectPhase",props:{phase:{},closedStatus:{},users:{},isEditable:{type:Boolean},readonly:{type:Boolean},timeTrackingData:{}},emits:["addMilestone","updateMilestone","archiveMilestone","unarchiveMilestone","updatePhase","archivePhase","unarchivePhase"],setup(a,{emit:t}){const o=a,{t:r}=We();e.watch(()=>o.phase.milestones,(_,C)=>{Te(_,C)});const n=_=>{t("updatePhase",{id:o.phase.id,name:_})},s=_=>{t("updatePhase",{id:o.phase.id,deadline:_})},i=_=>{t("updatePhase",_)},l=e.computed(()=>o.phase.milestones.map(_=>_2(_,o.closedStatus))),d=_=>{const{name:C,rank:v}=at(l.value??[],"milestone",r);t("addMilestone",{name:C,rank:v,phaseId:_})},p=_=>{t("updateMilestone",_)},c=_=>{t("archiveMilestone",_)},f=_=>{t("unarchiveMilestone",_)},m=_=>{t("archivePhase",_)},u=_=>{t("unarchivePhase",_)},h=_=>{"added"in _?t("updateMilestone",{id:_.added.element.id,phaseId:o.phase.id,rank:dt(l.value,_.added.newIndex)}):"removed"in _||"moved"in _&&t("updateMilestone",{id:_.moved.element.id,rank:dt(l.value,_.moved.newIndex)})},b=Le.useRoute(),g=e.computed(()=>b.path.includes("/mapping")),y=e.computed(()=>{var _;return o.phase.id!==((_=b.params)==null?void 0:_.phaseId)?{backgroundColor:"var(--ao-color-sheet)"}:o.phase.color?{backgroundColor:C2(o.phase.color)}:{backgroundColor:"var(--ao-color-primary-lightest)"}});return(_,C)=>(e.openBlock(),e.createElementBlock("li",Ih,[e.createElementVNode("div",{class:"ao-project-phases__draggable-card",style:e.normalizeStyle(y.value)},[_.isEditable?(e.openBlock(),e.createElementBlock("div",Lh,[e.createVNode(Q,{name:"DragIndicator",class:"ao-project-phase__drag-handle"})])):e.createCommentVNode("",!0),g.value?(e.openBlock(),e.createElementBlock("div",jh,[e.createVNode(Oh,{id:_.phase.id,milestones:l.value,name:_.phase.name,deadline:_.phase.deadline,active:_.phase.active,"is-editable":_.isEditable,color:_.phase.color,"onUpdate:deadline":s,"onUpdate:title":n,onArchivePhase:m,onUnarchivePhase:u,onUpdatePhase:i},null,8,["id","milestones","name","deadline","active","is-editable","color"])])):(e.openBlock(),e.createElementBlock("div",Dh,[e.createVNode(lh,{id:_.phase.id,milestones:l.value,name:_.phase.name,deadline:_.phase.deadline,active:_.phase.active,"is-editable":_.isEditable,color:_.phase.color,"time-tracking-data":_.timeTrackingData,"onUpdate:deadline":s,"onUpdate:title":n,onArchivePhase:m,onUnarchivePhase:u,onUpdatePhase:i},null,8,["id","milestones","name","deadline","active","is-editable","color","time-tracking-data"])]))],4),g.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Ph,[e.createElementVNode("div",{class:"ao-project-phase__milestones",style:e.normalizeStyle(y.value)},[e.createVNode(e.unref(De),e.mergeProps({class:"ao-project-phase__milestones-list",list:l.value,disabled:_.readonly||!_.isEditable,"item-key":"id",group:"kanban"},_.$attrs,{onChange:h}),{item:e.withCtx(({element:v})=>{var B;return[e.createVNode($h,{id:v.id,name:v.name,color:v.color,"phase-color":_.phase.color,activities:v.activities,deadline:v.deadline,active:v.active,"is-editable":!_.readonly&&_.isEditable,"is-draggable":!_.readonly&&_.isEditable,"closed-status":_.closedStatus,"is-selected":v.id===((B=_.$route.params)==null?void 0:B.milestoneId),assignee:v.assignee,important:v.important,readonly:_.readonly,"time-tracking-data":_.timeTrackingData,class:e.normalizeClass(["ao-project-phase__milestone"]),onClick:E=>!_.readonly&&_.$router.push({name:e.unref(re).milestone,params:{phaseId:_.phase.id,milestoneId:v.id}}),onUpdateMilestone:p,onArchiveMilestone:c,onUnarchiveMilestone:f},null,8,["id","name","color","phase-color","activities","deadline","active","is-editable","is-draggable","closed-status","is-selected","assignee","important","readonly","time-tracking-data","onClick"])]}),_:1},16,["list","disabled"]),e.createElementVNode("div",zh,[_.isEditable?(e.openBlock(),e.createBlock(Pe,{key:0,label:_.$t("project.milestone.add"),class:"ao-project-phase__milestone-add","icon-name":"Add",onClick:C[0]||(C[0]=()=>d(_.phase.id))},null,8,["label"])):e.createCommentVNode("",!0)])],4)]))]))}}),e9="",Rh={class:"ao-project__phases"},Uh={key:0,class:"ao-project-phase__phases-list-footer"},Fh=e.createElementVNode("div",{class:"ao-project-phase__empty_drag"},null,-1),Zh={class:"ao-project-phase__col-phase"},Wh=e.createElementVNode("div",{class:"ao-project-phase__col-milestones"},null,-1),fo=e.defineComponent({__name:"AoProjectPhases",props:{phases:{},closedStatus:{},isEditable:{type:Boolean},users:{},readonly:{type:Boolean},timeTrackingData:{}},emits:["addMilestone","updateMilestone","archiveMilestone","unarchiveMilestone","addPhase","updatePhase","archivePhase","unarchivePhase"],setup(a,{emit:t}){const o=a;e.watch(()=>o.phases,(m,u)=>{Te(m,u)});const r=m=>{t("addMilestone",m)},n=m=>{t("updateMilestone",m)},s=m=>{t("archiveMilestone",m)},i=m=>{t("unarchiveMilestone",m)},l=m=>{t("archivePhase",m)},d=m=>{t("unarchivePhase",m)},p=m=>{if(m.moved){const u=Ot(m,o.phases??[]);t("updatePhase",{id:m.moved.element.id,rank:u})}},c=m=>{t("updatePhase",m)},f=m=>{t("addPhase",m)};return(m,u)=>(e.openBlock(),e.createElementBlock("div",Rh,[e.createVNode(e.unref(De),{class:"ao-project-phase__phases-list","model-value":m.phases,"item-key":"id",handle:".ao-card__drag",onChange:p},{item:e.withCtx(({element:h})=>[e.createVNode(Hh,{phase:h,"is-editable":!m.readonly&&m.isEditable,"closed-status":m.closedStatus,users:m.users,readonly:m.readonly,"time-tracking-data":m.timeTrackingData,onAddMilestone:r,onUpdateMilestone:n,onArchiveMilestone:s,onUnarchiveMilestone:i,onUpdatePhase:c,onArchivePhase:l,onUnarchivePhase:d},null,8,["phase","is-editable","closed-status","users","readonly","time-tracking-data"])]),_:1},8,["model-value"]),m.isEditable?(e.openBlock(),e.createElementBlock("div",Uh,[Fh,e.createElementVNode("div",Zh,[e.createVNode(Pe,{label:m.$t("project.phases.add"),"icon-name":"Add",class:"ao-project-phase__add-phase",onClick:f},null,8,["label"])]),Wh])):e.createCommentVNode("",!0)]))}}),t9="",qh=["onSubmit"],Yh={class:"ao-add-template-modal__form-body"},Kh={class:"field__row"},Gh={class:"ao-add-template-modal__form-footer"},Ar=e.defineComponent({__name:"AoAddTemplateModal",props:{projectId:{},templates:{}},emits:["apply"],setup(a,{emit:t}){const o=a,r=e.computed(()=>o.templates.map(l=>({value:l.id,label:l.name}))),n=e.ref(null),s=l=>{n.value=l},i=()=>{n.value&&t("apply",n.value,o.projectId)};return(l,d)=>(e.openBlock(),e.createBlock(na,{size:"sm"},{header:e.withCtx(()=>[e.createVNode(ne,{title:l.$t("project.template.apply.title"),level:3},null,8,["title"])]),default:e.withCtx(()=>[e.createElementVNode("form",{class:"ao-add-template-modal__form",onSubmit:e.withModifiers(i,["prevent"])},[e.createElementVNode("p",null,e.toDisplayString(l.$t("project.template.apply.notice")),1),e.createElementVNode("div",Yh,[e.createElementVNode("div",Kh,[e.createVNode(ce,{value:n.value,options:r.value,detached:!0,onChange:s},null,8,["value","options"])])]),e.createElementVNode("footer",Gh,[e.createVNode(Y,{label:l.$t("project.template.apply.label"),type:"submit",color:"primary",variant:"solid",onClick:i},null,8,["label"])])],40,qh)]),_:1}))}}),a9="",Xh=["onSubmit"],Qh={class:"ao-save-template-modal__form-body"},Jh={class:"field__row"},e5={class:"ao-field ao-field--inline"},t5={class:"ao-field__label"},a5={class:"ao-save-template-modal__phases"},o5={class:"ao-field__label"},r5={class:"ao-save-template-modal__phases-list"},n5=["value"],i5={class:"ao-save-template-modal__form-footer"},Or=e.defineComponent({__name:"AoSaveTemplateModal",props:{phases:{}},emits:["save"],setup(a,{emit:t}){const o=a,r=e.ref(""),n=e.ref([]);e.onMounted(()=>{n.value=o.phases.map(i=>i.id)});const s=()=>{r.value&&t("save",r.value,n.value)};return(i,l)=>(e.openBlock(),e.createBlock(na,{size:"sm"},{header:e.withCtx(()=>[e.createVNode(ne,{title:i.$t("project.template.save.title"),level:3},null,8,["title"])]),default:e.withCtx(()=>[e.createElementVNode("form",{class:"ao-save-template-modal__form",onSubmit:e.withModifiers(s,["prevent"])},[e.createElementVNode("div",Qh,[e.createElementVNode("div",Jh,[e.createElementVNode("label",e5,[e.createElementVNode("span",t5,e.toDisplayString(i.$t("project.template.name.label"))+": ",1),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":l[0]||(l[0]=d=>r.value=d),type:"text"},null,512),[[e.vModelText,r.value]])])]),e.createElementVNode("div",a5,[e.createElementVNode("div",o5,e.toDisplayString(i.$t("project.template.phases.label")),1),e.createElementVNode("div",r5,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.phases,d=>(e.openBlock(),e.createElementBlock("label",{class:"ao-field ao-field--checkbox",key:d.id},[e.withDirectives(e.createElementVNode("input",{type:"checkbox",value:d.id,"onUpdate:modelValue":l[1]||(l[1]=p=>n.value=p)},null,8,n5),[[e.vModelCheckbox,n.value]]),e.createElementVNode("span",null,e.toDisplayString(d.name),1)]))),128))])])]),e.createElementVNode("footer",i5,[e.createVNode(Y,{label:i.$t("project.template.save.label"),type:"submit",color:"primary",variant:"solid",onClick:s},null,8,["label"])])],40,Xh)]),_:1}))}}),o9="",s5=e.defineComponent({props:{modelValue:{type:[String,Number],required:!0},tabs:{type:Array,required:!0}},emits:["update:modelValue"],methods:{selectTab(a){this.$emit("update:modelValue",a)}}}),r9="",l5={class:"tabbar-wrapper"},c5=["onClick"];function d5(a,t,o,r,n,s){return e.openBlock(),e.createElementBlock("div",l5,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.tabs,i=>(e.openBlock(),e.createElementBlock("button",{key:i.value,class:e.normalizeClass(["tab-button",{"tab-button--active":i.value===a.modelValue}]),type:"button",onClick:l=>a.selectTab(i.value)},e.toDisplayString(i.label),11,c5))),128))])}const wa=j(s5,[["render",d5],["__scopeId","data-v-ff4e3297"]]),p5={class:"ao-project"},u5={class:"ao-project__body"},m5=e.defineComponent({__name:"AoProjectOverviewProject",props:{project:{},phases:{},closedStatus:{},users:{},userId:{},templates:{},isTaskCheckable:{type:Function},statuses:{},activityTypes:{},isEditable:{type:[Boolean,String]},showsArchived:{type:Boolean},attachmentEnabled:{type:Boolean},timeTrackingData:{}},emits:["addPhase","updatePhase","archivePhase","unarchivePhase","addMilestone","updateMilestone","archiveMilestone","unarchiveMilestone","addActivity","update:activity","archiveActivity","copyPhaseToTemplate","unarchiveActivity","addSubtask","updateSubtask","deleteSubtask","addFiles","removeFile","addComment","updateComment","removeComment","applyTemplate","saveTemplate","update:showsArchived"],setup(a,{emit:t}){const o=a,{t:r}=We(),n=e.computed(()=>o.phases.flatMap($=>$.milestones)),s=()=>{const{name:$,rank:L}=at(o.phases,"phase",r);t("addPhase",{name:$,rank:L,projectId:o.project.id})},i=$=>{t("updatePhase",$)},l=$=>{t("archivePhase",$)},d=$=>{t("unarchivePhase",$)},p=$=>{t("copyPhaseToTemplate",$)},c=$=>{t("addMilestone",$)},f=$=>{t("updateMilestone",$)},m=$=>{t("archiveMilestone",$)},u=$=>{t("unarchiveMilestone",$)},h=$=>{t("addActivity",$)},b=$=>{t("update:activity",$)},g=$=>{t("archiveActivity",$)},y=$=>{t("unarchiveActivity",$)},_=$=>{t("addSubtask",$)},C=$=>{t("updateSubtask",$)},v=$=>{t("deleteSubtask",$)},B=e.computed(()=>n.value.flatMap($=>$.activities)),E=$=>{t("addFiles",$)},N=$=>{t("removeFile",$)},A=$=>{t("addComment",$)},z=$=>{t("updateComment",$)},U=$=>{t("removeComment",$)},Z=e.ref(!1),O=e.ref(!1),H=($,L)=>{t("applyTemplate",{templateId:$,projectId:L}),Z.value=!1},K=($,L)=>{var w;const V=(w=o.templates)==null?void 0:w.at(-1),T=V?ie.LexoRank.parse(V.rank).genNext():ie.LexoRank.middle();t("saveTemplate",{templateName:$,rank:T.format(),phaseIds:L}),O.value=!1},W=Le.useRouter(),F=e.ref("overview"),S=[{label:"Overview",value:"overview"},{label:"Feed",value:"feed"},{label:"Mapping",value:"mapping"}];return e.watch(F,$=>{$==="feed"?(W.push({name:re.feed}),console.log("Navigating to feed...")):$==="overview"?(W.push({name:re.project}),console.log("Navigating to feed...")):$==="mapping"&&(W.push({name:re.mapping}),console.log("Navigating to feed..."))}),($,L)=>{const V=e.resolveComponent("RouterView");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",e.mergeProps({class:"ao-project-overview"},$.$attrs),[e.createElementVNode("div",p5,[e.createVNode(It,null,{primary:e.withCtx(()=>[e.createVNode(wa,{tabs:S,modelValue:F.value,"onUpdate:modelValue":L[0]||(L[0]=T=>F.value=T)},null,8,["modelValue"]),e.createVNode(Y,{class:"ao-feed__show-archived",size:"sm","icon-name":$.showsArchived?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:$.$t("feed.filters.showsArchived.label"),role:"checkbox","aria-checked":$.showsArchived,onClick:L[1]||(L[1]=T=>$.$emit("update:showsArchived",!$.showsArchived))},null,8,["icon-name","label","aria-checked"])]),secondary:e.withCtx(()=>[$.isEditable===!0?(e.openBlock(),e.createBlock(Y,{key:0,class:"ao-project-overview__save-as-template",color:"primary",label:$.$t("project.template.save.label"),onClick:L[2]||(L[2]=T=>O.value=!0)},null,8,["label"])):e.createCommentVNode("",!0),$.isEditable===!0?(e.openBlock(),e.createBlock(Y,{key:1,class:"ao-project-overview__add-template",color:"primary",label:$.$t("project.template.apply.label"),onClick:L[3]||(L[3]=T=>Z.value=!0)},null,8,["label"])):e.createCommentVNode("",!0)]),_:1}),e.createElementVNode("div",u5,[e.createVNode(fo,{phases:$.phases,"closed-status":$.closedStatus,"is-editable":$.isEditable===!0,users:$.users,"time-tracking-data":$.timeTrackingData,onAddMilestone:c,onUpdateMilestone:f,onArchiveMilestone:m,onUnarchiveMilestone:u,onAddPhase:s,onUpdatePhase:i,onArchivePhase:l,onUnarchivePhase:d,onCopyPhaseToTemplate:p},null,8,["phases","closed-status","is-editable","users","time-tracking-data"])])]),e.createVNode(V,{class:"ao-project__sidebar",phases:$.phases,"project-id":$.project.id,"project-name":$.project.name,users:$.users,"is-editable":$.isEditable===!0,"closed-status":$.closedStatus,"time-tracking-data":$.timeTrackingData,onClose:L[4]||(L[4]=T=>$.$router.push({name:e.unref(re).project})),onUpdateMilestone:f,onAddActivity:h,onUpdateActivity:b,onArchiveActivity:g,onUnarchiveActivity:y},null,8,["phases","project-id","project-name","users","is-editable","closed-status","time-tracking-data"]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(V,{name:"modal",activities:B.value,"is-task-checkable":$.isTaskCheckable,statuses:$.statuses,"activity-types":$.activityTypes,phases:$.phases,project:$.project,users:$.users,"user-id":$.userId,"is-editable":$.isEditable,"attachment-enabled":$.attachmentEnabled,"time-tracking-data":$.timeTrackingData,"onUpdate:activity":b,onAddSubtask:_,onUpdateSubtask:C,onDeleteSubtask:v,onAddFiles:E,onRemoveFile:N,onAddComment:A,onUpdateComment:z,onRemoveComment:U},{default:e.withCtx(({Component:T})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(T),null,{default:e.withCtx(w=>[e.renderSlot($.$slots,"activityDetailsBody",e.normalizeProps(e.guardReactiveProps(w)))]),_:2},1024))]),_:3},8,["activities","is-task-checkable","statuses","activity-types","phases","project","users","user-id","is-editable","attachment-enabled","time-tracking-data"])]))],16),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[O.value?(e.openBlock(),e.createBlock(Or,{key:0,phases:$.phases,onClose:L[5]||(L[5]=T=>O.value=!1),onSave:K},null,8,["phases"])):e.createCommentVNode("",!0),Z.value?(e.openBlock(),e.createBlock(Ar,{key:1,"project-id":$.project.id,templates:$.templates,onClose:L[6]||(L[6]=T=>Z.value=!1),onApply:H},null,8,["project-id","templates"])):e.createCommentVNode("",!0)]))],64)}}}),n9="",f5={class:"ao-card-feed__header"},h5={key:1,class:"ao-card-feed__header-secondary ao-card-feed__header-icons"},g5={key:2,class:"ao-card-feed__header-secondary ao-card-feed__secondary"},_5={class:"ao-card-feed__body"},v5={key:0,class:"ao-card-feed__breadcrumbs"},C5={class:e.normalizeClass(["ao-card-feed__title-group"])},b5={class:"ao-card-feed__title-line"},y5={key:0,class:"ao-card-feed__slug"},w5={key:1,class:"ao-card-feed__deadline"},k5={class:"ao-card-feed__footer"},$5={class:"ao-card-feed__footer-row"},E5={class:"ao-assignees"},B5={key:0,class:"ao-assignee"},V5={key:0,class:"ao-card-feed__subitems"},S5={key:0,class:"ao-card-feed__subitem"},N5={class:"ao-card-feed__subitem"},x5={key:1,class:"ao-card-feed__subitem"},M5={class:"ao-card-feed__subitem"},T5={class:"ao-card-feed__timer-wrapper"},A5={class:"ao-card-feed__footer-row"},O5={key:0,class:"ao-card-feed__progress-wrapper"},I5={class:"ao-card-feed__subitem"},L5={class:"ao-card-feed__subitem"},ho=e.defineComponent({__name:"AoCardFeed",props:{id:{},name:{},projectName:{},projectId:{},projectColor:{},phaseName:{},milestoneName:{},milestoneColor:{},deadline:{},important:{type:Boolean},assignee:{},slug:{},comments:{},attachments:{},tasks:{},isEditable:{type:Boolean},isPrivate:{type:Boolean},isClosed:{type:Boolean},tagType:{}},emits:["removeAssignee","updateActivity","startTimer"],setup(a,{emit:t}){const o=a,r=e.computed(()=>o.tagType==="milestone"?o.milestoneName:o.projectName),n=e.computed(()=>o.tagType==="milestone"?o.milestoneColor:o.projectColor),s=h=>{t("updateActivity",{id:o.id,name:h})},i=e.computed(()=>o.tagType==="milestone"&&o.phaseName?`${o.phaseName}`:o.phaseName&&o.milestoneName?`${o.phaseName} / ${o.milestoneName}`:""),l=e.computed(()=>o.assignee?[o.assignee]:[]),d=e.computed(()=>ra(o.deadline)),p=h=>{t("removeAssignee",h)},c=()=>{t("startTimer",{activityId:o.id,name:o.name,project:o.projectName,projectId:o.projectId,slug:o.slug})},f=e.computed(()=>{var h;return(h=o.tasks)==null?void 0:h.length}),m=e.computed(()=>{var h;return(h=o.tasks)==null?void 0:h.filter(b=>b.isDone).length}),u=e.computed(()=>(m.value||0)/(f.value||1));return(h,b)=>(e.openBlock(),e.createBlock(ba,{class:e.normalizeClass(["ao-card-feed",{"ao-card-feed--closed":h.isClosed}]),"is-clickable":!0},{header:e.withCtx(()=>[e.createElementVNode("div",f5,[r.value?(e.openBlock(),e.createBlock(wt,{key:0,label:r.value,class:"ao-card-feed__project",variant:"solid",color:h.projectColor?void 0:"primary","raw-color":n.value},null,8,["label","color","raw-color"])):e.createCommentVNode("",!0),h.isPrivate||h.important||h.isClosed?(e.openBlock(),e.createElementBlock("div",h5,[h.isPrivate?(e.openBlock(),e.createBlock(Q,{key:0,name:"Lock",class:"ao-card-feed__warning",size:"sm"})):e.createCommentVNode("",!0),h.important?(e.openBlock(),e.createBlock(Q,{key:1,name:"FlagRounded",class:"ao-card-feed__important",size:"sm"})):e.createCommentVNode("",!0),h.isClosed?(e.openBlock(),e.createBlock(Q,{key:2,name:"CheckSmallRounded",class:"ao-card-feed__closed"})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),h.$slots.secondary?(e.openBlock(),e.createElementBlock("div",g5,[e.renderSlot(h.$slots,"secondary")])):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[e.createElementVNode("div",_5,[i.value?(e.openBlock(),e.createElementBlock("span",v5,e.toDisplayString(i.value),1)):e.createCommentVNode("",!0),e.createElementVNode("div",C5,[e.createElementVNode("div",b5,[h.slug?(e.openBlock(),e.createElementBlock("span",y5,e.toDisplayString(h.slug)+": ",1)):e.createCommentVNode("",!0),e.createVNode(ne,{id:h.id,title:h.name,level:5,"is-editable":h.isEditable,"onUpdate:title":s,class:"ao-card-feed__title-inline"},null,8,["id","title","is-editable"])])]),h.deadline?(e.openBlock(),e.createElementBlock("span",w5,e.toDisplayString(d.value),1)):e.createCommentVNode("",!0)])]),footer:e.withCtx(()=>[e.createElementVNode("div",k5,[e.createElementVNode("div",$5,[e.createElementVNode("ul",E5,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,g=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:g.id},[g?(e.openBlock(),e.createElementBlock("li",B5,[e.createVNode(ye,{"user-name":e.unref(er)(g),"avatar-url":g.avatarUrl,"is-closable":!0,onClose:()=>p(g.id)},null,8,["user-name","avatar-url","onClose"])])):e.createCommentVNode("",!0)],64))),128))]),h.comments||h.attachments?(e.openBlock(),e.createElementBlock("ul",V5,[h.comments?(e.openBlock(),e.createElementBlock("li",S5,[e.createVNode(Q,{name:"ChatOutline",size:"sm"}),e.createElementVNode("span",N5,e.toDisplayString(h.comments),1)])):e.createCommentVNode("",!0),h.attachments?(e.openBlock(),e.createElementBlock("li",x5,[e.createVNode(Q,{name:"AttachFileRounded",size:"sm"}),e.createElementVNode("span",M5,e.toDisplayString(h.attachments),1)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",T5,[e.createVNode(Q,{name:"PlayArrowRounded",class:"ao-card-feed__timer",size:"md",onClick:e.withModifiers(c,["stop"])},null,8,["onClick"])])]),e.createElementVNode("div",A5,[h.tasks&&h.tasks.length?(e.openBlock(),e.createElementBlock("div",O5,[e.createElementVNode("div",I5,[e.createVNode(Q,{name:"SelectCheckBox",size:"sm"}),e.createElementVNode("span",L5,e.toDisplayString(m.value)+" / "+e.toDisplayString(f.value),1)]),e.createVNode(ya,{percentages:u.value,class:"ao-card-feed__progress"},null,8,["percentages"])])):e.createCommentVNode("",!0)])])]),_:3},8,["class"]))}}),i9="",D5={class:"ao-project-milestone"},j5={class:"ao-project-milestone__header"},P5={class:"ao-project-milestone__header_line"},z5={class:"ao-project-milestone__header_line"},H5={class:"ao-project-milestone__title"},R5={key:0,class:"ao-fieldset ao-milestone__fieldset"},U5={class:"ao-field__row ao-milestone__field-row"},F5={class:"ao-field ao-field--inline"},Z5={class:"ao-field__row ao-milestone__field-row"},W5={class:"ao-field ao-milestone__field-multiselect"},q5=["onClick"],Y5={class:"ao-project-milestone__body"},K5={key:0,class:"ao-project-milestone__footer"},Ir=e.defineComponent({__name:"AoProjectOverviewMilestoneDetails",props:{milestoneId:{},users:{},projectId:{},phases:{},phaseId:{},isEditable:{type:Boolean},closedStatus:{},timeTrackingData:{}},emits:["close","addActivity","updateMilestone","updateActivity","archiveActivity","unarchiveActivity","startTimer"],setup(a,{emit:t}){const o=a,{t:r}=We(),n=v=>{var B;t("startTimer",v),(B=window.parent)==null||B.postMessage({type:"startTimer",data:v},"*")},s=e.computed(()=>{var v;return(v=o.phases)==null?void 0:v.find(B=>B.id===o.phaseId)}),i=e.computed(()=>{var v;return(v=o.phases)==null?void 0:v.flatMap(B=>B.milestones)}),l=e.computed(()=>{var v;return(v=i.value)==null?void 0:v.find(B=>B.id===o.milestoneId)}),d=e.computed(()=>{var v;return(v=l.value)==null?void 0:v.activities});e.watch(d,(v,B)=>{Te(v,B)});const p=v=>{t("close",v)},c=()=>{const{name:v,rank:B}=at(d.value??[],"activity",r);t("addActivity",{milestoneId:o.milestoneId,name:v,rank:B,projectId:o.projectId})},f=v=>{t("updateActivity",v)},m=v=>{d.value&&"moved"in v&&t("updateActivity",{id:v.moved.element.id,rank:dt(d.value,v.moved.newIndex)})},u=e.computed({get:()=>{var v;return(v=l.value)==null?void 0:v.color},set:v=>{l.value&&t("updateMilestone",{id:l.value.id,color:v})}}),h=e.computed({get:()=>{var v;return((v=l==null?void 0:l.value)==null?void 0:v.deadline)??""},set:v=>{l.value&&t("updateMilestone",{id:l.value.id,deadline:v!=null&&v.length?v:null})}}),b=v=>o.closedStatus?Da(v,o.closedStatus):!1,g=e.computed(()=>{var v;return((v=o.users)==null?void 0:v.map(B=>({label:`${B.firstName} ${B.lastName}`,value:B.id,avatar:B.avatarUrl})))||[]}),y=e.computed({get(){var v,B;return(B=(v=l.value)==null?void 0:v.assignee)!=null&&B.id?[l.value.assignee.id]:[]},set(v){t("updateMilestone",{id:o.milestoneId,assigneeId:v[0]??null})}}),_=e.computed({get(){var v;return((v=l.value)==null?void 0:v.important)??!1},set(v){t("updateMilestone",{id:o.milestoneId,important:v})}}),C=(v,B)=>{const E=v.currentTarget;E instanceof HTMLElement&&B(E)};return(v,B)=>{var E;return e.openBlock(),e.createElementBlock("div",D5,[e.createElementVNode("header",j5,[e.createElementVNode("div",P5,[e.createVNode(Y,{"icon-name":"CloseRounded",variant:"ghost",size:"sm",class:"ao-milestone__close",onClick:p})]),e.createElementVNode("div",z5,[e.createElementVNode("div",H5,[e.createVNode(ne,{title:((E=l.value)==null?void 0:E.name)||v.milestoneId,level:5},null,8,["title"]),e.createVNode(to,{modelValue:_.value,"onUpdate:modelValue":B[0]||(B[0]=N=>_.value=N),modelModifiers:{lazy:!0},disabled:!v.isEditable,class:"ao-milestone__important",color:"danger",label:v.$t("activity.important.label"),"icon-name":"FlagRounded",variant:"ghost",size:"sm"},null,8,["modelValue","disabled","label"])])]),l.value?(e.openBlock(),e.createElementBlock("div",R5,[e.createElementVNode("div",U5,[e.createElementVNode("label",F5,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":B[1]||(B[1]=N=>h.value=N),class:"ao-milestone__field ao-milestone__date-field",type:"date"},null,512),[[e.vModelText,h.value,void 0,{lazy:!0}]])])]),e.createElementVNode("div",Z5,[e.createElementVNode("label",W5,[e.createVNode(ce,{modelValue:y.value,"onUpdate:modelValue":B[2]||(B[2]=N=>y.value=N),options:g.value,"close-on-select":!0,searchable:!0,max:1,class:"ao-milestone__field ao-milestone__multiselect",placeholder:v.$t("activity.filters.assignee.placeholder"),mode:"tags",disabled:!v.isEditable,caret:v.isEditable},{tag:e.withCtx(({option:N,handleTagRemove:A})=>[e.createVNode(ye,{"user-name":N.label,"avatar-url":N.avatar,"is-closable":!0,onClose:z=>A(N,z)},null,8,["user-name","avatar-url","onClose"])]),_:1},8,["modelValue","options","placeholder","disabled","caret"])])]),e.createVNode(mo,{color:u.value,"onUpdate:color":B[3]||(B[3]=N=>u.value=N)},{clickable:e.withCtx(({openPicker:N,bgColor:A})=>[e.createElementVNode("button",{style:e.normalizeStyle({background:A}),class:"color-button",onClick:z=>C(z,N)},null,12,q5)]),_:1},8,["color"])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Y5,[e.createVNode(e.unref(De),e.mergeProps({class:"ao-project-milestone__activities",list:d.value,disabled:!v.isEditable,"item-key":"id",group:"kanban"},v.$attrs,{onChange:m}),{item:e.withCtx(({element:N})=>{var A,z,U,Z,O;return[e.createVNode(ho,{id:N.id,name:N.name||N.id,"project-id":v.projectId,"phase-name":(A=s.value)==null?void 0:A.name,"milestone-name":(z=l.value)==null?void 0:z.name,"milestone-color":(U=l.value)==null?void 0:U.color,deadline:N.deadline,important:N.important,users:v.users,assignee:N.assignee,slug:N.slug,comments:(Z=N.comments)==null?void 0:Z.length,attachments:(O=N.attachments)==null?void 0:O.length,tasks:N.tasks,"is-editable":v.isEditable,"is-private":N.private,"is-closed":b(N),onClick:H=>v.$router.push({name:e.unref(re).activity,params:{milestoneId:v.milestoneId,activityId:N.id}}),onUpdateActivity:f,onRemoveAssignee:()=>f({id:N.id,assigneeId:null}),onStartTimer:n},e.createSlots({_:2},[v.isEditable?{name:"secondary",fn:e.withCtx(()=>[v.isEditable&&N.active?(e.openBlock(),e.createBlock(Y,{key:0,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:v.$t("archive"),onClick:e.withModifiers(()=>v.$emit("archiveActivity",{id:N.id}),["stop"])},null,8,["label","onClick"])):e.createCommentVNode("",!0),v.isEditable&&!N.active?(e.openBlock(),e.createBlock(Y,{key:1,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:v.$t("feed.activity.unarchive"),onClick:e.withModifiers(()=>v.$emit("unarchiveActivity",{id:N.id}),["stop"])},null,8,["label","onClick"])):e.createCommentVNode("",!0)]),key:"0"}:void 0]),1032,["id","name","project-id","phase-name","milestone-name","milestone-color","deadline","important","users","assignee","slug","comments","attachments","tasks","is-editable","is-private","is-closed","onClick","onRemoveAssignee"])]}),_:1},16,["list","disabled"]),v.isEditable?(e.openBlock(),e.createElementBlock("div",K5,[e.createVNode(Pe,{"icon-name":"Add",label:v.$t("project.activity.add"),onClick:c},null,8,["label"])])):e.createCommentVNode("",!0)])])}}}),s9="",G5=e.defineComponent({__name:"AoProjectOverviewActivityDetails",props:{phaseId:{},milestoneId:{},activityId:{},activityTypes:{},activities:{},isTaskCheckable:{type:Function},statuses:{},phases:{},users:{},project:{},userId:{},isEditable:{type:Boolean},attachmentEnabled:{type:Boolean},timeTrackingData:{}},emits:["update:activity","addSubtask","updateSubtask","deleteSubtask","addFiles","removeFile","addComment","updateComment","removeComment"],setup(a,{emit:t}){const o=a,r=e.computed(()=>{var g;return(g=o.phases)==null?void 0:g.find(y=>y.id===o.phaseId)}),n=e.computed(()=>{var g;return(g=o.phases)==null?void 0:g.flatMap(y=>y.milestones)}),s=e.computed(()=>{var g;return(g=n.value)==null?void 0:g.find(y=>y.id===o.milestoneId)}),i=e.computed(()=>{var g;return(g=o.activities)==null?void 0:g.find(y=>y.id===o.activityId)}),l=g=>{t("update:activity",g)},d=g=>{t("addSubtask",g)},p=g=>{t("updateSubtask",g)},c=g=>{t("deleteSubtask",g)},f=g=>{t("addFiles",g)},m=g=>{t("removeFile",g)},u=g=>{t("addComment",g)},h=g=>{t("updateComment",g)},b=g=>{t("removeComment",g)};return(g,y)=>{var _,C;return i.value?(e.openBlock(),e.createBlock(ao,{key:0,activity:i.value,"activity-types":g.activityTypes,"milestone-id":g.milestoneId,"template-activities":g.activities,"is-template":!1,users:g.users,"user-id":g.userId,"is-task-checkable":g.isTaskCheckable,statuses:g.statuses,breadcrumbs:`${(_=r.value)==null?void 0:_.name} / ${(C=s.value)==null?void 0:C.name}`,"is-editable":g.isEditable,"attachment-enabled":g.attachmentEnabled,projects:[g.project],"time-tracking-data":g.timeTrackingData,onClose:g.$router.back,"onUpdate:activity":l,onAddSubtask:d,onUpdateSubtask:p,onDeleteSubtask:c,onAddFiles:f,onRemoveFile:m,onAddComment:u,onUpdateComment:h,onRemoveComment:b},{default:e.withCtx(v=>[e.renderSlot(g.$slots,"default",e.normalizeProps(e.guardReactiveProps(v)))]),_:3},8,["activity","activity-types","milestone-id","template-activities","users","user-id","is-task-checkable","statuses","breadcrumbs","is-editable","attachment-enabled","projects","time-tracking-data","onClose"])):e.createCommentVNode("",!0)}}}),X5={class:"ao-col-header"},Q5=e.defineComponent({__name:"AoColHeader",props:{title:{},items:{}},setup(a){return(t,o)=>(e.openBlock(),e.createElementBlock("header",X5,[e.createVNode(ne,{title:t.title,class:"ao-col-header__title",level:4},null,8,["title"]),t.items?(e.openBlock(),e.createBlock(wt,{key:0,label:t.items,class:"ao-col-header__items",variant:"solid",color:"primary"},null,8,["label"])):e.createCommentVNode("",!0)]))}}),l9="";function J5(a){return e.getCurrentScope()?(e.onScopeDispose(a),!0):!1}function ka(a){return typeof a=="function"?a():e.unref(a)}const e7=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const t7=a=>a!=null,Rt=()=>{};function a7(a,t){function o(...r){return new Promise((n,s)=>{Promise.resolve(a(()=>t.apply(this,r),{fn:t,thisArg:this,args:r})).then(n).catch(s)})}return o}function o7(a,t={}){let o,r,n=Rt;const s=l=>{clearTimeout(l),n(),n=Rt};return l=>{const d=ka(a),p=ka(t.maxWait);return o&&s(o),d<=0||p!==void 0&&p<=0?(r&&(s(r),r=null),Promise.resolve(l())):new Promise((c,f)=>{n=t.rejectOnCancel?f:c,p&&!r&&(r=setTimeout(()=>{o&&s(o),r=null,c(l())},p)),o=setTimeout(()=>{r&&s(r),r=null,c(l())},d)})}}function r7(a,t=200,o={}){return a7(o7(t,o),a)}function go(a){var t;const o=ka(a);return(t=o==null?void 0:o.$el)!=null?t:o}const n7=e7?window:void 0;function i7(){const a=e.ref(!1),t=e.getCurrentInstance();return t&&e.onMounted(()=>{a.value=!0},t),a}function s7(a){const t=i7();return e.computed(()=>(t.value,!!a()))}function l7(a,t,o={}){const{root:r,rootMargin:n="0px",threshold:s=.1,window:i=n7,immediate:l=!0}=o,d=s7(()=>i&&"IntersectionObserver"in i),p=e.computed(()=>{const h=ka(a);return(Array.isArray(h)?h:[h]).map(go).filter(t7)});let c=Rt;const f=e.ref(l),m=d.value?e.watch(()=>[p.value,go(r),f.value],([h,b])=>{if(c(),!f.value||!h.length)return;const g=new IntersectionObserver(t,{root:go(b),rootMargin:n,threshold:s});h.forEach(y=>y&&g.observe(y)),c=()=>{g.disconnect(),c=Rt}},{immediate:l,flush:"post"}):Rt,u=()=>{c(),m(),f.value=!1};return J5(u),{isSupported:d,isActive:f,pause(){c(),f.value=!1},resume(){f.value=!0},stop:u}}const c7={class:e.normalizeClass(["ao-list-kanban"])},d7={class:"ao-list-kanban__header"},p7={key:0,class:"ao-list-kanban__end ao-list-kanban__end--loading"},u7={key:1,class:"ao-list-kanban__end"},m7={key:0,class:"ao-list-kanban__no-more"},f7={key:1,class:"ao-list-kanban__divider"},h7={key:1,class:"ao-list-kanban__footer"},g7=e.defineComponent({__name:"AoListKanban",props:{list:{},status:{},users:{},userId:{},title:{},footerLabel:{},isLoading:{type:Boolean},hasMore:{type:Boolean},noMoreLabel:{},isEditable:{type:[Boolean,String]},tagType:{}},emits:["add","update:list","change:list","loadMore","selectActivity","archiveActivity","unarchiveActivity","updateActivity","startTimer"],setup(a,{emit:t}){const o=a,r=e.ref(!1),n=e.ref(null);l7(n,([{isIntersecting:c}])=>{r.value=c}),e.watch(r,c=>{c&&o.hasMore&&!o.isLoading&&t("loadMore")});const s=c=>{var f;return o.isEditable===!0?!0:o.userId&&o.isEditable==="only-own"?o.userId===((f=c.assignee)==null?void 0:f.id):!1},i=c=>{t("selectActivity",c)},l=c=>{t("updateActivity",c)},d=c=>{"added"in c?t("updateActivity",{id:c.added.element.id,statusId:o.status.id,rank:dt(o.list,c.added.newIndex)}):"removed"in c||"moved"in c&&t("updateActivity",{id:c.moved.element.id,rank:dt(o.list,c.moved.newIndex)})},p=e.ref(!1);return(c,f)=>(e.openBlock(),e.createElementBlock("div",c7,[c.title||c.$slots.header?e.renderSlot(c.$slots,"header",{key:0},()=>{var m;return[e.createElementVNode("div",d7,[c.title?(e.openBlock(),e.createBlock(Q5,{key:0,title:c.title,level:3,items:(m=c.list)==null?void 0:m.length},null,8,["title","items"])):e.createCommentVNode("",!0)])]}):e.createCommentVNode("",!0),e.createVNode(e.unref(De),e.mergeProps({class:["ao-list-kanban__list",p.value?"ao-list-kanban__transition":void 0],list:c.list,"item-key":"id",group:"kanban","ghost-class":"ao-list-kanban__ghost",animation:"200"},c.$attrs,{draggable:".ao-list-draggable",disabled:!c.isEditable,onChange:d,onStart:f[1]||(f[1]=m=>p.value=!0),onEnd:f[2]||(f[2]=m=>p.value=!1),"component-data":{tag:"transition-group",name:"ao-list-kanban__transition"}}),{item:e.withCtx(({element:m})=>{var u,h,b,g,y,_,C,v,B,E;return[e.createVNode(ho,{class:e.normalizeClass(s(m)?"ao-list-draggable":""),id:m.id,name:m.name,"project-name":(u=m.project)==null?void 0:u.name,"project-id":(h=m.project)==null?void 0:h.id,"project-color":(b=m.project)==null?void 0:b.color,"phase-name":(y=(g=m.milestone)==null?void 0:g.phase)==null?void 0:y.name,"milestone-name":(_=m.milestone)==null?void 0:_.name,"milestone-color":(C=m.milestone)==null?void 0:C.color,deadline:m.deadline,rules:((v=m.rules)==null?void 0:v.length)||0,tasks:m.tasks,description:m.description,important:m.important,type:m.type,comments:(B=m.comments)==null?void 0:B.length,attachments:(E=m.attachments)==null?void 0:E.length,users:c.users,assignee:m.assignee,slug:m.slug,"is-editable":s(m),"is-private":m.private,"tag-type":c.tagType,onUpdateActivity:[N=>s(m)&&l(N),()=>s(m)&&l],onClick:()=>i(m.id),onRemoveAssignee:()=>s(m)&&l({id:m.id,assigneeId:null}),onStartTimer:f[0]||(f[0]=N=>c.$emit("startTimer",N))},{secondary:e.withCtx(()=>[s(m)&&m.active?(e.openBlock(),e.createBlock(Y,{key:0,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:c.$t("feed.activity.archive"),onClick:e.withModifiers(()=>c.$emit("archiveActivity",{id:m.id}),["stop"])},null,8,["label","onClick"])):e.createCommentVNode("",!0),s(m)&&!m.active?(e.openBlock(),e.createBlock(Y,{key:1,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:c.$t("feed.activity.unarchive"),onClick:e.withModifiers(()=>c.$emit("unarchiveActivity",{id:m.id}),["stop"])},null,8,["label","onClick"])):e.createCommentVNode("",!0)]),_:2},1032,["class","id","name","project-name","project-id","project-color","phase-name","milestone-name","milestone-color","deadline","rules","tasks","description","important","type","comments","attachments","users","assignee","slug","is-editable","is-private","tag-type","onUpdateActivity","onClick","onRemoveAssignee"])]}),footer:e.withCtx(()=>[c.isLoading?(e.openBlock(),e.createElementBlock("div",p7,[e.createVNode(Q,{name:"Loading"})])):c.hasMore?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"scrollEnd",ref:n,class:"ao-list-kanban__end"},null,512)):(e.openBlock(),e.createElementBlock("div",u7,[c.noMoreLabel?(e.openBlock(),e.createElementBlock("span",m7,e.toDisplayString(c.noMoreLabel),1)):c.isEditable?(e.openBlock(),e.createElementBlock("span",f7)):e.createCommentVNode("",!0)]))]),_:1},16,["class","list","disabled"]),c.$slots.footer||c.footerLabel?(e.openBlock(),e.createElementBlock("div",h7,[e.renderSlot(c.$slots,"footer",{},()=>[c.isEditable?(e.openBlock(),e.createBlock(Pe,{key:0,"icon-name":"AddBoxOutlineRounded",label:c.footerLabel,onClick:f[3]||(f[3]=m=>c.$emit("add"))},null,8,["label"])):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)]))}}),c9="",_7={class:"ao-field ao-search-field"},v7=["value","placeholder","onKeypress"],C7=e.defineComponent({__name:"AoSearchField",props:{modelValue:{},delay:{default:250},placeholder:{default:"Search"}},emits:["update:modelValue","clear"],setup(a,{emit:t}){const o=a,r=async i=>{const d=i.target.value;t("update:modelValue",d,i)},n=r7(r,o.delay),s=i=>{t("clear",i)};return(i,l)=>(e.openBlock(),e.createElementBlock("div",_7,[e.createElementVNode("input",{value:i.modelValue,type:"text",class:"ao-field__input ao-search-field__input",placeholder:i.placeholder,onInput:l[0]||(l[0]=(...d)=>e.unref(n)&&e.unref(n)(...d)),onKeypress:e.withKeys(r,["enter"])},null,40,v7),e.createVNode(Q,{name:"SearchRounded",class:e.normalizeClass(`ao-search-field__icon ao-search-field__action ${i.modelValue?"":"ao-search-field__action--visible"}`)},null,8,["class"]),e.createVNode(Y,{"icon-name":"CloseRounded",size:"sm",color:"primary",corners:"round",class:e.normalizeClass(`ao-search-field__button ao-search-field__action ${i.modelValue?"ao-search-field__action--visible":""}`),onClick:s},null,8,["class"])]))}}),d9="",b7={class:"ao-feed"},y7={class:"ao-feed__filters"},w7={class:"ao-feed__body"},Lr=e.defineComponent({__name:"AoFeed",props:{activities:{},statuses:{},project:{},projects:{},filters:{},activityTypes:{},users:{},userId:{},initialActivityId:{},initialActivitySlug:{},searchText:{default:""},showsArchivedActivities:{type:Boolean},showsOnlyImportant:{type:Boolean},showsOnlyNonAssigned:{type:Boolean},selectedActivity:{},isTaskCheckable:{type:Function,default:void 0},isEditable:{type:[Boolean,String]},attachmentEnabled:{type:Boolean,default:!0},timeTrackingData:{}},emits:["change:activities","addActivity","update:filters","selectActivity","update:activity","archiveActivity","unarchiveActivity","update:searchText","clear:searchText","update:showsArchivedActivities","update:showsOnlyImportant","update:showsOnlyNonAssigned","addSubtask","updateSubtask","deleteSubtask","addFiles","removeFile","addComment","updateComment","removeComment","toast","startTimer"],setup(a,{emit:t}){const o=a,{t:r}=We();function n(V,T){t("toast",V,T)}const s=e.toRef(o,"activities"),i=async(V,T)=>{await t("selectActivity",V,T)},l=e.ref({}),d=e.ref(!1),p=e.ref(!1),c=e.computed(()=>o.project?"milestone":"project");e.watch([()=>o.statuses,()=>o.activities,()=>o.initialActivityId,()=>o.initialActivitySlug],async([V,T,w,x],[R,P])=>{l.value=Object.fromEntries(V.map(M=>[M.id,T.filter(D=>{var ee;return((ee=D.status)==null?void 0:ee.id)===M.id})])),w&&!d.value?(i(w,null),d.value=!0):x&&!d.value&&(i(null,x),d.value=!0),p.value&&Te(T,P)},{immediate:!0});const f=e.computed(()=>{var V;return!o.selectedActivity||!o.selectedActivity.milestone?"":`${((V=o.selectedActivity.milestone.phase)==null?void 0:V.name)??""} / ${o.selectedActivity.milestone.name??""}`}),m=V=>{var P,M;const T=(P=o.activities)==null?void 0:P.at(-1),w=T?ie.LexoRank.parse(T.rank).genNext():ie.LexoRank.middle(),x=((M=o.activities)==null?void 0:M.length)??0,R={name:r("activity.defaultName",{idx:x+1}),rank:w.format(),statusId:V.id};o.filters.assigneeId.length>0&&(R.assigneeId=o.filters.assigneeId[0]),o.filters.projectId.length>0&&(R.projectId=o.filters.projectId[0]),o.filters.typeId.length>0&&(R.typeId=o.filters.typeId[0]),p.value=!0,t("addActivity",R)},u=(V,T)=>{p.value=!1,t("update:filters",{...o.filters,[V]:T})},h=e.computed(()=>o.project?[o.project]:o.projects??[]),b=e.computed(()=>h.value.map(V=>({value:V.id,label:V.name}))),g=e.computed(()=>{var V;return(V=o.activityTypes)==null?void 0:V.map(T=>({value:T.id,label:T.name}))}),y=e.computed(()=>o.users.map(V=>({value:V.id,label:`${V.firstName} ${V.lastName}`,avatar:V.avatarUrl}))),_=V=>{o.selectedActivity&&t("update:activity",V)},C=V=>{t("update:activity",V)},v=V=>{t("archiveActivity",V)},B=V=>{t("unarchiveActivity",V)},E=V=>{var T;t("startTimer",V),(T=window.parent)==null||T.postMessage({type:"startTimer",data:V},"*")},N=V=>{p.value=!1,t("update:searchText",V)},A=V=>{p.value=!1,t("clear:searchText",V)},z=V=>{o.selectedActivity&&t("addSubtask",V)},U=V=>{o.selectedActivity&&t("updateSubtask",V)},Z=V=>{o.selectedActivity&&t("deleteSubtask",V)},O=V=>{t("addFiles",V)},H=V=>{t("removeFile",V)},K=V=>{o.selectedActivity&&t("addComment",{...V,activityId:o.selectedActivity.id})},W=V=>{const{id:T}=o.selectedActivity||{};T&&t("updateComment",V)},F=V=>{const{id:T}=o.selectedActivity||{};T&&t("removeComment",V)},S=Le.useRouter(),$=e.ref("feed"),L=[{label:"Overview",value:"overview"},{label:"Feed",value:"feed"},{label:"Mapping",value:"mapping"}];return e.watch($,V=>{V==="feed"?(S.push({name:re.feed}),console.log("Navigating to feed...")):V==="overview"?(S.push({name:re.project}),console.log("Navigating to feed...")):V==="mapping"&&(S.push({name:re.mapping}),console.log("Navigating to feed..."))}),(V,T)=>{var w;return e.openBlock(),e.createElementBlock("div",b7,[e.createVNode(It,null,{primary:e.withCtx(()=>[e.createElementVNode("div",y7,[e.createVNode(wa,{tabs:L,modelValue:$.value,"onUpdate:modelValue":T[0]||(T[0]=x=>$.value=x)},null,8,["modelValue"]),e.createVNode(C7,{"model-value":V.searchText,placeholder:V.$t("feed.search.placeholder"),class:"ao-feed__search","onUpdate:modelValue":N,onClear:A},null,8,["model-value","placeholder"]),o.project?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ce,{key:0,"model-value":V.filters[e.unref(Xe).project],mode:"tags",options:b.value,"close-on-select":!1,searchable:!0,class:"ao-feed__filter ao-feed__filter__projects",placeholder:V.$t("feed.filters.project.placeholder"),"onUpdate:modelValue":T[1]||(T[1]=x=>u(e.unref(Xe).project,x))},null,8,["model-value","options","placeholder"])),g.value?(e.openBlock(),e.createBlock(ce,{key:1,"model-value":V.filters[e.unref(Xe).type],mode:"tags",options:g.value,"close-on-select":!1,searchable:!0,class:"ao-feed__filter ao-feed__filter__types",placeholder:V.$t("feed.filters.activityType.placeholder"),"onUpdate:modelValue":T[2]||(T[2]=x=>u(e.unref(Xe).type,x))},null,8,["model-value","options","placeholder"])):e.createCommentVNode("",!0),y.value.length?(e.openBlock(),e.createBlock(ce,{key:2,"model-value":V.filters[e.unref(Xe).assignee],mode:"tags",options:y.value,"close-on-select":!1,searchable:!0,class:"ao-feed__filter ao-feed__filter__assignees",placeholder:V.$t("feed.filters.assignee.placeholder"),"onUpdate:modelValue":T[3]||(T[3]=x=>u(e.unref(Xe).assignee,x))},{tag:e.withCtx(({option:x,handleTagRemove:R})=>[e.createVNode(ye,{"user-name":x.label,"avatar-url":x.avatar,"is-closable":!0,onClose:P=>R(x,P)},null,8,["user-name","avatar-url","onClose"])]),_:1},8,["model-value","options","placeholder"])):e.createCommentVNode("",!0)]),e.createVNode(Y,{class:"ao-feed__only-non-assigned",size:"sm","icon-name":V.showsOnlyNonAssigned?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:V.$t("feed.filters.showsOnlyNonAssigned.label"),role:"checkbox","aria-checked":V.showsOnlyNonAssigned,onClick:T[4]||(T[4]=x=>V.$emit("update:showsOnlyNonAssigned",!V.showsOnlyNonAssigned))},null,8,["icon-name","label","aria-checked"]),e.createVNode(Y,{class:"ao-feed__only-important",size:"sm","icon-name":V.showsOnlyImportant?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:V.$t("feed.filters.showsOnlyImportant.label"),role:"checkbox","aria-checked":V.showsOnlyImportant,onClick:T[5]||(T[5]=x=>V.$emit("update:showsOnlyImportant",!V.showsOnlyImportant))},null,8,["icon-name","label","aria-checked"]),e.createVNode(Y,{class:"ao-feed__show-archived",size:"sm","icon-name":V.showsArchivedActivities?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:V.$t("feed.filters.showsArchivedActivities.label"),role:"checkbox","aria-checked":V.showsArchivedActivities,onClick:T[6]||(T[6]=x=>V.$emit("update:showsArchivedActivities",!V.showsArchivedActivities))},null,8,["icon-name","label","aria-checked"])]),_:1}),e.createElementVNode("div",w7,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.statuses,x=>(e.openBlock(),e.createBlock(g7,{key:x.id,status:x,list:l.value[x.id],title:x.name,"footer-label":V.$t("feed.activity.add"),users:V.users,"user-id":V.userId,"is-editable":V.isEditable,tagType:c.value,onAdd:()=>m(x),onSelectActivity:i,onArchiveActivity:v,onUnarchiveActivity:B,onUpdateActivity:C,onStartTimer:E},null,8,["status","list","title","footer-label","users","user-id","is-editable","tagType","onAdd"]))),128))]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[V.selectedActivity?(e.openBlock(),e.createBlock(ao,{key:0,activity:V.selectedActivity,"activity-types":V.activityTypes,"milestone-id":(w=V.selectedActivity.milestone)==null?void 0:w.id,"template-activities":s.value,users:V.users,"user-id":V.userId,"is-task-checkable":V.isTaskCheckable,statuses:V.statuses,breadcrumbs:f.value,"is-editable":V.isEditable,"attachment-enabled":V.attachmentEnabled,projects:h.value,"time-tracking-data":V.timeTrackingData,onClose:T[7]||(T[7]=()=>i(null,null)),"onUpdate:activity":_,onAddSubtask:z,onUpdateSubtask:U,onDeleteSubtask:Z,onAddFiles:O,onRemoveFile:H,onAddComment:K,onUpdateComment:W,onRemoveComment:F,onToast:n},{default:e.withCtx(x=>[e.renderSlot(V.$slots,"activityDetailsBody",e.normalizeProps(e.guardReactiveProps(x)))]),_:3},8,["activity","activity-types","milestone-id","template-activities","users","user-id","is-task-checkable","statuses","breadcrumbs","is-editable","attachment-enabled","projects","time-tracking-data"])):e.createCommentVNode("",!0)]))])}}}),p9="",k7={class:"ao-project-mapping"},$7={class:"ao-project-mapping-mapping__body"},E7={class:"ao-project-mapping-mapping__phases"},B7={key:0,class:"ao-project-mapping-mapping__image-wrapper"},V7=["src","alt"],S7=e.defineComponent({__name:"AoMapping",props:{project:{},phases:{},closedStatus:{},users:{},userId:{},templates:{},isTaskCheckable:{type:Function},statuses:{},activityTypes:{},isEditable:{type:[Boolean,String]},showsArchived:{type:Boolean},attachmentEnabled:{type:Boolean}},emits:["addPhase","updatePhase","archivePhase","unarchivePhase","copyPhaseToTemplate","applyTemplate","saveTemplate","update:showsArchived"],setup(a,{emit:t}){const o=a,{t:r}=We(),n=()=>{const{name:g,rank:y}=at(o.phases,"phase",r);t("addPhase",{name:g,rank:y,projectId:o.project.id})},s=g=>{t("updatePhase",g)},i=g=>{t("archivePhase",g)},l=g=>{t("unarchivePhase",g)},d=g=>{t("copyPhaseToTemplate",g)},p=e.ref(!1),c=e.ref(!1),f=(g,y)=>{t("applyTemplate",{templateId:g,projectId:y}),p.value=!1},m=(g,y)=>{var v;const _=(v=o.templates)==null?void 0:v.at(-1),C=_?ie.LexoRank.parse(_.rank).genNext():ie.LexoRank.middle();t("saveTemplate",{templateName:g,rank:C.format(),phaseIds:y}),c.value=!1},u=Le.useRouter(),h=e.ref("mapping"),b=[{label:"Overview",value:"overview"},{label:"Feed",value:"feed"},{label:"Mapping",value:"mapping"}];return e.watch(h,g=>{g==="feed"?(u.push({name:re.feed}),console.log("Navigating to feed...")):g==="overview"?(u.push({name:re.project}),console.log("Navigating to feed...")):g==="mapping"&&(u.push({name:re.mapping}),console.log("Navigating to feed..."))}),(g,y)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",e.mergeProps({class:"ao-project-mapping-overview"},g.$attrs),[e.createElementVNode("div",k7,[e.createVNode(It,null,{primary:e.withCtx(()=>[e.createVNode(wa,{modelValue:h.value,"onUpdate:modelValue":y[0]||(y[0]=_=>h.value=_),tabs:b},null,8,["modelValue"]),e.createVNode(Y,{class:"ao-feed__show-archived",size:"sm","icon-name":g.showsArchived?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:g.$t("feed.filters.showsArchived.label"),role:"checkbox","aria-checked":g.showsArchived,onClick:y[1]||(y[1]=_=>g.$emit("update:showsArchived",!g.showsArchived))},null,8,["icon-name","label","aria-checked"])]),secondary:e.withCtx(()=>[g.isEditable===!0?(e.openBlock(),e.createBlock(Y,{key:0,class:"ao-project-mapping-overview__save-as-template",color:"primary",label:g.$t("project.template.save.label"),onClick:y[2]||(y[2]=_=>c.value=!0)},null,8,["label"])):e.createCommentVNode("",!0),g.isEditable===!0?(e.openBlock(),e.createBlock(Y,{key:1,class:"ao-project-mapping-overview__add-template",color:"primary",label:g.$t("project.template.apply.label"),onClick:y[3]||(y[3]=_=>p.value=!0)},null,8,["label"])):e.createCommentVNode("",!0)]),_:1}),e.createElementVNode("div",$7,[e.createElementVNode("div",E7,[e.createVNode(fo,{phases:g.phases,"closed-status":g.closedStatus,"is-editable":g.isEditable===!0,users:g.users,onAddPhase:n,onUpdatePhase:s,onArchivePhase:i,onUnarchivePhase:l,onCopyPhaseToTemplate:d},null,8,["phases","closed-status","is-editable","users"])]),g.project.architectureImage?(e.openBlock(),e.createElementBlock("div",B7,[e.createElementVNode("img",{class:"architecture-image",src:g.project.architectureImage.url,alt:e.unref(r)("architectureImage.alt")},null,8,V7)])):e.createCommentVNode("",!0)])])],16),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[c.value?(e.openBlock(),e.createBlock(Or,{key:0,phases:g.phases,onClose:y[4]||(y[4]=_=>c.value=!1),onSave:m},null,8,["phases"])):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createBlock(Ar,{key:1,"project-id":g.project.id,templates:g.templates,onClose:y[5]||(y[5]=_=>p.value=!1),onApply:f},null,8,["project-id","templates"])):e.createCommentVNode("",!0)]))],64))}}),u9="",rt={TEMPLATES:"templates",TEMPLATE_DETAILS:"template_details",TEMPLATES_LIST:"templates_list"},N7=(a,t={})=>[{path:a,name:rt.TEMPLATES,redirect:{name:rt.TEMPLATES_LIST},...t,children:[{path:"",name:rt.TEMPLATES_LIST,component:Dr},{path:":templateId/:phaseId?/:milestoneId?/:activityId?",name:rt.TEMPLATE_DETAILS,component:Mr,props:!0}]}],re={project:"AoProject",feed:"AoProjectFeed",mapping:"AoProjectMapping",milestone:"AoMilestone",activity:"AoActivity"},x7=(a,t={})=>[{path:a,...t,redirect:{name:re.project},children:[{path:"",name:re.project,component:m5,props:!0,children:[{path:":phaseId/:milestoneId",name:re.milestone,component:Ir,props:!0},{path:":phaseId/:milestoneId/:activityId",name:re.activity,props:{default:!0,modal:!0},components:{default:Ir,modal:G5}}]},{path:"feed",name:re.feed,component:Lr,props:!0},{path:"mapping",name:re.mapping,component:S7,props:!0}]}],M7={class:"ao-templates"},Dr=e.defineComponent({__name:"AoTemplatesList",props:{templates:{}},emits:["addTemplate","updateTemplates","updateItem","removeItem"],setup(a,{emit:t}){const o=a,{t:r}=We();e.watch(()=>o.templates,(d,p)=>{Te(d,p)});const n=()=>{var m,u;const d=(m=o.templates)==null?void 0:m.at(-1),p=d?ie.LexoRank.parse(d.rank).genNext():ie.LexoRank.middle(),c=((u=o.templates)==null?void 0:u.length)??0,f={name:r("template.defaultName.template",{idx:c+1}),rank:p.format()};t("addTemplate",f)},s=(d,p)=>{t("updateItem",{itemType:te.TEMPLATES,id:d,templateId:d,data:{name:p}})},i=(d,p)=>{t("removeItem",{itemType:te.TEMPLATES,templateId:d,data:{id:d,...p?{name:p}:{}}})},l=d=>{if(d.moved){const p=Ot(d,o.templates??[]);t("updateItem",{itemType:te.TEMPLATES,id:d.moved.element.id,templateId:d.moved.element.id,data:{rank:p}})}};return(d,p)=>(e.openBlock(),e.createElementBlock("div",M7,[e.createVNode(It,null,{secondary:e.withCtx(()=>[e.createVNode(Y,{label:d.$t("templates.new"),color:"primary","icon-name":"Add","icon-position":"start",onClick:n},null,8,["label"])]),_:1}),e.createVNode(e.unref(De),{"model-value":d.templates,class:"ao-templates__list","item-key":"id",handle:".ao-card__drag",onChange:l},{item:e.withCtx(({element:c})=>{var f;return[e.createVNode(F2,{id:c.id,title:c.name,phases:c.phases,milestones:(f=c.phases)!=null&&f.length?e.unref(m2)(c.phases):0,activities:c.phases?e.unref(f2)(c.phases):0,"updated-at":c.updatedAt,"updated-by":c.updatedBy,onUpdateTitle:m=>s(c.id,m),onClick:m=>d.$router.push({name:e.unref(rt).TEMPLATE_DETAILS,params:{templateId:c.id}}),onDeleteItem:p[0]||(p[0]=(m,u)=>i(m,u))},null,8,["id","title","phases","milestones","activities","updated-at","updated-by","onUpdateTitle","onClick"])]}),_:1},8,["model-value"])]))}}),m9="",T7={class:"ao-field__label"},jr=e.defineComponent({__name:"AoField",props:{label:{},isMultiselect:{type:Boolean,default:!1}},setup(a){return(t,o)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(["ao-field",{"ao-field--multiselect":t.isMultiselect}])},[e.createElementVNode("span",T7,e.toDisplayString(t.label),1),e.renderSlot(t.$slots,"default")],2))}}),A7=["type","value","disabled","readonly"],O7=e.defineComponent({__name:"AoInputField",props:{label:{default:""},type:{default:"text"},modelValue:{default:""},modelModifiers:{default:()=>({})},isDisabled:{type:Boolean,default:!1},isReadonly:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(a,{emit:t}){const o=a,r=e.computed(()=>o.modelModifiers.lazy?"change":"input"),n=s=>{o.modelModifiers.number&&(s=Number(s)),t("update:modelValue",s)};return(s,i)=>(e.openBlock(),e.createBlock(jr,{label:s.label},{default:e.withCtx(()=>[e.createElementVNode("input",e.mergeProps({class:"ao-field__input",type:s.type,value:s.modelValue,disabled:s.isDisabled,readonly:s.isReadonly},{[e.toHandlerKey(r.value)]:i[0]||(i[0]=l=>n(l.target.value))}),null,16,A7)]),_:1},8,["label"]))}}),I7={class:"ao-field"},L7={class:"ao-field__label"},D7=["checked","disabled"],j7=e.defineComponent({__name:"AoCheckboxField",props:{label:{default:""},modelValue:{type:Boolean,default:!1},isReadonly:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(a){return(t,o)=>(e.openBlock(),e.createElementBlock("label",I7,[e.createElementVNode("span",L7,e.toDisplayString(t.label),1),e.createElementVNode("input",{class:"ao-field__input",type:"checkbox",checked:t.modelValue,disabled:t.isDisabled,onChange:o[0]||(o[0]=r=>{var n;return t.$emit("update:modelValue",((n=r.target)==null?void 0:n.checked)??!1)})},null,40,D7)]))}});X.AoAvatar=ye,X.AoCardFeed=ho,X.AoCheckboxField=j7,X.AoFeed=Lr,X.AoField=jr,X.AoInputField=O7,X.AoMultiselect=ce,X.AoProjectPhases=fo,X.AoTabBar=wa,X.AoTemplateDetails=Mr,X.AoTemplates=Wr,X.AoTemplatesList=Dr,X.TemplateItemTypeEnum=To,X.activityFeedStatus=Nd,X.durationTypes=Sd,X.feedFilterTypes=Xe,X.getProjectOverviewRoutes=x7,X.getTemplateRoutes=N7,X.listUpdateTypes=xd,X.milestoneStatus=kt,X.projectOverviewRoutes=re,X.ruleComparators=No,X.ruleDurationUnits=Mo,X.ruleTriggerTypes=xo,X.templateItemType=te,X.templateRouteNames=rt,Object.defineProperty(X,Symbol.toStringTag,{value:"Module"})});
|
|
6
|
+
*/function ot(a){let t={r:0,g:0,b:0,a:1};/#/.test(a)?t=Mf(a):/rgb/.test(a)?t=Tr(a):typeof a=="string"?t=Tr(`rgba(${a})`):Object.prototype.toString.call(a)==="[object Object]"&&(t=a);const{r:o,g:r,b:n,a:s}=t,{h:i,s:l,v:d}=Tf(t);return{r:o,g:r,b:n,a:s===void 0?1:s,h:i,s:l,v:d}}function oo(a){const t=document.createElement("canvas"),o=t.getContext("2d"),r=a*2;return t.width=r,t.height=r,o.fillStyle="#ffffff",o.fillRect(0,0,r,r),o.fillStyle="#ccd5db",o.fillRect(0,0,a,a),o.fillRect(a,a,a,a),t}function ro(a,t,o,r,n,s){const i=a==="l",l=t.createLinearGradient(0,0,i?o:0,i?0:r);l.addColorStop(.01,n),l.addColorStop(.99,s),t.fillStyle=l,t.fillRect(0,0,o,r)}function xf({r:a,g:t,b:o},r){const n=i=>("0"+Number(i).toString(16)).slice(-2),s=`#${n(a)}${n(t)}${n(o)}`;return r?s.toUpperCase():s}function Mf(a){a=a.slice(1);const t=o=>parseInt(o,16)||0;return{r:t(a.slice(0,2)),g:t(a.slice(2,4)),b:t(a.slice(4,6))}}function Tr(a){return typeof a=="string"?(a=(/rgba?\((.*?)\)/.exec(a)||["","0,0,0,1"])[1].split(","),{r:Number(a[0])||0,g:Number(a[1])||0,b:Number(a[2])||0,a:Number(a[3]?a[3]:1)}):a}function Tf({r:a,g:t,b:o}){a=a/255,t=t/255,o=o/255;const r=Math.max(a,t,o),n=Math.min(a,t,o),s=r-n;let i=0;r===n?i=0:r===a?t>=o?i=60*(t-o)/s:i=60*(t-o)/s+360:r===t?i=60*(o-a)/s+120:r===o&&(i=60*(a-t)/s+240),i=Math.floor(i);let l=parseFloat((r===0?0:1-n/r).toFixed(2)),d=parseFloat(r.toFixed(2));return{h:i,s:l,v:d}}var no=e.defineComponent({props:{color:{type:String,default:"#000000"},hsv:{type:Object,default:null},size:{type:Number,default:152}},emits:["selectSaturation"],data(){return{slideSaturationStyle:{}}},mounted(){this.renderColor(),this.renderSlide()},methods:{renderColor(){const a=this.$refs.canvasSaturation,t=this.size,o=a.getContext("2d");a.width=t,a.height=t,o.fillStyle=this.color,o.fillRect(0,0,t,t),ro("l",o,t,t,"#FFFFFF","rgba(255,255,255,0)"),ro("p",o,t,t,"rgba(0,0,0,0)","#000000")},renderSlide(){this.slideSaturationStyle={left:this.hsv.s*this.size-5+"px",top:(1-this.hsv.v)*this.size-5+"px"}},selectSaturation(a){const{top:t,left:o}=this.$el.getBoundingClientRect(),r=a.target.getContext("2d"),n=i=>{let l=i.clientX-o,d=i.clientY-t;l<0&&(l=0),d<0&&(d=0),l>this.size&&(l=this.size),d>this.size&&(d=this.size),this.slideSaturationStyle={left:l-5+"px",top:d-5+"px"};const p=r.getImageData(Math.min(l,this.size-1),Math.min(d,this.size-1),1,1),[c,f,m]=p.data;this.$emit("selectSaturation",{r:c,g:f,b:m})};n(a);const s=()=>{document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",s)};document.addEventListener("mousemove",n),document.addEventListener("mouseup",s)}}});const Af={ref:"canvasSaturation"};function Of(a,t,o,r,n,s){return e.openBlock(),e.createBlock("div",{class:"saturation",onMousedown:t[1]||(t[1]=e.withModifiers((...i)=>a.selectSaturation&&a.selectSaturation(...i),["prevent","stop"]))},[e.createVNode("canvas",Af,null,512),e.createVNode("div",{style:a.slideSaturationStyle,class:"slide"},null,4)],32)}no.render=Of,no.__file="src/color/Saturation.vue";var io=e.defineComponent({props:{hsv:{type:Object,default:null},width:{type:Number,default:15},height:{type:Number,default:152}},emits:["selectHue"],data(){return{slideHueStyle:{}}},mounted(){this.renderColor(),this.renderSlide()},methods:{renderColor(){const a=this.$refs.canvasHue,t=this.width,o=this.height,r=a.getContext("2d");a.width=t,a.height=o;const n=r.createLinearGradient(0,0,0,o);n.addColorStop(0,"#FF0000"),n.addColorStop(.17*1,"#FF00FF"),n.addColorStop(.17*2,"#0000FF"),n.addColorStop(.17*3,"#00FFFF"),n.addColorStop(.17*4,"#00FF00"),n.addColorStop(.17*5,"#FFFF00"),n.addColorStop(1,"#FF0000"),r.fillStyle=n,r.fillRect(0,0,t,o)},renderSlide(){this.slideHueStyle={top:(1-this.hsv.h/360)*this.height-2+"px"}},selectHue(a){const{top:t}=this.$el.getBoundingClientRect(),o=a.target.getContext("2d"),r=s=>{let i=s.clientY-t;i<0&&(i=0),i>this.height&&(i=this.height),this.slideHueStyle={top:i-2+"px"};const l=o.getImageData(0,Math.min(i,this.height-1),1,1),[d,p,c]=l.data;this.$emit("selectHue",{r:d,g:p,b:c})};r(a);const n=()=>{document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",n)};document.addEventListener("mousemove",r),document.addEventListener("mouseup",n)}}});const If={ref:"canvasHue"};function Lf(a,t,o,r,n,s){return e.openBlock(),e.createBlock("div",{class:"hue",onMousedown:t[1]||(t[1]=e.withModifiers((...i)=>a.selectHue&&a.selectHue(...i),["prevent","stop"]))},[e.createVNode("canvas",If,null,512),e.createVNode("div",{style:a.slideHueStyle,class:"slide"},null,4)],32)}io.render=Lf,io.__file="src/color/Hue.vue";var so=e.defineComponent({props:{color:{type:String,default:"#000000"},rgba:{type:Object,default:null},width:{type:Number,default:15},height:{type:Number,default:152}},emits:["selectAlpha"],data(){return{slideAlphaStyle:{},alphaSize:5}},watch:{color(){this.renderColor()},"rgba.a"(){this.renderSlide()}},mounted(){this.renderColor(),this.renderSlide()},methods:{renderColor(){const a=this.$refs.canvasAlpha,t=this.width,o=this.height,r=this.alphaSize,n=oo(r),s=a.getContext("2d");a.width=t,a.height=o,s.fillStyle=s.createPattern(n,"repeat"),s.fillRect(0,0,t,o),ro("p",s,t,o,"rgba(255,255,255,0)",this.color)},renderSlide(){this.slideAlphaStyle={top:this.rgba.a*this.height-2+"px"}},selectAlpha(a){const{top:t}=this.$el.getBoundingClientRect(),o=n=>{let s=n.clientY-t;s<0&&(s=0),s>this.height&&(s=this.height);let i=parseFloat((s/this.height).toFixed(2));this.$emit("selectAlpha",i)};o(a);const r=()=>{document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",r)};document.addEventListener("mousemove",o),document.addEventListener("mouseup",r)}}});const Df={ref:"canvasAlpha"};function jf(a,t,o,r,n,s){return e.openBlock(),e.createBlock("div",{class:"color-alpha",onMousedown:t[1]||(t[1]=e.withModifiers((...i)=>a.selectAlpha&&a.selectAlpha(...i),["prevent","stop"]))},[e.createVNode("canvas",Df,null,512),e.createVNode("div",{style:a.slideAlphaStyle,class:"slide"},null,4)],32)}so.render=jf,so.__file="src/color/Alpha.vue";var lo=e.defineComponent({props:{color:{type:String,default:"#000000"},width:{type:Number,default:100},height:{type:Number,default:30}},data(){return{alphaSize:5}},watch:{color(){this.renderColor()}},mounted(){this.renderColor()},methods:{renderColor(){const a=this.$el,t=this.width,o=this.height,r=this.alphaSize,n=oo(r),s=a.getContext("2d");a.width=t,a.height=o,s.fillStyle=s.createPattern(n,"repeat"),s.fillRect(0,0,t,o),s.fillStyle=this.color,s.fillRect(0,0,t,o)}}});function Pf(a,t,o,r,n,s){return e.openBlock(),e.createBlock("canvas")}lo.render=Pf,lo.__file="src/color/Preview.vue";var co=e.defineComponent({props:{suckerCanvas:{type:Object,default:null},suckerArea:{type:Array,default:()=>[]}},data(){return{isOpenSucker:!1,suckerPreview:null,isSucking:!1}},watch:{suckerCanvas(a){this.isSucking=!1,this.suckColor(a)}},methods:{openSucker(){this.isOpenSucker?this.keydownHandler({keyCode:27}):(this.isOpenSucker=!0,this.isSucking=!0,this.$emit("openSucker",!0),document.addEventListener("keydown",this.keydownHandler))},keydownHandler(a){a.keyCode===27&&(this.isOpenSucker=!1,this.isSucking=!1,this.$emit("openSucker",!1),document.removeEventListener("keydown",this.keydownHandler),document.removeEventListener("mousemove",this.mousemoveHandler),document.removeEventListener("mouseup",this.mousemoveHandler),this.suckerPreview&&(document.body.removeChild(this.suckerPreview),this.suckerPreview=null))},mousemoveHandler(a){const{clientX:t,clientY:o}=a,{top:r,left:n,width:s,height:i}=this.suckerCanvas.getBoundingClientRect(),l=t-n,d=o-r,c=this.suckerCanvas.getContext("2d").getImageData(Math.min(l,s-1),Math.min(d,i-1),1,1);let[f,m,u,h]=c.data;h=parseFloat((h/255).toFixed(2));const b=this.suckerPreview.style;Object.assign(b,{position:"absolute",left:t+20+"px",top:o-36+"px",width:"24px",height:"24px",borderRadius:"50%",border:"2px solid #fff",boxShadow:"0 0 8px 0 rgba(0, 0, 0, 0.16)",background:`rgba(${f}, ${m}, ${u}, ${h})`,zIndex:95}),this.suckerArea.length&&t>=this.suckerArea[0]&&o>=this.suckerArea[1]&&t<=this.suckerArea[2]&&o<=this.suckerArea[3]?b.display="":b.display="none"},suckColor(a){a&&a.tagName!=="CANVAS"||(this.suckerPreview=document.createElement("div"),this.suckerPreview&&document.body.appendChild(this.suckerPreview),document.addEventListener("mousemove",this.mousemoveHandler),document.addEventListener("mouseup",this.mousemoveHandler),a.addEventListener("click",t=>{const{clientX:o,clientY:r}=t,{top:n,left:s,width:i,height:l}=a.getBoundingClientRect(),d=o-s,p=r-n,f=a.getContext("2d").getImageData(Math.min(d,i-1),Math.min(p,l-1),1,1);let[m,u,h,b]=f.data;b=parseFloat((b/255).toFixed(2)),this.$emit("selectSucker",{r:m,g:u,b:h,a:b})}))}}});const zf=e.createVNode("path",{d:"M13.1,8.2l5.6,5.6c0.4,0.4,0.5,1.1,0.1,1.5s-1.1,0.5-1.5,0.1c0,0-0.1,0-0.1-0.1l-1.4-1.4l-7.7,7.7C7.9,21.9,7.6,22,7.3,22H3.1C2.5,22,2,21.5,2,20.9l0,0v-4.2c0-0.3,0.1-0.6,0.3-0.8l5.8-5.8C8.5,9.7,9.2,9.6,9.7,10s0.5,1.1,0.1,1.5c0,0,0,0.1-0.1,0.1l-5.5,5.5v2.7h2.7l7.4-7.4L8.7,6.8c-0.5-0.4-0.5-1-0.1-1.5s1.1-0.5,1.5-0.1c0,0,0.1,0,0.1,0.1l1.4,1.4l3.5-3.5c1.6-1.6,4.1-1.6,5.8-0.1c1.6,1.6,1.6,4.1,0.1,5.8L20.9,9l-3.6,3.6c-0.4,0.4-1.1,0.5-1.5,0.1"},null,-1),Hf={key:1,class:"sucker",viewBox:"-16 -16 68 68",xmlns:"http://www.w3.org/2000/svg",stroke:"#9099a4"},Rf=e.createVNode("g",{fill:"none","fill-rule":"evenodd"},[e.createVNode("g",{transform:"translate(1 1)","stroke-width":"4"},[e.createVNode("circle",{"stroke-opacity":".5",cx:"18",cy:"18",r:"18"}),e.createVNode("path",{d:"M36 18c0-9.94-8.06-18-18-18"},[e.createVNode("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indefinite"})])])],-1);function Uf(a,t,o,r,n,s){return e.openBlock(),e.createBlock("div",null,[a.isSucking?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createBlock("svg",{key:0,class:[{active:a.isOpenSucker},"sucker"],xmlns:"http://www.w3.org/2000/svg",viewBox:"-12 -12 48 48",onClick:t[1]||(t[1]=(...i)=>a.openSucker&&a.openSucker(...i))},[zf],2)),a.isSucking?(e.openBlock(),e.createBlock("svg",Hf,[Rf])):e.createCommentVNode("v-if",!0)])}co.render=Uf,co.__file="src/color/Sucker.vue";var po=e.defineComponent({props:{name:{type:String,default:""},color:{type:String,default:""}},emits:["inputColor","inputFocus","inputBlur"],setup(a,{emit:t}){return{modelColor:e.computed({get(){return a.color||""},set(s){t("inputColor",s)}}),handleFocus:s=>{t("inputFocus",s)},handleBlur:s=>{t("inputBlur",s)}}}});const Ff={class:"color-type"},Zf={class:"name"};function Wf(a,t,o,r,n,s){return e.openBlock(),e.createBlock("div",Ff,[e.createVNode("span",Zf,e.toDisplayString(a.name),1),e.withDirectives(e.createVNode("input",{"onUpdate:modelValue":t[1]||(t[1]=i=>a.modelColor=i),class:"value",onFocus:t[2]||(t[2]=(...i)=>a.handleFocus&&a.handleFocus(...i)),onBlur:t[3]||(t[3]=(...i)=>a.handleBlur&&a.handleBlur(...i))},null,544),[[e.vModelText,a.modelColor]])])}po.render=Wf,po.__file="src/color/Box.vue";var uo=e.defineComponent({name:"ColorPicker",props:{color:{type:String,default:"#000000"},colorsDefault:{type:Array,default:()=>[]},colorsHistoryKey:{type:String,default:""}},emits:["selectColor"],setup(a,{emit:t}){const o=e.ref(),r=e.ref([]),n=e.ref();a.colorsHistoryKey&&localStorage&&(r.value=JSON.parse(localStorage.getItem(a.colorsHistoryKey))||[]),n.value=oo(4).toDataURL(),e.onUnmounted(()=>{s(o.value)});function s(l){if(!l)return;const d=r.value||[],p=d.indexOf(l);p>=0&&d.splice(p,1),d.length>=8&&(d.length=7),d.unshift(l),r.value=d||[],localStorage&&a.colorsHistoryKey&&localStorage.setItem(a.colorsHistoryKey,JSON.stringify(d))}function i(l){t("selectColor",l)}return{setColorsHistory:s,colorsHistory:r,color:o,imgAlphaBase64:n,selectColor:i}}});const qf={class:"colors"},Yf={key:0,class:"colors history"};function Kf(a,t,o,r,n,s){return e.openBlock(),e.createBlock("div",null,[e.createVNode("ul",qf,[(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(a.colorsDefault,i=>(e.openBlock(),e.createBlock("li",{key:i,class:"item",onClick:l=>a.selectColor(i)},[e.createVNode("div",{style:{background:`url(${a.imgAlphaBase64})`},class:"alpha"},null,4),e.createVNode("div",{style:{background:i},class:"color"},null,4)],8,["onClick"]))),128))]),a.colorsHistory.length?(e.openBlock(),e.createBlock("ul",Yf,[(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(a.colorsHistory,i=>(e.openBlock(),e.createBlock("li",{key:i,class:"item",onClick:l=>a.selectColor(i)},[e.createVNode("div",{style:{background:`url(${a.imgAlphaBase64})`},class:"alpha"},null,4),e.createVNode("div",{style:{background:i},class:"color"},null,4)],8,["onClick"]))),128))])):e.createCommentVNode("v-if",!0)])}uo.render=Kf,uo.__file="src/color/Colors.vue";var vt=e.defineComponent({components:{Saturation:no,Hue:io,Alpha:so,Preview:lo,Sucker:co,Box:po,Colors:uo},emits:["changeColor","openSucker","inputFocus","inputBlur"],props:{color:{type:String,default:"#000000"},theme:{type:String,default:"dark"},suckerHide:{type:Boolean,default:!0},suckerCanvas:{type:null,default:null},suckerArea:{type:Array,default:()=>[]},colorsDefault:{type:Array,default:()=>["#000000","#FFFFFF","#FF1900","#F47365","#FFB243","#FFE623","#6EFF2A","#1BC7B1","#00BEFF","#2E81FF","#5D61FF","#FF89CF","#FC3CAD","#BF3DCE","#8E00A7","rgba(0,0,0,0)"]},colorsHistoryKey:{type:String,default:"vue-colorpicker-history"}},data(){return{hueWidth:15,hueHeight:152,previewHeight:30,modelRgba:"",modelHex:"",r:0,g:0,b:0,a:1,h:0,s:0,v:0}},computed:{isLightTheme(){return this.theme==="light"},totalWidth(){return this.hueHeight+(this.hueWidth+8)*2},previewWidth(){return this.totalWidth-(this.suckerHide?0:this.previewHeight)},rgba(){return{r:this.r,g:this.g,b:this.b,a:this.a}},hsv(){return{h:this.h,s:this.s,v:this.v}},rgbString(){return`rgb(${this.r}, ${this.g}, ${this.b})`},rgbaStringShort(){return`${this.r}, ${this.g}, ${this.b}, ${this.a}`},rgbaString(){return`rgba(${this.rgbaStringShort})`},hexString(){return xf(this.rgba,!0)}},created(){Object.assign(this,ot(this.color)),this.setText(),this.$watch("rgba",()=>{this.$emit("changeColor",{rgba:this.rgba,hsv:this.hsv,hex:this.modelHex})})},methods:{selectSaturation(a){const{r:t,g:o,b:r,h:n,s,v:i}=ot(a);Object.assign(this,{r:t,g:o,b:r,h:n,s,v:i}),this.setText()},handleFocus(a){this.$emit("inputFocus",a)},handleBlur(a){this.$emit("inputBlur",a)},selectHue(a){const{r:t,g:o,b:r,h:n,s,v:i}=ot(a);Object.assign(this,{r:t,g:o,b:r,h:n,s,v:i}),this.setText(),this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide()})},selectAlpha(a){this.a=a,this.setText()},inputHex(a){const{r:t,g:o,b:r,a:n,h:s,s:i,v:l}=ot(a);Object.assign(this,{r:t,g:o,b:r,a:n,h:s,s:i,v:l}),this.modelHex=a,this.modelRgba=this.rgbaStringShort,this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide(),this.$refs.hue.renderSlide()})},inputRgba(a){const{r:t,g:o,b:r,a:n,h:s,s:i,v:l}=ot(a);Object.assign(this,{r:t,g:o,b:r,a:n,h:s,s:i,v:l}),this.modelHex=this.hexString,this.modelRgba=a,this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide(),this.$refs.hue.renderSlide()})},setText(){this.modelHex=this.hexString,this.modelRgba=this.rgbaStringShort},openSucker(a){this.$emit("openSucker",a)},selectSucker(a){const{r:t,g:o,b:r,a:n,h:s,s:i,v:l}=ot(a);Object.assign(this,{r:t,g:o,b:r,a:n,h:s,s:i,v:l}),this.setText(),this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide(),this.$refs.hue.renderSlide()})},selectColor(a){const{r:t,g:o,b:r,a:n,h:s,s:i,v:l}=ot(a);Object.assign(this,{r:t,g:o,b:r,a:n,h:s,s:i,v:l}),this.setText(),this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide(),this.$refs.hue.renderSlide()})}}});const Gf={class:"color-set"};function Xf(a,t,o,r,n,s){const i=e.resolveComponent("Saturation"),l=e.resolveComponent("Hue"),d=e.resolveComponent("Alpha"),p=e.resolveComponent("Preview"),c=e.resolveComponent("Sucker"),f=e.resolveComponent("Box"),m=e.resolveComponent("Colors");return e.openBlock(),e.createBlock("div",{class:["hu-color-picker",{light:a.isLightTheme}],style:{width:a.totalWidth+"px"}},[e.createVNode("div",Gf,[e.createVNode(i,{ref:"saturation",color:a.rgbString,hsv:a.hsv,size:a.hueHeight,onSelectSaturation:a.selectSaturation},null,8,["color","hsv","size","onSelectSaturation"]),e.createVNode(l,{ref:"hue",hsv:a.hsv,width:a.hueWidth,height:a.hueHeight,onSelectHue:a.selectHue},null,8,["hsv","width","height","onSelectHue"]),e.createVNode(d,{ref:"alpha",color:a.rgbString,rgba:a.rgba,width:a.hueWidth,height:a.hueHeight,onSelectAlpha:a.selectAlpha},null,8,["color","rgba","width","height","onSelectAlpha"])]),e.createVNode("div",{style:{height:a.previewHeight+"px"},class:"color-show"},[e.createVNode(p,{color:a.rgbaString,width:a.previewWidth,height:a.previewHeight},null,8,["color","width","height"]),a.suckerHide?e.createCommentVNode("v-if",!0):(e.openBlock(),e.createBlock(c,{key:0,"sucker-canvas":a.suckerCanvas,"sucker-area":a.suckerArea,onOpenSucker:a.openSucker,onSelectSucker:a.selectSucker},null,8,["sucker-canvas","sucker-area","onOpenSucker","onSelectSucker"]))],4),e.createVNode(f,{name:"HEX",color:a.modelHex,onInputColor:a.inputHex,onInputFocus:a.handleFocus,onInputBlur:a.handleBlur},null,8,["color","onInputColor","onInputFocus","onInputBlur"]),e.createVNode(f,{name:"RGBA",color:a.modelRgba,onInputColor:a.inputRgba,onInputFocus:a.handleFocus,onInputBlur:a.handleBlur},null,8,["color","onInputColor","onInputFocus","onInputBlur"]),e.createVNode(m,{color:a.rgbaString,"colors-default":a.colorsDefault,"colors-history-key":a.colorsHistoryKey,onSelectColor:a.selectColor},null,8,["color","colors-default","colors-history-key","onSelectColor"]),e.createCommentVNode(" custom options "),e.renderSlot(a.$slots,"default")],6)}vt.render=Xf,vt.__file="src/color/ColorPicker.vue",vt.install=a=>{a.component(vt.name,vt)};const Y4="",Qf={class:"color-picker-wrapper"},mo=e.defineComponent({__name:"AoColorPicker",props:{color:{}},emits:["update:color"],setup(a,{emit:t}){const o=a,r=e.ref(!1),n=e.ref(null),s=e.ref(null),i=e.ref(0),l=e.ref(0),d=async u=>{s.value=u,r.value=!0,await e.nextTick();const h=u.getBoundingClientRect(),b=n.value,g=(b==null?void 0:b.offsetHeight)||300,y=window.innerHeight-h.bottom,_=h.top,C=y<g&&_>g;console.log("pickerHeight = "+g),i.value=C?h.top-g-8:h.bottom+8,l.value=h.left,setTimeout(()=>{window.addEventListener("click",c)},0)},p=e.computed(()=>({position:"fixed",top:`${i.value}px`,left:`${l.value}px`,zIndex:1e3})),c=u=>{const h=u.target;n.value&&!n.value.contains(h)&&(r.value=!1,t("update:color",f.value),window.removeEventListener("click",c))};e.onBeforeUnmount(()=>{window.removeEventListener("click",c)}),e.watch(()=>o.color,u=>{r.value||(f.value=u)});const f=e.ref(o.color),m=u=>{const{r:h,g:b,b:g,a:y}=u.rgba;f.value=`rgba(${h}, ${b}, ${g}, ${y})`};return(u,h)=>(e.openBlock(),e.createElementBlock("div",Qf,[e.renderSlot(u.$slots,"clickable",{openPicker:d,bgColor:u.color}),r.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"pickerRef",ref:n,class:"color-picker",style:e.normalizeStyle(p.value)},[e.createVNode(e.unref(vt),{class:"color-picker-box",theme:"light",color:u.color,onChangeColor:m},null,8,["color"])],4)):e.createCommentVNode("",!0)]))}}),K4="",Jf={class:"ao-card-project-phase__header"},eh={class:"ao-card-project-item__title-line"},th={key:0,class:"ao-card-project-item-phase__estimation"},ah={class:"ao-card-project-phase__footer"},oh={key:0,class:"ao-card-project-phase__footer-row ao-card-project-phase__footer-row--progress"},rh={class:"ao-card-project-phase__subitem"},nh={class:"ao-card-project-phase__subitem"},ih={key:0,class:"ao-card-project-phase__secondary"},sh={class:"ao-card-project-phase__deadline ao-card-project-phase__deadline--readonly"},lh=e.defineComponent({__name:"AoCardProjectItemPhase",props:{id:{},projectName:{},name:{},milestones:{},isEditable:{type:Boolean},deadline:{},active:{type:Boolean},color:{},timeTrackingData:{}},emits:["update:title","update:deadline","archivePhase","unarchivePhase","updatePhase"],setup(a,{emit:t}){const o=a,r=u=>{t("update:title",u)},n=e.computed(()=>{var u;return((u=o.milestones)==null?void 0:u.reduce((h,b)=>{var g;return h+((g=b.activities)==null?void 0:g.reduce((y,_)=>y+(_.estimation||0),0))},0))||0}),s=e.computed(()=>!o.milestones||!o.timeTrackingData?0:o.milestones.reduce((u,h)=>{var b;return u+(((b=h.activities)==null?void 0:b.reduce((g,y)=>{var C;const _=(C=o.timeTrackingData)==null?void 0:C[y.id];return g+((_==null?void 0:_.timeSpent)||0)},0))||0)},0)),i=e.computed(()=>(s.value/60).toFixed(2)),l=e.computed(()=>{var u;return(u=o.milestones)==null?void 0:u.length}),d=e.computed(()=>{var u;return(u=o.milestones)==null?void 0:u.filter(h=>h.status===kt.done).length}),p=e.computed(()=>(d.value||0)/(l.value||1)),c=e.computed({get:()=>o.deadline??"",set:u=>t("update:deadline",u!=null&&u.length?u:null)}),f=e.computed({get:()=>o.color,set:u=>{t("updatePhase",{id:o.id,color:u})}}),m=(u,h)=>{const b=u.target;b.closest("button")||b.closest("input")||b.closest(".ao-title")||h(b)};return(u,h)=>(e.openBlock(),e.createBlock(mo,{color:f.value,"onUpdate:color":h[2]||(h[2]=b=>f.value=b)},{clickable:e.withCtx(({openPicker:b,bgColor:g})=>[e.createVNode(ba,{class:"ao-card-project-phase","is-clickable":u.isEditable,color:g,withLeftBorder:!0,onClick:y=>m(y,b)},e.createSlots({default:e.withCtx(()=>[e.createElementVNode("div",eh,[e.createVNode(ne,{id:u.id,class:"ao-card-project-phase__title",title:u.name||"",level:4,"is-editable":u.isEditable,"onUpdate:title":r},null,8,["id","title","is-editable"]),n.value||s.value?(e.openBlock(),e.createElementBlock("span",th," ("+e.toDisplayString(i.value)+"/"+e.toDisplayString(n.value)+")",1)):e.createCommentVNode("",!0)])]),footer:e.withCtx(()=>[e.createElementVNode("div",ah,[l.value?(e.openBlock(),e.createElementBlock("div",oh,[e.createElementVNode("div",rh,[e.createVNode(Q,{name:"MountainFlagOutlineRounded",size:"sm"}),e.createElementVNode("span",nh,e.toDisplayString(d.value)+" / "+e.toDisplayString(l.value),1)]),e.createVNode(ya,{percentages:p.value,class:"ao-card-project-phase__progress",color:u.color},null,8,["percentages","color"]),u.$slots.secondary?(e.openBlock(),e.createElementBlock("div",ih,[e.renderSlot(u.$slots,"secondary")])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["ao-card-project-phase__footer-row",c.value?"":"ao-card-project-phase__no_deadline"])},[u.isEditable?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,"onUpdate:modelValue":h[1]||(h[1]=y=>c.value=y),class:"ao-card-project-phase__deadline ao-card-project-phase__deadline--input",type:"date"},null,512)),[[e.vModelText,c.value,void 0,{lazy:!0}]]):e.createCommentVNode("",!0),e.createElementVNode("span",sh,e.toDisplayString(e.unref(ra)(u.deadline)),1)],2)])]),_:2},[u.isEditable?{name:"header",fn:e.withCtx(()=>[e.createElementVNode("div",Jf,[e.createVNode(Y,{class:"ao-card-project-phase__archive",color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:u.active?u.$t("archive"):u.$t("unarchive"),onClick:h[0]||(h[0]=e.withModifiers(()=>u.active?u.$emit("archivePhase",{id:u.id}):u.$emit("unarchivePhase",{id:u.id}),["stop"]))},null,8,["label"])])]),key:"0"}:void 0]),1032,["is-clickable","color","onClick"])]),_:3},8,["color"]))}}),G4="",ch=e.defineComponent({__name:"AoBadge",props:{color:{}},setup(a){return(t,o)=>(e.openBlock(),e.createElementBlock("span",{class:"aoBadge",style:e.normalizeStyle({backgroundColor:t.color})},null,4))}}),X4="",dh={class:"ao-card-project-milestone__default"},ph={class:"ao-title-with-badge-wrapper"},uh={class:"ao-card-project-item__title-line"},mh={key:0,class:"ao-card-project-item-milestone__estimation"},fh={key:0,class:"ao-card-project-milestone__archive"},hh={class:"ao-card-project-milestone__activities"},gh={class:"ao-card-project-milestone__activities-row"},_h={class:"ao-card-project-milestone__subitem"},vh={class:"ao-card-project-milestone__subitem"},Ch={key:1,class:"ao-card-project-milestone__secondary"},bh={class:"ao-card-project-milestone__footer"},yh={key:1,class:"ao-field ao-card-project-milestone__deadline"},wh={class:"ao-field__label"},kh={key:2,class:"ao-card-project-milestone__assignee"},$h=e.defineComponent({__name:"AoCardProjectItemMilestone",props:{id:{},name:{},color:{},phaseColor:{},activities:{},closedStatus:{},isEditable:{type:Boolean},deadline:{},active:{type:Boolean},isSelected:{type:Boolean},assignee:{},important:{type:Boolean},readonly:{type:Boolean},timeTrackingData:{}},emits:["updateMilestone","archiveMilestone","unarchiveMilestone"],setup(a,{emit:t}){const o=a,r=e.computed(()=>{var c;return((c=o.activities)==null?void 0:c.reduce((f,m)=>f+(m.estimation||0),0))||0}),n=e.computed(()=>!o.activities||!o.timeTrackingData?0:o.activities.reduce((c,f)=>{var u;const m=(u=o.timeTrackingData)==null?void 0:u[f.id];return c+((m==null?void 0:m.timeSpent)||0)},0)),s=e.computed(()=>(n.value/60).toFixed(2)),i=e.computed(()=>{var c;return(c=o.activities)==null?void 0:c.length}),l=e.computed(()=>{var c;return(c=o.activities)==null?void 0:c.filter(f=>Da(f,o.closedStatus)).length}),d=e.computed(()=>(l.value||0)/(i.value||1)),p=c=>{t("updateMilestone",{id:o.id,name:c})};return(c,f)=>(e.openBlock(),e.createBlock(ba,{class:e.normalizeClass(["ao-card-project-milestone"]),"is-clickable":!c.readonly,"tag-name":"li","is-selected":c.isSelected,color:c.phaseColor},{default:e.withCtx(()=>[e.createElementVNode("div",dh,[e.createElementVNode("div",ph,[e.createVNode(ch,{color:c.color||""},null,8,["color"]),e.createElementVNode("div",uh,[e.createVNode(ne,{id:c.id,title:c.name||"",level:5,"is-editable":!c.readonly&&c.isEditable,class:"ao-card-project-milestone__title","onUpdate:title":p},null,8,["id","title","is-editable"]),r.value||n.value?(e.openBlock(),e.createElementBlock("span",mh," ("+e.toDisplayString(s.value)+"/"+e.toDisplayString(r.value)+")",1)):e.createCommentVNode("",!0)])]),!c.readonly&&c.isEditable?(e.openBlock(),e.createElementBlock("div",fh,[e.createVNode(Y,{color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:c.active?c.$t("archive"):c.$t("unarchive"),onClick:f[0]||(f[0]=e.withModifiers(()=>c.active?c.$emit("archiveMilestone",{id:c.id}):c.$emit("unarchiveMilestone",{id:c.id}),["stop"]))},null,8,["label"])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",hh,[e.createElementVNode("div",gh,[i.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",_h,[e.createVNode(Q,{name:"SelectCheckBox",size:"sm"}),e.createElementVNode("span",vh,e.toDisplayString(l.value)+" / "+e.toDisplayString(i.value),1)]),e.createVNode(ya,{percentages:d.value,color:c.phaseColor,class:"ao-card-project-milestone__progress"},null,8,["percentages","color"])],64)):e.createCommentVNode("",!0),c.$slots.secondary?(e.openBlock(),e.createElementBlock("div",Ch,[e.renderSlot(c.$slots,"secondary")])):e.createCommentVNode("",!0)])])]),footer:e.withCtx(()=>[e.createElementVNode("div",bh,[c.important?(e.openBlock(),e.createBlock(Q,{key:0,name:"FlagRounded",class:e.normalizeClass(c.isSelected?"ao-card-project-milestone__important--selected":"ao-card-project-milestone__important"),size:"sm"},null,8,["class"])):e.createCommentVNode("",!0),c.deadline?(e.openBlock(),e.createElementBlock("label",yh,[e.createElementVNode("span",wh,e.toDisplayString(e.unref(ra)(c.deadline)),1)])):e.createCommentVNode("",!0),c.assignee?(e.openBlock(),e.createElementBlock("div",kh,[e.createVNode(ye,{"user-name":e.unref(er)(c.assignee),"avatar-url":c.assignee.avatarUrl,color:c.isSelected?"black":"primary",size:"sm"},null,8,["user-name","avatar-url","color"])])):e.createCommentVNode("",!0)])]),_:3},8,["is-clickable","is-selected","color"]))}}),Q4="",Eh={class:"ao-mapping-card-project-phase__header"},Bh={class:"ao-card-project-item__title-line"},Vh={key:0,class:"ao-card-project-item-phase__estimation"},Sh={class:"ao-mapping-card-project-phase__footer"},Nh={key:0,class:"ao-mapping-card-project-phase__footer-row ao-mapping-card-project-phase__footer-row--progress"},xh={class:"ao-mapping-card-project-phase__subitem"},Mh={class:"ao-mapping-card-project-phase__subitem"},Th={key:0,class:"ao-mapping-card-project-phase__secondary"},Ah={class:"ao-mapping-card-project-phase__deadline ao-mapping-card-project-phase__deadline--readonly"},Oh=e.defineComponent({__name:"AoCondensedCardProjectItemPhase",props:{id:{},projectName:{},name:{},milestones:{},isEditable:{type:Boolean},deadline:{},active:{type:Boolean},color:{},timeTrackingData:{}},emits:["update:title","update:deadline","archivePhase","updatePhase","unarchivePhase"],setup(a,{emit:t}){const o=a,r=u=>{t("update:title",u)},n=e.computed(()=>{var u;return((u=o.milestones)==null?void 0:u.reduce((h,b)=>{var g;return h+((g=b.activities)==null?void 0:g.reduce((y,_)=>y+(_.estimation||0),0))},0))||0}),s=e.computed(()=>!o.milestones||!o.timeTrackingData?0:o.milestones.reduce((u,h)=>{var b;return u+(((b=h.activities)==null?void 0:b.reduce((g,y)=>{var C;const _=(C=o.timeTrackingData)==null?void 0:C[y.id];return g+((_==null?void 0:_.timeSpent)||0)},0))||0)},0)),i=e.computed(()=>(s.value/60).toFixed(2)),l=e.computed(()=>{var u;return(u=o.milestones)==null?void 0:u.length}),d=e.computed(()=>{var u;return(u=o.milestones)==null?void 0:u.filter(h=>h.status===kt.done).length}),p=e.computed(()=>(d.value||0)/(l.value||1)),c=e.computed({get:()=>o.deadline??"",set:u=>t("update:deadline",u!=null&&u.length?u:null)}),f=e.computed({get:()=>o.color,set:u=>{t("updatePhase",{id:o.id,color:u})}}),m=(u,h)=>{const b=u.target;b.closest("button")||b.closest("input")||b.closest(".ao-title")||h()};return(u,h)=>(e.openBlock(),e.createBlock(mo,{color:f.value,"onUpdate:color":h[2]||(h[2]=b=>f.value=b)},{clickable:e.withCtx(({openPicker:b,bgColor:g})=>[e.createVNode(ba,{class:"ao-mapping-card-project-phase","is-clickable":u.isEditable,color:g,withLeftBorder:!0,onClick:y=>m(y,b)},e.createSlots({default:e.withCtx(()=>[e.createElementVNode("div",Bh,[e.createVNode(ne,{id:u.id,class:"ao-mapping-card-project-phase__title",title:u.name||"",level:4,"is-editable":u.isEditable,"onUpdate:title":r},null,8,["id","title","is-editable"]),n.value||s.value?(e.openBlock(),e.createElementBlock("span",Vh," ("+e.toDisplayString(i.value)+"/"+e.toDisplayString(n.value)+")",1)):e.createCommentVNode("",!0)])]),footer:e.withCtx(()=>[e.createElementVNode("div",Sh,[l.value?(e.openBlock(),e.createElementBlock("div",Nh,[e.createElementVNode("div",xh,[e.createVNode(Q,{name:"MountainFlagOutlineRounded",size:"sm"}),e.createElementVNode("span",Mh,e.toDisplayString(d.value)+" / "+e.toDisplayString(l.value),1)]),e.createVNode(ya,{percentages:p.value,class:"ao-mapping-card-project-phase__progress",color:f.value},null,8,["percentages","color"]),u.$slots.secondary?(e.openBlock(),e.createElementBlock("div",Th,[e.renderSlot(u.$slots,"secondary")])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["ao-mapping-card-project-phase__footer-row",c.value?"":"ao-mapping-card-project-phase__no_deadline"])},[u.isEditable?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,"onUpdate:modelValue":h[1]||(h[1]=y=>c.value=y),class:"ao-mapping-card-project-phase__deadline ao-mapping-card-project-phase__deadline--input",type:"date"},null,512)),[[e.vModelText,c.value,void 0,{lazy:!0}]]):e.createCommentVNode("",!0),e.createElementVNode("span",Ah,e.toDisplayString(e.unref(ra)(u.deadline)),1)],2)])]),_:2},[u.isEditable?{name:"header",fn:e.withCtx(()=>[e.createElementVNode("div",Eh,[e.createVNode(Y,{class:"ao-mapping-card-project-phase__archive",color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:u.active?u.$t("archive"):u.$t("unarchive"),onClick:h[0]||(h[0]=e.withModifiers(()=>u.active?u.$emit("archivePhase",{id:u.id}):u.$emit("unarchivePhase",{id:u.id}),["stop"]))},null,8,["label"])])]),key:"0"}:void 0]),1032,["is-clickable","color","onClick"])]),_:3},8,["color"]))}}),J4="",Ih={class:"ao-project-phase"},Lh={key:0,class:"ao-project-phase__drag ao-card__drag"},Dh={key:1,class:"ao-project-phase__col-phase"},jh={key:2,class:"ao-mapping-project-phase__col-phase"},Ph={key:0,class:"ao-project-phase__col-milestones"},zh={class:"ao-project-phase__milestones-list-footer"},Hh=e.defineComponent({__name:"AoProjectPhase",props:{phase:{},closedStatus:{},users:{},isEditable:{type:Boolean},readonly:{type:Boolean},timeTrackingData:{}},emits:["addMilestone","updateMilestone","archiveMilestone","unarchiveMilestone","updatePhase","archivePhase","unarchivePhase"],setup(a,{emit:t}){const o=a,{t:r}=We();e.watch(()=>o.phase.milestones,(_,C)=>{Te(_,C)});const n=_=>{t("updatePhase",{id:o.phase.id,name:_})},s=_=>{t("updatePhase",{id:o.phase.id,deadline:_})},i=_=>{t("updatePhase",_)},l=e.computed(()=>o.phase.milestones.map(_=>_2(_,o.closedStatus))),d=_=>{const{name:C,rank:v}=at(l.value??[],"milestone",r);t("addMilestone",{name:C,rank:v,phaseId:_})},p=_=>{t("updateMilestone",_)},c=_=>{t("archiveMilestone",_)},f=_=>{t("unarchiveMilestone",_)},m=_=>{t("archivePhase",_)},u=_=>{t("unarchivePhase",_)},h=_=>{"added"in _?t("updateMilestone",{id:_.added.element.id,phaseId:o.phase.id,rank:dt(l.value,_.added.newIndex)}):"removed"in _||"moved"in _&&t("updateMilestone",{id:_.moved.element.id,rank:dt(l.value,_.moved.newIndex)})},b=Le.useRoute(),g=e.computed(()=>b.path.includes("/mapping")),y=e.computed(()=>{var _;return o.phase.id!==((_=b.params)==null?void 0:_.phaseId)?{backgroundColor:"var(--ao-color-sheet)"}:o.phase.color?{backgroundColor:C2(o.phase.color)}:{backgroundColor:"var(--ao-color-primary-lightest)"}});return(_,C)=>(e.openBlock(),e.createElementBlock("li",Ih,[e.createElementVNode("div",{class:"ao-project-phases__draggable-card",style:e.normalizeStyle(y.value)},[_.isEditable?(e.openBlock(),e.createElementBlock("div",Lh,[e.createVNode(Q,{name:"DragIndicator",class:"ao-project-phase__drag-handle"})])):e.createCommentVNode("",!0),g.value?(e.openBlock(),e.createElementBlock("div",jh,[e.createVNode(Oh,{id:_.phase.id,milestones:l.value,name:_.phase.name,deadline:_.phase.deadline,active:_.phase.active,"is-editable":_.isEditable,color:_.phase.color,"onUpdate:deadline":s,"onUpdate:title":n,onArchivePhase:m,onUnarchivePhase:u,onUpdatePhase:i},null,8,["id","milestones","name","deadline","active","is-editable","color"])])):(e.openBlock(),e.createElementBlock("div",Dh,[e.createVNode(lh,{id:_.phase.id,milestones:l.value,name:_.phase.name,deadline:_.phase.deadline,active:_.phase.active,"is-editable":_.isEditable,color:_.phase.color,"time-tracking-data":_.timeTrackingData,"onUpdate:deadline":s,"onUpdate:title":n,onArchivePhase:m,onUnarchivePhase:u,onUpdatePhase:i},null,8,["id","milestones","name","deadline","active","is-editable","color","time-tracking-data"])]))],4),g.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Ph,[e.createElementVNode("div",{class:"ao-project-phase__milestones",style:e.normalizeStyle(y.value)},[e.createVNode(e.unref(De),e.mergeProps({class:"ao-project-phase__milestones-list",list:l.value,disabled:_.readonly||!_.isEditable,"item-key":"id",group:"kanban"},_.$attrs,{onChange:h}),{item:e.withCtx(({element:v})=>{var B;return[e.createVNode($h,{id:v.id,name:v.name,color:v.color,"phase-color":_.phase.color,activities:v.activities,deadline:v.deadline,active:v.active,"is-editable":!_.readonly&&_.isEditable,"is-draggable":!_.readonly&&_.isEditable,"closed-status":_.closedStatus,"is-selected":v.id===((B=_.$route.params)==null?void 0:B.milestoneId),assignee:v.assignee,important:v.important,readonly:_.readonly,"time-tracking-data":_.timeTrackingData,class:e.normalizeClass(["ao-project-phase__milestone"]),onClick:E=>!_.readonly&&_.$router.push({name:e.unref(re).milestone,params:{phaseId:_.phase.id,milestoneId:v.id}}),onUpdateMilestone:p,onArchiveMilestone:c,onUnarchiveMilestone:f},null,8,["id","name","color","phase-color","activities","deadline","active","is-editable","is-draggable","closed-status","is-selected","assignee","important","readonly","time-tracking-data","onClick"])]}),_:1},16,["list","disabled"]),e.createElementVNode("div",zh,[_.isEditable?(e.openBlock(),e.createBlock(Pe,{key:0,label:_.$t("project.milestone.add"),class:"ao-project-phase__milestone-add","icon-name":"Add",onClick:C[0]||(C[0]=()=>d(_.phase.id))},null,8,["label"])):e.createCommentVNode("",!0)])],4)]))]))}}),e9="",Rh={class:"ao-project__phases"},Uh={key:0,class:"ao-project-phase__phases-list-footer"},Fh=e.createElementVNode("div",{class:"ao-project-phase__empty_drag"},null,-1),Zh={class:"ao-project-phase__col-phase"},Wh=e.createElementVNode("div",{class:"ao-project-phase__col-milestones"},null,-1),fo=e.defineComponent({__name:"AoProjectPhases",props:{phases:{},closedStatus:{},isEditable:{type:Boolean},users:{},readonly:{type:Boolean},timeTrackingData:{}},emits:["addMilestone","updateMilestone","archiveMilestone","unarchiveMilestone","addPhase","updatePhase","archivePhase","unarchivePhase"],setup(a,{emit:t}){const o=a;e.watch(()=>o.phases,(m,u)=>{Te(m,u)});const r=m=>{t("addMilestone",m)},n=m=>{t("updateMilestone",m)},s=m=>{t("archiveMilestone",m)},i=m=>{t("unarchiveMilestone",m)},l=m=>{t("archivePhase",m)},d=m=>{t("unarchivePhase",m)},p=m=>{if(m.moved){const u=Ot(m,o.phases??[]);t("updatePhase",{id:m.moved.element.id,rank:u})}},c=m=>{t("updatePhase",m)},f=m=>{t("addPhase",m)};return(m,u)=>(e.openBlock(),e.createElementBlock("div",Rh,[e.createVNode(e.unref(De),{class:"ao-project-phase__phases-list","model-value":m.phases,"item-key":"id",handle:".ao-card__drag",onChange:p},{item:e.withCtx(({element:h})=>[e.createVNode(Hh,{phase:h,"is-editable":!m.readonly&&m.isEditable,"closed-status":m.closedStatus,users:m.users,readonly:m.readonly,"time-tracking-data":m.timeTrackingData,onAddMilestone:r,onUpdateMilestone:n,onArchiveMilestone:s,onUnarchiveMilestone:i,onUpdatePhase:c,onArchivePhase:l,onUnarchivePhase:d},null,8,["phase","is-editable","closed-status","users","readonly","time-tracking-data"])]),_:1},8,["model-value"]),m.isEditable?(e.openBlock(),e.createElementBlock("div",Uh,[Fh,e.createElementVNode("div",Zh,[e.createVNode(Pe,{label:m.$t("project.phases.add"),"icon-name":"Add",class:"ao-project-phase__add-phase",onClick:f},null,8,["label"])]),Wh])):e.createCommentVNode("",!0)]))}}),t9="",qh=["onSubmit"],Yh={class:"ao-add-template-modal__form-body"},Kh={class:"field__row"},Gh={class:"ao-add-template-modal__form-footer"},Ar=e.defineComponent({__name:"AoAddTemplateModal",props:{projectId:{},templates:{}},emits:["apply"],setup(a,{emit:t}){const o=a,r=e.computed(()=>o.templates.map(l=>({value:l.id,label:l.name}))),n=e.ref(null),s=l=>{n.value=l},i=()=>{n.value&&t("apply",n.value,o.projectId)};return(l,d)=>(e.openBlock(),e.createBlock(na,{size:"sm"},{header:e.withCtx(()=>[e.createVNode(ne,{title:l.$t("project.template.apply.title"),level:3},null,8,["title"])]),default:e.withCtx(()=>[e.createElementVNode("form",{class:"ao-add-template-modal__form",onSubmit:e.withModifiers(i,["prevent"])},[e.createElementVNode("p",null,e.toDisplayString(l.$t("project.template.apply.notice")),1),e.createElementVNode("div",Yh,[e.createElementVNode("div",Kh,[e.createVNode(ce,{value:n.value,options:r.value,detached:!0,onChange:s},null,8,["value","options"])])]),e.createElementVNode("footer",Gh,[e.createVNode(Y,{label:l.$t("project.template.apply.label"),type:"submit",color:"primary",variant:"solid",onClick:i},null,8,["label"])])],40,qh)]),_:1}))}}),a9="",Xh=["onSubmit"],Qh={class:"ao-save-template-modal__form-body"},Jh={class:"field__row"},e5={class:"ao-field ao-field--inline"},t5={class:"ao-field__label"},a5={class:"ao-save-template-modal__phases"},o5={class:"ao-field__label"},r5={class:"ao-save-template-modal__phases-list"},n5=["value"],i5={class:"ao-save-template-modal__form-footer"},Or=e.defineComponent({__name:"AoSaveTemplateModal",props:{phases:{}},emits:["save"],setup(a,{emit:t}){const o=a,r=e.ref(""),n=e.ref([]);e.onMounted(()=>{n.value=o.phases.map(i=>i.id)});const s=()=>{r.value&&t("save",r.value,n.value)};return(i,l)=>(e.openBlock(),e.createBlock(na,{size:"sm"},{header:e.withCtx(()=>[e.createVNode(ne,{title:i.$t("project.template.save.title"),level:3},null,8,["title"])]),default:e.withCtx(()=>[e.createElementVNode("form",{class:"ao-save-template-modal__form",onSubmit:e.withModifiers(s,["prevent"])},[e.createElementVNode("div",Qh,[e.createElementVNode("div",Jh,[e.createElementVNode("label",e5,[e.createElementVNode("span",t5,e.toDisplayString(i.$t("project.template.name.label"))+": ",1),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":l[0]||(l[0]=d=>r.value=d),type:"text"},null,512),[[e.vModelText,r.value]])])]),e.createElementVNode("div",a5,[e.createElementVNode("div",o5,e.toDisplayString(i.$t("project.template.phases.label")),1),e.createElementVNode("div",r5,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.phases,d=>(e.openBlock(),e.createElementBlock("label",{class:"ao-field ao-field--checkbox",key:d.id},[e.withDirectives(e.createElementVNode("input",{type:"checkbox",value:d.id,"onUpdate:modelValue":l[1]||(l[1]=p=>n.value=p)},null,8,n5),[[e.vModelCheckbox,n.value]]),e.createElementVNode("span",null,e.toDisplayString(d.name),1)]))),128))])])]),e.createElementVNode("footer",i5,[e.createVNode(Y,{label:i.$t("project.template.save.label"),type:"submit",color:"primary",variant:"solid",onClick:s},null,8,["label"])])],40,Xh)]),_:1}))}}),o9="",s5=e.defineComponent({props:{modelValue:{type:[String,Number],required:!0},tabs:{type:Array,required:!0}},emits:["update:modelValue"],methods:{selectTab(a){this.$emit("update:modelValue",a)}}}),r9="",l5={class:"tabbar-wrapper"},c5=["onClick"];function d5(a,t,o,r,n,s){return e.openBlock(),e.createElementBlock("div",l5,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.tabs,i=>(e.openBlock(),e.createElementBlock("button",{key:i.value,class:e.normalizeClass(["tab-button",{"tab-button--active":i.value===a.modelValue}]),type:"button",onClick:l=>a.selectTab(i.value)},e.toDisplayString(i.label),11,c5))),128))])}const wa=j(s5,[["render",d5],["__scopeId","data-v-ff4e3297"]]),p5={class:"ao-project"},u5={class:"ao-project__body"},m5=e.defineComponent({__name:"AoProjectOverviewProject",props:{project:{},phases:{},closedStatus:{},users:{},userId:{},templates:{},isTaskCheckable:{type:Function},statuses:{},activityTypes:{},isEditable:{type:[Boolean,String]},showsArchived:{type:Boolean},attachmentEnabled:{type:Boolean},timeTrackingData:{}},emits:["addPhase","updatePhase","archivePhase","unarchivePhase","addMilestone","updateMilestone","archiveMilestone","unarchiveMilestone","addActivity","update:activity","archiveActivity","copyPhaseToTemplate","unarchiveActivity","addSubtask","updateSubtask","deleteSubtask","addFiles","removeFile","addComment","updateComment","removeComment","applyTemplate","saveTemplate","update:showsArchived"],setup(a,{emit:t}){const o=a,{t:r}=We(),n=e.computed(()=>o.phases.flatMap($=>$.milestones)),s=()=>{const{name:$,rank:L}=at(o.phases,"phase",r);t("addPhase",{name:$,rank:L,projectId:o.project.id})},i=$=>{t("updatePhase",$)},l=$=>{t("archivePhase",$)},d=$=>{t("unarchivePhase",$)},p=$=>{t("copyPhaseToTemplate",$)},c=$=>{t("addMilestone",$)},f=$=>{t("updateMilestone",$)},m=$=>{t("archiveMilestone",$)},u=$=>{t("unarchiveMilestone",$)},h=$=>{t("addActivity",$)},b=$=>{t("update:activity",$)},g=$=>{t("archiveActivity",$)},y=$=>{t("unarchiveActivity",$)},_=$=>{t("addSubtask",$)},C=$=>{t("updateSubtask",$)},v=$=>{t("deleteSubtask",$)},B=e.computed(()=>n.value.flatMap($=>$.activities)),E=$=>{t("addFiles",$)},N=$=>{t("removeFile",$)},A=$=>{t("addComment",$)},z=$=>{t("updateComment",$)},U=$=>{t("removeComment",$)},Z=e.ref(!1),O=e.ref(!1),H=($,L)=>{t("applyTemplate",{templateId:$,projectId:L}),Z.value=!1},K=($,L)=>{var w;const V=(w=o.templates)==null?void 0:w.at(-1),T=V?ie.LexoRank.parse(V.rank).genNext():ie.LexoRank.middle();t("saveTemplate",{templateName:$,rank:T.format(),phaseIds:L}),O.value=!1},W=Le.useRouter(),F=e.ref("overview"),S=[{label:"Overview",value:"overview"},{label:"Feed",value:"feed"},{label:"Mapping",value:"mapping"}];return e.watch(F,$=>{$==="feed"?(W.push({name:re.feed}),console.log("Navigating to feed...")):$==="overview"?(W.push({name:re.project}),console.log("Navigating to feed...")):$==="mapping"&&(W.push({name:re.mapping}),console.log("Navigating to feed..."))}),($,L)=>{const V=e.resolveComponent("RouterView");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",e.mergeProps({class:"ao-project-overview"},$.$attrs),[e.createElementVNode("div",p5,[e.createVNode(It,null,{primary:e.withCtx(()=>[e.createVNode(wa,{tabs:S,modelValue:F.value,"onUpdate:modelValue":L[0]||(L[0]=T=>F.value=T)},null,8,["modelValue"]),e.createVNode(Y,{class:"ao-feed__show-archived",size:"sm","icon-name":$.showsArchived?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:$.$t("feed.filters.showsArchived.label"),role:"checkbox","aria-checked":$.showsArchived,onClick:L[1]||(L[1]=T=>$.$emit("update:showsArchived",!$.showsArchived))},null,8,["icon-name","label","aria-checked"])]),secondary:e.withCtx(()=>[$.isEditable===!0?(e.openBlock(),e.createBlock(Y,{key:0,class:"ao-project-overview__save-as-template",color:"primary",label:$.$t("project.template.save.label"),onClick:L[2]||(L[2]=T=>O.value=!0)},null,8,["label"])):e.createCommentVNode("",!0),$.isEditable===!0?(e.openBlock(),e.createBlock(Y,{key:1,class:"ao-project-overview__add-template",color:"primary",label:$.$t("project.template.apply.label"),onClick:L[3]||(L[3]=T=>Z.value=!0)},null,8,["label"])):e.createCommentVNode("",!0)]),_:1}),e.createElementVNode("div",u5,[e.createVNode(fo,{phases:$.phases,"closed-status":$.closedStatus,"is-editable":$.isEditable===!0,users:$.users,"time-tracking-data":$.timeTrackingData,onAddMilestone:c,onUpdateMilestone:f,onArchiveMilestone:m,onUnarchiveMilestone:u,onAddPhase:s,onUpdatePhase:i,onArchivePhase:l,onUnarchivePhase:d,onCopyPhaseToTemplate:p},null,8,["phases","closed-status","is-editable","users","time-tracking-data"])])]),e.createVNode(V,{class:"ao-project__sidebar",phases:$.phases,"project-id":$.project.id,"project-name":$.project.name,users:$.users,"is-editable":$.isEditable===!0,"closed-status":$.closedStatus,"time-tracking-data":$.timeTrackingData,onClose:L[4]||(L[4]=T=>$.$router.push({name:e.unref(re).project})),onUpdateMilestone:f,onAddActivity:h,onUpdateActivity:b,onArchiveActivity:g,onUnarchiveActivity:y},null,8,["phases","project-id","project-name","users","is-editable","closed-status","time-tracking-data"]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(V,{name:"modal",activities:B.value,"is-task-checkable":$.isTaskCheckable,statuses:$.statuses,"activity-types":$.activityTypes,phases:$.phases,project:$.project,users:$.users,"user-id":$.userId,"is-editable":$.isEditable,"attachment-enabled":$.attachmentEnabled,"time-tracking-data":$.timeTrackingData,"onUpdate:activity":b,onAddSubtask:_,onUpdateSubtask:C,onDeleteSubtask:v,onAddFiles:E,onRemoveFile:N,onAddComment:A,onUpdateComment:z,onRemoveComment:U},{default:e.withCtx(({Component:T})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(T),null,{default:e.withCtx(w=>[e.renderSlot($.$slots,"activityDetailsBody",e.normalizeProps(e.guardReactiveProps(w)))]),_:2},1024))]),_:3},8,["activities","is-task-checkable","statuses","activity-types","phases","project","users","user-id","is-editable","attachment-enabled","time-tracking-data"])]))],16),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[O.value?(e.openBlock(),e.createBlock(Or,{key:0,phases:$.phases,onClose:L[5]||(L[5]=T=>O.value=!1),onSave:K},null,8,["phases"])):e.createCommentVNode("",!0),Z.value?(e.openBlock(),e.createBlock(Ar,{key:1,"project-id":$.project.id,templates:$.templates,onClose:L[6]||(L[6]=T=>Z.value=!1),onApply:H},null,8,["project-id","templates"])):e.createCommentVNode("",!0)]))],64)}}}),n9="",f5={class:"ao-card-feed__header"},h5={key:1,class:"ao-card-feed__header-secondary ao-card-feed__header-icons"},g5={key:2,class:"ao-card-feed__header-secondary ao-card-feed__secondary"},_5={class:"ao-card-feed__body"},v5={key:0,class:"ao-card-feed__breadcrumbs"},C5={class:e.normalizeClass(["ao-card-feed__title-group"])},b5={class:"ao-card-feed__title-line"},y5={key:0,class:"ao-card-feed__slug"},w5={key:1,class:"ao-card-feed__deadline"},k5={class:"ao-card-feed__footer"},$5={class:"ao-card-feed__footer-row"},E5={class:"ao-assignees"},B5={key:0,class:"ao-assignee"},V5={key:0,class:"ao-card-feed__subitems"},S5={key:0,class:"ao-card-feed__subitem"},N5={class:"ao-card-feed__subitem"},x5={key:1,class:"ao-card-feed__subitem"},M5={class:"ao-card-feed__subitem"},T5={class:"ao-card-feed__timer-wrapper"},A5={class:"ao-card-feed__footer-row"},O5={key:0,class:"ao-card-feed__progress-wrapper"},I5={class:"ao-card-feed__subitem"},L5={class:"ao-card-feed__subitem"},ho=e.defineComponent({__name:"AoCardFeed",props:{id:{},name:{},projectName:{},projectId:{},projectColor:{},phaseName:{},milestoneName:{},milestoneColor:{},deadline:{},important:{type:Boolean},assignee:{},slug:{},comments:{},attachments:{},tasks:{},isEditable:{type:Boolean},isPrivate:{type:Boolean},isClosed:{type:Boolean},tagType:{}},emits:["removeAssignee","updateActivity","startTimer"],setup(a,{emit:t}){const o=a,r=e.computed(()=>o.tagType==="milestone"?o.milestoneName:o.projectName),n=e.computed(()=>o.tagType==="milestone"?o.milestoneColor:o.projectColor),s=h=>{t("updateActivity",{id:o.id,name:h})},i=e.computed(()=>o.tagType==="milestone"&&o.phaseName?`${o.phaseName}`:o.phaseName&&o.milestoneName?`${o.phaseName} / ${o.milestoneName}`:""),l=e.computed(()=>o.assignee?[o.assignee]:[]),d=e.computed(()=>ra(o.deadline)),p=h=>{t("removeAssignee",h)},c=()=>{t("startTimer",{activityId:o.id,name:o.name,project:o.projectName,projectId:o.projectId,slug:o.slug})},f=e.computed(()=>{var h;return(h=o.tasks)==null?void 0:h.length}),m=e.computed(()=>{var h;return(h=o.tasks)==null?void 0:h.filter(b=>b.isDone).length}),u=e.computed(()=>(m.value||0)/(f.value||1));return(h,b)=>(e.openBlock(),e.createBlock(ba,{class:e.normalizeClass(["ao-card-feed",{"ao-card-feed--closed":h.isClosed}]),"is-clickable":!0},{header:e.withCtx(()=>[e.createElementVNode("div",f5,[r.value?(e.openBlock(),e.createBlock(wt,{key:0,label:r.value,class:"ao-card-feed__project",variant:"solid",color:h.projectColor?void 0:"primary","raw-color":n.value},null,8,["label","color","raw-color"])):e.createCommentVNode("",!0),h.isPrivate||h.important||h.isClosed?(e.openBlock(),e.createElementBlock("div",h5,[h.isPrivate?(e.openBlock(),e.createBlock(Q,{key:0,name:"Lock",class:"ao-card-feed__warning",size:"sm"})):e.createCommentVNode("",!0),h.important?(e.openBlock(),e.createBlock(Q,{key:1,name:"FlagRounded",class:"ao-card-feed__important",size:"sm"})):e.createCommentVNode("",!0),h.isClosed?(e.openBlock(),e.createBlock(Q,{key:2,name:"CheckSmallRounded",class:"ao-card-feed__closed"})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),h.$slots.secondary?(e.openBlock(),e.createElementBlock("div",g5,[e.renderSlot(h.$slots,"secondary")])):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[e.createElementVNode("div",_5,[i.value?(e.openBlock(),e.createElementBlock("span",v5,e.toDisplayString(i.value),1)):e.createCommentVNode("",!0),e.createElementVNode("div",C5,[e.createElementVNode("div",b5,[h.slug?(e.openBlock(),e.createElementBlock("span",y5,e.toDisplayString(h.slug)+": ",1)):e.createCommentVNode("",!0),e.createVNode(ne,{id:h.id,title:h.name,level:5,"is-editable":h.isEditable,"onUpdate:title":s,class:"ao-card-feed__title-inline"},null,8,["id","title","is-editable"])])]),h.deadline?(e.openBlock(),e.createElementBlock("span",w5,e.toDisplayString(d.value),1)):e.createCommentVNode("",!0)])]),footer:e.withCtx(()=>[e.createElementVNode("div",k5,[e.createElementVNode("div",$5,[e.createElementVNode("ul",E5,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,g=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:g.id},[g?(e.openBlock(),e.createElementBlock("li",B5,[e.createVNode(ye,{"user-name":e.unref(er)(g),"avatar-url":g.avatarUrl,"is-closable":!0,onClose:()=>p(g.id)},null,8,["user-name","avatar-url","onClose"])])):e.createCommentVNode("",!0)],64))),128))]),h.comments||h.attachments?(e.openBlock(),e.createElementBlock("ul",V5,[h.comments?(e.openBlock(),e.createElementBlock("li",S5,[e.createVNode(Q,{name:"ChatOutline",size:"sm"}),e.createElementVNode("span",N5,e.toDisplayString(h.comments),1)])):e.createCommentVNode("",!0),h.attachments?(e.openBlock(),e.createElementBlock("li",x5,[e.createVNode(Q,{name:"AttachFileRounded",size:"sm"}),e.createElementVNode("span",M5,e.toDisplayString(h.attachments),1)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",T5,[e.createVNode(Q,{name:"TimerOutline",class:"ao-card-feed__timer",size:"md",onClick:e.withModifiers(c,["stop"])},null,8,["onClick"])])]),e.createElementVNode("div",A5,[h.tasks&&h.tasks.length?(e.openBlock(),e.createElementBlock("div",O5,[e.createElementVNode("div",I5,[e.createVNode(Q,{name:"SelectCheckBox",size:"sm"}),e.createElementVNode("span",L5,e.toDisplayString(m.value)+" / "+e.toDisplayString(f.value),1)]),e.createVNode(ya,{percentages:u.value,class:"ao-card-feed__progress"},null,8,["percentages"])])):e.createCommentVNode("",!0)])])]),_:3},8,["class"]))}}),i9="",D5={class:"ao-project-milestone"},j5={class:"ao-project-milestone__header"},P5={class:"ao-project-milestone__header_line"},z5={class:"ao-project-milestone__header_line"},H5={class:"ao-project-milestone__title"},R5={key:0,class:"ao-fieldset ao-milestone__fieldset"},U5={class:"ao-field__row ao-milestone__field-row"},F5={class:"ao-field ao-field--inline"},Z5={class:"ao-field__row ao-milestone__field-row"},W5={class:"ao-field ao-milestone__field-multiselect"},q5=["onClick"],Y5={class:"ao-project-milestone__body"},K5={key:0,class:"ao-project-milestone__footer"},Ir=e.defineComponent({__name:"AoProjectOverviewMilestoneDetails",props:{milestoneId:{},users:{},projectId:{},phases:{},phaseId:{},isEditable:{type:Boolean},closedStatus:{},timeTrackingData:{}},emits:["close","addActivity","updateMilestone","updateActivity","archiveActivity","unarchiveActivity","startTimer"],setup(a,{emit:t}){const o=a,{t:r}=We(),n=v=>{var B;t("startTimer",v),(B=window.parent)==null||B.postMessage({type:"startTimer",data:v},"*")},s=e.computed(()=>{var v;return(v=o.phases)==null?void 0:v.find(B=>B.id===o.phaseId)}),i=e.computed(()=>{var v;return(v=o.phases)==null?void 0:v.flatMap(B=>B.milestones)}),l=e.computed(()=>{var v;return(v=i.value)==null?void 0:v.find(B=>B.id===o.milestoneId)}),d=e.computed(()=>{var v;return(v=l.value)==null?void 0:v.activities});e.watch(d,(v,B)=>{Te(v,B)});const p=v=>{t("close",v)},c=()=>{const{name:v,rank:B}=at(d.value??[],"activity",r);t("addActivity",{milestoneId:o.milestoneId,name:v,rank:B,projectId:o.projectId})},f=v=>{t("updateActivity",v)},m=v=>{d.value&&"moved"in v&&t("updateActivity",{id:v.moved.element.id,rank:dt(d.value,v.moved.newIndex)})},u=e.computed({get:()=>{var v;return(v=l.value)==null?void 0:v.color},set:v=>{l.value&&t("updateMilestone",{id:l.value.id,color:v})}}),h=e.computed({get:()=>{var v;return((v=l==null?void 0:l.value)==null?void 0:v.deadline)??""},set:v=>{l.value&&t("updateMilestone",{id:l.value.id,deadline:v!=null&&v.length?v:null})}}),b=v=>o.closedStatus?Da(v,o.closedStatus):!1,g=e.computed(()=>{var v;return((v=o.users)==null?void 0:v.map(B=>({label:`${B.firstName} ${B.lastName}`,value:B.id,avatar:B.avatarUrl})))||[]}),y=e.computed({get(){var v,B;return(B=(v=l.value)==null?void 0:v.assignee)!=null&&B.id?[l.value.assignee.id]:[]},set(v){t("updateMilestone",{id:o.milestoneId,assigneeId:v[0]??null})}}),_=e.computed({get(){var v;return((v=l.value)==null?void 0:v.important)??!1},set(v){t("updateMilestone",{id:o.milestoneId,important:v})}}),C=(v,B)=>{const E=v.currentTarget;E instanceof HTMLElement&&B(E)};return(v,B)=>{var E;return e.openBlock(),e.createElementBlock("div",D5,[e.createElementVNode("header",j5,[e.createElementVNode("div",P5,[e.createVNode(Y,{"icon-name":"CloseRounded",variant:"ghost",size:"sm",class:"ao-milestone__close",onClick:p})]),e.createElementVNode("div",z5,[e.createElementVNode("div",H5,[e.createVNode(ne,{title:((E=l.value)==null?void 0:E.name)||v.milestoneId,level:5},null,8,["title"]),e.createVNode(to,{modelValue:_.value,"onUpdate:modelValue":B[0]||(B[0]=N=>_.value=N),modelModifiers:{lazy:!0},disabled:!v.isEditable,class:"ao-milestone__important",color:"danger",label:v.$t("activity.important.label"),"icon-name":"FlagRounded",variant:"ghost",size:"sm"},null,8,["modelValue","disabled","label"])])]),l.value?(e.openBlock(),e.createElementBlock("div",R5,[e.createElementVNode("div",U5,[e.createElementVNode("label",F5,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":B[1]||(B[1]=N=>h.value=N),class:"ao-milestone__field ao-milestone__date-field",type:"date"},null,512),[[e.vModelText,h.value,void 0,{lazy:!0}]])])]),e.createElementVNode("div",Z5,[e.createElementVNode("label",W5,[e.createVNode(ce,{modelValue:y.value,"onUpdate:modelValue":B[2]||(B[2]=N=>y.value=N),options:g.value,"close-on-select":!0,searchable:!0,max:1,class:"ao-milestone__field ao-milestone__multiselect",placeholder:v.$t("activity.filters.assignee.placeholder"),mode:"tags",disabled:!v.isEditable,caret:v.isEditable},{tag:e.withCtx(({option:N,handleTagRemove:A})=>[e.createVNode(ye,{"user-name":N.label,"avatar-url":N.avatar,"is-closable":!0,onClose:z=>A(N,z)},null,8,["user-name","avatar-url","onClose"])]),_:1},8,["modelValue","options","placeholder","disabled","caret"])])]),e.createVNode(mo,{color:u.value,"onUpdate:color":B[3]||(B[3]=N=>u.value=N)},{clickable:e.withCtx(({openPicker:N,bgColor:A})=>[e.createElementVNode("button",{style:e.normalizeStyle({background:A}),class:"color-button",onClick:z=>C(z,N)},null,12,q5)]),_:1},8,["color"])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Y5,[e.createVNode(e.unref(De),e.mergeProps({class:"ao-project-milestone__activities",list:d.value,disabled:!v.isEditable,"item-key":"id",group:"kanban"},v.$attrs,{onChange:m}),{item:e.withCtx(({element:N})=>{var A,z,U,Z,O;return[e.createVNode(ho,{id:N.id,name:N.name||N.id,"project-id":v.projectId,"phase-name":(A=s.value)==null?void 0:A.name,"milestone-name":(z=l.value)==null?void 0:z.name,"milestone-color":(U=l.value)==null?void 0:U.color,deadline:N.deadline,important:N.important,users:v.users,assignee:N.assignee,slug:N.slug,comments:(Z=N.comments)==null?void 0:Z.length,attachments:(O=N.attachments)==null?void 0:O.length,tasks:N.tasks,"is-editable":v.isEditable,"is-private":N.private,"is-closed":b(N),onClick:H=>v.$router.push({name:e.unref(re).activity,params:{milestoneId:v.milestoneId,activityId:N.id}}),onUpdateActivity:f,onRemoveAssignee:()=>f({id:N.id,assigneeId:null}),onStartTimer:n},e.createSlots({_:2},[v.isEditable?{name:"secondary",fn:e.withCtx(()=>[v.isEditable&&N.active?(e.openBlock(),e.createBlock(Y,{key:0,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:v.$t("archive"),onClick:e.withModifiers(()=>v.$emit("archiveActivity",{id:N.id}),["stop"])},null,8,["label","onClick"])):e.createCommentVNode("",!0),v.isEditable&&!N.active?(e.openBlock(),e.createBlock(Y,{key:1,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:v.$t("feed.activity.unarchive"),onClick:e.withModifiers(()=>v.$emit("unarchiveActivity",{id:N.id}),["stop"])},null,8,["label","onClick"])):e.createCommentVNode("",!0)]),key:"0"}:void 0]),1032,["id","name","project-id","phase-name","milestone-name","milestone-color","deadline","important","users","assignee","slug","comments","attachments","tasks","is-editable","is-private","is-closed","onClick","onRemoveAssignee"])]}),_:1},16,["list","disabled"]),v.isEditable?(e.openBlock(),e.createElementBlock("div",K5,[e.createVNode(Pe,{"icon-name":"Add",label:v.$t("project.activity.add"),onClick:c},null,8,["label"])])):e.createCommentVNode("",!0)])])}}}),s9="",G5=e.defineComponent({__name:"AoProjectOverviewActivityDetails",props:{phaseId:{},milestoneId:{},activityId:{},activityTypes:{},activities:{},isTaskCheckable:{type:Function},statuses:{},phases:{},users:{},project:{},userId:{},isEditable:{type:Boolean},attachmentEnabled:{type:Boolean},timeTrackingData:{}},emits:["update:activity","addSubtask","updateSubtask","deleteSubtask","addFiles","removeFile","addComment","updateComment","removeComment"],setup(a,{emit:t}){const o=a,r=e.computed(()=>{var g;return(g=o.phases)==null?void 0:g.find(y=>y.id===o.phaseId)}),n=e.computed(()=>{var g;return(g=o.phases)==null?void 0:g.flatMap(y=>y.milestones)}),s=e.computed(()=>{var g;return(g=n.value)==null?void 0:g.find(y=>y.id===o.milestoneId)}),i=e.computed(()=>{var g;return(g=o.activities)==null?void 0:g.find(y=>y.id===o.activityId)}),l=g=>{t("update:activity",g)},d=g=>{t("addSubtask",g)},p=g=>{t("updateSubtask",g)},c=g=>{t("deleteSubtask",g)},f=g=>{t("addFiles",g)},m=g=>{t("removeFile",g)},u=g=>{t("addComment",g)},h=g=>{t("updateComment",g)},b=g=>{t("removeComment",g)};return(g,y)=>{var _,C;return i.value?(e.openBlock(),e.createBlock(ao,{key:0,activity:i.value,"activity-types":g.activityTypes,"milestone-id":g.milestoneId,"template-activities":g.activities,"is-template":!1,users:g.users,"user-id":g.userId,"is-task-checkable":g.isTaskCheckable,statuses:g.statuses,breadcrumbs:`${(_=r.value)==null?void 0:_.name} / ${(C=s.value)==null?void 0:C.name}`,"is-editable":g.isEditable,"attachment-enabled":g.attachmentEnabled,projects:[g.project],"time-tracking-data":g.timeTrackingData,onClose:g.$router.back,"onUpdate:activity":l,onAddSubtask:d,onUpdateSubtask:p,onDeleteSubtask:c,onAddFiles:f,onRemoveFile:m,onAddComment:u,onUpdateComment:h,onRemoveComment:b},{default:e.withCtx(v=>[e.renderSlot(g.$slots,"default",e.normalizeProps(e.guardReactiveProps(v)))]),_:3},8,["activity","activity-types","milestone-id","template-activities","users","user-id","is-task-checkable","statuses","breadcrumbs","is-editable","attachment-enabled","projects","time-tracking-data","onClose"])):e.createCommentVNode("",!0)}}}),X5={class:"ao-col-header"},Q5=e.defineComponent({__name:"AoColHeader",props:{title:{},items:{}},setup(a){return(t,o)=>(e.openBlock(),e.createElementBlock("header",X5,[e.createVNode(ne,{title:t.title,class:"ao-col-header__title",level:4},null,8,["title"]),t.items?(e.openBlock(),e.createBlock(wt,{key:0,label:t.items,class:"ao-col-header__items",variant:"solid",color:"primary"},null,8,["label"])):e.createCommentVNode("",!0)]))}}),l9="";function J5(a){return e.getCurrentScope()?(e.onScopeDispose(a),!0):!1}function ka(a){return typeof a=="function"?a():e.unref(a)}const e7=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const t7=a=>a!=null,Rt=()=>{};function a7(a,t){function o(...r){return new Promise((n,s)=>{Promise.resolve(a(()=>t.apply(this,r),{fn:t,thisArg:this,args:r})).then(n).catch(s)})}return o}function o7(a,t={}){let o,r,n=Rt;const s=l=>{clearTimeout(l),n(),n=Rt};return l=>{const d=ka(a),p=ka(t.maxWait);return o&&s(o),d<=0||p!==void 0&&p<=0?(r&&(s(r),r=null),Promise.resolve(l())):new Promise((c,f)=>{n=t.rejectOnCancel?f:c,p&&!r&&(r=setTimeout(()=>{o&&s(o),r=null,c(l())},p)),o=setTimeout(()=>{r&&s(r),r=null,c(l())},d)})}}function r7(a,t=200,o={}){return a7(o7(t,o),a)}function go(a){var t;const o=ka(a);return(t=o==null?void 0:o.$el)!=null?t:o}const n7=e7?window:void 0;function i7(){const a=e.ref(!1),t=e.getCurrentInstance();return t&&e.onMounted(()=>{a.value=!0},t),a}function s7(a){const t=i7();return e.computed(()=>(t.value,!!a()))}function l7(a,t,o={}){const{root:r,rootMargin:n="0px",threshold:s=.1,window:i=n7,immediate:l=!0}=o,d=s7(()=>i&&"IntersectionObserver"in i),p=e.computed(()=>{const h=ka(a);return(Array.isArray(h)?h:[h]).map(go).filter(t7)});let c=Rt;const f=e.ref(l),m=d.value?e.watch(()=>[p.value,go(r),f.value],([h,b])=>{if(c(),!f.value||!h.length)return;const g=new IntersectionObserver(t,{root:go(b),rootMargin:n,threshold:s});h.forEach(y=>y&&g.observe(y)),c=()=>{g.disconnect(),c=Rt}},{immediate:l,flush:"post"}):Rt,u=()=>{c(),m(),f.value=!1};return J5(u),{isSupported:d,isActive:f,pause(){c(),f.value=!1},resume(){f.value=!0},stop:u}}const c7={class:e.normalizeClass(["ao-list-kanban"])},d7={class:"ao-list-kanban__header"},p7={key:0,class:"ao-list-kanban__end ao-list-kanban__end--loading"},u7={key:1,class:"ao-list-kanban__end"},m7={key:0,class:"ao-list-kanban__no-more"},f7={key:1,class:"ao-list-kanban__divider"},h7={key:1,class:"ao-list-kanban__footer"},g7=e.defineComponent({__name:"AoListKanban",props:{list:{},status:{},users:{},userId:{},title:{},footerLabel:{},isLoading:{type:Boolean},hasMore:{type:Boolean},noMoreLabel:{},isEditable:{type:[Boolean,String]},tagType:{}},emits:["add","update:list","change:list","loadMore","selectActivity","archiveActivity","unarchiveActivity","updateActivity","startTimer"],setup(a,{emit:t}){const o=a,r=e.ref(!1),n=e.ref(null);l7(n,([{isIntersecting:c}])=>{r.value=c}),e.watch(r,c=>{c&&o.hasMore&&!o.isLoading&&t("loadMore")});const s=c=>{var f;return o.isEditable===!0?!0:o.userId&&o.isEditable==="only-own"?o.userId===((f=c.assignee)==null?void 0:f.id):!1},i=c=>{t("selectActivity",c)},l=c=>{t("updateActivity",c)},d=c=>{"added"in c?t("updateActivity",{id:c.added.element.id,statusId:o.status.id,rank:dt(o.list,c.added.newIndex)}):"removed"in c||"moved"in c&&t("updateActivity",{id:c.moved.element.id,rank:dt(o.list,c.moved.newIndex)})},p=e.ref(!1);return(c,f)=>(e.openBlock(),e.createElementBlock("div",c7,[c.title||c.$slots.header?e.renderSlot(c.$slots,"header",{key:0},()=>{var m;return[e.createElementVNode("div",d7,[c.title?(e.openBlock(),e.createBlock(Q5,{key:0,title:c.title,level:3,items:(m=c.list)==null?void 0:m.length},null,8,["title","items"])):e.createCommentVNode("",!0)])]}):e.createCommentVNode("",!0),e.createVNode(e.unref(De),e.mergeProps({class:["ao-list-kanban__list",p.value?"ao-list-kanban__transition":void 0],list:c.list,"item-key":"id",group:"kanban","ghost-class":"ao-list-kanban__ghost",animation:"200"},c.$attrs,{draggable:".ao-list-draggable",disabled:!c.isEditable,onChange:d,onStart:f[1]||(f[1]=m=>p.value=!0),onEnd:f[2]||(f[2]=m=>p.value=!1),"component-data":{tag:"transition-group",name:"ao-list-kanban__transition"}}),{item:e.withCtx(({element:m})=>{var u,h,b,g,y,_,C,v,B,E;return[e.createVNode(ho,{class:e.normalizeClass(s(m)?"ao-list-draggable":""),id:m.id,name:m.name,"project-name":(u=m.project)==null?void 0:u.name,"project-id":(h=m.project)==null?void 0:h.id,"project-color":(b=m.project)==null?void 0:b.color,"phase-name":(y=(g=m.milestone)==null?void 0:g.phase)==null?void 0:y.name,"milestone-name":(_=m.milestone)==null?void 0:_.name,"milestone-color":(C=m.milestone)==null?void 0:C.color,deadline:m.deadline,rules:((v=m.rules)==null?void 0:v.length)||0,tasks:m.tasks,description:m.description,important:m.important,type:m.type,comments:(B=m.comments)==null?void 0:B.length,attachments:(E=m.attachments)==null?void 0:E.length,users:c.users,assignee:m.assignee,slug:m.slug,"is-editable":s(m),"is-private":m.private,"tag-type":c.tagType,onUpdateActivity:[N=>s(m)&&l(N),()=>s(m)&&l],onClick:()=>i(m.id),onRemoveAssignee:()=>s(m)&&l({id:m.id,assigneeId:null}),onStartTimer:f[0]||(f[0]=N=>c.$emit("startTimer",N))},{secondary:e.withCtx(()=>[s(m)&&m.active?(e.openBlock(),e.createBlock(Y,{key:0,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:c.$t("feed.activity.archive"),onClick:e.withModifiers(()=>c.$emit("archiveActivity",{id:m.id}),["stop"])},null,8,["label","onClick"])):e.createCommentVNode("",!0),s(m)&&!m.active?(e.openBlock(),e.createBlock(Y,{key:1,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:c.$t("feed.activity.unarchive"),onClick:e.withModifiers(()=>c.$emit("unarchiveActivity",{id:m.id}),["stop"])},null,8,["label","onClick"])):e.createCommentVNode("",!0)]),_:2},1032,["class","id","name","project-name","project-id","project-color","phase-name","milestone-name","milestone-color","deadline","rules","tasks","description","important","type","comments","attachments","users","assignee","slug","is-editable","is-private","tag-type","onUpdateActivity","onClick","onRemoveAssignee"])]}),footer:e.withCtx(()=>[c.isLoading?(e.openBlock(),e.createElementBlock("div",p7,[e.createVNode(Q,{name:"Loading"})])):c.hasMore?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"scrollEnd",ref:n,class:"ao-list-kanban__end"},null,512)):(e.openBlock(),e.createElementBlock("div",u7,[c.noMoreLabel?(e.openBlock(),e.createElementBlock("span",m7,e.toDisplayString(c.noMoreLabel),1)):c.isEditable?(e.openBlock(),e.createElementBlock("span",f7)):e.createCommentVNode("",!0)]))]),_:1},16,["class","list","disabled"]),c.$slots.footer||c.footerLabel?(e.openBlock(),e.createElementBlock("div",h7,[e.renderSlot(c.$slots,"footer",{},()=>[c.isEditable?(e.openBlock(),e.createBlock(Pe,{key:0,"icon-name":"AddBoxOutlineRounded",label:c.footerLabel,onClick:f[3]||(f[3]=m=>c.$emit("add"))},null,8,["label"])):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)]))}}),c9="",_7={class:"ao-field ao-search-field"},v7=["value","placeholder","onKeypress"],C7=e.defineComponent({__name:"AoSearchField",props:{modelValue:{},delay:{default:250},placeholder:{default:"Search"}},emits:["update:modelValue","clear"],setup(a,{emit:t}){const o=a,r=async i=>{const d=i.target.value;t("update:modelValue",d,i)},n=r7(r,o.delay),s=i=>{t("clear",i)};return(i,l)=>(e.openBlock(),e.createElementBlock("div",_7,[e.createElementVNode("input",{value:i.modelValue,type:"text",class:"ao-field__input ao-search-field__input",placeholder:i.placeholder,onInput:l[0]||(l[0]=(...d)=>e.unref(n)&&e.unref(n)(...d)),onKeypress:e.withKeys(r,["enter"])},null,40,v7),e.createVNode(Q,{name:"SearchRounded",class:e.normalizeClass(`ao-search-field__icon ao-search-field__action ${i.modelValue?"":"ao-search-field__action--visible"}`)},null,8,["class"]),e.createVNode(Y,{"icon-name":"CloseRounded",size:"sm",color:"primary",corners:"round",class:e.normalizeClass(`ao-search-field__button ao-search-field__action ${i.modelValue?"ao-search-field__action--visible":""}`),onClick:s},null,8,["class"])]))}}),d9="",b7={class:"ao-feed"},y7={class:"ao-feed__filters"},w7={class:"ao-feed__body"},Lr=e.defineComponent({__name:"AoFeed",props:{activities:{},statuses:{},project:{},projects:{},filters:{},activityTypes:{},users:{},userId:{},initialActivityId:{},initialActivitySlug:{},searchText:{default:""},showsArchivedActivities:{type:Boolean},showsOnlyImportant:{type:Boolean},showsOnlyNonAssigned:{type:Boolean},selectedActivity:{},isTaskCheckable:{type:Function,default:void 0},isEditable:{type:[Boolean,String]},attachmentEnabled:{type:Boolean,default:!0},timeTrackingData:{}},emits:["change:activities","addActivity","update:filters","selectActivity","update:activity","archiveActivity","unarchiveActivity","update:searchText","clear:searchText","update:showsArchivedActivities","update:showsOnlyImportant","update:showsOnlyNonAssigned","addSubtask","updateSubtask","deleteSubtask","addFiles","removeFile","addComment","updateComment","removeComment","toast","startTimer"],setup(a,{emit:t}){const o=a,{t:r}=We();function n(V,T){t("toast",V,T)}const s=e.toRef(o,"activities"),i=async(V,T)=>{await t("selectActivity",V,T)},l=e.ref({}),d=e.ref(!1),p=e.ref(!1),c=e.computed(()=>o.project?"milestone":"project");e.watch([()=>o.statuses,()=>o.activities,()=>o.initialActivityId,()=>o.initialActivitySlug],async([V,T,w,x],[R,P])=>{l.value=Object.fromEntries(V.map(M=>[M.id,T.filter(D=>{var ee;return((ee=D.status)==null?void 0:ee.id)===M.id})])),w&&!d.value?(i(w,null),d.value=!0):x&&!d.value&&(i(null,x),d.value=!0),p.value&&Te(T,P)},{immediate:!0});const f=e.computed(()=>{var V;return!o.selectedActivity||!o.selectedActivity.milestone?"":`${((V=o.selectedActivity.milestone.phase)==null?void 0:V.name)??""} / ${o.selectedActivity.milestone.name??""}`}),m=V=>{var P,M;const T=(P=o.activities)==null?void 0:P.at(-1),w=T?ie.LexoRank.parse(T.rank).genNext():ie.LexoRank.middle(),x=((M=o.activities)==null?void 0:M.length)??0,R={name:r("activity.defaultName",{idx:x+1}),rank:w.format(),statusId:V.id};o.filters.assigneeId.length>0&&(R.assigneeId=o.filters.assigneeId[0]),o.filters.projectId.length>0&&(R.projectId=o.filters.projectId[0]),o.filters.typeId.length>0&&(R.typeId=o.filters.typeId[0]),p.value=!0,t("addActivity",R)},u=(V,T)=>{p.value=!1,t("update:filters",{...o.filters,[V]:T})},h=e.computed(()=>o.project?[o.project]:o.projects??[]),b=e.computed(()=>h.value.map(V=>({value:V.id,label:V.name}))),g=e.computed(()=>{var V;return(V=o.activityTypes)==null?void 0:V.map(T=>({value:T.id,label:T.name}))}),y=e.computed(()=>o.users.map(V=>({value:V.id,label:`${V.firstName} ${V.lastName}`,avatar:V.avatarUrl}))),_=V=>{o.selectedActivity&&t("update:activity",V)},C=V=>{t("update:activity",V)},v=V=>{t("archiveActivity",V)},B=V=>{t("unarchiveActivity",V)},E=V=>{var T;t("startTimer",V),(T=window.parent)==null||T.postMessage({type:"startTimer",data:V},"*")},N=V=>{p.value=!1,t("update:searchText",V)},A=V=>{p.value=!1,t("clear:searchText",V)},z=V=>{o.selectedActivity&&t("addSubtask",V)},U=V=>{o.selectedActivity&&t("updateSubtask",V)},Z=V=>{o.selectedActivity&&t("deleteSubtask",V)},O=V=>{t("addFiles",V)},H=V=>{t("removeFile",V)},K=V=>{o.selectedActivity&&t("addComment",{...V,activityId:o.selectedActivity.id})},W=V=>{const{id:T}=o.selectedActivity||{};T&&t("updateComment",V)},F=V=>{const{id:T}=o.selectedActivity||{};T&&t("removeComment",V)},S=Le.useRouter(),$=e.ref("feed"),L=[{label:"Overview",value:"overview"},{label:"Feed",value:"feed"},{label:"Mapping",value:"mapping"}];return e.watch($,V=>{V==="feed"?(S.push({name:re.feed}),console.log("Navigating to feed...")):V==="overview"?(S.push({name:re.project}),console.log("Navigating to feed...")):V==="mapping"&&(S.push({name:re.mapping}),console.log("Navigating to feed..."))}),(V,T)=>{var w;return e.openBlock(),e.createElementBlock("div",b7,[e.createVNode(It,null,{primary:e.withCtx(()=>[e.createElementVNode("div",y7,[e.createVNode(wa,{tabs:L,modelValue:$.value,"onUpdate:modelValue":T[0]||(T[0]=x=>$.value=x)},null,8,["modelValue"]),e.createVNode(C7,{"model-value":V.searchText,placeholder:V.$t("feed.search.placeholder"),class:"ao-feed__search","onUpdate:modelValue":N,onClear:A},null,8,["model-value","placeholder"]),o.project?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ce,{key:0,"model-value":V.filters[e.unref(Xe).project],mode:"tags",options:b.value,"close-on-select":!1,searchable:!0,class:"ao-feed__filter ao-feed__filter__projects",placeholder:V.$t("feed.filters.project.placeholder"),"onUpdate:modelValue":T[1]||(T[1]=x=>u(e.unref(Xe).project,x))},null,8,["model-value","options","placeholder"])),g.value?(e.openBlock(),e.createBlock(ce,{key:1,"model-value":V.filters[e.unref(Xe).type],mode:"tags",options:g.value,"close-on-select":!1,searchable:!0,class:"ao-feed__filter ao-feed__filter__types",placeholder:V.$t("feed.filters.activityType.placeholder"),"onUpdate:modelValue":T[2]||(T[2]=x=>u(e.unref(Xe).type,x))},null,8,["model-value","options","placeholder"])):e.createCommentVNode("",!0),y.value.length?(e.openBlock(),e.createBlock(ce,{key:2,"model-value":V.filters[e.unref(Xe).assignee],mode:"tags",options:y.value,"close-on-select":!1,searchable:!0,class:"ao-feed__filter ao-feed__filter__assignees",placeholder:V.$t("feed.filters.assignee.placeholder"),"onUpdate:modelValue":T[3]||(T[3]=x=>u(e.unref(Xe).assignee,x))},{tag:e.withCtx(({option:x,handleTagRemove:R})=>[e.createVNode(ye,{"user-name":x.label,"avatar-url":x.avatar,"is-closable":!0,onClose:P=>R(x,P)},null,8,["user-name","avatar-url","onClose"])]),_:1},8,["model-value","options","placeholder"])):e.createCommentVNode("",!0)]),e.createVNode(Y,{class:"ao-feed__only-non-assigned",size:"sm","icon-name":V.showsOnlyNonAssigned?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:V.$t("feed.filters.showsOnlyNonAssigned.label"),role:"checkbox","aria-checked":V.showsOnlyNonAssigned,onClick:T[4]||(T[4]=x=>V.$emit("update:showsOnlyNonAssigned",!V.showsOnlyNonAssigned))},null,8,["icon-name","label","aria-checked"]),e.createVNode(Y,{class:"ao-feed__only-important",size:"sm","icon-name":V.showsOnlyImportant?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:V.$t("feed.filters.showsOnlyImportant.label"),role:"checkbox","aria-checked":V.showsOnlyImportant,onClick:T[5]||(T[5]=x=>V.$emit("update:showsOnlyImportant",!V.showsOnlyImportant))},null,8,["icon-name","label","aria-checked"]),e.createVNode(Y,{class:"ao-feed__show-archived",size:"sm","icon-name":V.showsArchivedActivities?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:V.$t("feed.filters.showsArchivedActivities.label"),role:"checkbox","aria-checked":V.showsArchivedActivities,onClick:T[6]||(T[6]=x=>V.$emit("update:showsArchivedActivities",!V.showsArchivedActivities))},null,8,["icon-name","label","aria-checked"])]),_:1}),e.createElementVNode("div",w7,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.statuses,x=>(e.openBlock(),e.createBlock(g7,{key:x.id,status:x,list:l.value[x.id],title:x.name,"footer-label":V.$t("feed.activity.add"),users:V.users,"user-id":V.userId,"is-editable":V.isEditable,tagType:c.value,onAdd:()=>m(x),onSelectActivity:i,onArchiveActivity:v,onUnarchiveActivity:B,onUpdateActivity:C,onStartTimer:E},null,8,["status","list","title","footer-label","users","user-id","is-editable","tagType","onAdd"]))),128))]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[V.selectedActivity?(e.openBlock(),e.createBlock(ao,{key:0,activity:V.selectedActivity,"activity-types":V.activityTypes,"milestone-id":(w=V.selectedActivity.milestone)==null?void 0:w.id,"template-activities":s.value,users:V.users,"user-id":V.userId,"is-task-checkable":V.isTaskCheckable,statuses:V.statuses,breadcrumbs:f.value,"is-editable":V.isEditable,"attachment-enabled":V.attachmentEnabled,projects:h.value,"time-tracking-data":V.timeTrackingData,onClose:T[7]||(T[7]=()=>i(null,null)),"onUpdate:activity":_,onAddSubtask:z,onUpdateSubtask:U,onDeleteSubtask:Z,onAddFiles:O,onRemoveFile:H,onAddComment:K,onUpdateComment:W,onRemoveComment:F,onToast:n},{default:e.withCtx(x=>[e.renderSlot(V.$slots,"activityDetailsBody",e.normalizeProps(e.guardReactiveProps(x)))]),_:3},8,["activity","activity-types","milestone-id","template-activities","users","user-id","is-task-checkable","statuses","breadcrumbs","is-editable","attachment-enabled","projects","time-tracking-data"])):e.createCommentVNode("",!0)]))])}}}),p9="",k7={class:"ao-project-mapping"},$7={class:"ao-project-mapping-mapping__body"},E7={class:"ao-project-mapping-mapping__phases"},B7={key:0,class:"ao-project-mapping-mapping__image-wrapper"},V7=["src","alt"],S7=e.defineComponent({__name:"AoMapping",props:{project:{},phases:{},closedStatus:{},users:{},userId:{},templates:{},isTaskCheckable:{type:Function},statuses:{},activityTypes:{},isEditable:{type:[Boolean,String]},showsArchived:{type:Boolean},attachmentEnabled:{type:Boolean}},emits:["addPhase","updatePhase","archivePhase","unarchivePhase","copyPhaseToTemplate","applyTemplate","saveTemplate","update:showsArchived"],setup(a,{emit:t}){const o=a,{t:r}=We(),n=()=>{const{name:g,rank:y}=at(o.phases,"phase",r);t("addPhase",{name:g,rank:y,projectId:o.project.id})},s=g=>{t("updatePhase",g)},i=g=>{t("archivePhase",g)},l=g=>{t("unarchivePhase",g)},d=g=>{t("copyPhaseToTemplate",g)},p=e.ref(!1),c=e.ref(!1),f=(g,y)=>{t("applyTemplate",{templateId:g,projectId:y}),p.value=!1},m=(g,y)=>{var v;const _=(v=o.templates)==null?void 0:v.at(-1),C=_?ie.LexoRank.parse(_.rank).genNext():ie.LexoRank.middle();t("saveTemplate",{templateName:g,rank:C.format(),phaseIds:y}),c.value=!1},u=Le.useRouter(),h=e.ref("mapping"),b=[{label:"Overview",value:"overview"},{label:"Feed",value:"feed"},{label:"Mapping",value:"mapping"}];return e.watch(h,g=>{g==="feed"?(u.push({name:re.feed}),console.log("Navigating to feed...")):g==="overview"?(u.push({name:re.project}),console.log("Navigating to feed...")):g==="mapping"&&(u.push({name:re.mapping}),console.log("Navigating to feed..."))}),(g,y)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",e.mergeProps({class:"ao-project-mapping-overview"},g.$attrs),[e.createElementVNode("div",k7,[e.createVNode(It,null,{primary:e.withCtx(()=>[e.createVNode(wa,{modelValue:h.value,"onUpdate:modelValue":y[0]||(y[0]=_=>h.value=_),tabs:b},null,8,["modelValue"]),e.createVNode(Y,{class:"ao-feed__show-archived",size:"sm","icon-name":g.showsArchived?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:g.$t("feed.filters.showsArchived.label"),role:"checkbox","aria-checked":g.showsArchived,onClick:y[1]||(y[1]=_=>g.$emit("update:showsArchived",!g.showsArchived))},null,8,["icon-name","label","aria-checked"])]),secondary:e.withCtx(()=>[g.isEditable===!0?(e.openBlock(),e.createBlock(Y,{key:0,class:"ao-project-mapping-overview__save-as-template",color:"primary",label:g.$t("project.template.save.label"),onClick:y[2]||(y[2]=_=>c.value=!0)},null,8,["label"])):e.createCommentVNode("",!0),g.isEditable===!0?(e.openBlock(),e.createBlock(Y,{key:1,class:"ao-project-mapping-overview__add-template",color:"primary",label:g.$t("project.template.apply.label"),onClick:y[3]||(y[3]=_=>p.value=!0)},null,8,["label"])):e.createCommentVNode("",!0)]),_:1}),e.createElementVNode("div",$7,[e.createElementVNode("div",E7,[e.createVNode(fo,{phases:g.phases,"closed-status":g.closedStatus,"is-editable":g.isEditable===!0,users:g.users,onAddPhase:n,onUpdatePhase:s,onArchivePhase:i,onUnarchivePhase:l,onCopyPhaseToTemplate:d},null,8,["phases","closed-status","is-editable","users"])]),g.project.architectureImage?(e.openBlock(),e.createElementBlock("div",B7,[e.createElementVNode("img",{class:"architecture-image",src:g.project.architectureImage.url,alt:e.unref(r)("architectureImage.alt")},null,8,V7)])):e.createCommentVNode("",!0)])])],16),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[c.value?(e.openBlock(),e.createBlock(Or,{key:0,phases:g.phases,onClose:y[4]||(y[4]=_=>c.value=!1),onSave:m},null,8,["phases"])):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createBlock(Ar,{key:1,"project-id":g.project.id,templates:g.templates,onClose:y[5]||(y[5]=_=>p.value=!1),onApply:f},null,8,["project-id","templates"])):e.createCommentVNode("",!0)]))],64))}}),u9="",rt={TEMPLATES:"templates",TEMPLATE_DETAILS:"template_details",TEMPLATES_LIST:"templates_list"},N7=(a,t={})=>[{path:a,name:rt.TEMPLATES,redirect:{name:rt.TEMPLATES_LIST},...t,children:[{path:"",name:rt.TEMPLATES_LIST,component:Dr},{path:":templateId/:phaseId?/:milestoneId?/:activityId?",name:rt.TEMPLATE_DETAILS,component:Mr,props:!0}]}],re={project:"AoProject",feed:"AoProjectFeed",mapping:"AoProjectMapping",milestone:"AoMilestone",activity:"AoActivity"},x7=(a,t={})=>[{path:a,...t,redirect:{name:re.project},children:[{path:"",name:re.project,component:m5,props:!0,children:[{path:":phaseId/:milestoneId",name:re.milestone,component:Ir,props:!0},{path:":phaseId/:milestoneId/:activityId",name:re.activity,props:{default:!0,modal:!0},components:{default:Ir,modal:G5}}]},{path:"feed",name:re.feed,component:Lr,props:!0},{path:"mapping",name:re.mapping,component:S7,props:!0}]}],M7={class:"ao-templates"},Dr=e.defineComponent({__name:"AoTemplatesList",props:{templates:{}},emits:["addTemplate","updateTemplates","updateItem","removeItem"],setup(a,{emit:t}){const o=a,{t:r}=We();e.watch(()=>o.templates,(d,p)=>{Te(d,p)});const n=()=>{var m,u;const d=(m=o.templates)==null?void 0:m.at(-1),p=d?ie.LexoRank.parse(d.rank).genNext():ie.LexoRank.middle(),c=((u=o.templates)==null?void 0:u.length)??0,f={name:r("template.defaultName.template",{idx:c+1}),rank:p.format()};t("addTemplate",f)},s=(d,p)=>{t("updateItem",{itemType:te.TEMPLATES,id:d,templateId:d,data:{name:p}})},i=(d,p)=>{t("removeItem",{itemType:te.TEMPLATES,templateId:d,data:{id:d,...p?{name:p}:{}}})},l=d=>{if(d.moved){const p=Ot(d,o.templates??[]);t("updateItem",{itemType:te.TEMPLATES,id:d.moved.element.id,templateId:d.moved.element.id,data:{rank:p}})}};return(d,p)=>(e.openBlock(),e.createElementBlock("div",M7,[e.createVNode(It,null,{secondary:e.withCtx(()=>[e.createVNode(Y,{label:d.$t("templates.new"),color:"primary","icon-name":"Add","icon-position":"start",onClick:n},null,8,["label"])]),_:1}),e.createVNode(e.unref(De),{"model-value":d.templates,class:"ao-templates__list","item-key":"id",handle:".ao-card__drag",onChange:l},{item:e.withCtx(({element:c})=>{var f;return[e.createVNode(F2,{id:c.id,title:c.name,phases:c.phases,milestones:(f=c.phases)!=null&&f.length?e.unref(m2)(c.phases):0,activities:c.phases?e.unref(f2)(c.phases):0,"updated-at":c.updatedAt,"updated-by":c.updatedBy,onUpdateTitle:m=>s(c.id,m),onClick:m=>d.$router.push({name:e.unref(rt).TEMPLATE_DETAILS,params:{templateId:c.id}}),onDeleteItem:p[0]||(p[0]=(m,u)=>i(m,u))},null,8,["id","title","phases","milestones","activities","updated-at","updated-by","onUpdateTitle","onClick"])]}),_:1},8,["model-value"])]))}}),m9="",T7={class:"ao-field__label"},jr=e.defineComponent({__name:"AoField",props:{label:{},isMultiselect:{type:Boolean,default:!1}},setup(a){return(t,o)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(["ao-field",{"ao-field--multiselect":t.isMultiselect}])},[e.createElementVNode("span",T7,e.toDisplayString(t.label),1),e.renderSlot(t.$slots,"default")],2))}}),A7=["type","value","disabled","readonly"],O7=e.defineComponent({__name:"AoInputField",props:{label:{default:""},type:{default:"text"},modelValue:{default:""},modelModifiers:{default:()=>({})},isDisabled:{type:Boolean,default:!1},isReadonly:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(a,{emit:t}){const o=a,r=e.computed(()=>o.modelModifiers.lazy?"change":"input"),n=s=>{o.modelModifiers.number&&(s=Number(s)),t("update:modelValue",s)};return(s,i)=>(e.openBlock(),e.createBlock(jr,{label:s.label},{default:e.withCtx(()=>[e.createElementVNode("input",e.mergeProps({class:"ao-field__input",type:s.type,value:s.modelValue,disabled:s.isDisabled,readonly:s.isReadonly},{[e.toHandlerKey(r.value)]:i[0]||(i[0]=l=>n(l.target.value))}),null,16,A7)]),_:1},8,["label"]))}}),I7={class:"ao-field"},L7={class:"ao-field__label"},D7=["checked","disabled"],j7=e.defineComponent({__name:"AoCheckboxField",props:{label:{default:""},modelValue:{type:Boolean,default:!1},isReadonly:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(a){return(t,o)=>(e.openBlock(),e.createElementBlock("label",I7,[e.createElementVNode("span",L7,e.toDisplayString(t.label),1),e.createElementVNode("input",{class:"ao-field__input",type:"checkbox",checked:t.modelValue,disabled:t.isDisabled,onChange:o[0]||(o[0]=r=>{var n;return t.$emit("update:modelValue",((n=r.target)==null?void 0:n.checked)??!1)})},null,40,D7)]))}});X.AoAvatar=ye,X.AoCardFeed=ho,X.AoCheckboxField=j7,X.AoFeed=Lr,X.AoField=jr,X.AoInputField=O7,X.AoMultiselect=ce,X.AoProjectPhases=fo,X.AoTabBar=wa,X.AoTemplateDetails=Mr,X.AoTemplates=Wr,X.AoTemplatesList=Dr,X.TemplateItemTypeEnum=To,X.activityFeedStatus=Nd,X.durationTypes=Sd,X.feedFilterTypes=Xe,X.getProjectOverviewRoutes=x7,X.getTemplateRoutes=N7,X.listUpdateTypes=xd,X.milestoneStatus=kt,X.projectOverviewRoutes=re,X.ruleComparators=No,X.ruleDurationUnits=Mo,X.ruleTriggerTypes=xo,X.templateItemType=te,X.templateRouteNames=rt,Object.defineProperty(X,Symbol.toStringTag,{value:"Module"})});
|