const e=require("../_util/type.js"),t=require("../_util/classNames.js"),n=require("../_util/PortalWrapper.js"),r=require("../_util/hooks/useId.js");let i=require("vue");var a={fill:`transparent`,"pointer-events":`auto`},o=(0,i.defineComponent)({name:`TourMask`,props:{prefixCls:{type:String},pos:e.objectType(),rootClassName:{type:String},showMask:e.booleanType(),fill:{type:String,default:`rgba(0,0,0,0.5)`},open:e.booleanType(),animated:e.someType([Boolean,Object]),zIndex:{type:Number}},setup(e,{attrs:o}){let s=r.default();return()=>{let{prefixCls:r,open:c,rootClassName:l,pos:u,showMask:d,fill:f,animated:p,zIndex:m}=e,h=`${r}-mask-${s}`,g=typeof p==`object`?p?.placeholder:p;return(0,i.createVNode)(n.default,{visible:c,autoLock:!0},{default:()=>c&&(0,i.createVNode)(`div`,{...o,class:t.default(`${r}-mask`,l,o.class),style:[{position:`fixed`,left:0,right:0,top:0,bottom:0,zIndex:m,pointerEvents:`none`},o.style]},[d?(0,i.createVNode)(`svg`,{style:{width:`100%`,height:`100%`}},[(0,i.createVNode)(`defs`,null,[(0,i.createVNode)(`mask`,{id:h},[(0,i.createVNode)(`rect`,{x:`0`,y:`0`,width:`100vw`,height:`100vh`,fill:`white`},null),u&&(0,i.createVNode)(`rect`,{x:u.left,y:u.top,rx:u.radius,width:u.width,height:u.height,fill:`black`,class:g?`${r}-placeholder-animated`:``},null)])]),(0,i.createVNode)(`rect`,{x:`0`,y:`0`,width:`100%`,height:`100%`,fill:f,mask:`url(#${h})`},null),u&&(0,i.createVNode)(i.Fragment,null,[(0,i.createVNode)(`rect`,{...a,x:`0`,y:`0`,width:`100%`,height:u.top},null),(0,i.createVNode)(`rect`,{...a,x:`0`,y:`0`,width:u.left,height:`100%`},null),(0,i.createVNode)(`rect`,{...a,x:`0`,y:u.top+u.height,width:`100%`,height:`calc(100vh - ${u.top+u.height}px)`},null),(0,i.createVNode)(`rect`,{...a,x:u.left+u.width,y:`0`,width:`calc(100vw - ${u.left+u.width}px)`,height:`100%`},null)])]):null])})}}});exports.default=o;