@26lights/orcha 0.41.72 → 0.41.73
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 +1 -1
- package/dist/orcha.es.js +124 -125
- package/dist/orcha.umd.js +1 -1
- package/package.json +2 -2
package/dist/orcha.cjs.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* vue-color-kit v1.0.6
|
|
3
3
|
* (c) 2023
|
|
4
4
|
* @license MIT
|
|
5
|
-
*/function Qe(a){let t={r:0,g:0,b:0,a:1};/#/.test(a)?t=Nv(a):/rgb/.test(a)?t=Go(a):typeof a=="string"?t=Go(`rgba(${a})`):Object.prototype.toString.call(a)==="[object Object]"&&(t=a);const{r:o,g:n,b:s,a:r}=t,{h:l,s:i,v:c}=Sv(t);return{r:o,g:n,b:s,a:r===void 0?1:r,h:l,s:i,v:c}}function mo(a){const t=document.createElement("canvas"),o=t.getContext("2d"),n=a*2;return t.width=n,t.height=n,o.fillStyle="#ffffff",o.fillRect(0,0,n,n),o.fillStyle="#ccd5db",o.fillRect(0,0,a,a),o.fillRect(a,a,a,a),t}function Ya(a,t,o,n,s,r){const l=a==="l",i=t.createLinearGradient(0,0,l?o:0,l?0:n);i.addColorStop(.01,s),i.addColorStop(.99,r),t.fillStyle=i,t.fillRect(0,0,o,n)}function Bv({r:a,g:t,b:o},n){const s=l=>("0"+Number(l).toString(16)).slice(-2),r=`#${s(a)}${s(t)}${s(o)}`;return n?r.toUpperCase():r}function Nv(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 Go(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 Sv({r:a,g:t,b:o}){a=a/255,t=t/255,o=o/255;const n=Math.max(a,t,o),s=Math.min(a,t,o),r=n-s;let l=0;n===s?l=0:n===a?t>=o?l=60*(t-o)/r:l=60*(t-o)/r+360:n===t?l=60*(o-a)/r+120:n===o&&(l=60*(a-t)/r+240),l=Math.floor(l);let i=parseFloat((n===0?0:1-s/n).toFixed(2)),c=parseFloat(n.toFixed(2));return{h:l,s:i,v:c}}var vo=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),Ya("l",o,t,t,"#FFFFFF","rgba(255,255,255,0)"),Ya("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(),n=a.target.getContext("2d"),s=l=>{let i=l.clientX-o,c=l.clientY-t;i<0&&(i=0),c<0&&(c=0),i>this.size&&(i=this.size),c>this.size&&(c=this.size),this.slideSaturationStyle={left:i-5+"px",top:c-5+"px"};const u=n.getImageData(Math.min(i,this.size-1),Math.min(c,this.size-1),1,1),[d,p,m]=u.data;this.$emit("selectSaturation",{r:d,g:p,b:m})};s(a);const r=()=>{document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",r)};document.addEventListener("mousemove",s),document.addEventListener("mouseup",r)}}});const Mv={ref:"canvasSaturation"};function Av(a,t,o,n,s,r){return e.openBlock(),e.createBlock("div",{class:"saturation",onMousedown:t[1]||(t[1]=e.withModifiers((...l)=>a.selectSaturation&&a.selectSaturation(...l),["prevent","stop"]))},[e.createVNode("canvas",Mv,null,512),e.createVNode("div",{style:a.slideSaturationStyle,class:"slide"},null,4)],32)}vo.render=Av;vo.__file="src/color/Saturation.vue";var fo=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,n=a.getContext("2d");a.width=t,a.height=o;const s=n.createLinearGradient(0,0,0,o);s.addColorStop(0,"#FF0000"),s.addColorStop(.17*1,"#FF00FF"),s.addColorStop(.17*2,"#0000FF"),s.addColorStop(.17*3,"#00FFFF"),s.addColorStop(.17*4,"#00FF00"),s.addColorStop(.17*5,"#FFFF00"),s.addColorStop(1,"#FF0000"),n.fillStyle=s,n.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"),n=r=>{let l=r.clientY-t;l<0&&(l=0),l>this.height&&(l=this.height),this.slideHueStyle={top:l-2+"px"};const i=o.getImageData(0,Math.min(l,this.height-1),1,1),[c,u,d]=i.data;this.$emit("selectHue",{r:c,g:u,b:d})};n(a);const s=()=>{document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",s)};document.addEventListener("mousemove",n),document.addEventListener("mouseup",s)}}});const Tv={ref:"canvasHue"};function Ov(a,t,o,n,s,r){return e.openBlock(),e.createBlock("div",{class:"hue",onMousedown:t[1]||(t[1]=e.withModifiers((...l)=>a.selectHue&&a.selectHue(...l),["prevent","stop"]))},[e.createVNode("canvas",Tv,null,512),e.createVNode("div",{style:a.slideHueStyle,class:"slide"},null,4)],32)}fo.render=Ov;fo.__file="src/color/Hue.vue";var ho=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,n=this.alphaSize,s=mo(n),r=a.getContext("2d");a.width=t,a.height=o,r.fillStyle=r.createPattern(s,"repeat"),r.fillRect(0,0,t,o),Ya("p",r,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=s=>{let r=s.clientY-t;r<0&&(r=0),r>this.height&&(r=this.height);let l=parseFloat((r/this.height).toFixed(2));this.$emit("selectAlpha",l)};o(a);const n=()=>{document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",n)};document.addEventListener("mousemove",o),document.addEventListener("mouseup",n)}}});const Iv={ref:"canvasAlpha"};function Lv(a,t,o,n,s,r){return e.openBlock(),e.createBlock("div",{class:"color-alpha",onMousedown:t[1]||(t[1]=e.withModifiers((...l)=>a.selectAlpha&&a.selectAlpha(...l),["prevent","stop"]))},[e.createVNode("canvas",Iv,null,512),e.createVNode("div",{style:a.slideAlphaStyle,class:"slide"},null,4)],32)}ho.render=Lv;ho.__file="src/color/Alpha.vue";var Co=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,n=this.alphaSize,s=mo(n),r=a.getContext("2d");a.width=t,a.height=o,r.fillStyle=r.createPattern(s,"repeat"),r.fillRect(0,0,t,o),r.fillStyle=this.color,r.fillRect(0,0,t,o)}}});function Dv(a,t,o,n,s,r){return e.openBlock(),e.createBlock("canvas")}Co.render=Dv;Co.__file="src/color/Preview.vue";var go=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:n,left:s,width:r,height:l}=this.suckerCanvas.getBoundingClientRect(),i=t-s,c=o-n,d=this.suckerCanvas.getContext("2d").getImageData(Math.min(i,r-1),Math.min(c,l-1),1,1);let[p,m,f,y]=d.data;y=parseFloat((y/255).toFixed(2));const _=this.suckerPreview.style;Object.assign(_,{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(${p}, ${m}, ${f}, ${y})`,zIndex:95}),this.suckerArea.length&&t>=this.suckerArea[0]&&o>=this.suckerArea[1]&&t<=this.suckerArea[2]&&o<=this.suckerArea[3]?_.display="":_.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:n}=t,{top:s,left:r,width:l,height:i}=a.getBoundingClientRect(),c=o-r,u=n-s,p=a.getContext("2d").getImageData(Math.min(c,l-1),Math.min(u,i-1),1,1);let[m,f,y,_]=p.data;_=parseFloat((_/255).toFixed(2)),this.$emit("selectSucker",{r:m,g:f,b:y,a:_})}))}}});const Pv=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),Hv={key:1,class:"sucker",viewBox:"-16 -16 68 68",xmlns:"http://www.w3.org/2000/svg",stroke:"#9099a4"},Rv=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 jv(a,t,o,n,s,r){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]=(...l)=>a.openSucker&&a.openSucker(...l))},[Pv],2)),a.isSucking?(e.openBlock(),e.createBlock("svg",Hv,[Rv])):e.createCommentVNode("v-if",!0)])}go.render=jv;go.__file="src/color/Sucker.vue";var _o=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(r){t("inputColor",r)}}),handleFocus:r=>{t("inputFocus",r)},handleBlur:r=>{t("inputBlur",r)}}}});const Fv={class:"color-type"},Uv={class:"name"};function zv(a,t,o,n,s,r){return e.openBlock(),e.createBlock("div",Fv,[e.createVNode("span",Uv,e.toDisplayString(a.name),1),e.withDirectives(e.createVNode("input",{"onUpdate:modelValue":t[1]||(t[1]=l=>a.modelColor=l),class:"value",onFocus:t[2]||(t[2]=(...l)=>a.handleFocus&&a.handleFocus(...l)),onBlur:t[3]||(t[3]=(...l)=>a.handleBlur&&a.handleBlur(...l))},null,544),[[e.vModelText,a.modelColor]])])}_o.render=zv;_o.__file="src/color/Box.vue";var yo=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(),n=e.ref([]),s=e.ref();a.colorsHistoryKey&&localStorage&&(n.value=JSON.parse(localStorage.getItem(a.colorsHistoryKey))||[]),s.value=mo(4).toDataURL(),e.onUnmounted(()=>{r(o.value)});function r(i){if(!i)return;const c=n.value||[],u=c.indexOf(i);u>=0&&c.splice(u,1),c.length>=8&&(c.length=7),c.unshift(i),n.value=c||[],localStorage&&a.colorsHistoryKey&&localStorage.setItem(a.colorsHistoryKey,JSON.stringify(c))}function l(i){t("selectColor",i)}return{setColorsHistory:r,colorsHistory:n,color:o,imgAlphaBase64:s,selectColor:l}}});const Zv={class:"colors"},xv={key:0,class:"colors history"};function Wv(a,t,o,n,s,r){return e.openBlock(),e.createBlock("div",null,[e.createVNode("ul",Zv,[(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(a.colorsDefault,l=>(e.openBlock(),e.createBlock("li",{key:l,class:"item",onClick:i=>a.selectColor(l)},[e.createVNode("div",{style:{background:`url(${a.imgAlphaBase64})`},class:"alpha"},null,4),e.createVNode("div",{style:{background:l},class:"color"},null,4)],8,["onClick"]))),128))]),a.colorsHistory.length?(e.openBlock(),e.createBlock("ul",xv,[(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(a.colorsHistory,l=>(e.openBlock(),e.createBlock("li",{key:l,class:"item",onClick:i=>a.selectColor(l)},[e.createVNode("div",{style:{background:`url(${a.imgAlphaBase64})`},class:"alpha"},null,4),e.createVNode("div",{style:{background:l},class:"color"},null,4)],8,["onClick"]))),128))])):e.createCommentVNode("v-if",!0)])}yo.render=Wv;yo.__file="src/color/Colors.vue";var ut=e.defineComponent({components:{Saturation:vo,Hue:fo,Alpha:ho,Preview:Co,Sucker:go,Box:_o,Colors:yo},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 Bv(this.rgba,!0)}},created(){Object.assign(this,Qe(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:n,h:s,s:r,v:l}=Qe(a);Object.assign(this,{r:t,g:o,b:n,h:s,s:r,v:l}),this.setText()},handleFocus(a){this.$emit("inputFocus",a)},handleBlur(a){this.$emit("inputBlur",a)},selectHue(a){const{r:t,g:o,b:n,h:s,s:r,v:l}=Qe(a);Object.assign(this,{r:t,g:o,b:n,h:s,s:r,v:l}),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:n,a:s,h:r,s:l,v:i}=Qe(a);Object.assign(this,{r:t,g:o,b:n,a:s,h:r,s:l,v:i}),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:n,a:s,h:r,s:l,v:i}=Qe(a);Object.assign(this,{r:t,g:o,b:n,a:s,h:r,s:l,v:i}),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:n,a:s,h:r,s:l,v:i}=Qe(a);Object.assign(this,{r:t,g:o,b:n,a:s,h:r,s:l,v:i}),this.setText(),this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide(),this.$refs.hue.renderSlide()})},selectColor(a){const{r:t,g:o,b:n,a:s,h:r,s:l,v:i}=Qe(a);Object.assign(this,{r:t,g:o,b:n,a:s,h:r,s:l,v:i}),this.setText(),this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide(),this.$refs.hue.renderSlide()})}}});const qv={class:"color-set"};function Yv(a,t,o,n,s,r){const l=e.resolveComponent("Saturation"),i=e.resolveComponent("Hue"),c=e.resolveComponent("Alpha"),u=e.resolveComponent("Preview"),d=e.resolveComponent("Sucker"),p=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",qv,[e.createVNode(l,{ref:"saturation",color:a.rgbString,hsv:a.hsv,size:a.hueHeight,onSelectSaturation:a.selectSaturation},null,8,["color","hsv","size","onSelectSaturation"]),e.createVNode(i,{ref:"hue",hsv:a.hsv,width:a.hueWidth,height:a.hueHeight,onSelectHue:a.selectHue},null,8,["hsv","width","height","onSelectHue"]),e.createVNode(c,{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(u,{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(d,{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(p,{name:"HEX",color:a.modelHex,onInputColor:a.inputHex,onInputFocus:a.handleFocus,onInputBlur:a.handleBlur},null,8,["color","onInputColor","onInputFocus","onInputBlur"]),e.createVNode(p,{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)}ut.render=Yv;ut.__file="src/color/ColorPicker.vue";ut.install=a=>{a.component(ut.name,ut)};const Kv={class:"color-picker-wrapper"},Rn=e.defineComponent({__name:"AoColorPicker",props:{color:{}},emits:["update:color"],setup(a,{emit:t}){const o=e.ref(!1),n=e.ref(null),s=async()=>{o.value=!0,await e.nextTick(),setTimeout(()=>{window.addEventListener("click",r)},0)},r=i=>{const c=i.target;n.value&&!n.value.contains(c)&&(o.value=!1,window.removeEventListener("click",r))};e.onBeforeUnmount(()=>{window.removeEventListener("click",r)});const l=i=>{const{r:c,g:u,b:d,a:p}=i.rgba,m=`rgba(${c}, ${u}, ${d}, ${p})`;console.log("COLOR"),console.log(m),console.log(i),t("update:color",m)};return(i,c)=>(e.openBlock(),e.createElementBlock("div",Kv,[e.renderSlot(i.$slots,"clickable",{openPicker:s,bgColor:i.color}),o.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"pickerRef",ref:n},[e.createVNode(e.unref(ut),{class:"color-picker",theme:"light",color:i.color,onChangeColor:l},null,8,["color"])],512)):e.createCommentVNode("",!0)]))}});const Gv={class:"ao-mapping-card-project-phase__header"},Xv={class:"ao-card-project-item__title-line"},Qv={key:0,class:"ao-card-project-item-phase__estimation"},Jv={class:"ao-mapping-card-project-phase__footer"},ef={key:0,class:"ao-mapping-card-project-phase__footer-row ao-mapping-card-project-phase__footer-row--progress"},tf={class:"ao-mapping-card-project-phase__subitem"},af={class:"ao-mapping-card-project-phase__subitem"},of={key:0,class:"ao-mapping-card-project-phase__secondary"},nf={class:"ao-mapping-card-project-phase__deadline ao-mapping-card-project-phase__deadline--readonly"},sf=e.defineComponent({__name:"AoCondensedCardProjectItemPhase",props:{id:{},projectName:{},name:{},milestones:{},isEditable:{type:Boolean},deadline:{},active:{type:Boolean},color:{}},emits:["update:title","update:deadline","archivePhase","updatePhase","unarchivePhase"],setup(a,{emit:t}){const o=a,n=p=>{t("update:title",p)},s=e.computed(()=>{var p;return(p=o.milestones)==null?void 0:p.reduce((m,f)=>{var y;return m+((y=f.activities)==null?void 0:y.reduce((_,h)=>_+(h.estimation||0),0))},0)}),r=e.computed(()=>{var p;return(p=o.milestones)==null?void 0:p.length}),l=e.computed(()=>{var p;return(p=o.milestones)==null?void 0:p.filter(m=>m.status===Ot.done).length}),i=e.computed(()=>(l.value||0)/(r.value||1)),c=e.computed({get:()=>o.deadline??"",set:p=>t("update:deadline",p!=null&&p.length?p:null)}),u=e.computed({get:()=>o.color,set:p=>{t("updatePhase",{id:o.id,color:p})}}),d=(p,m)=>{const f=p.target;f.closest("button")||f.closest("input")||f.closest(".ao-title")||m()};return(p,m)=>(e.openBlock(),e.createBlock(Rn,{color:u.value,"onUpdate:color":m[2]||(m[2]=f=>u.value=f)},{clickable:e.withCtx(({openPicker:f,bgColor:y})=>[e.createVNode(Ba,{class:"ao-mapping-card-project-phase","is-clickable":p.isEditable,onClick:_=>d(_,f),style:e.normalizeStyle({"--ao-card-custom-bg":y})},e.createSlots({default:e.withCtx(()=>[e.createElementVNode("div",Xv,[e.createVNode(ne,{id:p.id,class:"ao-mapping-card-project-phase__title",title:p.name||"",level:4,"is-editable":p.isEditable,"onUpdate:title":n},null,8,["id","title","is-editable"]),s.value?(e.openBlock(),e.createElementBlock("span",Qv," ("+e.toDisplayString(s.value)+")",1)):e.createCommentVNode("",!0)])]),footer:e.withCtx(()=>[e.createElementVNode("div",Jv,[r.value?(e.openBlock(),e.createElementBlock("div",ef,[e.createElementVNode("div",tf,[e.createVNode(Q,{name:"MountainFlagOutlineRounded",size:"sm"}),e.createElementVNode("span",af,e.toDisplayString(l.value)+" / "+e.toDisplayString(r.value),1)]),e.createVNode(Na,{percentages:i.value,class:"ao-mapping-card-project-phase__progress",color:u.value},null,8,["percentages","color"]),p.$slots.secondary?(e.openBlock(),e.createElementBlock("div",of,[e.renderSlot(p.$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"])},[p.isEditable?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,"onUpdate:modelValue":m[1]||(m[1]=_=>c.value=_),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",nf,e.toDisplayString(e.unref(_a)(p.deadline)),1)],2)])]),_:2},[p.isEditable?{name:"header",fn:e.withCtx(()=>[e.createElementVNode("div",Gv,[e.createVNode(K,{class:"ao-mapping-card-project-phase__archive",color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:p.active?p.$t("archive"):p.$t("unarchive"),onClick:m[0]||(m[0]=e.withModifiers(()=>p.active?p.$emit("archivePhase",{id:p.id}):p.$emit("unarchivePhase",{id:p.id}),["stop"]))},null,8,["label"])])]),key:"0"}:void 0]),1032,["is-clickable","onClick","style"])]),_:3},8,["color"]))}});const lf={class:"ao-project-phase"},rf={key:0,class:"ao-project-phase__drag ao-card__drag"},cf={key:1,class:"ao-project-phase__col-phase"},df={key:2,class:"ao-mapping-project-phase__col-phase"},uf={key:0,class:"ao-project-phase__col-milestones"},pf={class:"ao-project-phase__milestones-list-footer"},mf=e.defineComponent({__name:"AoProjectPhase",props:{phase:{},closedStatus:{},users:{},isEditable:{type:Boolean},readonly:{type:Boolean}},emits:["addMilestone","updateMilestone","archiveMilestone","unarchiveMilestone","updatePhase","archivePhase","unarchivePhase"],setup(a,{emit:t}){const o=a,{t:n}=Ye();e.watch(()=>o.phase.milestones,(v,C)=>{Me(v,C)});const s=v=>{t("updatePhase",{id:o.phase.id,name:v})},r=v=>{t("updatePhase",{id:o.phase.id,deadline:v})},l=v=>{t("updatePhase",v)},i=e.computed(()=>o.phase.milestones.map(v=>Q0(v,o.closedStatus))),c=v=>{const{name:C,rank:N}=ot(i.value??[],"milestone",n);t("addMilestone",{name:C,rank:N,phaseId:v})},u=v=>{t("updateMilestone",v)},d=v=>{t("archiveMilestone",v)},p=v=>{t("unarchiveMilestone",v)},m=v=>{t("archivePhase",v)},f=v=>{t("unarchivePhase",v)},y=v=>{"added"in v?t("updateMilestone",{id:v.added.element.id,phaseId:o.phase.id,rank:pt(i.value,v.added.newIndex)}):"removed"in v||"moved"in v&&t("updateMilestone",{id:v.moved.element.id,rank:pt(i.value,v.moved.newIndex)})},_=Rt.useRoute(),h=e.computed(()=>_.path.includes("/mapping")),b=e.computed(()=>{var v;return o.phase.id!==((v=_.params)==null?void 0:v.phaseId)?{backgroundColor:"var(--ao-color-sheet)"}:o.phase.color?{backgroundColor:e3(o.phase.color)}:{backgroundColor:"var(--ao-color-primary-lightest)"}});return(v,C)=>(e.openBlock(),e.createElementBlock("li",lf,[e.createElementVNode("div",{class:"ao-project-phases__draggable-card",style:e.normalizeStyle(b.value)},[v.isEditable?(e.openBlock(),e.createElementBlock("div",rf,[e.createVNode(Q,{name:"DragIndicator",class:"ao-project-phase__drag-handle"})])):e.createCommentVNode("",!0),h.value?(e.openBlock(),e.createElementBlock("div",df,[e.createVNode(sf,{id:v.phase.id,milestones:i.value,name:v.phase.name,deadline:v.phase.deadline,active:v.phase.active,"is-editable":v.isEditable,color:v.phase.color,"onUpdate:deadline":r,"onUpdate:title":s,onArchivePhase:m,onUnarchivePhase:f,onUpdatePhase:l},null,8,["id","milestones","name","deadline","active","is-editable","color"])])):(e.openBlock(),e.createElementBlock("div",cf,[e.createVNode(dv,{id:v.phase.id,milestones:i.value,name:v.phase.name,deadline:v.phase.deadline,active:v.phase.active,"is-editable":v.isEditable,color:v.phase.color,"onUpdate:deadline":r,"onUpdate:title":s,onArchivePhase:m,onUnarchivePhase:f},null,8,["id","milestones","name","deadline","active","is-editable","color"])]))],4),h.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",uf,[e.createElementVNode("div",{class:"ao-project-phase__milestones",style:e.normalizeStyle(b.value)},[e.createVNode(e.unref(xe),e.mergeProps({class:"ao-project-phase__milestones-list",list:i.value,disabled:v.readonly||!v.isEditable,"item-key":"id",group:"kanban"},v.$attrs,{onChange:y}),{item:e.withCtx(({element:N})=>{var V;return[e.createVNode(Vv,{id:N.id,name:N.name,color:N.color,"phase-color":v.phase.color,activities:N.activities,deadline:N.deadline,active:N.active,"is-editable":!v.readonly&&v.isEditable,"is-draggable":!v.readonly&&v.isEditable,"closed-status":v.closedStatus,"is-selected":N.id===((V=v.$route.params)==null?void 0:V.milestoneId),assignee:N.assignee,important:N.important,readonly:v.readonly,class:e.normalizeClass(["ao-project-phase__milestone"]),onClick:B=>!v.readonly&&v.$router.push({name:e.unref(oe).milestone,params:{phaseId:v.phase.id,milestoneId:N.id}}),onUpdateMilestone:u,onArchiveMilestone:d,onUnarchiveMilestone:p},null,8,["id","name","color","phase-color","activities","deadline","active","is-editable","is-draggable","closed-status","is-selected","assignee","important","readonly","onClick"])]}),_:1},16,["list","disabled"]),e.createElementVNode("div",pf,[v.isEditable?(e.openBlock(),e.createBlock(We,{key:0,label:v.$t("project.milestone.add"),class:"ao-project-phase__milestone-add","icon-name":"Add",onClick:C[0]||(C[0]=()=>c(v.phase.id))},null,8,["label"])):e.createCommentVNode("",!0)])],4)]))]))}});const vf={class:"ao-project__phases"},ff={key:0,class:"ao-project-phase__phases-list-footer"},hf=e.createElementVNode("div",{class:"ao-project-phase__empty_drag"},null,-1),Cf={class:"ao-project-phase__col-phase"},gf=e.createElementVNode("div",{class:"ao-project-phase__col-milestones"},null,-1),bo=e.defineComponent({__name:"AoProjectPhases",props:{phases:{},closedStatus:{},isEditable:{type:Boolean},users:{},readonly:{type:Boolean}},emits:["addMilestone","updateMilestone","archiveMilestone","unarchiveMilestone","addPhase","updatePhase","archivePhase","unarchivePhase"],setup(a,{emit:t}){const o=a;e.watch(()=>o.phases,(m,f)=>{Me(m,f)});const n=m=>{t("addMilestone",m)},s=m=>{t("updateMilestone",m)},r=m=>{t("archiveMilestone",m)},l=m=>{t("unarchiveMilestone",m)},i=m=>{t("archivePhase",m)},c=m=>{t("unarchivePhase",m)},u=m=>{if(m.moved){const f=zt(m,o.phases??[]);t("updatePhase",{id:m.moved.element.id,rank:f})}},d=m=>{t("updatePhase",m)},p=m=>{t("addPhase",m)};return(m,f)=>(e.openBlock(),e.createElementBlock("div",vf,[e.createVNode(e.unref(xe),{class:"ao-project-phase__phases-list","model-value":m.phases,"item-key":"id",handle:".ao-card__drag",onChange:u},{item:e.withCtx(({element:y})=>[e.createVNode(mf,{phase:y,"is-editable":!m.readonly&&m.isEditable,"closed-status":m.closedStatus,users:m.users,readonly:m.readonly,onAddMilestone:n,onUpdateMilestone:s,onArchiveMilestone:r,onUnarchiveMilestone:l,onUpdatePhase:d,onArchivePhase:i,onUnarchivePhase:c},null,8,["phase","is-editable","closed-status","users","readonly"])]),_:1},8,["model-value"]),m.isEditable?(e.openBlock(),e.createElementBlock("div",ff,[hf,e.createElementVNode("div",Cf,[e.createVNode(We,{label:m.$t("project.phases.add"),"icon-name":"Add",class:"ao-project-phase__add-phase",onClick:p},null,8,["label"])]),gf])):e.createCommentVNode("",!0)]))}});const _f=["onSubmit"],yf={class:"ao-add-template-modal__form-body"},bf={class:"field__row"},kf={class:"ao-add-template-modal__form-footer"},jn=e.defineComponent({__name:"AoAddTemplateModal",props:{projectId:{},templates:{}},emits:["apply"],setup(a,{emit:t}){const o=a,n=e.computed(()=>o.templates.map(i=>({value:i.id,label:i.name}))),s=e.ref(null),r=i=>{s.value=i},l=()=>{s.value&&t("apply",s.value,o.projectId)};return(i,c)=>(e.openBlock(),e.createBlock(ya,{size:"sm"},{header:e.withCtx(()=>[e.createVNode(ne,{title:i.$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(l,["prevent"])},[e.createElementVNode("p",null,e.toDisplayString(i.$t("project.template.apply.notice")),1),e.createElementVNode("div",yf,[e.createElementVNode("div",bf,[e.createVNode(re,{value:s.value,options:n.value,detached:!0,onChange:r},null,8,["value","options"])])]),e.createElementVNode("footer",kf,[e.createVNode(K,{label:i.$t("project.template.apply.label"),type:"submit",color:"primary",variant:"solid",onClick:l},null,8,["label"])])],40,_f)]),_:1}))}});const wf=["onSubmit"],$f={class:"ao-save-template-modal__form-body"},Ef={class:"field__row"},Vf={class:"ao-field ao-field--inline"},Bf={class:"ao-field__label"},Nf={class:"ao-save-template-modal__phases"},Sf={class:"ao-field__label"},Mf={class:"ao-save-template-modal__phases-list"},Af=["value"],Tf={class:"ao-save-template-modal__form-footer"},Fn=e.defineComponent({__name:"AoSaveTemplateModal",props:{phases:{}},emits:["save"],setup(a,{emit:t}){const o=a,n=e.ref(""),s=e.ref([]);e.onMounted(()=>{s.value=o.phases.map(l=>l.id)});const r=()=>{n.value&&t("save",n.value,s.value)};return(l,i)=>(e.openBlock(),e.createBlock(ya,{size:"sm"},{header:e.withCtx(()=>[e.createVNode(ne,{title:l.$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(r,["prevent"])},[e.createElementVNode("div",$f,[e.createElementVNode("div",Ef,[e.createElementVNode("label",Vf,[e.createElementVNode("span",Bf,e.toDisplayString(l.$t("project.template.name.label"))+": ",1),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":i[0]||(i[0]=c=>n.value=c),type:"text"},null,512),[[e.vModelText,n.value]])])]),e.createElementVNode("div",Nf,[e.createElementVNode("div",Sf,e.toDisplayString(l.$t("project.template.phases.label")),1),e.createElementVNode("div",Mf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.phases,c=>(e.openBlock(),e.createElementBlock("label",{class:"ao-field ao-field--checkbox",key:c.id},[e.withDirectives(e.createElementVNode("input",{type:"checkbox",value:c.id,"onUpdate:modelValue":i[1]||(i[1]=u=>s.value=u)},null,8,Af),[[e.vModelCheckbox,s.value]]),e.createElementVNode("span",null,e.toDisplayString(c.name),1)]))),128))])])]),e.createElementVNode("footer",Tf,[e.createVNode(K,{label:l.$t("project.template.save.label"),type:"submit",color:"primary",variant:"solid",onClick:r},null,8,["label"])])],40,wf)]),_:1}))}});const Of=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)}}});const If={class:"tabbar-wrapper"},Lf=["onClick"];function Df(a,t,o,n,s,r){return e.openBlock(),e.createElementBlock("div",If,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.tabs,l=>(e.openBlock(),e.createElementBlock("button",{key:l.value,class:e.normalizeClass(["tab-button",{"tab-button--active":l.value===a.modelValue}]),type:"button",onClick:i=>a.selectTab(l.value)},e.toDisplayString(l.label),11,Lf))),128))])}const ko=I(Of,[["render",Df],["__scopeId","data-v-ff4e3297"]]),Pf={class:"ao-project"},Hf={class:"ao-project__body"},Rf=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}},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:n}=Ye(),s=e.computed(()=>o.phases.flatMap($=>$.milestones)),r=()=>{const{name:$,rank:k}=ot(o.phases,"phase",n);t("addPhase",{name:$,rank:k,projectId:o.project.id})},l=$=>{t("updatePhase",$)},i=$=>{t("archivePhase",$)},c=$=>{t("unarchivePhase",$)},u=$=>{t("copyPhaseToTemplate",$)},d=$=>{t("addMilestone",$)},p=$=>{t("updateMilestone",$)},m=$=>{t("archiveMilestone",$)},f=$=>{t("unarchiveMilestone",$)},y=$=>{t("addActivity",$)},_=$=>{t("update:activity",$)},h=$=>{t("archiveActivity",$)},b=$=>{t("unarchiveActivity",$)},v=$=>{t("addSubtask",$)},C=$=>{t("updateSubtask",$)},N=$=>{t("deleteSubtask",$)},V=e.computed(()=>s.value.flatMap($=>$.activities)),B=$=>{t("addFiles",$)},L=$=>{t("removeFile",$)},P=$=>{t("addComment",$)},R=$=>{t("updateComment",$)},F=$=>{t("removeComment",$)},z=e.ref(!1),T=e.ref(!1),j=($,k)=>{t("applyTemplate",{templateId:$,projectId:k}),z.value=!1},Y=($,k)=>{var M;const O=(M=o.templates)==null?void 0:M.at(-1),g=O?se.LexoRank.parse(O.rank).genNext():se.LexoRank.middle();t("saveTemplate",{templateName:$,rank:g.format(),phaseIds:k}),T.value=!1},Z=Rt.useRouter(),U=e.ref("overview"),E=[{label:"Overview",value:"overview"},{label:"Feed",value:"feed"},{label:"Mapping",value:"mapping"}];return e.watch(U,$=>{$==="feed"?(Z.push({name:oe.feed}),console.log("Navigating to feed...")):$==="overview"?(Z.push({name:oe.project}),console.log("Navigating to feed...")):$==="mapping"&&(Z.push({name:oe.mapping}),console.log("Navigating to feed..."))}),($,k)=>{const O=e.resolveComponent("RouterView");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",e.mergeProps({class:"ao-project-overview"},$.$attrs),[e.createElementVNode("div",Pf,[e.createVNode(Zt,null,{primary:e.withCtx(()=>[e.createVNode(ko,{tabs:E,modelValue:U.value,"onUpdate:modelValue":k[0]||(k[0]=g=>U.value=g)},null,8,["modelValue"]),e.createVNode(K,{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:k[1]||(k[1]=g=>$.$emit("update:showsArchived",!$.showsArchived))},null,8,["icon-name","label","aria-checked"])]),secondary:e.withCtx(()=>[$.isEditable===!0?(e.openBlock(),e.createBlock(K,{key:0,class:"ao-project-overview__save-as-template",color:"primary",label:$.$t("project.template.save.label"),onClick:k[2]||(k[2]=g=>T.value=!0)},null,8,["label"])):e.createCommentVNode("",!0),$.isEditable===!0?(e.openBlock(),e.createBlock(K,{key:1,class:"ao-project-overview__add-template",color:"primary",label:$.$t("project.template.apply.label"),onClick:k[3]||(k[3]=g=>z.value=!0)},null,8,["label"])):e.createCommentVNode("",!0)]),_:1}),e.createElementVNode("div",Hf,[e.createVNode(bo,{phases:$.phases,"closed-status":$.closedStatus,"is-editable":$.isEditable===!0,users:$.users,onAddMilestone:d,onUpdateMilestone:p,onArchiveMilestone:m,onUnarchiveMilestone:f,onAddPhase:r,onUpdatePhase:l,onArchivePhase:i,onUnarchivePhase:c,onCopyPhaseToTemplate:u},null,8,["phases","closed-status","is-editable","users"])])]),e.createVNode(O,{class:"ao-project__sidebar",phases:$.phases,"project-id":$.project.id,"project-name":$.project.name,users:$.users,"is-editable":$.isEditable===!0,"closed-status":$.closedStatus,onClose:k[4]||(k[4]=g=>$.$router.push({name:e.unref(oe).project})),onUpdateMilestone:p,onAddActivity:y,onUpdateActivity:_,onArchiveActivity:h,onUnarchiveActivity:b},null,8,["phases","project-id","project-name","users","is-editable","closed-status"]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(O,{name:"modal",activities:V.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,"onUpdate:activity":_,onAddSubtask:v,onUpdateSubtask:C,onDeleteSubtask:N,onAddFiles:B,onRemoveFile:L,onAddComment:P,onUpdateComment:R,onRemoveComment:F},{default:e.withCtx(({Component:g})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(g),null,{default:e.withCtx(M=>[e.renderSlot($.$slots,"activityDetailsBody",e.normalizeProps(e.guardReactiveProps(M)))]),_:2},1024))]),_:3},8,["activities","is-task-checkable","statuses","activity-types","phases","project","users","user-id","is-editable","attachment-enabled"])]))],16),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[T.value?(e.openBlock(),e.createBlock(Fn,{key:0,phases:$.phases,onClose:k[5]||(k[5]=g=>T.value=!1),onSave:Y},null,8,["phases"])):e.createCommentVNode("",!0),z.value?(e.openBlock(),e.createBlock(jn,{key:1,"project-id":$.project.id,templates:$.templates,onClose:k[6]||(k[6]=g=>z.value=!1),onApply:j},null,8,["project-id","templates"])):e.createCommentVNode("",!0)]))],64)}}});const jf={class:"ao-card-feed__header"},Ff={key:1,class:"ao-card-feed__header-secondary ao-card-feed__header-icons"},Uf={key:2,class:"ao-card-feed__header-secondary ao-card-feed__secondary"},zf={class:"ao-card-feed__body"},Zf={key:0,class:"ao-card-feed__breadcrumbs"},xf={class:e.normalizeClass(["ao-card-feed__title-group"])},Wf={class:"ao-card-feed__title-line"},qf={key:0,class:"ao-card-feed__slug"},Yf={key:1,class:"ao-card-feed__deadline"},Kf={class:"ao-card-feed__footer"},Gf={class:"ao-card-feed__footer-row"},Xf={class:"ao-assignees"},Qf={key:0,class:"ao-assignee"},Jf={key:0,class:"ao-card-feed__subitems"},eh={key:0,class:"ao-card-feed__subitem"},th={class:"ao-card-feed__subitem"},ah={key:1,class:"ao-card-feed__subitem"},oh={class:"ao-card-feed__subitem"},nh={class:"ao-card-feed__footer-row"},sh={key:0,class:"ao-card-feed__progress-wrapper"},lh={class:"ao-card-feed__subitem"},rh={class:"ao-card-feed__subitem"},wo=e.defineComponent({__name:"AoCardFeed",props:{id:{},name:{},projectName:{},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"],setup(a,{emit:t}){const o=a,n=e.computed(()=>o.tagType==="milestone"?o.milestoneName:o.projectName),s=e.computed(()=>o.tagType==="milestone"?o.milestoneColor:o.projectColor),r=f=>{t("updateActivity",{id:o.id,name:f})},l=e.computed(()=>o.tagType==="milestone"&&o.phaseName?`${o.phaseName}`:o.phaseName&&o.milestoneName?`${o.phaseName} / ${o.milestoneName}`:""),i=e.computed(()=>o.assignee?[o.assignee]:[]),c=e.computed(()=>_a(o.deadline)),u=f=>{t("removeAssignee",f)},d=e.computed(()=>{var f;return(f=o.tasks)==null?void 0:f.length}),p=e.computed(()=>{var f;return(f=o.tasks)==null?void 0:f.filter(y=>y.isDone).length}),m=e.computed(()=>(p.value||0)/(d.value||1));return(f,y)=>(e.openBlock(),e.createBlock(Ba,{class:e.normalizeClass(["ao-card-feed",{"ao-card-feed--closed":f.isClosed}]),"is-clickable":!0},{header:e.withCtx(()=>[e.createElementVNode("div",jf,[n.value?(e.openBlock(),e.createBlock(Tt,{key:0,label:n.value,class:"ao-card-feed__project",variant:"solid",color:f.projectColor?void 0:"primary","raw-color":s.value},null,8,["label","color","raw-color"])):e.createCommentVNode("",!0),f.isPrivate||f.important||f.isClosed?(e.openBlock(),e.createElementBlock("div",Ff,[f.isPrivate?(e.openBlock(),e.createBlock(Q,{key:0,name:"Lock",class:"ao-card-feed__warning",size:"sm"})):e.createCommentVNode("",!0),f.important?(e.openBlock(),e.createBlock(Q,{key:1,name:"FlagRounded",class:"ao-card-feed__important",size:"sm"})):e.createCommentVNode("",!0),f.isClosed?(e.openBlock(),e.createBlock(Q,{key:2,name:"CheckSmallRounded",class:"ao-card-feed__closed"})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),f.$slots.secondary?(e.openBlock(),e.createElementBlock("div",Uf,[e.renderSlot(f.$slots,"secondary")])):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[e.createElementVNode("div",zf,[l.value?(e.openBlock(),e.createElementBlock("span",Zf,e.toDisplayString(l.value),1)):e.createCommentVNode("",!0),e.createElementVNode("div",xf,[e.createElementVNode("div",Wf,[f.slug?(e.openBlock(),e.createElementBlock("span",qf,e.toDisplayString(f.slug)+": ",1)):e.createCommentVNode("",!0),e.createVNode(ne,{id:f.id,title:f.name,level:5,"is-editable":f.isEditable,"onUpdate:title":r,class:"ao-card-feed__title-inline"},null,8,["id","title","is-editable"])])]),f.deadline?(e.openBlock(),e.createElementBlock("span",Yf,e.toDisplayString(c.value),1)):e.createCommentVNode("",!0)])]),footer:e.withCtx(()=>[e.createElementVNode("div",Kf,[e.createElementVNode("div",Gf,[e.createElementVNode("ul",Xf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,_=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:_.id},[_?(e.openBlock(),e.createElementBlock("li",Qf,[e.createVNode(ke,{"user-name":e.unref(yn)(_),"avatar-url":_.avatarUrl,"is-closable":!0,onClose:()=>u(_.id)},null,8,["user-name","avatar-url","onClose"])])):e.createCommentVNode("",!0)],64))),128))]),f.comments||f.attachments?(e.openBlock(),e.createElementBlock("ul",Jf,[f.comments?(e.openBlock(),e.createElementBlock("li",eh,[e.createVNode(Q,{name:"ChatOutline",size:"sm"}),e.createElementVNode("span",th,e.toDisplayString(f.comments),1)])):e.createCommentVNode("",!0),f.attachments?(e.openBlock(),e.createElementBlock("li",ah,[e.createVNode(Q,{name:"AttachFileRounded",size:"sm"}),e.createElementVNode("span",oh,e.toDisplayString(f.attachments),1)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",nh,[f.tasks&&f.tasks.length?(e.openBlock(),e.createElementBlock("div",sh,[e.createElementVNode("div",lh,[e.createVNode(Q,{name:"SelectCheckBox",size:"sm"}),e.createElementVNode("span",rh,e.toDisplayString(p.value)+" / "+e.toDisplayString(d.value),1)]),e.createVNode(Na,{percentages:m.value,class:"ao-card-feed__progress"},null,8,["percentages"])])):e.createCommentVNode("",!0)])])]),_:3},8,["class"]))}});const ih={class:"ao-project-milestone"},ch={class:"ao-project-milestone__header"},dh={class:"ao-project-milestone__header_line"},uh={class:"ao-project-milestone__header_line"},ph={class:"ao-project-milestone__title"},mh={key:0,class:"ao-fieldset ao-milestone__fieldset"},vh={class:"ao-field__row ao-milestone__field-row"},fh={class:"ao-field ao-field--inline"},hh={class:"ao-field__row ao-milestone__field-row"},Ch={class:"ao-field ao-milestone__field-multiselect"},gh=["onClick"],_h={class:"ao-project-milestone__body"},yh={key:0,class:"ao-project-milestone__footer"},Xo=e.defineComponent({__name:"AoProjectOverviewMilestoneDetails",props:{milestoneId:{},users:{},projectId:{},phases:{},phaseId:{},isEditable:{type:Boolean},closedStatus:{}},emits:["close","addActivity","updateMilestone","updateActivity","archiveActivity","unarchiveActivity"],setup(a,{emit:t}){const o=a,{t:n}=Ye(),s=e.computed(()=>{var v;return(v=o.phases)==null?void 0:v.find(C=>C.id===o.phaseId)}),r=e.computed(()=>{var v;return(v=o.phases)==null?void 0:v.flatMap(C=>C.milestones)}),l=e.computed(()=>{var v;return(v=r.value)==null?void 0:v.find(C=>C.id===o.milestoneId)}),i=e.computed(()=>{var v;return(v=l.value)==null?void 0:v.activities});e.watch(i,(v,C)=>{Me(v,C)});const c=v=>{t("close",v)},u=()=>{const{name:v,rank:C}=ot(i.value??[],"activity",n);t("addActivity",{milestoneId:o.milestoneId,name:v,rank:C,projectId:o.projectId})},d=v=>{t("updateActivity",v)},p=v=>{i.value&&"moved"in v&&t("updateActivity",{id:v.moved.element.id,rank:pt(i.value,v.moved.newIndex)})},m=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})}}),f=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})}}),y=v=>o.closedStatus?Qa(v,o.closedStatus):!1,_=e.computed(()=>{var v;return((v=o.users)==null?void 0:v.map(C=>({label:`${C.firstName} ${C.lastName}`,value:C.id,avatar:C.avatarUrl})))||[]}),h=e.computed({get(){var v,C;return(C=(v=l.value)==null?void 0:v.assignee)!=null&&C.id?[l.value.assignee.id]:[]},set(v){t("updateMilestone",{id:o.milestoneId,assigneeId:v[0]??null})}}),b=e.computed({get(){var v;return((v=l.value)==null?void 0:v.important)??!1},set(v){t("updateMilestone",{id:o.milestoneId,important:v})}});return(v,C)=>{var N;return e.openBlock(),e.createElementBlock("div",ih,[e.createElementVNode("header",ch,[e.createElementVNode("div",dh,[e.createVNode(K,{"icon-name":"CloseRounded",variant:"ghost",size:"sm",class:"ao-milestone__close",onClick:c})]),e.createElementVNode("div",uh,[e.createElementVNode("div",ph,[e.createVNode(ne,{title:((N=l.value)==null?void 0:N.name)||v.milestoneId,level:5},null,8,["title"]),e.createVNode(qa,{modelValue:b.value,"onUpdate:modelValue":C[0]||(C[0]=V=>b.value=V),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",mh,[e.createElementVNode("div",vh,[e.createElementVNode("label",fh,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":C[1]||(C[1]=V=>f.value=V),class:"ao-milestone__field ao-milestone__date-field",type:"date"},null,512),[[e.vModelText,f.value,void 0,{lazy:!0}]])])]),e.createElementVNode("div",hh,[e.createElementVNode("label",Ch,[e.createVNode(re,{modelValue:h.value,"onUpdate:modelValue":C[2]||(C[2]=V=>h.value=V),options:_.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:V,handleTagRemove:B})=>[e.createVNode(ke,{"user-name":V.label,"avatar-url":V.avatar,"is-closable":!0,onClose:L=>B(V,L)},null,8,["user-name","avatar-url","onClose"])]),_:1},8,["modelValue","options","placeholder","disabled","caret"])])]),e.createVNode(Rn,{color:m.value,"onUpdate:color":C[3]||(C[3]=V=>m.value=V)},{clickable:e.withCtx(({openPicker:V,bgColor:B})=>[e.createElementVNode("button",{style:e.normalizeStyle({background:B}),class:"color-button",onClick:V},null,12,gh)]),_:1},8,["color"])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",_h,[e.createVNode(e.unref(xe),e.mergeProps({class:"ao-project-milestone__activities",list:i.value,disabled:!v.isEditable,"item-key":"id",group:"kanban"},v.$attrs,{onChange:p}),{item:e.withCtx(({element:V})=>{var B,L,P,R,F;return[e.createVNode(wo,{id:V.id,name:V.name||V.id,"phase-name":(B=s.value)==null?void 0:B.name,"milestone-name":(L=l.value)==null?void 0:L.name,"milestone-color":(P=l.value)==null?void 0:P.color,deadline:V.deadline,important:V.important,users:v.users,assignee:V.assignee,slug:V.slug,comments:(R=V.comments)==null?void 0:R.length,attachments:(F=V.attachments)==null?void 0:F.length,tasks:V.tasks,"is-editable":v.isEditable,"is-private":V.private,"is-closed":y(V),onClick:z=>v.$router.push({name:e.unref(oe).activity,params:{milestoneId:v.milestoneId,activityId:V.id}}),onUpdateActivity:d,onRemoveAssignee:()=>d({id:V.id,assigneeId:null})},e.createSlots({_:2},[v.isEditable?{name:"secondary",fn:e.withCtx(()=>[v.isEditable&&V.active?(e.openBlock(),e.createBlock(K,{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:V.id}),["stop"])},null,8,["label","onClick"])):e.createCommentVNode("",!0),v.isEditable&&!V.active?(e.openBlock(),e.createBlock(K,{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:V.id}),["stop"])},null,8,["label","onClick"])):e.createCommentVNode("",!0)]),key:"0"}:void 0]),1032,["id","name","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",yh,[e.createVNode(We,{"icon-name":"Add",label:v.$t("project.activity.add"),onClick:u},null,8,["label"])])):e.createCommentVNode("",!0)])])}}});const bh=e.defineComponent({__name:"AoProjectOverviewActivityDetails",props:{phaseId:{},milestoneId:{},activityId:{},activityTypes:{},activities:{},isTaskCheckable:{type:Function},statuses:{},phases:{},users:{},project:{},userId:{},isEditable:{type:Boolean},attachmentEnabled:{type:Boolean}},emits:["update:activity","addSubtask","updateSubtask","deleteSubtask","addFiles","removeFile","addComment","updateComment","removeComment"],setup(a,{emit:t}){const o=a,n=e.computed(()=>{var h;return(h=o.phases)==null?void 0:h.find(b=>b.id===o.phaseId)}),s=e.computed(()=>{var h;return(h=o.phases)==null?void 0:h.flatMap(b=>b.milestones)}),r=e.computed(()=>{var h;return(h=s.value)==null?void 0:h.find(b=>b.id===o.milestoneId)}),l=e.computed(()=>{var h;return(h=o.activities)==null?void 0:h.find(b=>b.id===o.activityId)}),i=h=>{t("update:activity",h)},c=h=>{t("addSubtask",h)},u=h=>{t("updateSubtask",h)},d=h=>{t("deleteSubtask",h)},p=h=>{t("addFiles",h)},m=h=>{t("removeFile",h)},f=h=>{t("addComment",h)},y=h=>{t("updateComment",h)},_=h=>{t("removeComment",h)};return(h,b)=>{var v,C;return l.value?(e.openBlock(),e.createBlock(po,{key:0,activity:l.value,"activity-types":h.activityTypes,"milestone-id":h.milestoneId,"template-activities":h.activities,"is-template":!1,users:h.users,"user-id":h.userId,"is-task-checkable":h.isTaskCheckable,statuses:h.statuses,breadcrumbs:`${(v=n.value)==null?void 0:v.name} / ${(C=r.value)==null?void 0:C.name}`,"is-editable":h.isEditable,"attachment-enabled":h.attachmentEnabled,projects:[h.project],onClose:h.$router.back,"onUpdate:activity":i,onAddSubtask:c,onUpdateSubtask:u,onDeleteSubtask:d,onAddFiles:p,onRemoveFile:m,onAddComment:f,onUpdateComment:y,onRemoveComment:_},{default:e.withCtx(N=>[e.renderSlot(h.$slots,"default",e.normalizeProps(e.guardReactiveProps(N)))]),_:3},8,["activity","activity-types","milestone-id","template-activities","users","user-id","is-task-checkable","statuses","breadcrumbs","is-editable","attachment-enabled","projects","onClose"])):e.createCommentVNode("",!0)}}}),kh={class:"ao-col-header"},wh=e.defineComponent({__name:"AoColHeader",props:{title:{},items:{}},setup(a){return(t,o)=>(e.openBlock(),e.createElementBlock("header",kh,[e.createVNode(ne,{title:t.title,class:"ao-col-header__title",level:4},null,8,["title"]),t.items?(e.openBlock(),e.createBlock(Tt,{key:0,label:t.items,class:"ao-col-header__items",variant:"solid",color:"primary"},null,8,["label"])):e.createCommentVNode("",!0)]))}});function $h(a){return e.getCurrentScope()?(e.onScopeDispose(a),!0):!1}function ma(a){return typeof a=="function"?a():e.unref(a)}const Eh=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Vh=a=>a!=null,At=()=>{};function Bh(a,t){function o(...n){return new Promise((s,r)=>{Promise.resolve(a(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(s).catch(r)})}return o}function Nh(a,t={}){let o,n,s=At;const r=i=>{clearTimeout(i),s(),s=At};return i=>{const c=ma(a),u=ma(t.maxWait);return o&&r(o),c<=0||u!==void 0&&u<=0?(n&&(r(n),n=null),Promise.resolve(i())):new Promise((d,p)=>{s=t.rejectOnCancel?p:d,u&&!n&&(n=setTimeout(()=>{o&&r(o),n=null,d(i())},u)),o=setTimeout(()=>{n&&r(n),n=null,d(i())},c)})}}function Sh(a,t=200,o={}){return Bh(Nh(t,o),a)}function Ua(a){var t;const o=ma(a);return(t=o==null?void 0:o.$el)!=null?t:o}const Mh=Eh?window:void 0;function Ah(){const a=e.ref(!1),t=e.getCurrentInstance();return t&&e.onMounted(()=>{a.value=!0},t),a}function Th(a){const t=Ah();return e.computed(()=>(t.value,!!a()))}function Oh(a,t,o={}){const{root:n,rootMargin:s="0px",threshold:r=.1,window:l=Mh,immediate:i=!0}=o,c=Th(()=>l&&"IntersectionObserver"in l),u=e.computed(()=>{const y=ma(a);return(Array.isArray(y)?y:[y]).map(Ua).filter(Vh)});let d=At;const p=e.ref(i),m=c.value?e.watch(()=>[u.value,Ua(n),p.value],([y,_])=>{if(d(),!p.value||!y.length)return;const h=new IntersectionObserver(t,{root:Ua(_),rootMargin:s,threshold:r});y.forEach(b=>b&&h.observe(b)),d=()=>{h.disconnect(),d=At}},{immediate:i,flush:"post"}):At,f=()=>{d(),m(),p.value=!1};return $h(f),{isSupported:c,isActive:p,pause(){d(),p.value=!1},resume(){p.value=!0},stop:f}}const Ih={class:e.normalizeClass(["ao-list-kanban"])},Lh={class:"ao-list-kanban__header"},Dh={key:0,class:"ao-list-kanban__end ao-list-kanban__end--loading"},Ph={key:1,class:"ao-list-kanban__end"},Hh={key:0,class:"ao-list-kanban__no-more"},Rh={key:1,class:"ao-list-kanban__divider"},jh={key:1,class:"ao-list-kanban__footer"},Fh=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"],setup(a,{emit:t}){const o=a,n=e.ref(!1),s=e.ref(null);Oh(s,([{isIntersecting:d}])=>{n.value=d}),e.watch(n,d=>{d&&o.hasMore&&!o.isLoading&&t("loadMore")});const r=d=>{var p;return o.isEditable===!0?!0:o.userId&&o.isEditable==="only-own"?o.userId===((p=d.assignee)==null?void 0:p.id):!1},l=d=>{t("selectActivity",d)},i=d=>{t("updateActivity",d)},c=d=>{"added"in d?t("updateActivity",{id:d.added.element.id,statusId:o.status.id,rank:pt(o.list,d.added.newIndex)}):"removed"in d||"moved"in d&&t("updateActivity",{id:d.moved.element.id,rank:pt(o.list,d.moved.newIndex)})},u=e.ref(!1);return(d,p)=>(e.openBlock(),e.createElementBlock("div",Ih,[d.title||d.$slots.header?e.renderSlot(d.$slots,"header",{key:0},()=>{var m;return[e.createElementVNode("div",Lh,[d.title?(e.openBlock(),e.createBlock(wh,{key:0,title:d.title,level:3,items:(m=d.list)==null?void 0:m.length},null,8,["title","items"])):e.createCommentVNode("",!0)])]}):e.createCommentVNode("",!0),e.createVNode(e.unref(xe),e.mergeProps({class:["ao-list-kanban__list",u.value?"ao-list-kanban__transition":void 0],list:d.list,"item-key":"id",group:"kanban","ghost-class":"ao-list-kanban__ghost",animation:"200"},d.$attrs,{draggable:".ao-list-draggable",disabled:!d.isEditable,onChange:c,onStart:p[0]||(p[0]=m=>u.value=!0),onEnd:p[1]||(p[1]=m=>u.value=!1),"component-data":{tag:"transition-group",name:"ao-list-kanban__transition"}}),{item:e.withCtx(({element:m})=>{var f,y,_,h,b,v,C,N,V;return[e.createVNode(wo,{class:e.normalizeClass(r(m)?"ao-list-draggable":""),id:m.id,name:m.name,"project-name":(f=m.project)==null?void 0:f.name,"project-color":(y=m.project)==null?void 0:y.color,"phase-name":(h=(_=m.milestone)==null?void 0:_.phase)==null?void 0:h.name,"milestone-name":(b=m.milestone)==null?void 0:b.name,"milestone-color":(v=m.milestone)==null?void 0:v.color,deadline:m.deadline,rules:((C=m.rules)==null?void 0:C.length)||0,tasks:m.tasks,description:m.description,important:m.important,type:m.type,comments:(N=m.comments)==null?void 0:N.length,attachments:(V=m.attachments)==null?void 0:V.length,users:d.users,assignee:m.assignee,slug:m.slug,"is-editable":r(m),"is-private":m.private,"tag-type":d.tagType,onUpdateActivity:[B=>r(m)&&i(B),()=>r(m)&&i],onClick:()=>l(m.id),onRemoveAssignee:()=>r(m)&&i({id:m.id,assigneeId:null})},{secondary:e.withCtx(()=>[r(m)&&m.active?(e.openBlock(),e.createBlock(K,{key:0,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:d.$t("feed.activity.archive"),onClick:e.withModifiers(()=>d.$emit("archiveActivity",{id:m.id}),["stop"])},null,8,["label","onClick"])):e.createCommentVNode("",!0),r(m)&&!m.active?(e.openBlock(),e.createBlock(K,{key:1,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:d.$t("feed.activity.unarchive"),onClick:e.withModifiers(()=>d.$emit("unarchiveActivity",{id:m.id}),["stop"])},null,8,["label","onClick"])):e.createCommentVNode("",!0)]),_:2},1032,["class","id","name","project-name","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(()=>[d.isLoading?(e.openBlock(),e.createElementBlock("div",Dh,[e.createVNode(Q,{name:"Loading"})])):d.hasMore?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"scrollEnd",ref:s,class:"ao-list-kanban__end"},null,512)):(e.openBlock(),e.createElementBlock("div",Ph,[d.noMoreLabel?(e.openBlock(),e.createElementBlock("span",Hh,e.toDisplayString(d.noMoreLabel),1)):d.isEditable?(e.openBlock(),e.createElementBlock("span",Rh)):e.createCommentVNode("",!0)]))]),_:1},16,["class","list","disabled"]),d.$slots.footer||d.footerLabel?(e.openBlock(),e.createElementBlock("div",jh,[e.renderSlot(d.$slots,"footer",{},()=>[d.isEditable?(e.openBlock(),e.createBlock(We,{key:0,"icon-name":"AddBoxOutlineRounded",label:d.footerLabel,onClick:p[2]||(p[2]=m=>d.$emit("add"))},null,8,["label"])):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)]))}});const Uh={class:"ao-field ao-search-field"},zh=["value","placeholder","onKeypress"],Zh=e.defineComponent({__name:"AoSearchField",props:{modelValue:{},delay:{default:250},placeholder:{default:"Search"}},emits:["update:modelValue","clear"],setup(a,{emit:t}){const o=a,n=async l=>{const c=l.target.value;t("update:modelValue",c,l)},s=Sh(n,o.delay),r=l=>{t("clear",l)};return(l,i)=>(e.openBlock(),e.createElementBlock("div",Uh,[e.createElementVNode("input",{value:l.modelValue,type:"text",class:"ao-field__input ao-search-field__input",placeholder:l.placeholder,onInput:i[0]||(i[0]=(...c)=>e.unref(s)&&e.unref(s)(...c)),onKeypress:e.withKeys(n,["enter"])},null,40,zh),e.createVNode(Q,{name:"SearchRounded",class:e.normalizeClass(`ao-search-field__icon ao-search-field__action ${l.modelValue?"":"ao-search-field__action--visible"}`)},null,8,["class"]),e.createVNode(K,{"icon-name":"CloseRounded",size:"sm",color:"primary",corners:"round",class:e.normalizeClass(`ao-search-field__button ao-search-field__action ${l.modelValue?"ao-search-field__action--visible":""}`),onClick:r},null,8,["class"])]))}});const xh={class:"ao-feed"},Wh={class:"ao-feed__filters"},qh={class:"ao-feed__body"},Un=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}},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"],setup(a,{emit:t}){const o=a,{t:n}=Ye();function s(k,O){t("toast",k,O)}const r=e.toRef(o,"activities"),l=async(k,O)=>{await t("selectActivity",k,O)},i=e.ref({}),c=e.ref(!1),u=e.ref(!1),d=e.computed(()=>o.project?"milestone":"project");e.watch([()=>o.statuses,()=>o.activities,()=>o.initialActivityId,()=>o.initialActivitySlug],async([k,O,g,M],[q,x])=>{i.value=Object.fromEntries(k.map(D=>[D.id,O.filter(S=>{var H;return((H=S.status)==null?void 0:H.id)===D.id})])),g&&!c.value?(l(g,null),c.value=!0):M&&!c.value&&(l(null,M),c.value=!0),u.value&&Me(O,x)},{immediate:!0});const p=e.computed(()=>{var k;return!o.selectedActivity||!o.selectedActivity.milestone?"":`${((k=o.selectedActivity.milestone.phase)==null?void 0:k.name)??""} / ${o.selectedActivity.milestone.name??""}`}),m=k=>{var x,D;const O=(x=o.activities)==null?void 0:x.at(-1),g=O?se.LexoRank.parse(O.rank).genNext():se.LexoRank.middle(),M=((D=o.activities)==null?void 0:D.length)??0,q={name:n("activity.defaultName",{idx:M+1}),rank:g.format(),statusId:k.id};o.filters.assigneeId.length>0&&(q.assigneeId=o.filters.assigneeId[0]),o.filters.projectId.length>0&&(q.projectId=o.filters.projectId[0]),o.filters.typeId.length>0&&(q.typeId=o.filters.typeId[0]),u.value=!0,t("addActivity",q)},f=(k,O)=>{u.value=!1,t("update:filters",{...o.filters,[k]:O})},y=e.computed(()=>o.project?[o.project]:o.projects??[]),_=e.computed(()=>y.value.map(k=>({value:k.id,label:k.name}))),h=e.computed(()=>{var k;return(k=o.activityTypes)==null?void 0:k.map(O=>({value:O.id,label:O.name}))}),b=e.computed(()=>o.users.map(k=>({value:k.id,label:`${k.firstName} ${k.lastName}`,avatar:k.avatarUrl}))),v=k=>{o.selectedActivity&&t("update:activity",k)},C=k=>{t("update:activity",k)},N=k=>{t("archiveActivity",k)},V=k=>{t("unarchiveActivity",k)},B=k=>{u.value=!1,t("update:searchText",k)},L=k=>{u.value=!1,t("clear:searchText",k)},P=k=>{o.selectedActivity&&t("addSubtask",k)},R=k=>{o.selectedActivity&&t("updateSubtask",k)},F=k=>{o.selectedActivity&&t("deleteSubtask",k)},z=k=>{t("addFiles",k)},T=k=>{t("removeFile",k)},j=k=>{o.selectedActivity&&t("addComment",{...k,activityId:o.selectedActivity.id})},Y=k=>{const{id:O}=o.selectedActivity||{};O&&t("updateComment",k)},Z=k=>{const{id:O}=o.selectedActivity||{};O&&t("removeComment",k)},U=Rt.useRouter(),E=e.ref("feed"),$=[{label:"Overview",value:"overview"},{label:"Feed",value:"feed"},{label:"Mapping",value:"mapping"}];return e.watch(E,k=>{k==="feed"?(U.push({name:oe.feed}),console.log("Navigating to feed...")):k==="overview"?(U.push({name:oe.project}),console.log("Navigating to feed...")):k==="mapping"&&(U.push({name:oe.mapping}),console.log("Navigating to feed..."))}),(k,O)=>{var g;return e.openBlock(),e.createElementBlock("div",xh,[e.createVNode(Zt,null,{primary:e.withCtx(()=>[e.createElementVNode("div",Wh,[e.createVNode(ko,{tabs:$,modelValue:E.value,"onUpdate:modelValue":O[0]||(O[0]=M=>E.value=M)},null,8,["modelValue"]),e.createVNode(Zh,{"model-value":k.searchText,placeholder:k.$t("feed.search.placeholder"),class:"ao-feed__search","onUpdate:modelValue":B,onClear:L},null,8,["model-value","placeholder"]),o.project?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(re,{key:0,"model-value":k.filters[e.unref(Je).project],mode:"tags",options:_.value,"close-on-select":!1,searchable:!0,class:"ao-feed__filter ao-feed__filter__projects",placeholder:k.$t("feed.filters.project.placeholder"),"onUpdate:modelValue":O[1]||(O[1]=M=>f(e.unref(Je).project,M))},null,8,["model-value","options","placeholder"])),h.value?(e.openBlock(),e.createBlock(re,{key:1,"model-value":k.filters[e.unref(Je).type],mode:"tags",options:h.value,"close-on-select":!1,searchable:!0,class:"ao-feed__filter ao-feed__filter__types",placeholder:k.$t("feed.filters.activityType.placeholder"),"onUpdate:modelValue":O[2]||(O[2]=M=>f(e.unref(Je).type,M))},null,8,["model-value","options","placeholder"])):e.createCommentVNode("",!0),b.value.length?(e.openBlock(),e.createBlock(re,{key:2,"model-value":k.filters[e.unref(Je).assignee],mode:"tags",options:b.value,"close-on-select":!1,searchable:!0,class:"ao-feed__filter ao-feed__filter__assignees",placeholder:k.$t("feed.filters.assignee.placeholder"),"onUpdate:modelValue":O[3]||(O[3]=M=>f(e.unref(Je).assignee,M))},{tag:e.withCtx(({option:M,handleTagRemove:q})=>[e.createVNode(ke,{"user-name":M.label,"avatar-url":M.avatar,"is-closable":!0,onClose:x=>q(M,x)},null,8,["user-name","avatar-url","onClose"])]),_:1},8,["model-value","options","placeholder"])):e.createCommentVNode("",!0)]),e.createVNode(K,{class:"ao-feed__only-non-assigned",size:"sm","icon-name":k.showsOnlyNonAssigned?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:k.$t("feed.filters.showsOnlyNonAssigned.label"),role:"checkbox","aria-checked":k.showsOnlyNonAssigned,onClick:O[4]||(O[4]=M=>k.$emit("update:showsOnlyNonAssigned",!k.showsOnlyNonAssigned))},null,8,["icon-name","label","aria-checked"]),e.createVNode(K,{class:"ao-feed__only-important",size:"sm","icon-name":k.showsOnlyImportant?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:k.$t("feed.filters.showsOnlyImportant.label"),role:"checkbox","aria-checked":k.showsOnlyImportant,onClick:O[5]||(O[5]=M=>k.$emit("update:showsOnlyImportant",!k.showsOnlyImportant))},null,8,["icon-name","label","aria-checked"]),e.createVNode(K,{class:"ao-feed__show-archived",size:"sm","icon-name":k.showsArchivedActivities?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:k.$t("feed.filters.showsArchivedActivities.label"),role:"checkbox","aria-checked":k.showsArchivedActivities,onClick:O[6]||(O[6]=M=>k.$emit("update:showsArchivedActivities",!k.showsArchivedActivities))},null,8,["icon-name","label","aria-checked"])]),_:1}),e.createElementVNode("div",qh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.statuses,M=>(e.openBlock(),e.createBlock(Fh,{key:M.id,status:M,list:i.value[M.id],title:M.name,"footer-label":k.$t("feed.activity.add"),users:k.users,"user-id":k.userId,"is-editable":k.isEditable,tagType:d.value,onAdd:()=>m(M),onSelectActivity:l,onArchiveActivity:N,onUnarchiveActivity:V,onUpdateActivity:C},null,8,["status","list","title","footer-label","users","user-id","is-editable","tagType","onAdd"]))),128))]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[k.selectedActivity?(e.openBlock(),e.createBlock(po,{key:0,activity:k.selectedActivity,"activity-types":k.activityTypes,"milestone-id":(g=k.selectedActivity.milestone)==null?void 0:g.id,"template-activities":r.value,users:k.users,"user-id":k.userId,"is-task-checkable":k.isTaskCheckable,statuses:k.statuses,breadcrumbs:p.value,"is-editable":k.isEditable,"attachment-enabled":k.attachmentEnabled,projects:y.value,onClose:O[7]||(O[7]=()=>l(null,null)),"onUpdate:activity":v,onAddSubtask:P,onUpdateSubtask:R,onDeleteSubtask:F,onAddFiles:z,onRemoveFile:T,onAddComment:j,onUpdateComment:Y,onRemoveComment:Z,onToast:s},{default:e.withCtx(M=>[e.renderSlot(k.$slots,"activityDetailsBody",e.normalizeProps(e.guardReactiveProps(M)))]),_:3},8,["activity","activity-types","milestone-id","template-activities","users","user-id","is-task-checkable","statuses","breadcrumbs","is-editable","attachment-enabled","projects"])):e.createCommentVNode("",!0)]))])}}});const Yh={class:"ao-project-mapping"},Kh={class:"ao-project-mapping-mapping__body"},Gh={class:"ao-project-mapping-mapping__phases"},Xh={key:0,class:"ao-project-mapping-mapping__image-wrapper"},Qh=["src","alt"],Jh=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:n}=Ye(),s=()=>{const{name:h,rank:b}=ot(o.phases,"phase",n);t("addPhase",{name:h,rank:b,projectId:o.project.id})},r=h=>{t("updatePhase",h)},l=h=>{t("archivePhase",h)},i=h=>{t("unarchivePhase",h)},c=h=>{t("copyPhaseToTemplate",h)},u=e.ref(!1),d=e.ref(!1),p=(h,b)=>{t("applyTemplate",{templateId:h,projectId:b}),u.value=!1},m=(h,b)=>{var N;const v=(N=o.templates)==null?void 0:N.at(-1),C=v?se.LexoRank.parse(v.rank).genNext():se.LexoRank.middle();t("saveTemplate",{templateName:h,rank:C.format(),phaseIds:b}),d.value=!1},f=Rt.useRouter(),y=e.ref("mapping"),_=[{label:"Overview",value:"overview"},{label:"Feed",value:"feed"},{label:"Mapping",value:"mapping"}];return e.watch(y,h=>{h==="feed"?(f.push({name:oe.feed}),console.log("Navigating to feed...")):h==="overview"?(f.push({name:oe.project}),console.log("Navigating to feed...")):h==="mapping"&&(f.push({name:oe.mapping}),console.log("Navigating to feed..."))}),(h,b)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",e.mergeProps({class:"ao-project-mapping-overview"},h.$attrs),[e.createElementVNode("div",Yh,[e.createVNode(Zt,null,{primary:e.withCtx(()=>[e.createVNode(ko,{tabs:_,modelValue:y.value,"onUpdate:modelValue":b[0]||(b[0]=v=>y.value=v)},null,8,["modelValue"]),e.createVNode(K,{class:"ao-feed__show-archived",size:"sm","icon-name":h.showsArchived?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:h.$t("feed.filters.showsArchived.label"),role:"checkbox","aria-checked":h.showsArchived,onClick:b[1]||(b[1]=v=>h.$emit("update:showsArchived",!h.showsArchived))},null,8,["icon-name","label","aria-checked"])]),secondary:e.withCtx(()=>[h.isEditable===!0?(e.openBlock(),e.createBlock(K,{key:0,class:"ao-project-mapping-overview__save-as-template",color:"primary",label:h.$t("project.template.save.label"),onClick:b[2]||(b[2]=v=>d.value=!0)},null,8,["label"])):e.createCommentVNode("",!0),h.isEditable===!0?(e.openBlock(),e.createBlock(K,{key:1,class:"ao-project-mapping-overview__add-template",color:"primary",label:h.$t("project.template.apply.label"),onClick:b[3]||(b[3]=v=>u.value=!0)},null,8,["label"])):e.createCommentVNode("",!0)]),_:1}),e.createElementVNode("div",Kh,[e.createElementVNode("div",Gh,[e.createVNode(bo,{phases:h.phases,"closed-status":h.closedStatus,"is-editable":h.isEditable===!0,users:h.users,onAddPhase:s,onUpdatePhase:r,onArchivePhase:l,onUnarchivePhase:i,onCopyPhaseToTemplate:c},null,8,["phases","closed-status","is-editable","users"])]),h.project.architectureImage?(e.openBlock(),e.createElementBlock("div",Xh,[e.createElementVNode("img",{class:"architecture-image",src:h.project.architectureImage.url,alt:e.unref(n)("architectureImage.alt")},null,8,Qh)])):e.createCommentVNode("",!0)])])],16),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[d.value?(e.openBlock(),e.createBlock(Fn,{key:0,phases:h.phases,onClose:b[4]||(b[4]=v=>d.value=!1),onSave:m},null,8,["phases"])):e.createCommentVNode("",!0),u.value?(e.openBlock(),e.createBlock(jn,{key:1,"project-id":h.project.id,templates:h.templates,onClose:b[5]||(b[5]=v=>u.value=!1),onApply:p},null,8,["project-id","templates"])):e.createCommentVNode("",!0)]))],64))}});const tt={TEMPLATES:"templates",TEMPLATE_DETAILS:"template_details",TEMPLATES_LIST:"templates_list"},e9=(a,t={})=>[{path:a,name:tt.TEMPLATES,redirect:{name:tt.TEMPLATES_LIST},...t,children:[{path:"",name:tt.TEMPLATES_LIST,component:zn},{path:":templateId/:phaseId?/:milestoneId?/:activityId?",name:tt.TEMPLATE_DETAILS,component:Hn,props:!0}]}],oe={project:"AoProject",feed:"AoProjectFeed",mapping:"AoProjectMapping",milestone:"AoMilestone",activity:"AoActivity"},t9=(a,t={})=>[{path:a,...t,redirect:{name:oe.project},children:[{path:"",name:oe.project,component:Rf,props:!0,children:[{path:":phaseId/:milestoneId",name:oe.milestone,component:Xo,props:!0},{path:":phaseId/:milestoneId/:activityId",name:oe.activity,props:{default:!0,modal:!0},components:{default:Xo,modal:bh}}]},{path:"feed",name:oe.feed,component:Un,props:!0},{path:"mapping",name:oe.mapping,component:Jh,props:!0}]}],a9={class:"ao-templates"},zn=e.defineComponent({__name:"AoTemplatesList",props:{templates:{}},emits:["addTemplate","updateTemplates","updateItem","removeItem"],setup(a,{emit:t}){const o=a,{t:n}=Ye();e.watch(()=>o.templates,(c,u)=>{Me(c,u)});const s=()=>{var m,f;const c=(m=o.templates)==null?void 0:m.at(-1),u=c?se.LexoRank.parse(c.rank).genNext():se.LexoRank.middle(),d=((f=o.templates)==null?void 0:f.length)??0,p={name:n("template.defaultName.template",{idx:d+1}),rank:u.format()};t("addTemplate",p)},r=(c,u)=>{t("updateItem",{itemType:ee.TEMPLATES,id:c,templateId:c,data:{name:u}})},l=(c,u)=>{t("removeItem",{itemType:ee.TEMPLATES,templateId:c,data:{id:c,...u?{name:u}:{}}})},i=c=>{if(c.moved){const u=zt(c,o.templates??[]);t("updateItem",{itemType:ee.TEMPLATES,id:c.moved.element.id,templateId:c.moved.element.id,data:{rank:u}})}};return(c,u)=>(e.openBlock(),e.createElementBlock("div",a9,[e.createVNode(Zt,null,{secondary:e.withCtx(()=>[e.createVNode(K,{label:c.$t("templates.new"),color:"primary","icon-name":"Add","icon-position":"start",onClick:s},null,8,["label"])]),_:1}),e.createVNode(e.unref(xe),{"model-value":c.templates,class:"ao-templates__list","item-key":"id",handle:".ao-card__drag",onChange:i},{item:e.withCtx(({element:d})=>{var p;return[e.createVNode($3,{id:d.id,title:d.name,phases:d.phases,milestones:(p=d.phases)!=null&&p.length?e.unref(Y0)(d.phases):0,activities:d.phases?e.unref(K0)(d.phases):0,"updated-at":d.updatedAt,"updated-by":d.updatedBy,onUpdateTitle:m=>r(d.id,m),onClick:m=>c.$router.push({name:e.unref(tt).TEMPLATE_DETAILS,params:{templateId:d.id}}),onDeleteItem:u[0]||(u[0]=(m,f)=>l(m,f))},null,8,["id","title","phases","milestones","activities","updated-at","updated-by","onUpdateTitle","onClick"])]}),_:1},8,["model-value"])]))}});const o9={class:"ao-field__label"},Zn=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",o9,e.toDisplayString(t.label),1),e.renderSlot(t.$slots,"default")],2))}}),n9=["type","value","disabled","readonly"],s9=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,n=e.computed(()=>o.modelModifiers.lazy?"change":"input"),s=r=>{o.modelModifiers.number&&(r=Number(r)),t("update:modelValue",r)};return(r,l)=>(e.openBlock(),e.createBlock(Zn,{label:r.label},{default:e.withCtx(()=>[e.createElementVNode("input",e.mergeProps({class:"ao-field__input",type:r.type,value:r.modelValue,disabled:r.isDisabled,readonly:r.isReadonly},{[e.toHandlerKey(n.value)]:l[0]||(l[0]=i=>s(i.target.value))}),null,16,n9)]),_:1},8,["label"]))}}),l9={class:"ao-field"},r9={class:"ao-field__label"},i9=["checked","disabled"],c9=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",l9,[e.createElementVNode("span",r9,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]=n=>{var s;return t.$emit("update:modelValue",((s=n.target)==null?void 0:s.checked)??!1)})},null,40,i9)]))}});exports.AoAvatar=ke;exports.AoCardFeed=wo;exports.AoCheckboxField=c9;exports.AoFeed=Un;exports.AoField=Zn;exports.AoInputField=s9;exports.AoMultiselect=re;exports.AoProjectPhases=bo;exports.AoTemplateDetails=Hn;exports.AoTemplates=is;exports.AoTemplatesList=zn;exports.TemplateItemTypeEnum=nn;exports.activityFeedStatus=c2;exports.durationTypes=i2;exports.feedFilterTypes=Je;exports.getProjectOverviewRoutes=t9;exports.getTemplateRoutes=e9;exports.listUpdateTypes=d2;exports.milestoneStatus=Ot;exports.projectOverviewRoutes=oe;exports.ruleComparators=tn;exports.ruleDurationUnits=on;exports.ruleTriggerTypes=an;exports.templateItemType=ee;exports.templateRouteNames=tt;
|
|
5
|
+
*/function Qe(a){let t={r:0,g:0,b:0,a:1};/#/.test(a)?t=Nv(a):/rgb/.test(a)?t=Go(a):typeof a=="string"?t=Go(`rgba(${a})`):Object.prototype.toString.call(a)==="[object Object]"&&(t=a);const{r:o,g:n,b:s,a:r}=t,{h:l,s:i,v:c}=Sv(t);return{r:o,g:n,b:s,a:r===void 0?1:r,h:l,s:i,v:c}}function mo(a){const t=document.createElement("canvas"),o=t.getContext("2d"),n=a*2;return t.width=n,t.height=n,o.fillStyle="#ffffff",o.fillRect(0,0,n,n),o.fillStyle="#ccd5db",o.fillRect(0,0,a,a),o.fillRect(a,a,a,a),t}function Ya(a,t,o,n,s,r){const l=a==="l",i=t.createLinearGradient(0,0,l?o:0,l?0:n);i.addColorStop(.01,s),i.addColorStop(.99,r),t.fillStyle=i,t.fillRect(0,0,o,n)}function Bv({r:a,g:t,b:o},n){const s=l=>("0"+Number(l).toString(16)).slice(-2),r=`#${s(a)}${s(t)}${s(o)}`;return n?r.toUpperCase():r}function Nv(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 Go(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 Sv({r:a,g:t,b:o}){a=a/255,t=t/255,o=o/255;const n=Math.max(a,t,o),s=Math.min(a,t,o),r=n-s;let l=0;n===s?l=0:n===a?t>=o?l=60*(t-o)/r:l=60*(t-o)/r+360:n===t?l=60*(o-a)/r+120:n===o&&(l=60*(a-t)/r+240),l=Math.floor(l);let i=parseFloat((n===0?0:1-s/n).toFixed(2)),c=parseFloat(n.toFixed(2));return{h:l,s:i,v:c}}var vo=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),Ya("l",o,t,t,"#FFFFFF","rgba(255,255,255,0)"),Ya("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(),n=a.target.getContext("2d"),s=l=>{let i=l.clientX-o,c=l.clientY-t;i<0&&(i=0),c<0&&(c=0),i>this.size&&(i=this.size),c>this.size&&(c=this.size),this.slideSaturationStyle={left:i-5+"px",top:c-5+"px"};const u=n.getImageData(Math.min(i,this.size-1),Math.min(c,this.size-1),1,1),[d,p,m]=u.data;this.$emit("selectSaturation",{r:d,g:p,b:m})};s(a);const r=()=>{document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",r)};document.addEventListener("mousemove",s),document.addEventListener("mouseup",r)}}});const Mv={ref:"canvasSaturation"};function Av(a,t,o,n,s,r){return e.openBlock(),e.createBlock("div",{class:"saturation",onMousedown:t[1]||(t[1]=e.withModifiers((...l)=>a.selectSaturation&&a.selectSaturation(...l),["prevent","stop"]))},[e.createVNode("canvas",Mv,null,512),e.createVNode("div",{style:a.slideSaturationStyle,class:"slide"},null,4)],32)}vo.render=Av;vo.__file="src/color/Saturation.vue";var fo=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,n=a.getContext("2d");a.width=t,a.height=o;const s=n.createLinearGradient(0,0,0,o);s.addColorStop(0,"#FF0000"),s.addColorStop(.17*1,"#FF00FF"),s.addColorStop(.17*2,"#0000FF"),s.addColorStop(.17*3,"#00FFFF"),s.addColorStop(.17*4,"#00FF00"),s.addColorStop(.17*5,"#FFFF00"),s.addColorStop(1,"#FF0000"),n.fillStyle=s,n.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"),n=r=>{let l=r.clientY-t;l<0&&(l=0),l>this.height&&(l=this.height),this.slideHueStyle={top:l-2+"px"};const i=o.getImageData(0,Math.min(l,this.height-1),1,1),[c,u,d]=i.data;this.$emit("selectHue",{r:c,g:u,b:d})};n(a);const s=()=>{document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",s)};document.addEventListener("mousemove",n),document.addEventListener("mouseup",s)}}});const Tv={ref:"canvasHue"};function Ov(a,t,o,n,s,r){return e.openBlock(),e.createBlock("div",{class:"hue",onMousedown:t[1]||(t[1]=e.withModifiers((...l)=>a.selectHue&&a.selectHue(...l),["prevent","stop"]))},[e.createVNode("canvas",Tv,null,512),e.createVNode("div",{style:a.slideHueStyle,class:"slide"},null,4)],32)}fo.render=Ov;fo.__file="src/color/Hue.vue";var ho=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,n=this.alphaSize,s=mo(n),r=a.getContext("2d");a.width=t,a.height=o,r.fillStyle=r.createPattern(s,"repeat"),r.fillRect(0,0,t,o),Ya("p",r,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=s=>{let r=s.clientY-t;r<0&&(r=0),r>this.height&&(r=this.height);let l=parseFloat((r/this.height).toFixed(2));this.$emit("selectAlpha",l)};o(a);const n=()=>{document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",n)};document.addEventListener("mousemove",o),document.addEventListener("mouseup",n)}}});const Iv={ref:"canvasAlpha"};function Lv(a,t,o,n,s,r){return e.openBlock(),e.createBlock("div",{class:"color-alpha",onMousedown:t[1]||(t[1]=e.withModifiers((...l)=>a.selectAlpha&&a.selectAlpha(...l),["prevent","stop"]))},[e.createVNode("canvas",Iv,null,512),e.createVNode("div",{style:a.slideAlphaStyle,class:"slide"},null,4)],32)}ho.render=Lv;ho.__file="src/color/Alpha.vue";var Co=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,n=this.alphaSize,s=mo(n),r=a.getContext("2d");a.width=t,a.height=o,r.fillStyle=r.createPattern(s,"repeat"),r.fillRect(0,0,t,o),r.fillStyle=this.color,r.fillRect(0,0,t,o)}}});function Dv(a,t,o,n,s,r){return e.openBlock(),e.createBlock("canvas")}Co.render=Dv;Co.__file="src/color/Preview.vue";var go=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:n,left:s,width:r,height:l}=this.suckerCanvas.getBoundingClientRect(),i=t-s,c=o-n,d=this.suckerCanvas.getContext("2d").getImageData(Math.min(i,r-1),Math.min(c,l-1),1,1);let[p,m,f,y]=d.data;y=parseFloat((y/255).toFixed(2));const _=this.suckerPreview.style;Object.assign(_,{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(${p}, ${m}, ${f}, ${y})`,zIndex:95}),this.suckerArea.length&&t>=this.suckerArea[0]&&o>=this.suckerArea[1]&&t<=this.suckerArea[2]&&o<=this.suckerArea[3]?_.display="":_.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:n}=t,{top:s,left:r,width:l,height:i}=a.getBoundingClientRect(),c=o-r,u=n-s,p=a.getContext("2d").getImageData(Math.min(c,l-1),Math.min(u,i-1),1,1);let[m,f,y,_]=p.data;_=parseFloat((_/255).toFixed(2)),this.$emit("selectSucker",{r:m,g:f,b:y,a:_})}))}}});const Pv=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),Hv={key:1,class:"sucker",viewBox:"-16 -16 68 68",xmlns:"http://www.w3.org/2000/svg",stroke:"#9099a4"},Rv=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 jv(a,t,o,n,s,r){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]=(...l)=>a.openSucker&&a.openSucker(...l))},[Pv],2)),a.isSucking?(e.openBlock(),e.createBlock("svg",Hv,[Rv])):e.createCommentVNode("v-if",!0)])}go.render=jv;go.__file="src/color/Sucker.vue";var _o=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(r){t("inputColor",r)}}),handleFocus:r=>{t("inputFocus",r)},handleBlur:r=>{t("inputBlur",r)}}}});const Fv={class:"color-type"},Uv={class:"name"};function zv(a,t,o,n,s,r){return e.openBlock(),e.createBlock("div",Fv,[e.createVNode("span",Uv,e.toDisplayString(a.name),1),e.withDirectives(e.createVNode("input",{"onUpdate:modelValue":t[1]||(t[1]=l=>a.modelColor=l),class:"value",onFocus:t[2]||(t[2]=(...l)=>a.handleFocus&&a.handleFocus(...l)),onBlur:t[3]||(t[3]=(...l)=>a.handleBlur&&a.handleBlur(...l))},null,544),[[e.vModelText,a.modelColor]])])}_o.render=zv;_o.__file="src/color/Box.vue";var yo=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(),n=e.ref([]),s=e.ref();a.colorsHistoryKey&&localStorage&&(n.value=JSON.parse(localStorage.getItem(a.colorsHistoryKey))||[]),s.value=mo(4).toDataURL(),e.onUnmounted(()=>{r(o.value)});function r(i){if(!i)return;const c=n.value||[],u=c.indexOf(i);u>=0&&c.splice(u,1),c.length>=8&&(c.length=7),c.unshift(i),n.value=c||[],localStorage&&a.colorsHistoryKey&&localStorage.setItem(a.colorsHistoryKey,JSON.stringify(c))}function l(i){t("selectColor",i)}return{setColorsHistory:r,colorsHistory:n,color:o,imgAlphaBase64:s,selectColor:l}}});const Zv={class:"colors"},xv={key:0,class:"colors history"};function Wv(a,t,o,n,s,r){return e.openBlock(),e.createBlock("div",null,[e.createVNode("ul",Zv,[(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(a.colorsDefault,l=>(e.openBlock(),e.createBlock("li",{key:l,class:"item",onClick:i=>a.selectColor(l)},[e.createVNode("div",{style:{background:`url(${a.imgAlphaBase64})`},class:"alpha"},null,4),e.createVNode("div",{style:{background:l},class:"color"},null,4)],8,["onClick"]))),128))]),a.colorsHistory.length?(e.openBlock(),e.createBlock("ul",xv,[(e.openBlock(!0),e.createBlock(e.Fragment,null,e.renderList(a.colorsHistory,l=>(e.openBlock(),e.createBlock("li",{key:l,class:"item",onClick:i=>a.selectColor(l)},[e.createVNode("div",{style:{background:`url(${a.imgAlphaBase64})`},class:"alpha"},null,4),e.createVNode("div",{style:{background:l},class:"color"},null,4)],8,["onClick"]))),128))])):e.createCommentVNode("v-if",!0)])}yo.render=Wv;yo.__file="src/color/Colors.vue";var ut=e.defineComponent({components:{Saturation:vo,Hue:fo,Alpha:ho,Preview:Co,Sucker:go,Box:_o,Colors:yo},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 Bv(this.rgba,!0)}},created(){Object.assign(this,Qe(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:n,h:s,s:r,v:l}=Qe(a);Object.assign(this,{r:t,g:o,b:n,h:s,s:r,v:l}),this.setText()},handleFocus(a){this.$emit("inputFocus",a)},handleBlur(a){this.$emit("inputBlur",a)},selectHue(a){const{r:t,g:o,b:n,h:s,s:r,v:l}=Qe(a);Object.assign(this,{r:t,g:o,b:n,h:s,s:r,v:l}),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:n,a:s,h:r,s:l,v:i}=Qe(a);Object.assign(this,{r:t,g:o,b:n,a:s,h:r,s:l,v:i}),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:n,a:s,h:r,s:l,v:i}=Qe(a);Object.assign(this,{r:t,g:o,b:n,a:s,h:r,s:l,v:i}),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:n,a:s,h:r,s:l,v:i}=Qe(a);Object.assign(this,{r:t,g:o,b:n,a:s,h:r,s:l,v:i}),this.setText(),this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide(),this.$refs.hue.renderSlide()})},selectColor(a){const{r:t,g:o,b:n,a:s,h:r,s:l,v:i}=Qe(a);Object.assign(this,{r:t,g:o,b:n,a:s,h:r,s:l,v:i}),this.setText(),this.$nextTick(()=>{this.$refs.saturation.renderColor(),this.$refs.saturation.renderSlide(),this.$refs.hue.renderSlide()})}}});const qv={class:"color-set"};function Yv(a,t,o,n,s,r){const l=e.resolveComponent("Saturation"),i=e.resolveComponent("Hue"),c=e.resolveComponent("Alpha"),u=e.resolveComponent("Preview"),d=e.resolveComponent("Sucker"),p=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",qv,[e.createVNode(l,{ref:"saturation",color:a.rgbString,hsv:a.hsv,size:a.hueHeight,onSelectSaturation:a.selectSaturation},null,8,["color","hsv","size","onSelectSaturation"]),e.createVNode(i,{ref:"hue",hsv:a.hsv,width:a.hueWidth,height:a.hueHeight,onSelectHue:a.selectHue},null,8,["hsv","width","height","onSelectHue"]),e.createVNode(c,{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(u,{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(d,{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(p,{name:"HEX",color:a.modelHex,onInputColor:a.inputHex,onInputFocus:a.handleFocus,onInputBlur:a.handleBlur},null,8,["color","onInputColor","onInputFocus","onInputBlur"]),e.createVNode(p,{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)}ut.render=Yv;ut.__file="src/color/ColorPicker.vue";ut.install=a=>{a.component(ut.name,ut)};const Kv={class:"color-picker-wrapper"},Rn=e.defineComponent({__name:"AoColorPicker",props:{color:{}},emits:["update:color"],setup(a,{emit:t}){const o=e.ref(!1),n=e.ref(null),s=async()=>{o.value=!0,await e.nextTick(),setTimeout(()=>{window.addEventListener("click",r)},0)},r=i=>{const c=i.target;n.value&&!n.value.contains(c)&&(o.value=!1,window.removeEventListener("click",r))};e.onBeforeUnmount(()=>{window.removeEventListener("click",r)});const l=i=>{const{r:c,g:u,b:d,a:p}=i.rgba,m=`rgba(${c}, ${u}, ${d}, ${p})`;console.log("COLOR"),console.log(m),console.log(i),t("update:color",m)};return(i,c)=>(e.openBlock(),e.createElementBlock("div",Kv,[e.renderSlot(i.$slots,"clickable",{openPicker:s,bgColor:i.color}),o.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"pickerRef",ref:n},[e.createVNode(e.unref(ut),{class:"color-picker",theme:"light",color:i.color,onChangeColor:l},null,8,["color"])],512)):e.createCommentVNode("",!0)]))}});const Gv={class:"ao-mapping-card-project-phase__header"},Xv={class:"ao-card-project-item__title-line"},Qv={key:0,class:"ao-card-project-item-phase__estimation"},Jv={class:"ao-mapping-card-project-phase__footer"},ef={key:0,class:"ao-mapping-card-project-phase__footer-row ao-mapping-card-project-phase__footer-row--progress"},tf={class:"ao-mapping-card-project-phase__subitem"},af={class:"ao-mapping-card-project-phase__subitem"},of={key:0,class:"ao-mapping-card-project-phase__secondary"},nf={class:"ao-mapping-card-project-phase__deadline ao-mapping-card-project-phase__deadline--readonly"},sf=e.defineComponent({__name:"AoCondensedCardProjectItemPhase",props:{id:{},projectName:{},name:{},milestones:{},isEditable:{type:Boolean},deadline:{},active:{type:Boolean},color:{}},emits:["update:title","update:deadline","archivePhase","updatePhase","unarchivePhase"],setup(a,{emit:t}){const o=a,n=p=>{t("update:title",p)},s=e.computed(()=>{var p;return(p=o.milestones)==null?void 0:p.reduce((m,f)=>{var y;return m+((y=f.activities)==null?void 0:y.reduce((_,h)=>_+(h.estimation||0),0))},0)}),r=e.computed(()=>{var p;return(p=o.milestones)==null?void 0:p.length}),l=e.computed(()=>{var p;return(p=o.milestones)==null?void 0:p.filter(m=>m.status===Ot.done).length}),i=e.computed(()=>(l.value||0)/(r.value||1)),c=e.computed({get:()=>o.deadline??"",set:p=>t("update:deadline",p!=null&&p.length?p:null)}),u=e.computed({get:()=>o.color,set:p=>{t("updatePhase",{id:o.id,color:p})}}),d=(p,m)=>{const f=p.target;f.closest("button")||f.closest("input")||f.closest(".ao-title")||m()};return(p,m)=>(e.openBlock(),e.createBlock(Rn,{color:u.value,"onUpdate:color":m[2]||(m[2]=f=>u.value=f)},{clickable:e.withCtx(({openPicker:f,bgColor:y})=>[e.createVNode(Ba,{class:"ao-mapping-card-project-phase","is-clickable":p.isEditable,onClick:_=>d(_,f)},e.createSlots({default:e.withCtx(()=>[e.createElementVNode("div",Xv,[e.createVNode(ne,{id:p.id,class:"ao-mapping-card-project-phase__title",title:p.name||"",level:4,"is-editable":p.isEditable,"onUpdate:title":n},null,8,["id","title","is-editable"]),s.value?(e.openBlock(),e.createElementBlock("span",Qv," ("+e.toDisplayString(s.value)+")",1)):e.createCommentVNode("",!0)])]),footer:e.withCtx(()=>[e.createElementVNode("div",Jv,[r.value?(e.openBlock(),e.createElementBlock("div",ef,[e.createElementVNode("div",tf,[e.createVNode(Q,{name:"MountainFlagOutlineRounded",size:"sm"}),e.createElementVNode("span",af,e.toDisplayString(l.value)+" / "+e.toDisplayString(r.value),1)]),e.createVNode(Na,{percentages:i.value,class:"ao-mapping-card-project-phase__progress",color:u.value},null,8,["percentages","color"]),p.$slots.secondary?(e.openBlock(),e.createElementBlock("div",of,[e.renderSlot(p.$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"])},[p.isEditable?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,"onUpdate:modelValue":m[1]||(m[1]=_=>c.value=_),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",nf,e.toDisplayString(e.unref(_a)(p.deadline)),1)],2)])]),_:2},[p.isEditable?{name:"header",fn:e.withCtx(()=>[e.createElementVNode("div",Gv,[e.createVNode(K,{class:"ao-mapping-card-project-phase__archive",color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:p.active?p.$t("archive"):p.$t("unarchive"),onClick:m[0]||(m[0]=e.withModifiers(()=>p.active?p.$emit("archivePhase",{id:p.id}):p.$emit("unarchivePhase",{id:p.id}),["stop"]))},null,8,["label"])])]),key:"0"}:void 0]),1032,["is-clickable","onClick"])]),_:3},8,["color"]))}});const lf={class:"ao-project-phase"},rf={key:0,class:"ao-project-phase__drag ao-card__drag"},cf={key:1,class:"ao-project-phase__col-phase"},df={key:2,class:"ao-mapping-project-phase__col-phase"},uf={key:0,class:"ao-project-phase__col-milestones"},pf={class:"ao-project-phase__milestones-list-footer"},mf=e.defineComponent({__name:"AoProjectPhase",props:{phase:{},closedStatus:{},users:{},isEditable:{type:Boolean},readonly:{type:Boolean}},emits:["addMilestone","updateMilestone","archiveMilestone","unarchiveMilestone","updatePhase","archivePhase","unarchivePhase"],setup(a,{emit:t}){const o=a,{t:n}=Ye();e.watch(()=>o.phase.milestones,(v,C)=>{Me(v,C)});const s=v=>{t("updatePhase",{id:o.phase.id,name:v})},r=v=>{t("updatePhase",{id:o.phase.id,deadline:v})},l=v=>{t("updatePhase",v)},i=e.computed(()=>o.phase.milestones.map(v=>Q0(v,o.closedStatus))),c=v=>{const{name:C,rank:N}=ot(i.value??[],"milestone",n);t("addMilestone",{name:C,rank:N,phaseId:v})},u=v=>{t("updateMilestone",v)},d=v=>{t("archiveMilestone",v)},p=v=>{t("unarchiveMilestone",v)},m=v=>{t("archivePhase",v)},f=v=>{t("unarchivePhase",v)},y=v=>{"added"in v?t("updateMilestone",{id:v.added.element.id,phaseId:o.phase.id,rank:pt(i.value,v.added.newIndex)}):"removed"in v||"moved"in v&&t("updateMilestone",{id:v.moved.element.id,rank:pt(i.value,v.moved.newIndex)})},_=Rt.useRoute(),h=e.computed(()=>_.path.includes("/mapping")),b=e.computed(()=>{var v;return o.phase.id!==((v=_.params)==null?void 0:v.phaseId)?{backgroundColor:"var(--ao-color-sheet)"}:o.phase.color?{backgroundColor:e3(o.phase.color)}:{backgroundColor:"var(--ao-color-primary-lightest)"}});return(v,C)=>(e.openBlock(),e.createElementBlock("li",lf,[e.createElementVNode("div",{class:"ao-project-phases__draggable-card",style:e.normalizeStyle(b.value)},[v.isEditable?(e.openBlock(),e.createElementBlock("div",rf,[e.createVNode(Q,{name:"DragIndicator",class:"ao-project-phase__drag-handle"})])):e.createCommentVNode("",!0),h.value?(e.openBlock(),e.createElementBlock("div",df,[e.createVNode(sf,{id:v.phase.id,milestones:i.value,name:v.phase.name,deadline:v.phase.deadline,active:v.phase.active,"is-editable":v.isEditable,color:v.phase.color,"onUpdate:deadline":r,"onUpdate:title":s,onArchivePhase:m,onUnarchivePhase:f,onUpdatePhase:l},null,8,["id","milestones","name","deadline","active","is-editable","color"])])):(e.openBlock(),e.createElementBlock("div",cf,[e.createVNode(dv,{id:v.phase.id,milestones:i.value,name:v.phase.name,deadline:v.phase.deadline,active:v.phase.active,"is-editable":v.isEditable,color:v.phase.color,"onUpdate:deadline":r,"onUpdate:title":s,onArchivePhase:m,onUnarchivePhase:f},null,8,["id","milestones","name","deadline","active","is-editable","color"])]))],4),h.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",uf,[e.createElementVNode("div",{class:"ao-project-phase__milestones",style:e.normalizeStyle(b.value)},[e.createVNode(e.unref(xe),e.mergeProps({class:"ao-project-phase__milestones-list",list:i.value,disabled:v.readonly||!v.isEditable,"item-key":"id",group:"kanban"},v.$attrs,{onChange:y}),{item:e.withCtx(({element:N})=>{var V;return[e.createVNode(Vv,{id:N.id,name:N.name,color:N.color,"phase-color":v.phase.color,activities:N.activities,deadline:N.deadline,active:N.active,"is-editable":!v.readonly&&v.isEditable,"is-draggable":!v.readonly&&v.isEditable,"closed-status":v.closedStatus,"is-selected":N.id===((V=v.$route.params)==null?void 0:V.milestoneId),assignee:N.assignee,important:N.important,readonly:v.readonly,class:e.normalizeClass(["ao-project-phase__milestone"]),onClick:B=>!v.readonly&&v.$router.push({name:e.unref(oe).milestone,params:{phaseId:v.phase.id,milestoneId:N.id}}),onUpdateMilestone:u,onArchiveMilestone:d,onUnarchiveMilestone:p},null,8,["id","name","color","phase-color","activities","deadline","active","is-editable","is-draggable","closed-status","is-selected","assignee","important","readonly","onClick"])]}),_:1},16,["list","disabled"]),e.createElementVNode("div",pf,[v.isEditable?(e.openBlock(),e.createBlock(We,{key:0,label:v.$t("project.milestone.add"),class:"ao-project-phase__milestone-add","icon-name":"Add",onClick:C[0]||(C[0]=()=>c(v.phase.id))},null,8,["label"])):e.createCommentVNode("",!0)])],4)]))]))}});const vf={class:"ao-project__phases"},ff={key:0,class:"ao-project-phase__phases-list-footer"},hf=e.createElementVNode("div",{class:"ao-project-phase__empty_drag"},null,-1),Cf={class:"ao-project-phase__col-phase"},gf=e.createElementVNode("div",{class:"ao-project-phase__col-milestones"},null,-1),bo=e.defineComponent({__name:"AoProjectPhases",props:{phases:{},closedStatus:{},isEditable:{type:Boolean},users:{},readonly:{type:Boolean}},emits:["addMilestone","updateMilestone","archiveMilestone","unarchiveMilestone","addPhase","updatePhase","archivePhase","unarchivePhase"],setup(a,{emit:t}){const o=a;e.watch(()=>o.phases,(m,f)=>{Me(m,f)});const n=m=>{t("addMilestone",m)},s=m=>{t("updateMilestone",m)},r=m=>{t("archiveMilestone",m)},l=m=>{t("unarchiveMilestone",m)},i=m=>{t("archivePhase",m)},c=m=>{t("unarchivePhase",m)},u=m=>{if(m.moved){const f=zt(m,o.phases??[]);t("updatePhase",{id:m.moved.element.id,rank:f})}},d=m=>{t("updatePhase",m)},p=m=>{t("addPhase",m)};return(m,f)=>(e.openBlock(),e.createElementBlock("div",vf,[e.createVNode(e.unref(xe),{class:"ao-project-phase__phases-list","model-value":m.phases,"item-key":"id",handle:".ao-card__drag",onChange:u},{item:e.withCtx(({element:y})=>[e.createVNode(mf,{phase:y,"is-editable":!m.readonly&&m.isEditable,"closed-status":m.closedStatus,users:m.users,readonly:m.readonly,onAddMilestone:n,onUpdateMilestone:s,onArchiveMilestone:r,onUnarchiveMilestone:l,onUpdatePhase:d,onArchivePhase:i,onUnarchivePhase:c},null,8,["phase","is-editable","closed-status","users","readonly"])]),_:1},8,["model-value"]),m.isEditable?(e.openBlock(),e.createElementBlock("div",ff,[hf,e.createElementVNode("div",Cf,[e.createVNode(We,{label:m.$t("project.phases.add"),"icon-name":"Add",class:"ao-project-phase__add-phase",onClick:p},null,8,["label"])]),gf])):e.createCommentVNode("",!0)]))}});const _f=["onSubmit"],yf={class:"ao-add-template-modal__form-body"},bf={class:"field__row"},kf={class:"ao-add-template-modal__form-footer"},jn=e.defineComponent({__name:"AoAddTemplateModal",props:{projectId:{},templates:{}},emits:["apply"],setup(a,{emit:t}){const o=a,n=e.computed(()=>o.templates.map(i=>({value:i.id,label:i.name}))),s=e.ref(null),r=i=>{s.value=i},l=()=>{s.value&&t("apply",s.value,o.projectId)};return(i,c)=>(e.openBlock(),e.createBlock(ya,{size:"sm"},{header:e.withCtx(()=>[e.createVNode(ne,{title:i.$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(l,["prevent"])},[e.createElementVNode("p",null,e.toDisplayString(i.$t("project.template.apply.notice")),1),e.createElementVNode("div",yf,[e.createElementVNode("div",bf,[e.createVNode(re,{value:s.value,options:n.value,detached:!0,onChange:r},null,8,["value","options"])])]),e.createElementVNode("footer",kf,[e.createVNode(K,{label:i.$t("project.template.apply.label"),type:"submit",color:"primary",variant:"solid",onClick:l},null,8,["label"])])],40,_f)]),_:1}))}});const wf=["onSubmit"],$f={class:"ao-save-template-modal__form-body"},Ef={class:"field__row"},Vf={class:"ao-field ao-field--inline"},Bf={class:"ao-field__label"},Nf={class:"ao-save-template-modal__phases"},Sf={class:"ao-field__label"},Mf={class:"ao-save-template-modal__phases-list"},Af=["value"],Tf={class:"ao-save-template-modal__form-footer"},Fn=e.defineComponent({__name:"AoSaveTemplateModal",props:{phases:{}},emits:["save"],setup(a,{emit:t}){const o=a,n=e.ref(""),s=e.ref([]);e.onMounted(()=>{s.value=o.phases.map(l=>l.id)});const r=()=>{n.value&&t("save",n.value,s.value)};return(l,i)=>(e.openBlock(),e.createBlock(ya,{size:"sm"},{header:e.withCtx(()=>[e.createVNode(ne,{title:l.$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(r,["prevent"])},[e.createElementVNode("div",$f,[e.createElementVNode("div",Ef,[e.createElementVNode("label",Vf,[e.createElementVNode("span",Bf,e.toDisplayString(l.$t("project.template.name.label"))+": ",1),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":i[0]||(i[0]=c=>n.value=c),type:"text"},null,512),[[e.vModelText,n.value]])])]),e.createElementVNode("div",Nf,[e.createElementVNode("div",Sf,e.toDisplayString(l.$t("project.template.phases.label")),1),e.createElementVNode("div",Mf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.phases,c=>(e.openBlock(),e.createElementBlock("label",{class:"ao-field ao-field--checkbox",key:c.id},[e.withDirectives(e.createElementVNode("input",{type:"checkbox",value:c.id,"onUpdate:modelValue":i[1]||(i[1]=u=>s.value=u)},null,8,Af),[[e.vModelCheckbox,s.value]]),e.createElementVNode("span",null,e.toDisplayString(c.name),1)]))),128))])])]),e.createElementVNode("footer",Tf,[e.createVNode(K,{label:l.$t("project.template.save.label"),type:"submit",color:"primary",variant:"solid",onClick:r},null,8,["label"])])],40,wf)]),_:1}))}});const Of=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)}}});const If={class:"tabbar-wrapper"},Lf=["onClick"];function Df(a,t,o,n,s,r){return e.openBlock(),e.createElementBlock("div",If,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.tabs,l=>(e.openBlock(),e.createElementBlock("button",{key:l.value,class:e.normalizeClass(["tab-button",{"tab-button--active":l.value===a.modelValue}]),type:"button",onClick:i=>a.selectTab(l.value)},e.toDisplayString(l.label),11,Lf))),128))])}const ko=I(Of,[["render",Df],["__scopeId","data-v-ff4e3297"]]),Pf={class:"ao-project"},Hf={class:"ao-project__body"},Rf=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}},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:n}=Ye(),s=e.computed(()=>o.phases.flatMap($=>$.milestones)),r=()=>{const{name:$,rank:k}=ot(o.phases,"phase",n);t("addPhase",{name:$,rank:k,projectId:o.project.id})},l=$=>{t("updatePhase",$)},i=$=>{t("archivePhase",$)},c=$=>{t("unarchivePhase",$)},u=$=>{t("copyPhaseToTemplate",$)},d=$=>{t("addMilestone",$)},p=$=>{t("updateMilestone",$)},m=$=>{t("archiveMilestone",$)},f=$=>{t("unarchiveMilestone",$)},y=$=>{t("addActivity",$)},_=$=>{t("update:activity",$)},h=$=>{t("archiveActivity",$)},b=$=>{t("unarchiveActivity",$)},v=$=>{t("addSubtask",$)},C=$=>{t("updateSubtask",$)},N=$=>{t("deleteSubtask",$)},V=e.computed(()=>s.value.flatMap($=>$.activities)),B=$=>{t("addFiles",$)},L=$=>{t("removeFile",$)},P=$=>{t("addComment",$)},R=$=>{t("updateComment",$)},F=$=>{t("removeComment",$)},z=e.ref(!1),T=e.ref(!1),j=($,k)=>{t("applyTemplate",{templateId:$,projectId:k}),z.value=!1},Y=($,k)=>{var M;const O=(M=o.templates)==null?void 0:M.at(-1),g=O?se.LexoRank.parse(O.rank).genNext():se.LexoRank.middle();t("saveTemplate",{templateName:$,rank:g.format(),phaseIds:k}),T.value=!1},Z=Rt.useRouter(),U=e.ref("overview"),E=[{label:"Overview",value:"overview"},{label:"Feed",value:"feed"},{label:"Mapping",value:"mapping"}];return e.watch(U,$=>{$==="feed"?(Z.push({name:oe.feed}),console.log("Navigating to feed...")):$==="overview"?(Z.push({name:oe.project}),console.log("Navigating to feed...")):$==="mapping"&&(Z.push({name:oe.mapping}),console.log("Navigating to feed..."))}),($,k)=>{const O=e.resolveComponent("RouterView");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",e.mergeProps({class:"ao-project-overview"},$.$attrs),[e.createElementVNode("div",Pf,[e.createVNode(Zt,null,{primary:e.withCtx(()=>[e.createVNode(ko,{tabs:E,modelValue:U.value,"onUpdate:modelValue":k[0]||(k[0]=g=>U.value=g)},null,8,["modelValue"]),e.createVNode(K,{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:k[1]||(k[1]=g=>$.$emit("update:showsArchived",!$.showsArchived))},null,8,["icon-name","label","aria-checked"])]),secondary:e.withCtx(()=>[$.isEditable===!0?(e.openBlock(),e.createBlock(K,{key:0,class:"ao-project-overview__save-as-template",color:"primary",label:$.$t("project.template.save.label"),onClick:k[2]||(k[2]=g=>T.value=!0)},null,8,["label"])):e.createCommentVNode("",!0),$.isEditable===!0?(e.openBlock(),e.createBlock(K,{key:1,class:"ao-project-overview__add-template",color:"primary",label:$.$t("project.template.apply.label"),onClick:k[3]||(k[3]=g=>z.value=!0)},null,8,["label"])):e.createCommentVNode("",!0)]),_:1}),e.createElementVNode("div",Hf,[e.createVNode(bo,{phases:$.phases,"closed-status":$.closedStatus,"is-editable":$.isEditable===!0,users:$.users,onAddMilestone:d,onUpdateMilestone:p,onArchiveMilestone:m,onUnarchiveMilestone:f,onAddPhase:r,onUpdatePhase:l,onArchivePhase:i,onUnarchivePhase:c,onCopyPhaseToTemplate:u},null,8,["phases","closed-status","is-editable","users"])])]),e.createVNode(O,{class:"ao-project__sidebar",phases:$.phases,"project-id":$.project.id,"project-name":$.project.name,users:$.users,"is-editable":$.isEditable===!0,"closed-status":$.closedStatus,onClose:k[4]||(k[4]=g=>$.$router.push({name:e.unref(oe).project})),onUpdateMilestone:p,onAddActivity:y,onUpdateActivity:_,onArchiveActivity:h,onUnarchiveActivity:b},null,8,["phases","project-id","project-name","users","is-editable","closed-status"]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(O,{name:"modal",activities:V.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,"onUpdate:activity":_,onAddSubtask:v,onUpdateSubtask:C,onDeleteSubtask:N,onAddFiles:B,onRemoveFile:L,onAddComment:P,onUpdateComment:R,onRemoveComment:F},{default:e.withCtx(({Component:g})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(g),null,{default:e.withCtx(M=>[e.renderSlot($.$slots,"activityDetailsBody",e.normalizeProps(e.guardReactiveProps(M)))]),_:2},1024))]),_:3},8,["activities","is-task-checkable","statuses","activity-types","phases","project","users","user-id","is-editable","attachment-enabled"])]))],16),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[T.value?(e.openBlock(),e.createBlock(Fn,{key:0,phases:$.phases,onClose:k[5]||(k[5]=g=>T.value=!1),onSave:Y},null,8,["phases"])):e.createCommentVNode("",!0),z.value?(e.openBlock(),e.createBlock(jn,{key:1,"project-id":$.project.id,templates:$.templates,onClose:k[6]||(k[6]=g=>z.value=!1),onApply:j},null,8,["project-id","templates"])):e.createCommentVNode("",!0)]))],64)}}});const jf={class:"ao-card-feed__header"},Ff={key:1,class:"ao-card-feed__header-secondary ao-card-feed__header-icons"},Uf={key:2,class:"ao-card-feed__header-secondary ao-card-feed__secondary"},zf={class:"ao-card-feed__body"},Zf={key:0,class:"ao-card-feed__breadcrumbs"},xf={class:e.normalizeClass(["ao-card-feed__title-group"])},Wf={class:"ao-card-feed__title-line"},qf={key:0,class:"ao-card-feed__slug"},Yf={key:1,class:"ao-card-feed__deadline"},Kf={class:"ao-card-feed__footer"},Gf={class:"ao-card-feed__footer-row"},Xf={class:"ao-assignees"},Qf={key:0,class:"ao-assignee"},Jf={key:0,class:"ao-card-feed__subitems"},eh={key:0,class:"ao-card-feed__subitem"},th={class:"ao-card-feed__subitem"},ah={key:1,class:"ao-card-feed__subitem"},oh={class:"ao-card-feed__subitem"},nh={class:"ao-card-feed__footer-row"},sh={key:0,class:"ao-card-feed__progress-wrapper"},lh={class:"ao-card-feed__subitem"},rh={class:"ao-card-feed__subitem"},wo=e.defineComponent({__name:"AoCardFeed",props:{id:{},name:{},projectName:{},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"],setup(a,{emit:t}){const o=a,n=e.computed(()=>o.tagType==="milestone"?o.milestoneName:o.projectName),s=e.computed(()=>o.tagType==="milestone"?o.milestoneColor:o.projectColor),r=f=>{t("updateActivity",{id:o.id,name:f})},l=e.computed(()=>o.tagType==="milestone"&&o.phaseName?`${o.phaseName}`:o.phaseName&&o.milestoneName?`${o.phaseName} / ${o.milestoneName}`:""),i=e.computed(()=>o.assignee?[o.assignee]:[]),c=e.computed(()=>_a(o.deadline)),u=f=>{t("removeAssignee",f)},d=e.computed(()=>{var f;return(f=o.tasks)==null?void 0:f.length}),p=e.computed(()=>{var f;return(f=o.tasks)==null?void 0:f.filter(y=>y.isDone).length}),m=e.computed(()=>(p.value||0)/(d.value||1));return(f,y)=>(e.openBlock(),e.createBlock(Ba,{class:e.normalizeClass(["ao-card-feed",{"ao-card-feed--closed":f.isClosed}]),"is-clickable":!0},{header:e.withCtx(()=>[e.createElementVNode("div",jf,[n.value?(e.openBlock(),e.createBlock(Tt,{key:0,label:n.value,class:"ao-card-feed__project",variant:"solid",color:f.projectColor?void 0:"primary","raw-color":s.value},null,8,["label","color","raw-color"])):e.createCommentVNode("",!0),f.isPrivate||f.important||f.isClosed?(e.openBlock(),e.createElementBlock("div",Ff,[f.isPrivate?(e.openBlock(),e.createBlock(Q,{key:0,name:"Lock",class:"ao-card-feed__warning",size:"sm"})):e.createCommentVNode("",!0),f.important?(e.openBlock(),e.createBlock(Q,{key:1,name:"FlagRounded",class:"ao-card-feed__important",size:"sm"})):e.createCommentVNode("",!0),f.isClosed?(e.openBlock(),e.createBlock(Q,{key:2,name:"CheckSmallRounded",class:"ao-card-feed__closed"})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),f.$slots.secondary?(e.openBlock(),e.createElementBlock("div",Uf,[e.renderSlot(f.$slots,"secondary")])):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[e.createElementVNode("div",zf,[l.value?(e.openBlock(),e.createElementBlock("span",Zf,e.toDisplayString(l.value),1)):e.createCommentVNode("",!0),e.createElementVNode("div",xf,[e.createElementVNode("div",Wf,[f.slug?(e.openBlock(),e.createElementBlock("span",qf,e.toDisplayString(f.slug)+": ",1)):e.createCommentVNode("",!0),e.createVNode(ne,{id:f.id,title:f.name,level:5,"is-editable":f.isEditable,"onUpdate:title":r,class:"ao-card-feed__title-inline"},null,8,["id","title","is-editable"])])]),f.deadline?(e.openBlock(),e.createElementBlock("span",Yf,e.toDisplayString(c.value),1)):e.createCommentVNode("",!0)])]),footer:e.withCtx(()=>[e.createElementVNode("div",Kf,[e.createElementVNode("div",Gf,[e.createElementVNode("ul",Xf,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,_=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:_.id},[_?(e.openBlock(),e.createElementBlock("li",Qf,[e.createVNode(ke,{"user-name":e.unref(yn)(_),"avatar-url":_.avatarUrl,"is-closable":!0,onClose:()=>u(_.id)},null,8,["user-name","avatar-url","onClose"])])):e.createCommentVNode("",!0)],64))),128))]),f.comments||f.attachments?(e.openBlock(),e.createElementBlock("ul",Jf,[f.comments?(e.openBlock(),e.createElementBlock("li",eh,[e.createVNode(Q,{name:"ChatOutline",size:"sm"}),e.createElementVNode("span",th,e.toDisplayString(f.comments),1)])):e.createCommentVNode("",!0),f.attachments?(e.openBlock(),e.createElementBlock("li",ah,[e.createVNode(Q,{name:"AttachFileRounded",size:"sm"}),e.createElementVNode("span",oh,e.toDisplayString(f.attachments),1)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",nh,[f.tasks&&f.tasks.length?(e.openBlock(),e.createElementBlock("div",sh,[e.createElementVNode("div",lh,[e.createVNode(Q,{name:"SelectCheckBox",size:"sm"}),e.createElementVNode("span",rh,e.toDisplayString(p.value)+" / "+e.toDisplayString(d.value),1)]),e.createVNode(Na,{percentages:m.value,class:"ao-card-feed__progress"},null,8,["percentages"])])):e.createCommentVNode("",!0)])])]),_:3},8,["class"]))}});const ih={class:"ao-project-milestone"},ch={class:"ao-project-milestone__header"},dh={class:"ao-project-milestone__header_line"},uh={class:"ao-project-milestone__header_line"},ph={class:"ao-project-milestone__title"},mh={key:0,class:"ao-fieldset ao-milestone__fieldset"},vh={class:"ao-field__row ao-milestone__field-row"},fh={class:"ao-field ao-field--inline"},hh={class:"ao-field__row ao-milestone__field-row"},Ch={class:"ao-field ao-milestone__field-multiselect"},gh=["onClick"],_h={class:"ao-project-milestone__body"},yh={key:0,class:"ao-project-milestone__footer"},Xo=e.defineComponent({__name:"AoProjectOverviewMilestoneDetails",props:{milestoneId:{},users:{},projectId:{},phases:{},phaseId:{},isEditable:{type:Boolean},closedStatus:{}},emits:["close","addActivity","updateMilestone","updateActivity","archiveActivity","unarchiveActivity"],setup(a,{emit:t}){const o=a,{t:n}=Ye(),s=e.computed(()=>{var v;return(v=o.phases)==null?void 0:v.find(C=>C.id===o.phaseId)}),r=e.computed(()=>{var v;return(v=o.phases)==null?void 0:v.flatMap(C=>C.milestones)}),l=e.computed(()=>{var v;return(v=r.value)==null?void 0:v.find(C=>C.id===o.milestoneId)}),i=e.computed(()=>{var v;return(v=l.value)==null?void 0:v.activities});e.watch(i,(v,C)=>{Me(v,C)});const c=v=>{t("close",v)},u=()=>{const{name:v,rank:C}=ot(i.value??[],"activity",n);t("addActivity",{milestoneId:o.milestoneId,name:v,rank:C,projectId:o.projectId})},d=v=>{t("updateActivity",v)},p=v=>{i.value&&"moved"in v&&t("updateActivity",{id:v.moved.element.id,rank:pt(i.value,v.moved.newIndex)})},m=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})}}),f=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})}}),y=v=>o.closedStatus?Qa(v,o.closedStatus):!1,_=e.computed(()=>{var v;return((v=o.users)==null?void 0:v.map(C=>({label:`${C.firstName} ${C.lastName}`,value:C.id,avatar:C.avatarUrl})))||[]}),h=e.computed({get(){var v,C;return(C=(v=l.value)==null?void 0:v.assignee)!=null&&C.id?[l.value.assignee.id]:[]},set(v){t("updateMilestone",{id:o.milestoneId,assigneeId:v[0]??null})}}),b=e.computed({get(){var v;return((v=l.value)==null?void 0:v.important)??!1},set(v){t("updateMilestone",{id:o.milestoneId,important:v})}});return(v,C)=>{var N;return e.openBlock(),e.createElementBlock("div",ih,[e.createElementVNode("header",ch,[e.createElementVNode("div",dh,[e.createVNode(K,{"icon-name":"CloseRounded",variant:"ghost",size:"sm",class:"ao-milestone__close",onClick:c})]),e.createElementVNode("div",uh,[e.createElementVNode("div",ph,[e.createVNode(ne,{title:((N=l.value)==null?void 0:N.name)||v.milestoneId,level:5},null,8,["title"]),e.createVNode(qa,{modelValue:b.value,"onUpdate:modelValue":C[0]||(C[0]=V=>b.value=V),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",mh,[e.createElementVNode("div",vh,[e.createElementVNode("label",fh,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":C[1]||(C[1]=V=>f.value=V),class:"ao-milestone__field ao-milestone__date-field",type:"date"},null,512),[[e.vModelText,f.value,void 0,{lazy:!0}]])])]),e.createElementVNode("div",hh,[e.createElementVNode("label",Ch,[e.createVNode(re,{modelValue:h.value,"onUpdate:modelValue":C[2]||(C[2]=V=>h.value=V),options:_.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:V,handleTagRemove:B})=>[e.createVNode(ke,{"user-name":V.label,"avatar-url":V.avatar,"is-closable":!0,onClose:L=>B(V,L)},null,8,["user-name","avatar-url","onClose"])]),_:1},8,["modelValue","options","placeholder","disabled","caret"])])]),e.createVNode(Rn,{color:m.value,"onUpdate:color":C[3]||(C[3]=V=>m.value=V)},{clickable:e.withCtx(({openPicker:V,bgColor:B})=>[e.createElementVNode("button",{style:e.normalizeStyle({background:B}),class:"color-button",onClick:V},null,12,gh)]),_:1},8,["color"])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",_h,[e.createVNode(e.unref(xe),e.mergeProps({class:"ao-project-milestone__activities",list:i.value,disabled:!v.isEditable,"item-key":"id",group:"kanban"},v.$attrs,{onChange:p}),{item:e.withCtx(({element:V})=>{var B,L,P,R,F;return[e.createVNode(wo,{id:V.id,name:V.name||V.id,"phase-name":(B=s.value)==null?void 0:B.name,"milestone-name":(L=l.value)==null?void 0:L.name,"milestone-color":(P=l.value)==null?void 0:P.color,deadline:V.deadline,important:V.important,users:v.users,assignee:V.assignee,slug:V.slug,comments:(R=V.comments)==null?void 0:R.length,attachments:(F=V.attachments)==null?void 0:F.length,tasks:V.tasks,"is-editable":v.isEditable,"is-private":V.private,"is-closed":y(V),onClick:z=>v.$router.push({name:e.unref(oe).activity,params:{milestoneId:v.milestoneId,activityId:V.id}}),onUpdateActivity:d,onRemoveAssignee:()=>d({id:V.id,assigneeId:null})},e.createSlots({_:2},[v.isEditable?{name:"secondary",fn:e.withCtx(()=>[v.isEditable&&V.active?(e.openBlock(),e.createBlock(K,{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:V.id}),["stop"])},null,8,["label","onClick"])):e.createCommentVNode("",!0),v.isEditable&&!V.active?(e.openBlock(),e.createBlock(K,{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:V.id}),["stop"])},null,8,["label","onClick"])):e.createCommentVNode("",!0)]),key:"0"}:void 0]),1032,["id","name","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",yh,[e.createVNode(We,{"icon-name":"Add",label:v.$t("project.activity.add"),onClick:u},null,8,["label"])])):e.createCommentVNode("",!0)])])}}});const bh=e.defineComponent({__name:"AoProjectOverviewActivityDetails",props:{phaseId:{},milestoneId:{},activityId:{},activityTypes:{},activities:{},isTaskCheckable:{type:Function},statuses:{},phases:{},users:{},project:{},userId:{},isEditable:{type:Boolean},attachmentEnabled:{type:Boolean}},emits:["update:activity","addSubtask","updateSubtask","deleteSubtask","addFiles","removeFile","addComment","updateComment","removeComment"],setup(a,{emit:t}){const o=a,n=e.computed(()=>{var h;return(h=o.phases)==null?void 0:h.find(b=>b.id===o.phaseId)}),s=e.computed(()=>{var h;return(h=o.phases)==null?void 0:h.flatMap(b=>b.milestones)}),r=e.computed(()=>{var h;return(h=s.value)==null?void 0:h.find(b=>b.id===o.milestoneId)}),l=e.computed(()=>{var h;return(h=o.activities)==null?void 0:h.find(b=>b.id===o.activityId)}),i=h=>{t("update:activity",h)},c=h=>{t("addSubtask",h)},u=h=>{t("updateSubtask",h)},d=h=>{t("deleteSubtask",h)},p=h=>{t("addFiles",h)},m=h=>{t("removeFile",h)},f=h=>{t("addComment",h)},y=h=>{t("updateComment",h)},_=h=>{t("removeComment",h)};return(h,b)=>{var v,C;return l.value?(e.openBlock(),e.createBlock(po,{key:0,activity:l.value,"activity-types":h.activityTypes,"milestone-id":h.milestoneId,"template-activities":h.activities,"is-template":!1,users:h.users,"user-id":h.userId,"is-task-checkable":h.isTaskCheckable,statuses:h.statuses,breadcrumbs:`${(v=n.value)==null?void 0:v.name} / ${(C=r.value)==null?void 0:C.name}`,"is-editable":h.isEditable,"attachment-enabled":h.attachmentEnabled,projects:[h.project],onClose:h.$router.back,"onUpdate:activity":i,onAddSubtask:c,onUpdateSubtask:u,onDeleteSubtask:d,onAddFiles:p,onRemoveFile:m,onAddComment:f,onUpdateComment:y,onRemoveComment:_},{default:e.withCtx(N=>[e.renderSlot(h.$slots,"default",e.normalizeProps(e.guardReactiveProps(N)))]),_:3},8,["activity","activity-types","milestone-id","template-activities","users","user-id","is-task-checkable","statuses","breadcrumbs","is-editable","attachment-enabled","projects","onClose"])):e.createCommentVNode("",!0)}}}),kh={class:"ao-col-header"},wh=e.defineComponent({__name:"AoColHeader",props:{title:{},items:{}},setup(a){return(t,o)=>(e.openBlock(),e.createElementBlock("header",kh,[e.createVNode(ne,{title:t.title,class:"ao-col-header__title",level:4},null,8,["title"]),t.items?(e.openBlock(),e.createBlock(Tt,{key:0,label:t.items,class:"ao-col-header__items",variant:"solid",color:"primary"},null,8,["label"])):e.createCommentVNode("",!0)]))}});function $h(a){return e.getCurrentScope()?(e.onScopeDispose(a),!0):!1}function ma(a){return typeof a=="function"?a():e.unref(a)}const Eh=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Vh=a=>a!=null,At=()=>{};function Bh(a,t){function o(...n){return new Promise((s,r)=>{Promise.resolve(a(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(s).catch(r)})}return o}function Nh(a,t={}){let o,n,s=At;const r=i=>{clearTimeout(i),s(),s=At};return i=>{const c=ma(a),u=ma(t.maxWait);return o&&r(o),c<=0||u!==void 0&&u<=0?(n&&(r(n),n=null),Promise.resolve(i())):new Promise((d,p)=>{s=t.rejectOnCancel?p:d,u&&!n&&(n=setTimeout(()=>{o&&r(o),n=null,d(i())},u)),o=setTimeout(()=>{n&&r(n),n=null,d(i())},c)})}}function Sh(a,t=200,o={}){return Bh(Nh(t,o),a)}function Ua(a){var t;const o=ma(a);return(t=o==null?void 0:o.$el)!=null?t:o}const Mh=Eh?window:void 0;function Ah(){const a=e.ref(!1),t=e.getCurrentInstance();return t&&e.onMounted(()=>{a.value=!0},t),a}function Th(a){const t=Ah();return e.computed(()=>(t.value,!!a()))}function Oh(a,t,o={}){const{root:n,rootMargin:s="0px",threshold:r=.1,window:l=Mh,immediate:i=!0}=o,c=Th(()=>l&&"IntersectionObserver"in l),u=e.computed(()=>{const y=ma(a);return(Array.isArray(y)?y:[y]).map(Ua).filter(Vh)});let d=At;const p=e.ref(i),m=c.value?e.watch(()=>[u.value,Ua(n),p.value],([y,_])=>{if(d(),!p.value||!y.length)return;const h=new IntersectionObserver(t,{root:Ua(_),rootMargin:s,threshold:r});y.forEach(b=>b&&h.observe(b)),d=()=>{h.disconnect(),d=At}},{immediate:i,flush:"post"}):At,f=()=>{d(),m(),p.value=!1};return $h(f),{isSupported:c,isActive:p,pause(){d(),p.value=!1},resume(){p.value=!0},stop:f}}const Ih={class:e.normalizeClass(["ao-list-kanban"])},Lh={class:"ao-list-kanban__header"},Dh={key:0,class:"ao-list-kanban__end ao-list-kanban__end--loading"},Ph={key:1,class:"ao-list-kanban__end"},Hh={key:0,class:"ao-list-kanban__no-more"},Rh={key:1,class:"ao-list-kanban__divider"},jh={key:1,class:"ao-list-kanban__footer"},Fh=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"],setup(a,{emit:t}){const o=a,n=e.ref(!1),s=e.ref(null);Oh(s,([{isIntersecting:d}])=>{n.value=d}),e.watch(n,d=>{d&&o.hasMore&&!o.isLoading&&t("loadMore")});const r=d=>{var p;return o.isEditable===!0?!0:o.userId&&o.isEditable==="only-own"?o.userId===((p=d.assignee)==null?void 0:p.id):!1},l=d=>{t("selectActivity",d)},i=d=>{t("updateActivity",d)},c=d=>{"added"in d?t("updateActivity",{id:d.added.element.id,statusId:o.status.id,rank:pt(o.list,d.added.newIndex)}):"removed"in d||"moved"in d&&t("updateActivity",{id:d.moved.element.id,rank:pt(o.list,d.moved.newIndex)})},u=e.ref(!1);return(d,p)=>(e.openBlock(),e.createElementBlock("div",Ih,[d.title||d.$slots.header?e.renderSlot(d.$slots,"header",{key:0},()=>{var m;return[e.createElementVNode("div",Lh,[d.title?(e.openBlock(),e.createBlock(wh,{key:0,title:d.title,level:3,items:(m=d.list)==null?void 0:m.length},null,8,["title","items"])):e.createCommentVNode("",!0)])]}):e.createCommentVNode("",!0),e.createVNode(e.unref(xe),e.mergeProps({class:["ao-list-kanban__list",u.value?"ao-list-kanban__transition":void 0],list:d.list,"item-key":"id",group:"kanban","ghost-class":"ao-list-kanban__ghost",animation:"200"},d.$attrs,{draggable:".ao-list-draggable",disabled:!d.isEditable,onChange:c,onStart:p[0]||(p[0]=m=>u.value=!0),onEnd:p[1]||(p[1]=m=>u.value=!1),"component-data":{tag:"transition-group",name:"ao-list-kanban__transition"}}),{item:e.withCtx(({element:m})=>{var f,y,_,h,b,v,C,N,V;return[e.createVNode(wo,{class:e.normalizeClass(r(m)?"ao-list-draggable":""),id:m.id,name:m.name,"project-name":(f=m.project)==null?void 0:f.name,"project-color":(y=m.project)==null?void 0:y.color,"phase-name":(h=(_=m.milestone)==null?void 0:_.phase)==null?void 0:h.name,"milestone-name":(b=m.milestone)==null?void 0:b.name,"milestone-color":(v=m.milestone)==null?void 0:v.color,deadline:m.deadline,rules:((C=m.rules)==null?void 0:C.length)||0,tasks:m.tasks,description:m.description,important:m.important,type:m.type,comments:(N=m.comments)==null?void 0:N.length,attachments:(V=m.attachments)==null?void 0:V.length,users:d.users,assignee:m.assignee,slug:m.slug,"is-editable":r(m),"is-private":m.private,"tag-type":d.tagType,onUpdateActivity:[B=>r(m)&&i(B),()=>r(m)&&i],onClick:()=>l(m.id),onRemoveAssignee:()=>r(m)&&i({id:m.id,assigneeId:null})},{secondary:e.withCtx(()=>[r(m)&&m.active?(e.openBlock(),e.createBlock(K,{key:0,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:d.$t("feed.activity.archive"),onClick:e.withModifiers(()=>d.$emit("archiveActivity",{id:m.id}),["stop"])},null,8,["label","onClick"])):e.createCommentVNode("",!0),r(m)&&!m.active?(e.openBlock(),e.createBlock(K,{key:1,color:"primary",variant:"ghost","icon-name":"ArchiveOutlineRounded",size:"sm","icon-position":"start",corners:"round",label:d.$t("feed.activity.unarchive"),onClick:e.withModifiers(()=>d.$emit("unarchiveActivity",{id:m.id}),["stop"])},null,8,["label","onClick"])):e.createCommentVNode("",!0)]),_:2},1032,["class","id","name","project-name","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(()=>[d.isLoading?(e.openBlock(),e.createElementBlock("div",Dh,[e.createVNode(Q,{name:"Loading"})])):d.hasMore?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"scrollEnd",ref:s,class:"ao-list-kanban__end"},null,512)):(e.openBlock(),e.createElementBlock("div",Ph,[d.noMoreLabel?(e.openBlock(),e.createElementBlock("span",Hh,e.toDisplayString(d.noMoreLabel),1)):d.isEditable?(e.openBlock(),e.createElementBlock("span",Rh)):e.createCommentVNode("",!0)]))]),_:1},16,["class","list","disabled"]),d.$slots.footer||d.footerLabel?(e.openBlock(),e.createElementBlock("div",jh,[e.renderSlot(d.$slots,"footer",{},()=>[d.isEditable?(e.openBlock(),e.createBlock(We,{key:0,"icon-name":"AddBoxOutlineRounded",label:d.footerLabel,onClick:p[2]||(p[2]=m=>d.$emit("add"))},null,8,["label"])):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)]))}});const Uh={class:"ao-field ao-search-field"},zh=["value","placeholder","onKeypress"],Zh=e.defineComponent({__name:"AoSearchField",props:{modelValue:{},delay:{default:250},placeholder:{default:"Search"}},emits:["update:modelValue","clear"],setup(a,{emit:t}){const o=a,n=async l=>{const c=l.target.value;t("update:modelValue",c,l)},s=Sh(n,o.delay),r=l=>{t("clear",l)};return(l,i)=>(e.openBlock(),e.createElementBlock("div",Uh,[e.createElementVNode("input",{value:l.modelValue,type:"text",class:"ao-field__input ao-search-field__input",placeholder:l.placeholder,onInput:i[0]||(i[0]=(...c)=>e.unref(s)&&e.unref(s)(...c)),onKeypress:e.withKeys(n,["enter"])},null,40,zh),e.createVNode(Q,{name:"SearchRounded",class:e.normalizeClass(`ao-search-field__icon ao-search-field__action ${l.modelValue?"":"ao-search-field__action--visible"}`)},null,8,["class"]),e.createVNode(K,{"icon-name":"CloseRounded",size:"sm",color:"primary",corners:"round",class:e.normalizeClass(`ao-search-field__button ao-search-field__action ${l.modelValue?"ao-search-field__action--visible":""}`),onClick:r},null,8,["class"])]))}});const xh={class:"ao-feed"},Wh={class:"ao-feed__filters"},qh={class:"ao-feed__body"},Un=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}},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"],setup(a,{emit:t}){const o=a,{t:n}=Ye();function s(k,O){t("toast",k,O)}const r=e.toRef(o,"activities"),l=async(k,O)=>{await t("selectActivity",k,O)},i=e.ref({}),c=e.ref(!1),u=e.ref(!1),d=e.computed(()=>o.project?"milestone":"project");e.watch([()=>o.statuses,()=>o.activities,()=>o.initialActivityId,()=>o.initialActivitySlug],async([k,O,g,M],[q,x])=>{i.value=Object.fromEntries(k.map(D=>[D.id,O.filter(S=>{var H;return((H=S.status)==null?void 0:H.id)===D.id})])),g&&!c.value?(l(g,null),c.value=!0):M&&!c.value&&(l(null,M),c.value=!0),u.value&&Me(O,x)},{immediate:!0});const p=e.computed(()=>{var k;return!o.selectedActivity||!o.selectedActivity.milestone?"":`${((k=o.selectedActivity.milestone.phase)==null?void 0:k.name)??""} / ${o.selectedActivity.milestone.name??""}`}),m=k=>{var x,D;const O=(x=o.activities)==null?void 0:x.at(-1),g=O?se.LexoRank.parse(O.rank).genNext():se.LexoRank.middle(),M=((D=o.activities)==null?void 0:D.length)??0,q={name:n("activity.defaultName",{idx:M+1}),rank:g.format(),statusId:k.id};o.filters.assigneeId.length>0&&(q.assigneeId=o.filters.assigneeId[0]),o.filters.projectId.length>0&&(q.projectId=o.filters.projectId[0]),o.filters.typeId.length>0&&(q.typeId=o.filters.typeId[0]),u.value=!0,t("addActivity",q)},f=(k,O)=>{u.value=!1,t("update:filters",{...o.filters,[k]:O})},y=e.computed(()=>o.project?[o.project]:o.projects??[]),_=e.computed(()=>y.value.map(k=>({value:k.id,label:k.name}))),h=e.computed(()=>{var k;return(k=o.activityTypes)==null?void 0:k.map(O=>({value:O.id,label:O.name}))}),b=e.computed(()=>o.users.map(k=>({value:k.id,label:`${k.firstName} ${k.lastName}`,avatar:k.avatarUrl}))),v=k=>{o.selectedActivity&&t("update:activity",k)},C=k=>{t("update:activity",k)},N=k=>{t("archiveActivity",k)},V=k=>{t("unarchiveActivity",k)},B=k=>{u.value=!1,t("update:searchText",k)},L=k=>{u.value=!1,t("clear:searchText",k)},P=k=>{o.selectedActivity&&t("addSubtask",k)},R=k=>{o.selectedActivity&&t("updateSubtask",k)},F=k=>{o.selectedActivity&&t("deleteSubtask",k)},z=k=>{t("addFiles",k)},T=k=>{t("removeFile",k)},j=k=>{o.selectedActivity&&t("addComment",{...k,activityId:o.selectedActivity.id})},Y=k=>{const{id:O}=o.selectedActivity||{};O&&t("updateComment",k)},Z=k=>{const{id:O}=o.selectedActivity||{};O&&t("removeComment",k)},U=Rt.useRouter(),E=e.ref("feed"),$=[{label:"Overview",value:"overview"},{label:"Feed",value:"feed"},{label:"Mapping",value:"mapping"}];return e.watch(E,k=>{k==="feed"?(U.push({name:oe.feed}),console.log("Navigating to feed...")):k==="overview"?(U.push({name:oe.project}),console.log("Navigating to feed...")):k==="mapping"&&(U.push({name:oe.mapping}),console.log("Navigating to feed..."))}),(k,O)=>{var g;return e.openBlock(),e.createElementBlock("div",xh,[e.createVNode(Zt,null,{primary:e.withCtx(()=>[e.createElementVNode("div",Wh,[e.createVNode(ko,{tabs:$,modelValue:E.value,"onUpdate:modelValue":O[0]||(O[0]=M=>E.value=M)},null,8,["modelValue"]),e.createVNode(Zh,{"model-value":k.searchText,placeholder:k.$t("feed.search.placeholder"),class:"ao-feed__search","onUpdate:modelValue":B,onClear:L},null,8,["model-value","placeholder"]),o.project?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(re,{key:0,"model-value":k.filters[e.unref(Je).project],mode:"tags",options:_.value,"close-on-select":!1,searchable:!0,class:"ao-feed__filter ao-feed__filter__projects",placeholder:k.$t("feed.filters.project.placeholder"),"onUpdate:modelValue":O[1]||(O[1]=M=>f(e.unref(Je).project,M))},null,8,["model-value","options","placeholder"])),h.value?(e.openBlock(),e.createBlock(re,{key:1,"model-value":k.filters[e.unref(Je).type],mode:"tags",options:h.value,"close-on-select":!1,searchable:!0,class:"ao-feed__filter ao-feed__filter__types",placeholder:k.$t("feed.filters.activityType.placeholder"),"onUpdate:modelValue":O[2]||(O[2]=M=>f(e.unref(Je).type,M))},null,8,["model-value","options","placeholder"])):e.createCommentVNode("",!0),b.value.length?(e.openBlock(),e.createBlock(re,{key:2,"model-value":k.filters[e.unref(Je).assignee],mode:"tags",options:b.value,"close-on-select":!1,searchable:!0,class:"ao-feed__filter ao-feed__filter__assignees",placeholder:k.$t("feed.filters.assignee.placeholder"),"onUpdate:modelValue":O[3]||(O[3]=M=>f(e.unref(Je).assignee,M))},{tag:e.withCtx(({option:M,handleTagRemove:q})=>[e.createVNode(ke,{"user-name":M.label,"avatar-url":M.avatar,"is-closable":!0,onClose:x=>q(M,x)},null,8,["user-name","avatar-url","onClose"])]),_:1},8,["model-value","options","placeholder"])):e.createCommentVNode("",!0)]),e.createVNode(K,{class:"ao-feed__only-non-assigned",size:"sm","icon-name":k.showsOnlyNonAssigned?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:k.$t("feed.filters.showsOnlyNonAssigned.label"),role:"checkbox","aria-checked":k.showsOnlyNonAssigned,onClick:O[4]||(O[4]=M=>k.$emit("update:showsOnlyNonAssigned",!k.showsOnlyNonAssigned))},null,8,["icon-name","label","aria-checked"]),e.createVNode(K,{class:"ao-feed__only-important",size:"sm","icon-name":k.showsOnlyImportant?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:k.$t("feed.filters.showsOnlyImportant.label"),role:"checkbox","aria-checked":k.showsOnlyImportant,onClick:O[5]||(O[5]=M=>k.$emit("update:showsOnlyImportant",!k.showsOnlyImportant))},null,8,["icon-name","label","aria-checked"]),e.createVNode(K,{class:"ao-feed__show-archived",size:"sm","icon-name":k.showsArchivedActivities?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:k.$t("feed.filters.showsArchivedActivities.label"),role:"checkbox","aria-checked":k.showsArchivedActivities,onClick:O[6]||(O[6]=M=>k.$emit("update:showsArchivedActivities",!k.showsArchivedActivities))},null,8,["icon-name","label","aria-checked"])]),_:1}),e.createElementVNode("div",qh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.statuses,M=>(e.openBlock(),e.createBlock(Fh,{key:M.id,status:M,list:i.value[M.id],title:M.name,"footer-label":k.$t("feed.activity.add"),users:k.users,"user-id":k.userId,"is-editable":k.isEditable,tagType:d.value,onAdd:()=>m(M),onSelectActivity:l,onArchiveActivity:N,onUnarchiveActivity:V,onUpdateActivity:C},null,8,["status","list","title","footer-label","users","user-id","is-editable","tagType","onAdd"]))),128))]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[k.selectedActivity?(e.openBlock(),e.createBlock(po,{key:0,activity:k.selectedActivity,"activity-types":k.activityTypes,"milestone-id":(g=k.selectedActivity.milestone)==null?void 0:g.id,"template-activities":r.value,users:k.users,"user-id":k.userId,"is-task-checkable":k.isTaskCheckable,statuses:k.statuses,breadcrumbs:p.value,"is-editable":k.isEditable,"attachment-enabled":k.attachmentEnabled,projects:y.value,onClose:O[7]||(O[7]=()=>l(null,null)),"onUpdate:activity":v,onAddSubtask:P,onUpdateSubtask:R,onDeleteSubtask:F,onAddFiles:z,onRemoveFile:T,onAddComment:j,onUpdateComment:Y,onRemoveComment:Z,onToast:s},{default:e.withCtx(M=>[e.renderSlot(k.$slots,"activityDetailsBody",e.normalizeProps(e.guardReactiveProps(M)))]),_:3},8,["activity","activity-types","milestone-id","template-activities","users","user-id","is-task-checkable","statuses","breadcrumbs","is-editable","attachment-enabled","projects"])):e.createCommentVNode("",!0)]))])}}});const Yh={class:"ao-project-mapping"},Kh={class:"ao-project-mapping-mapping__body"},Gh={class:"ao-project-mapping-mapping__phases"},Xh={key:0,class:"ao-project-mapping-mapping__image-wrapper"},Qh=["src","alt"],Jh=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:n}=Ye(),s=()=>{const{name:h,rank:b}=ot(o.phases,"phase",n);t("addPhase",{name:h,rank:b,projectId:o.project.id})},r=h=>{t("updatePhase",h)},l=h=>{t("archivePhase",h)},i=h=>{t("unarchivePhase",h)},c=h=>{t("copyPhaseToTemplate",h)},u=e.ref(!1),d=e.ref(!1),p=(h,b)=>{t("applyTemplate",{templateId:h,projectId:b}),u.value=!1},m=(h,b)=>{var N;const v=(N=o.templates)==null?void 0:N.at(-1),C=v?se.LexoRank.parse(v.rank).genNext():se.LexoRank.middle();t("saveTemplate",{templateName:h,rank:C.format(),phaseIds:b}),d.value=!1},f=Rt.useRouter(),y=e.ref("mapping"),_=[{label:"Overview",value:"overview"},{label:"Feed",value:"feed"},{label:"Mapping",value:"mapping"}];return e.watch(y,h=>{h==="feed"?(f.push({name:oe.feed}),console.log("Navigating to feed...")):h==="overview"?(f.push({name:oe.project}),console.log("Navigating to feed...")):h==="mapping"&&(f.push({name:oe.mapping}),console.log("Navigating to feed..."))}),(h,b)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",e.mergeProps({class:"ao-project-mapping-overview"},h.$attrs),[e.createElementVNode("div",Yh,[e.createVNode(Zt,null,{primary:e.withCtx(()=>[e.createVNode(ko,{tabs:_,modelValue:y.value,"onUpdate:modelValue":b[0]||(b[0]=v=>y.value=v)},null,8,["modelValue"]),e.createVNode(K,{class:"ao-feed__show-archived",size:"sm","icon-name":h.showsArchived?"CheckBoxOutlineRounded":"CheckBoxOutlineBlank","icon-position":"start",color:"primary",variant:"ghost",label:h.$t("feed.filters.showsArchived.label"),role:"checkbox","aria-checked":h.showsArchived,onClick:b[1]||(b[1]=v=>h.$emit("update:showsArchived",!h.showsArchived))},null,8,["icon-name","label","aria-checked"])]),secondary:e.withCtx(()=>[h.isEditable===!0?(e.openBlock(),e.createBlock(K,{key:0,class:"ao-project-mapping-overview__save-as-template",color:"primary",label:h.$t("project.template.save.label"),onClick:b[2]||(b[2]=v=>d.value=!0)},null,8,["label"])):e.createCommentVNode("",!0),h.isEditable===!0?(e.openBlock(),e.createBlock(K,{key:1,class:"ao-project-mapping-overview__add-template",color:"primary",label:h.$t("project.template.apply.label"),onClick:b[3]||(b[3]=v=>u.value=!0)},null,8,["label"])):e.createCommentVNode("",!0)]),_:1}),e.createElementVNode("div",Kh,[e.createElementVNode("div",Gh,[e.createVNode(bo,{phases:h.phases,"closed-status":h.closedStatus,"is-editable":h.isEditable===!0,users:h.users,onAddPhase:s,onUpdatePhase:r,onArchivePhase:l,onUnarchivePhase:i,onCopyPhaseToTemplate:c},null,8,["phases","closed-status","is-editable","users"])]),h.project.architectureImage?(e.openBlock(),e.createElementBlock("div",Xh,[e.createElementVNode("img",{class:"architecture-image",src:h.project.architectureImage.url,alt:e.unref(n)("architectureImage.alt")},null,8,Qh)])):e.createCommentVNode("",!0)])])],16),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[d.value?(e.openBlock(),e.createBlock(Fn,{key:0,phases:h.phases,onClose:b[4]||(b[4]=v=>d.value=!1),onSave:m},null,8,["phases"])):e.createCommentVNode("",!0),u.value?(e.openBlock(),e.createBlock(jn,{key:1,"project-id":h.project.id,templates:h.templates,onClose:b[5]||(b[5]=v=>u.value=!1),onApply:p},null,8,["project-id","templates"])):e.createCommentVNode("",!0)]))],64))}});const tt={TEMPLATES:"templates",TEMPLATE_DETAILS:"template_details",TEMPLATES_LIST:"templates_list"},e9=(a,t={})=>[{path:a,name:tt.TEMPLATES,redirect:{name:tt.TEMPLATES_LIST},...t,children:[{path:"",name:tt.TEMPLATES_LIST,component:zn},{path:":templateId/:phaseId?/:milestoneId?/:activityId?",name:tt.TEMPLATE_DETAILS,component:Hn,props:!0}]}],oe={project:"AoProject",feed:"AoProjectFeed",mapping:"AoProjectMapping",milestone:"AoMilestone",activity:"AoActivity"},t9=(a,t={})=>[{path:a,...t,redirect:{name:oe.project},children:[{path:"",name:oe.project,component:Rf,props:!0,children:[{path:":phaseId/:milestoneId",name:oe.milestone,component:Xo,props:!0},{path:":phaseId/:milestoneId/:activityId",name:oe.activity,props:{default:!0,modal:!0},components:{default:Xo,modal:bh}}]},{path:"feed",name:oe.feed,component:Un,props:!0},{path:"mapping",name:oe.mapping,component:Jh,props:!0}]}],a9={class:"ao-templates"},zn=e.defineComponent({__name:"AoTemplatesList",props:{templates:{}},emits:["addTemplate","updateTemplates","updateItem","removeItem"],setup(a,{emit:t}){const o=a,{t:n}=Ye();e.watch(()=>o.templates,(c,u)=>{Me(c,u)});const s=()=>{var m,f;const c=(m=o.templates)==null?void 0:m.at(-1),u=c?se.LexoRank.parse(c.rank).genNext():se.LexoRank.middle(),d=((f=o.templates)==null?void 0:f.length)??0,p={name:n("template.defaultName.template",{idx:d+1}),rank:u.format()};t("addTemplate",p)},r=(c,u)=>{t("updateItem",{itemType:ee.TEMPLATES,id:c,templateId:c,data:{name:u}})},l=(c,u)=>{t("removeItem",{itemType:ee.TEMPLATES,templateId:c,data:{id:c,...u?{name:u}:{}}})},i=c=>{if(c.moved){const u=zt(c,o.templates??[]);t("updateItem",{itemType:ee.TEMPLATES,id:c.moved.element.id,templateId:c.moved.element.id,data:{rank:u}})}};return(c,u)=>(e.openBlock(),e.createElementBlock("div",a9,[e.createVNode(Zt,null,{secondary:e.withCtx(()=>[e.createVNode(K,{label:c.$t("templates.new"),color:"primary","icon-name":"Add","icon-position":"start",onClick:s},null,8,["label"])]),_:1}),e.createVNode(e.unref(xe),{"model-value":c.templates,class:"ao-templates__list","item-key":"id",handle:".ao-card__drag",onChange:i},{item:e.withCtx(({element:d})=>{var p;return[e.createVNode($3,{id:d.id,title:d.name,phases:d.phases,milestones:(p=d.phases)!=null&&p.length?e.unref(Y0)(d.phases):0,activities:d.phases?e.unref(K0)(d.phases):0,"updated-at":d.updatedAt,"updated-by":d.updatedBy,onUpdateTitle:m=>r(d.id,m),onClick:m=>c.$router.push({name:e.unref(tt).TEMPLATE_DETAILS,params:{templateId:d.id}}),onDeleteItem:u[0]||(u[0]=(m,f)=>l(m,f))},null,8,["id","title","phases","milestones","activities","updated-at","updated-by","onUpdateTitle","onClick"])]}),_:1},8,["model-value"])]))}});const o9={class:"ao-field__label"},Zn=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",o9,e.toDisplayString(t.label),1),e.renderSlot(t.$slots,"default")],2))}}),n9=["type","value","disabled","readonly"],s9=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,n=e.computed(()=>o.modelModifiers.lazy?"change":"input"),s=r=>{o.modelModifiers.number&&(r=Number(r)),t("update:modelValue",r)};return(r,l)=>(e.openBlock(),e.createBlock(Zn,{label:r.label},{default:e.withCtx(()=>[e.createElementVNode("input",e.mergeProps({class:"ao-field__input",type:r.type,value:r.modelValue,disabled:r.isDisabled,readonly:r.isReadonly},{[e.toHandlerKey(n.value)]:l[0]||(l[0]=i=>s(i.target.value))}),null,16,n9)]),_:1},8,["label"]))}}),l9={class:"ao-field"},r9={class:"ao-field__label"},i9=["checked","disabled"],c9=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",l9,[e.createElementVNode("span",r9,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]=n=>{var s;return t.$emit("update:modelValue",((s=n.target)==null?void 0:s.checked)??!1)})},null,40,i9)]))}});exports.AoAvatar=ke;exports.AoCardFeed=wo;exports.AoCheckboxField=c9;exports.AoFeed=Un;exports.AoField=Zn;exports.AoInputField=s9;exports.AoMultiselect=re;exports.AoProjectPhases=bo;exports.AoTemplateDetails=Hn;exports.AoTemplates=is;exports.AoTemplatesList=zn;exports.TemplateItemTypeEnum=nn;exports.activityFeedStatus=c2;exports.durationTypes=i2;exports.feedFilterTypes=Je;exports.getProjectOverviewRoutes=t9;exports.getTemplateRoutes=e9;exports.listUpdateTypes=d2;exports.milestoneStatus=Ot;exports.projectOverviewRoutes=oe;exports.ruleComparators=tn;exports.ruleDurationUnits=on;exports.ruleTriggerTypes=an;exports.templateItemType=ee;exports.templateRouteNames=tt;
|