jamespot-react-components 1.3.164 → 1.3.166
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/jamespot-react-components.cjs +3 -3
- package/dist/jamespot-react-components.js +1180 -1161
- package/dist/src/components/JRCFileViewer/JRCFileViewer.d.ts +2 -1
- package/dist/src/components/JRCFileViewer/JRCFileViewerRaw.d.ts +1 -1
- package/dist/src/components/JRCFileViewer/types.d.ts +1 -0
- package/dist/src/components/JRCTooltip/JRCTooltip.stories.d.ts +5 -0
- package/package.json +3 -3
|
@@ -389,7 +389,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
389
389
|
`,_ae=v.span`
|
|
390
390
|
display: inline-block;
|
|
391
391
|
${e=>e.height?`height: ${e.height}`:""}
|
|
392
|
-
`,Uf=h.forwardRef((e,t)=>{const r=h.useMemo(()=>qt(),[]),n=h.useMemo(()=>e.asBlock?SP:Gae,[e.asBlock]),i=h.useMemo(()=>e.asBlock?SP:_ae,[e.asBlock]);return l.jsxs(n,{className:e.className,height:e.height,children:[l.jsx(i,{"aria-describedby":e.disabled?void 0:r,"data-tooltip-id":r,height:e.height,className:"tooltip-source",children:e.children}),!e.disabled&&l.jsx(Wae,{ref:
|
|
392
|
+
`,Uf=h.forwardRef((e,t)=>{const r=h.useMemo(()=>qt(),[]),n=h.useMemo(()=>e.asBlock?SP:Gae,[e.asBlock]),i=h.useMemo(()=>e.asBlock?SP:_ae,[e.asBlock]),[o,a]=h.useState(!1),s=h.useRef(null),A=h.useRef(void 0),c=h.useRef(!1);e.disabled&&o&&a(!1),h.useEffect(()=>()=>clearTimeout(A.current),[]);const d=h.useCallback(m=>{s.current=m,typeof t=="function"?t(m):t&&(t.current=m)},[t]),u=()=>{clearTimeout(A.current),A.current=void 0},f=m=>{!(m.target instanceof Node)||!m.currentTarget.contains(m.target)||(c.current=!0,!(o||e.disabled||A.current)&&(e.delayShow?A.current=setTimeout(()=>{A.current=void 0,a(!0)},e.delayShow):a(!0)))},g=()=>{c.current=!1,u()},p=()=>{c.current||s.current?.close()};return l.jsxs(n,{className:e.className,height:e.height,children:[l.jsx(i,{"aria-describedby":e.disabled?void 0:r,"data-tooltip-id":r,height:e.height,className:"tooltip-source",onMouseOver:f,onMouseLeave:g,children:e.children}),!e.disabled&&o&&l.jsx(Wae,{ref:d,defaultIsOpen:!0,afterShow:p,afterHide:()=>a(!1),role:"tooltip",id:r,place:e.position??"bottom",$backgroundColor:e.color.background,border:e.color.border?`1px solid ${e.color.border}`:void 0,$textColor:e.color.text,clickable:e.clickable,globalCloseEvents:Uae,sizeTooltip:e.sizeTooltip,className:"tooltip-wrapper",delayHide:e.delayHide??0,"aria-label":e.description,opacity:1,children:e.tooltip})]})});Uf.displayName="JRCBaseTooltip";const Vae=v.div`
|
|
393
393
|
width: 100%;
|
|
394
394
|
`,Xae=v.div`
|
|
395
395
|
display: flex;
|
|
@@ -411,7 +411,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
411
411
|
word-break: break-word;
|
|
412
412
|
`,ar=e=>{const t=F.useIntl(),r=v.useTheme(),n=h.useRef(null),i=!!(e.closeButton??e.button),o=e.closeButton??e.button?"large":e.title??(e.description&&e.description.length>50)?"medium":"small",a=()=>{n.current?.close()};return e.active===!1?l.jsx(l.Fragment,{children:e.children}):l.jsx(l.Fragment,{children:l.jsx(Uf,{ref:n,height:e.height,asBlock:e.asBlock,className:e.className,color:{background:r.color.navy,text:r.color.white},description:e.description,sizeTooltip:o,position:e.position,tooltip:l.jsxs("div",{children:[l.jsxs(Xae,{children:[o==="large"&&e.closeButton&&e.button&&l.jsx(Kae,{onClick:a,children:l.jsx(ie,{name:"icon-times",size:24,color:"white"})}),l.jsxs(Vae,{children:[e.title!==void 0&&l.jsx(Xl,{size:"l",children:t.formatMessage({id:e.title})}),l.jsx(qae,{$sizeTooltip:o,children:t.formatMessage({id:e.description})})]})]}),l.jsx(Jae,{children:o==="large"&&e.button&&l.jsx(Ez,{...e.button,onClick:s=>{e.button?.onClick?.(s),a()}})})]}),clickable:i,children:e.children})})};function Yae(e,t){return e&&!e.endsWith(t)?`${e}${t}`:e}function Zae(e,t){return e?.startsWith(t)?e.split("").slice(t.length).join(""):e}function fo(e){return e.toString().padStart(2,"0")}function Qz(e,t){return e.slice(0,t).trim()+(e.trim().length>t?"...":"")}function $ae(e){return e.length===0?"":e[0].toUpperCase()+e.slice(1)}function ese(e){return e.replace(/\\(.)/g,"$1")}function Uz(e,t){return e.toLowerCase().startsWith(t.toLowerCase())}function zz(e,t){return e.toLowerCase().includes(t.toLowerCase())}function Dc(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase()}const tse=Object.freeze(Object.defineProperty({__proto__:null,capitalize:$ae,includesIgnoreCase:zz,limitSize:Qz,normalizeText:Dc,padStartTwoDigits:fo,removeIfStartsWith:Zae,startsWithIgnoreCase:Uz,stripSlashes:ese,suffixIfDoesNotExist:Yae},Symbol.toStringTag,{value:"Module"})),Hi=e=>String(e).padStart(2,"0"),yo=e=>{const t=e?new Date(e):new Date;return{date:t.getDate(),month:t.getMonth()+1,year:t.getFullYear(),hours:t.getHours(),minutes:t.getMinutes(),seconds:t.getSeconds()}},xs=e=>{const t=e.getFullYear(),r=Hi(e.getMonth()+1),n=Hi(e.getDate());return`${t}-${r}-${n}`},Em=e=>{const t=Hi(e.getHours()),r=Hi(e.getMinutes()),n=Hi(e.getSeconds());return`${t}:${r}:${n}`},nc=e=>{const t=xs(e),r=Em(e);return`${t} ${r}`},Qc=(e,t)=>{const{date:r,month:n,year:i}=yo(t),{date:o,month:a,year:s}=yo(e);return r===o&&n===a&&i===s},my=e=>{const{date:t,month:r,year:n}=yo(),{date:i,month:o,year:a}=yo(e);return t===i&&r===o&&n===a},oD=e=>{const t=new Date;t.setDate(t.getDate()-1);const{date:r,month:n,year:i}=yo(t),{date:o,month:a,year:s}=yo(e);return o===r&&a===n&&s===i},aD=e=>{const t=new Date;t.setDate(t.getDate()+1);const{date:r,month:n,year:i}=yo(t),{date:o,month:a,year:s}=yo(e);return o===r&&a===n&&s===i},Wz=e=>my(e)?"GLOBAL_Today":oD(e)?"GLOBAL_Yesterday":aD(e)?"GLOBAL_Tomorrow":null,Wa=e=>{if(e){const t=Date.parse(e);if(!isNaN(t))return new Date(t).getTime()/1e3}},rse=(e=new Date)=>e.toISOString().substring(0,10),nse=(e,t="date")=>{const r=yo(e),n=t.split("-"),i=[];return n.includes("date")&&i.push(`${fo(r.date)}/${fo(r.month)}/${r.year}`),n.includes("time")&&i.push(`${fo(r.hours)}h${fo(r.minutes)}`),n.includes("sec")&&i.push(`${fo(r.seconds)}s`),i.join(" ")},ise=e=>!isNaN(Date.parse(e)),ose=e=>{const t=new Date(e);return t.setDate(0),e.getDate()<t.getDate()&&t.setDate(e.getDate()),t},ase=e=>{const t=new Date(e);return t.setDate(32),t.setDate(32),t.setDate(0),e.getDate()<t.getDate()&&t.setDate(e.getDate()),t},sse=Object.freeze(Object.defineProperty({__proto__:null,addMonth:ase,dateLabel:Wz,extractDate:yo,formatDate:xs,formatDateTime:nc,formatTime:Em,isSameDay:Qc,isToday:my,isTomorrow:aD,isValidDate:ise,isYesterday:oD,padDate:Hi,strToTimestamp:Wa,substractMonth:ose,toHumanDate:nse,toISODate:rse},Symbol.toStringTag,{value:"Module"}));function DP(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function lse(e){if(Array.isArray(e))return e}function Ase(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,i,o,a,s=[],A=!0,c=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(A=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);A=!0);}catch(d){c=!0,i=d}finally{try{if(!A&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}function cse(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
413
413
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dse(e,t){return lse(e)||Ase(e,t)||use(e,t)||cse()}function use(e,t){if(e){if(typeof e=="string")return DP(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?DP(e,t):void 0}}const Gz=Object.entries,IP=Object.setPrototypeOf,fse=Object.isFrozen,gse=Object.getPrototypeOf,hse=Object.getOwnPropertyDescriptor;let un=Object.freeze,gn=Object.seal,ic=Object.create,_z=typeof Reflect<"u"&&Reflect,xE=_z.apply,bE=_z.construct;un||(un=function(t){return t});gn||(gn=function(t){return t});xE||(xE=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),o=2;o<n;o++)i[o-2]=arguments[o];return t.apply(r,i)});bE||(bE=function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return new t(...n)});const TA=Mr(Array.prototype.forEach),pse=Mr(Array.prototype.lastIndexOf),TP=Mr(Array.prototype.pop),OA=Mr(Array.prototype.push),mse=Mr(Array.prototype.splice),ps=Array.isArray,vu=Mr(String.prototype.toLowerCase),pw=Mr(String.prototype.toString),OP=Mr(String.prototype.match),Qd=Mr(String.prototype.replace),jP=Mr(String.prototype.indexOf),vse=Mr(String.prototype.trim),yse=Mr(Number.prototype.toString),xse=Mr(Boolean.prototype.toString),PP=typeof BigInt>"u"?null:Mr(BigInt.prototype.toString),kP=typeof Symbol>"u"?null:Mr(Symbol.prototype.toString),qr=Mr(Object.prototype.hasOwnProperty),Ud=Mr(Object.prototype.toString),Kr=Mr(RegExp.prototype.test),il=bse(TypeError);function Mr(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return xE(e,t,n)}}function bse(e){return function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return bE(e,r)}}function vt(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:vu;if(IP&&IP(e,null),!ps(t))return e;let n=t.length;for(;n--;){let i=t[n];if(typeof i=="string"){const o=r(i);o!==i&&(fse(t)||(t[n]=o),i=o)}e[i]=!0}return e}function wse(e){for(let t=0;t<e.length;t++)qr(e,t)||(e[t]=null);return e}function Rn(e){const t=ic(null);for(const n of Gz(e)){var r=dse(n,2);const i=r[0],o=r[1];qr(e,i)&&(ps(o)?t[i]=wse(o):o&&typeof o=="object"&&o.constructor===Object?t[i]=Rn(o):t[i]=o)}return t}function Cse(e){switch(typeof e){case"string":return e;case"number":return yse(e);case"boolean":return xse(e);case"bigint":return PP?PP(e):"0";case"symbol":return kP?kP(e):"Symbol()";case"undefined":return Ud(e);case"function":case"object":{if(e===null)return Ud(e);const t=e,r=Mo(t,"toString");if(typeof r=="function"){const n=r(t);return typeof n=="string"?n:Ud(n)}return Ud(e)}default:return Ud(e)}}function Mo(e,t){for(;e!==null;){const n=hse(e,t);if(n){if(n.get)return Mr(n.get);if(typeof n.value=="function")return Mr(n.value)}e=gse(e)}function r(){return null}return r}function Ese(e){try{return Kr(e,""),!0}catch{return!1}}const LP=un(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),mw=un(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),vw=un(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Bse=un(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),yw=un(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Sse=un(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),MP=un(["#text"]),RP=un(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),xw=un(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),NP=un(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),eh=un(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Dse=gn(/{{[\w\W]*|^[\w\W]*}}/g),Ise=gn(/<%[\w\W]*|^[\w\W]*%>/g),Tse=gn(/\${[\w\W]*/g),Ose=gn(/^data-[\-\w.\u00B7-\uFFFF]+$/),jse=gn(/^aria-[\-\w]+$/),FP=gn(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Pse=gn(/^(?:\w+script|data):/i),kse=gn(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Lse=gn(/^html$/i),Mse=gn(/^[a-z][.\w]*(-[.\w]+)+$/i),HP=gn(/<[/\w!]/g),QP=gn(/<[/\w]/g),Rse=gn(/<\/no(script|embed|frames)/i),Nse=gn(/\/>/i),di={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Fse=function(){return typeof window>"u"?null:window},Hse=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let n=null;const i="data-tt-policy-suffix";r&&r.hasAttribute(i)&&(n=r.getAttribute(i));const o="dompurify"+(n?"#"+n:"");try{return t.createPolicy(o,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},UP=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},rs=function(t,r,n,i){return qr(t,r)&&ps(t[r])?vt(i.base?Rn(i.base):{},t[r],i.transform):n};function Vz(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Fse();const t=xe=>Vz(xe);if(t.version="3.4.12",t.removed=[],!e||!e.document||e.document.nodeType!==di.document||!e.Element)return t.isSupported=!1,t;let r=e.document;const n=r,i=n.currentScript;e.DocumentFragment;const o=e.HTMLTemplateElement,a=e.Node,s=e.Element,A=e.NodeFilter,c=e.NamedNodeMap;c===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const d=e.DOMParser,u=e.trustedTypes,f=s.prototype,g=Mo(f,"cloneNode"),p=Mo(f,"remove"),m=Mo(f,"nextSibling"),y=Mo(f,"childNodes"),x=Mo(f,"parentNode"),b=Mo(f,"shadowRoot"),w=Mo(f,"attributes"),C=a&&a.prototype?Mo(a.prototype,"nodeType"):null,B=a&&a.prototype?Mo(a.prototype,"nodeName"):null;if(typeof o=="function"){const xe=r.createElement("template");xe.content&&xe.content.ownerDocument&&(r=xe.content.ownerDocument)}let E,S="",D,I=!1,O=0;const T=function(){if(O>0)throw il('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},j=function(z){T(),O++;try{return E.createHTML(z)}finally{O--}},k=function(z){T(),O++;try{return E.createScriptURL(z)}finally{O--}},L=function(){return I||(D=Hse(u,i),I=!0),D},V=r,J=V.implementation,H=V.createNodeIterator,W=V.createDocumentFragment,K=V.getElementsByTagName,U=n.importNode;let P=UP();t.isSupported=typeof Gz=="function"&&typeof x=="function"&&J&&J.createHTMLDocument!==void 0;const Q=Dse,G=Ise,Y=Tse,se=Ose,fe=jse,le=Pse,_=kse,q=Mse;let $=FP,ee=null;const R=vt({},[...LP,...mw,...vw,...yw,...MP]);let ce=null;const oe=vt({},[...RP,...xw,...NP,...eh]);let de=Object.seal(ic(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ce=null,Ge=null;const xt=Object.seal(ic(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Se=!0,it=!0,ae=!1,he=!0,me=!1,et=!0,vr=!1,Yi=!1,Zi=null,_n=null,$i=!1,hn=!1,Ai=!1,eo=!1,To=!0,Si=!1;const gr="user-content-";let Sr=!0,Di=!1,Vn={},Me=null;const ct=vt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Qe=null;const lt=vt({},["audio","video","img","source","image","track"]);let tr=null;const nt=vt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),to="http://www.w3.org/1998/Math/MathML",_t="http://www.w3.org/2000/svg",Ht="http://www.w3.org/1999/xhtml";let ke=Ht,ot=!1,nn=null;const da=vt({},[to,_t,Ht],pw),we=un(["mi","mo","mn","ms","mtext"]);let Ue=vt({},we);const He=un(["annotation-xml"]);let bt=vt({},He);const Dr=vt({},["title","style","font","a","script"]);let pn=null;const Ii=["application/xhtml+xml","text/html"],on="text/html";let ft=null,St=null;const es=r.createElement("form"),kg=function(z){return z instanceof RegExp||z instanceof Function},kd=function(){let z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(St&&St===z)return;(!z||typeof z!="object")&&(z={}),z=Rn(z),pn=Ii.indexOf(z.PARSER_MEDIA_TYPE)===-1?on:z.PARSER_MEDIA_TYPE,ft=pn==="application/xhtml+xml"?pw:vu,ee=rs(z,"ALLOWED_TAGS",R,{transform:ft}),ce=rs(z,"ALLOWED_ATTR",oe,{transform:ft}),nn=rs(z,"ALLOWED_NAMESPACES",da,{transform:pw}),tr=rs(z,"ADD_URI_SAFE_ATTR",nt,{transform:ft,base:nt}),Qe=rs(z,"ADD_DATA_URI_TAGS",lt,{transform:ft,base:lt}),Me=rs(z,"FORBID_CONTENTS",ct,{transform:ft}),Ce=rs(z,"FORBID_TAGS",Rn({}),{transform:ft}),Ge=rs(z,"FORBID_ATTR",Rn({}),{transform:ft}),Vn=qr(z,"USE_PROFILES")?z.USE_PROFILES&&typeof z.USE_PROFILES=="object"?Rn(z.USE_PROFILES):z.USE_PROFILES:!1,Se=z.ALLOW_ARIA_ATTR!==!1,it=z.ALLOW_DATA_ATTR!==!1,ae=z.ALLOW_UNKNOWN_PROTOCOLS||!1,he=z.ALLOW_SELF_CLOSE_IN_ATTR!==!1,me=z.SAFE_FOR_TEMPLATES||!1,et=z.SAFE_FOR_XML!==!1,vr=z.WHOLE_DOCUMENT||!1,hn=z.RETURN_DOM||!1,Ai=z.RETURN_DOM_FRAGMENT||!1,eo=z.RETURN_TRUSTED_TYPE||!1,$i=z.FORCE_BODY||!1,To=z.SANITIZE_DOM!==!1,Si=z.SANITIZE_NAMED_PROPS||!1,Sr=z.KEEP_CONTENT!==!1,Di=z.IN_PLACE||!1,$=Ese(z.ALLOWED_URI_REGEXP)?z.ALLOWED_URI_REGEXP:FP,ke=typeof z.NAMESPACE=="string"?z.NAMESPACE:Ht,Ue=qr(z,"MATHML_TEXT_INTEGRATION_POINTS")&&z.MATHML_TEXT_INTEGRATION_POINTS&&typeof z.MATHML_TEXT_INTEGRATION_POINTS=="object"?Rn(z.MATHML_TEXT_INTEGRATION_POINTS):vt({},we),bt=qr(z,"HTML_INTEGRATION_POINTS")&&z.HTML_INTEGRATION_POINTS&&typeof z.HTML_INTEGRATION_POINTS=="object"?Rn(z.HTML_INTEGRATION_POINTS):vt({},He);const re=qr(z,"CUSTOM_ELEMENT_HANDLING")&&z.CUSTOM_ELEMENT_HANDLING&&typeof z.CUSTOM_ELEMENT_HANDLING=="object"?Rn(z.CUSTOM_ELEMENT_HANDLING):ic(null);if(de=ic(null),qr(re,"tagNameCheck")&&kg(re.tagNameCheck)&&(de.tagNameCheck=re.tagNameCheck),qr(re,"attributeNameCheck")&&kg(re.attributeNameCheck)&&(de.attributeNameCheck=re.attributeNameCheck),qr(re,"allowCustomizedBuiltInElements")&&typeof re.allowCustomizedBuiltInElements=="boolean"&&(de.allowCustomizedBuiltInElements=re.allowCustomizedBuiltInElements),gn(de),me&&(it=!1),Ai&&(hn=!0),Vn&&(ee=vt({},MP),ce=ic(null),Vn.html===!0&&(vt(ee,LP),vt(ce,RP)),Vn.svg===!0&&(vt(ee,mw),vt(ce,xw),vt(ce,eh)),Vn.svgFilters===!0&&(vt(ee,vw),vt(ce,xw),vt(ce,eh)),Vn.mathMl===!0&&(vt(ee,yw),vt(ce,NP),vt(ce,eh))),xt.tagCheck=null,xt.attributeCheck=null,qr(z,"ADD_TAGS")&&(typeof z.ADD_TAGS=="function"?xt.tagCheck=z.ADD_TAGS:ps(z.ADD_TAGS)&&(ee===R&&(ee=Rn(ee)),vt(ee,z.ADD_TAGS,ft))),qr(z,"ADD_ATTR")&&(typeof z.ADD_ATTR=="function"?xt.attributeCheck=z.ADD_ATTR:ps(z.ADD_ATTR)&&(ce===oe&&(ce=Rn(ce)),vt(ce,z.ADD_ATTR,ft))),qr(z,"ADD_URI_SAFE_ATTR")&&ps(z.ADD_URI_SAFE_ATTR)&&vt(tr,z.ADD_URI_SAFE_ATTR,ft),qr(z,"FORBID_CONTENTS")&&ps(z.FORBID_CONTENTS)&&(Me===ct&&(Me=Rn(Me)),vt(Me,z.FORBID_CONTENTS,ft)),qr(z,"ADD_FORBID_CONTENTS")&&ps(z.ADD_FORBID_CONTENTS)&&(Me===ct&&(Me=Rn(Me)),vt(Me,z.ADD_FORBID_CONTENTS,ft)),Sr&&(ee["#text"]=!0),vr&&vt(ee,["html","head","body"]),ee.table&&(vt(ee,["tbody"]),delete Ce.tbody),z.TRUSTED_TYPES_POLICY){if(typeof z.TRUSTED_TYPES_POLICY.createHTML!="function")throw il('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof z.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw il('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const ge=E;E=z.TRUSTED_TYPES_POLICY;try{S=j("")}catch(Oe){throw E=ge,Oe}}else z.TRUSTED_TYPES_POLICY===null?(E=void 0,S=""):(E===void 0&&(E=L()),E&&typeof S=="string"&&(S=j("")));un&&un(z),St=z},Ld=vt({},[...mw,...vw,...Bse]),Md=vt({},[...yw,...Sse]),Lg=function(z,re,ge){return re.namespaceURI===Ht?z==="svg":re.namespaceURI===to?z==="svg"&&(ge==="annotation-xml"||Ue[ge]):!!Ld[z]},Mg=function(z,re,ge){return re.namespaceURI===Ht?z==="math":re.namespaceURI===_t?z==="math"&&bt[ge]:!!Md[z]},Rg=function(z,re,ge){return re.namespaceURI===_t&&!bt[ge]||re.namespaceURI===to&&!Ue[ge]?!1:!Md[z]&&(Dr[z]||!Ld[z])},Dt=function(z){let re=x(z);(!re||!re.tagName)&&(re={namespaceURI:ke,tagName:"template"});const ge=vu(z.tagName),Oe=vu(re.tagName);return nn[z.namespaceURI]?z.namespaceURI===_t?Lg(ge,re,Oe):z.namespaceURI===to?Mg(ge,re,Oe):z.namespaceURI===Ht?Rg(ge,re,Oe):!!(pn==="application/xhtml+xml"&&nn[z.namespaceURI]):!1},Xr=function(z){OA(t.removed,{element:z});try{x(z).removeChild(z)}catch{if(p(z),!x(z))throw il("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},ts=function(z){el(z);const re=y(z);if(re){const Oe=[];TA(re,Xe=>{OA(Oe,Xe)}),TA(Oe,Xe=>{try{p(Xe)}catch{}})}const ge=w(z);if(ge)for(let Oe=ge.length-1;Oe>=0;--Oe){const Xe=ge[Oe],$e=Xe&&Xe.name;if(typeof $e=="string")try{z.removeAttribute($e)}catch{}}},ci=function(z,re){try{OA(t.removed,{attribute:re.getAttributeNode(z),from:re})}catch{OA(t.removed,{attribute:null,from:re})}if(re.removeAttribute(z),z==="is")if(hn||Ai)try{Xr(re)}catch{}else try{re.setAttribute(z,"")}catch{}},rb=function(z){const re=w(z);if(re)for(let ge=re.length-1;ge>=0;--ge){const Oe=re[ge],Xe=Oe&&Oe.name;if(!(typeof Xe!="string"||ce[ft(Xe)]))try{z.removeAttribute(Xe)}catch{}}},el=function(z){const re=[z];for(;re.length>0;){const ge=re.pop();(C?C(ge):ge.nodeType)===di.element&&rb(ge);const Xe=y(ge);if(Xe)for(let $e=Xe.length-1;$e>=0;--$e)re.push(Xe[$e])}},FY=function(z){if(!et)return;const re=[z];for(;re.length>0;){const ge=re.pop(),Oe=C?C(ge):ge.nodeType;if(Oe===di.processingInstruction||Oe===di.comment&&Kr(QP,ge.data)){try{p(ge)}catch{}continue}if(Oe===di.element){const $e=ge,hr=ft(B?B(ge):ge.nodeName);try{$e.hasAttribute&&$e.hasAttribute("patchsrc")&&$e.removeAttribute("patchsrc"),$e.hasAttribute&&$e.hasAttribute("for")&&hr!=="label"&&hr!=="output"&&$e.removeAttribute("for")}catch{}}const Xe=y(ge);if(Xe)for(let $e=Xe.length-1;$e>=0;--$e)re.push(Xe[$e])}},$O=function(z){let re=null,ge=null;if($i)z="<remove></remove>"+z;else{const $e=OP(z,/^[\r\n\t ]+/);ge=$e&&$e[0]}pn==="application/xhtml+xml"&&ke===Ht&&(z='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+z+"</body></html>");const Oe=E?j(z):z;if(ke===Ht)try{re=new d().parseFromString(Oe,pn)}catch{}if(!re||!re.documentElement){re=J.createDocument(ke,"template",null);try{re.documentElement.innerHTML=ot?S:Oe}catch{}}const Xe=re.body||re.documentElement;return z&&ge&&Xe.insertBefore(r.createTextNode(ge),Xe.childNodes[0]||null),ke===Ht?K.call(re,vr?"html":"body")[0]:vr?re.documentElement:Xe},ej=function(z){return H.call(z.ownerDocument||z,z,A.SHOW_ELEMENT|A.SHOW_COMMENT|A.SHOW_TEXT|A.SHOW_PROCESSING_INSTRUCTION|A.SHOW_CDATA_SECTION,null)},Ng=function(z){return z=Qd(z,Q," "),z=Qd(z,G," "),z=Qd(z,Y," "),z},nb=function(z){var re;z.normalize();const ge=H.call(z.ownerDocument||z,z,A.SHOW_TEXT|A.SHOW_COMMENT|A.SHOW_CDATA_SECTION|A.SHOW_PROCESSING_INSTRUCTION,null);let Oe=ge.nextNode();for(;Oe;)Oe.data=Ng(Oe.data),Oe=ge.nextNode();const Xe=(re=z.querySelectorAll)===null||re===void 0?void 0:re.call(z,"template");Xe&&TA(Xe,$e=>{IA($e.content)&&nb($e.content)})},Fg=function(z){const re=B?B(z):null;return typeof re!="string"||ft(re)!=="form"?!1:typeof z.nodeName!="string"||typeof z.textContent!="string"||typeof z.removeChild!="function"||z.attributes!==w(z)||typeof z.removeAttribute!="function"||typeof z.setAttribute!="function"||typeof z.namespaceURI!="string"||typeof z.insertBefore!="function"||typeof z.hasChildNodes!="function"||z.nodeType!==C(z)||z.childNodes!==y(z)},IA=function(z){if(!C||typeof z!="object"||z===null)return!1;try{return C(z)===di.documentFragment}catch{return!1}},Rd=function(z){if(!C||typeof z!="object"||z===null)return!1;try{return typeof C(z)=="number"}catch{return!1}};function Oo(xe,z,re){xe.length!==0&&TA(xe,ge=>{ge.call(t,z,re,St)})}const HY=function(z,re){return!!(et&&z.hasChildNodes()&&!Rd(z.firstElementChild)&&Kr(HP,z.textContent)&&Kr(HP,z.innerHTML)||et&&z.namespaceURI===Ht&&re==="style"&&Rd(z.firstElementChild)||z.nodeType===di.processingInstruction||et&&z.nodeType===di.comment&&Kr(QP,z.data))},QY=function(z,re){if(!Ce[re]&&nj(re)&&(de.tagNameCheck instanceof RegExp&&Kr(de.tagNameCheck,re)||de.tagNameCheck instanceof Function&&de.tagNameCheck(re)))return!1;if(Sr&&!Me[re]){const ge=x(z),Oe=y(z);if(Oe&&ge){const Xe=Oe.length;for(let $e=Xe-1;$e>=0;--$e){const hr=Di?Oe[$e]:g(Oe[$e],!0);ge.insertBefore(hr,m(z))}}}return Xr(z),!0},tj=function(z,re){if(Oo(P.beforeSanitizeElements,z,null),z!==re&&x(z)===null)return!0;if(Fg(z))return Xr(z),!0;const ge=ft(B?B(z):z.nodeName);if(Oo(P.uponSanitizeElement,z,{tagName:ge,allowedTags:ee}),z!==re&&x(z)===null)return!0;if(HY(z,ge))return Xr(z),!0;if(Ce[ge]||!(xt.tagCheck instanceof Function&&xt.tagCheck(ge))&&!ee[ge]){const Xe=QY(z,ge);return Xe===!1&&Oo(P.afterSanitizeElements,z,null),Xe}if((C?C(z):z.nodeType)===di.element&&!Dt(z)||(ge==="noscript"||ge==="noembed"||ge==="noframes")&&Kr(Rse,z.innerHTML))return Xr(z),!0;if(me&&z.nodeType===di.text){const Xe=Ng(z.textContent);z.textContent!==Xe&&(OA(t.removed,{element:z.cloneNode()}),z.textContent=Xe)}return Oo(P.afterSanitizeElements,z,null),!1},rj=function(z,re,ge){if(Ge[re]||et&&re==="patchsrc"||et&&re==="for"&&z!=="label"&&z!=="output"||To&&(re==="id"||re==="name")&&(ge in r||ge in es))return!1;const Oe=ce[re]||xt.attributeCheck instanceof Function&&xt.attributeCheck(re,z);if(!(it&&Kr(se,re))){if(!(Se&&Kr(fe,re))){if(Oe){if(!tr[re]){if(!Kr($,Qd(ge,_,""))){if(!((re==="src"||re==="xlink:href"||re==="href")&&z!=="script"&&jP(ge,"data:")===0&&Qe[z])){if(!(ae&&!Kr(le,Qd(ge,_,"")))){if(ge)return!1}}}}}else if(!(nj(z)&&(de.tagNameCheck instanceof RegExp&&Kr(de.tagNameCheck,z)||de.tagNameCheck instanceof Function&&de.tagNameCheck(z))&&(de.attributeNameCheck instanceof RegExp&&Kr(de.attributeNameCheck,re)||de.attributeNameCheck instanceof Function&&de.attributeNameCheck(re,z))||re==="is"&&de.allowCustomizedBuiltInElements&&(de.tagNameCheck instanceof RegExp&&Kr(de.tagNameCheck,ge)||de.tagNameCheck instanceof Function&&de.tagNameCheck(ge))))return!1}}return!0},UY=vt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),nj=function(z){return!UY[vu(z)]&&Kr(q,z)},zY=function(z,re,ge,Oe){if(E&&typeof u=="object"&&typeof u.getAttributeType=="function"&&!ge)switch(u.getAttributeType(z,re)){case"TrustedHTML":return j(Oe);case"TrustedScriptURL":return k(Oe)}return Oe},WY=function(z,re,ge,Oe){try{ge?z.setAttributeNS(ge,re,Oe):z.setAttribute(re,Oe),Fg(z)?Xr(z):TP(t.removed)}catch{ci(re,z)}},ij=function(z){Oo(P.beforeSanitizeAttributes,z,null);const re=z.attributes;if(!re||Fg(z))return;const ge={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ce,forceKeepAttr:void 0};let Oe=re.length;const Xe=ft(z.nodeName);for(;Oe--;){const $e=re[Oe],hr=$e.name,mn=$e.namespaceURI,ro=$e.value,Xn=ft(hr),no=ro;let Mn=hr==="value"?no:vse(no);if(ge.attrName=Xn,ge.attrValue=Mn,ge.keepAttr=!0,ge.forceKeepAttr=void 0,Oo(P.uponSanitizeAttribute,z,ge),Mn=ge.attrValue,Si&&(Xn==="id"||Xn==="name")&&jP(Mn,gr)!==0&&(ci(hr,z),Mn=gr+Mn),et&&Kr(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Mn)){ci(hr,z);continue}if(Xn==="attributename"&&OP(Mn,"href")){ci(hr,z);continue}if(!ge.forceKeepAttr){if(!ge.keepAttr){ci(hr,z);continue}if(!he&&Kr(Nse,Mn)){ci(hr,z);continue}if(me&&(Mn=Ng(Mn)),!rj(Xe,Xn,Mn)){ci(hr,z);continue}Mn=zY(Xe,Xn,mn,Mn),Mn!==no&&WY(z,hr,mn,Mn)}}Oo(P.afterSanitizeAttributes,z,null)},Hg=function(z){let re=null;const ge=ej(z);for(Oo(P.beforeSanitizeShadowDOM,z,null);re=ge.nextNode();)if(Oo(P.uponSanitizeShadowNode,re,null),tj(re,z),ij(re),IA(re.content)&&Hg(re.content),(C?C(re):re.nodeType)===di.element){const Xe=b(re);IA(Xe)&&(ib(Xe),Hg(Xe))}Oo(P.afterSanitizeShadowDOM,z,null)},ib=function(z){const re=[{node:z,shadow:null}];for(;re.length>0;){const ge=re.pop();if(ge.shadow){Hg(ge.shadow);continue}const Oe=ge.node,$e=(C?C(Oe):Oe.nodeType)===di.element,hr=y(Oe);if(hr)for(let mn=hr.length-1;mn>=0;--mn)re.push({node:hr[mn],shadow:null});if($e){const mn=B?B(Oe):null;if(typeof mn=="string"&&ft(mn)==="template"){const ro=Oe.content;IA(ro)&&re.push({node:ro,shadow:null})}}if($e){const mn=b(Oe);IA(mn)&&re.push({node:null,shadow:mn},{node:mn,shadow:null})}}};return t.sanitize=function(xe){let z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},re=null,ge=null,Oe=null,Xe=null;if(ot=!xe,ot&&(xe="<!-->"),typeof xe!="string"&&!Rd(xe)&&(xe=Cse(xe),typeof xe!="string"))throw il("dirty is not a string, aborting");if(!t.isSupported)return xe;Yi?(ee=Zi,ce=_n):kd(z),(P.uponSanitizeElement.length>0||P.uponSanitizeAttribute.length>0)&&(ee=Rn(ee)),P.uponSanitizeAttribute.length>0&&(ce=Rn(ce)),t.removed=[];const $e=Di&&typeof xe!="string"&&Rd(xe);if($e){FY(xe);const Xn=B?B(xe):xe.nodeName;if(typeof Xn=="string"){const no=ft(Xn);if(!ee[no]||Ce[no])throw ts(xe),il("root node is forbidden and cannot be sanitized in-place")}if(Fg(xe))throw ts(xe),il("root node is clobbered and cannot be sanitized in-place");try{ib(xe)}catch(no){throw ts(xe),no}}else if(Rd(xe))re=$O("<!---->"),ge=re.ownerDocument.importNode(xe,!0),ge.nodeType===di.element&&ge.nodeName==="BODY"||ge.nodeName==="HTML"?re=ge:re.appendChild(ge),ib(ge);else{if(!hn&&!me&&!vr&&xe.indexOf("<")===-1)return E&&eo?j(xe):xe;if(re=$O(xe),!re)return hn?null:eo?S:""}re&&$i&&Xr(re.firstChild);const hr=$e?xe:re,mn=ej(hr);try{for(;Oe=mn.nextNode();)tj(Oe,hr),ij(Oe),IA(Oe.content)&&Hg(Oe.content)}catch(Xn){throw $e&&(ts(xe),TA(t.removed,no=>{no.element&&el(no.element)})),Xn}if($e)return TA(t.removed,Xn=>{Xn.element&&el(Xn.element)}),me&&nb(xe),xe;if(hn){if(me&&nb(re),Ai)for(Xe=W.call(re.ownerDocument);re.firstChild;)Xe.appendChild(re.firstChild);else Xe=re;return(ce.shadowroot||ce.shadowrootmode)&&(Xe=U.call(n,Xe,!0)),Xe}let ro=vr?re.outerHTML:re.innerHTML;return vr&&ee["!doctype"]&&re.ownerDocument&&re.ownerDocument.doctype&&re.ownerDocument.doctype.name&&Kr(Lse,re.ownerDocument.doctype.name)&&(ro="<!DOCTYPE "+re.ownerDocument.doctype.name+`>
|
|
414
|
-
`+ro),me&&(ro=Ng(ro)),E&&eo?j(ro):ro},t.setConfig=function(){let xe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};kd(xe),Yi=!0,Zi=ee,_n=ce},t.clearConfig=function(){St=null,Yi=!1,Zi=null,_n=null,E=D,S=""},t.isValidAttribute=function(xe,z,re){St||kd({});const ge=ft(xe),Oe=ft(z);return rj(ge,Oe,re)},t.addHook=function(xe,z){typeof z=="function"&&qr(P,xe)&&OA(P[xe],z)},t.removeHook=function(xe,z){if(qr(P,xe)){if(z!==void 0){const re=pse(P[xe],z);return re===-1?void 0:mse(P[xe],re,1)[0]}return TP(P[xe])}},t.removeHooks=function(xe){qr(P,xe)&&(P[xe]=[])},t.removeAllHooks=function(){P=UP()},t}var sD=Vz();const Xz=["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","br","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","h1","h2","h3","h4","h5","h6","hgroup","hr","i","img","ins","j-mention","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","shadow","small","source","spacer","span","strike","strong","sub","summary","sup","table","tbody","td","template","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr","iframe"],Kz=["accept","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","border","capture","cellpadding","cellspacing","checked","cite","class","clear","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","target","title","translate","type","usemap","value","width","slot","allowfullscreen","frameborder"],Qse=["background-color","border","border-collapse","border-color","border-bottom-color","border-left-color","border-right-color","border-top-color","border-spacing","border-radius","border-width","color","display","font-size","height","line-height","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","padding","padding-bottom","padding-left","padding-right","padding-top","text-align","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-decoration-thickness","vertical-align","width"];let Jz=!0,qz=[],Mp=!1;function Use(e,t){Jz=e,qz=t.map(r=>r.toLowerCase().replace(/^www\./,""))}function zse(e){if(!Mp)return!0;if(!Jz)return!1;if(!e||!/^(https?:)?\/\//i.test(e))return!0;try{const t=new URL(e,window.location.origin).hostname.replace(/^www\./,"");return!qz.includes(t)}catch{return!0}}sD.addHook("afterSanitizeAttributes",e=>{if(e.tagName.toLowerCase()==="iframe"&&zse(e.getAttribute("src"))&&e.setAttribute("sandbox","allow-scripts allow-same-origin"),"style"in e){const t=Vse(e.style);t.length?e.setAttribute("style",t.join("")):e.removeAttribute("style")}});function Vo(e,t){const r=Mp;Mp=t?.useAdminIframeSettings??!1;try{return sD.sanitize(e??"",{ALLOWED_TAGS:Xz,ALLOWED_ATTR:Kz})}finally{Mp=r}}const Wse=["a","area","iframe","video","audio","object","embed","details","summary"],Gse=["tabindex","controls"];function _se(e){return sD.sanitize(e??"",{ALLOWED_TAGS:Xz,ALLOWED_ATTR:Kz,FORBID_TAGS:Wse,FORBID_ATTR:Gse})}function Yz(e,t){if(!e||t<=0)return{html:e??"",truncated:!1};const r=document.createElement("div");r.innerHTML=e;const n=document.createTreeWalker(r,NodeFilter.SHOW_TEXT);let i=0,o=null,a=0,s=n.nextNode();for(;s;){const c=s.nodeValue??"";if(i+c.length>=t){o=s,a=Math.max(0,t-i);break}i+=c.length,s=n.nextNode()}if(!o)return{html:r.innerHTML,truncated:!1};o.nodeValue=(o.nodeValue??"").slice(0,a)+"…";let A=o;for(;A&&A!==r;){let c=A.nextSibling;for(;c;){const d=c.nextSibling;c.parentNode?.removeChild(c),c=d}A=A.parentNode}return{html:r.innerHTML,truncated:!0}}function Vse(e){const t=[];
|
|
414
|
+
`+ro),me&&(ro=Ng(ro)),E&&eo?j(ro):ro},t.setConfig=function(){let xe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};kd(xe),Yi=!0,Zi=ee,_n=ce},t.clearConfig=function(){St=null,Yi=!1,Zi=null,_n=null,E=D,S=""},t.isValidAttribute=function(xe,z,re){St||kd({});const ge=ft(xe),Oe=ft(z);return rj(ge,Oe,re)},t.addHook=function(xe,z){typeof z=="function"&&qr(P,xe)&&OA(P[xe],z)},t.removeHook=function(xe,z){if(qr(P,xe)){if(z!==void 0){const re=pse(P[xe],z);return re===-1?void 0:mse(P[xe],re,1)[0]}return TP(P[xe])}},t.removeHooks=function(xe){qr(P,xe)&&(P[xe]=[])},t.removeAllHooks=function(){P=UP()},t}var sD=Vz();const Xz=["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","br","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","h1","h2","h3","h4","h5","h6","hgroup","hr","i","img","ins","j-mention","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","shadow","small","source","spacer","span","strike","strong","sub","summary","sup","table","tbody","td","template","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr","iframe"],Kz=["accept","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","border","capture","cellpadding","cellspacing","checked","cite","class","clear","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","target","title","translate","type","usemap","value","width","slot","allowfullscreen","frameborder"],Qse=["background-color","border","border-collapse","border-color","border-bottom-color","border-left-color","border-right-color","border-top-color","border-spacing","border-radius","border-width","color","display","font-size","height","line-height","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","padding","padding-bottom","padding-left","padding-right","padding-top","text-align","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-decoration-thickness","vertical-align","width"];let Jz=!0,qz=[],Mp=!1;function Use(e,t){Jz=e,qz=t.map(r=>r.toLowerCase().replace(/^www\./,""))}function zse(e){if(!Mp)return!0;if(!Jz)return!1;if(!e||!/^(https?:)?\/\//i.test(e))return!0;try{const t=new URL(e,window.location.origin).hostname.replace(/^www\./,"");return!qz.includes(t)}catch{return!0}}sD.addHook("afterSanitizeAttributes",e=>{if(e.tagName.toLowerCase()==="iframe"&&zse(e.getAttribute("src"))&&e.setAttribute("sandbox","allow-scripts allow-same-origin"),"style"in e){const t=Vse(e.style);t.length?e.setAttribute("style",t.join("")):e.removeAttribute("style")}});function Vo(e,t){const r=Mp;Mp=t?.useAdminIframeSettings??!1;try{return sD.sanitize(e??"",{ALLOWED_TAGS:Xz,ALLOWED_ATTR:Kz})}finally{Mp=r}}const Wse=["a","area","iframe","video","audio","object","embed","details","summary"],Gse=["tabindex","controls"];function _se(e){return sD.sanitize(e??"",{ALLOWED_TAGS:Xz,ALLOWED_ATTR:Kz,FORBID_TAGS:Wse,FORBID_ATTR:Gse})}function Yz(e,t){if(!e||t<=0)return{html:e??"",truncated:!1};const r=document.createElement("div");r.innerHTML=e;const n=document.createTreeWalker(r,NodeFilter.SHOW_TEXT);let i=0,o=null,a=0,s=n.nextNode();for(;s;){const c=s.nodeValue??"";if(i+c.length>=t){o=s,a=Math.max(0,t-i);break}i+=c.length,s=n.nextNode()}if(!o)return{html:r.innerHTML,truncated:!1};o.nodeValue=(o.nodeValue??"").slice(0,a)+"…";let A=o;for(;A&&A!==r;){let c=A.nextSibling;for(;c;){const d=c.nextSibling;c.parentNode?.removeChild(c),c=d}A=A.parentNode}return{html:r.innerHTML,truncated:!0}}function Vse(e){const t=[];for(let r=0;r<e.length;r++){const n=e.item(r);Qse.includes(n)&&t.push(`${n}:${e.getPropertyValue(n)};`)}return t}const wE=e=>new DOMParser().parseFromString(e.replace(/</g,"___E_S_C_A_P_E_D___"),"text/html").documentElement.textContent.replace(/___E_S_C_A_P_E_D___/g,"<");function Zz(e){const t=document.createElement("textarea");return t.innerHTML=e,t.value}function $z(e){return new DOMParser().parseFromString(e,"text/html").body.textContent??""}const lA=({condition:e,wrapper:t,wrapperFalse:r,children:n})=>l.jsx(l.Fragment,{children:e?t(n):r?r(n):n}),Uc=({condition:e,hasLicense:t=!0,tooltip:r,children:n,className:i})=>{const a={description:F.useIntl().formatMessage({id:"GLOBAL_Action_Missing_License"})};return l.jsx(lA,{condition:!!e&&!!r||!t,wrapper:s=>l.jsx(ar,{...t?r:a,className:i,children:s}),children:n})},bw={s:{"font-size":12,"font-weight":"normal"},m:{"font-size":16,"font-weight":"semiBold"},l:{"font-size":18,"font-weight":"semiBold"}},Xse=v.a`
|
|
415
415
|
color: ${e=>e.$color?e.theme.color[e.$color]:e.theme.font.hrefColor};
|
|
416
416
|
${e=>e.$asBlock&&"display:block;"}
|
|
417
417
|
${({$size:e})=>e&&`font-size: ${bw[e]["font-size"]}px;`}
|
|
@@ -3281,7 +3281,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
3281
3281
|
background-color: ${e=>e.theme.color.primary};
|
|
3282
3282
|
color: ${e=>e.theme.color.white};
|
|
3283
3283
|
}
|
|
3284
|
-
`,$E=function(e,t){const[r,n]=h.useState(t);return h.useEffect(()=>{const i=({key:a})=>{a===e&&!r&&n(!0)},o=({key:a})=>{a===e&&r&&n(!1)};return window.addEventListener("keydown",i),window.addEventListener("keyup",o),()=>{window.removeEventListener("keydown",i),window.removeEventListener("keyup",o)}},[e,r]),{keyPressed:r,setKeyPressed:n}},CL=25,O0e=({index:e,total:t,onRelease:r})=>{const n=$E("ArrowLeft",void 0),i=$E("ArrowRight",void 0);return h.useEffect(()=>{!n.keyPressed&&n.keyPressed!==void 0&&r("prev")},[n.keyPressed]),h.useEffect(()=>{!i.keyPressed&&i.keyPressed!==void 0&&r("next")},[i.keyPressed]),l.jsxs(T0e,{children:[l.jsx(wL,{onMouseDown:()=>n.setKeyPressed(!0),onMouseUp:()=>n.setKeyPressed(!1),children:l.jsx("div",{className:n.keyPressed?"left down":"left",children:l.jsx(ie,{name:"icon-angle-left",size:CL,color:"#fff"})})}),l.jsxs(I0e,{children:[e+1,"/",t]}),l.jsx(wL,{onMouseDown:()=>i.setKeyPressed(!0),onMouseUp:()=>i.setKeyPressed(!1),children:l.jsx("div",{className:i.keyPressed?"right down":"right",children:l.jsx(ie,{name:"icon-angle-right",size:CL,color:"#fff"})})})]})},j0e=({item:e,options:t})=>{const r=F.useIntl();return l.jsx(_a,{options:t.map(n=>({label:r.formatMessage({id:n.label}),onClick:()=>n.onClick(e)})),small:!0,label:r.formatMessage({id:"FILE_Viewer_Open_With"}),color:"primary"})},Xd=({item:e,options:t,children:r})=>{const n=F.useIntl(),i=e?.downloadHref;return l.jsxs(C0e,{children:[l.jsx(E0e,{children:r}),e!==void 0&&(i!==void 0||t!==void 0)&&l.jsxs(B0e,{children:[i!==void 0&&l.jsx(pe,{label:n.formatMessage({id:"GLOBAL_Download"}),onClick:()=>{const o=document.createElement("a");o.href=i,o.click(),o.remove()}}),t!==void 0&&l.jsx(j0e,{item:e,options:t})]})]})},P0e=({children:e})=>l.jsx(w0e,{children:e}),k0e=({children:e})=>l.jsx(S0e,{"data-cy":"file-viewer-image",children:e}),L0e=({children:e})=>l.jsx(D0e,{children:e}),M0e=({item:e,openWithOptions:t})=>{const r=N.getFileFamily(e.mimetype),n=e.mimetype,i=e.url,o=t.find(a=>a.condition(e))?.options;switch(r){default:return l.jsx(Xd,{item:e,options:o,children:l.jsx(ku,{mimetype:n})});case"application":return l.jsx(Xd,{item:e,options:o,children:l.jsx(ku,{mimetype:n})});case"audio":return i!==void 0?l.jsx(P0e,{children:l.jsx(EE,{uri:i,mimetype:n})}):l.jsx(Xd,{item:e,options:o,children:l.jsx(EE,{mimetype:n})});case"video":return i!==void 0?l.jsx(L0e,{children:l.jsx(Im,{uri:i,mimetype:n})}):l.jsx(Xd,{item:e,options:o,children:l.jsx(Im,{mimetype:n})});case"gif":case"image":return i!==void 0?l.jsx(k0e,{children:l.jsx(Iy,{uri:i,mimetype:n,size:1900})}):l.jsx(Xd,{item:e,options:o,children:l.jsx(ku,{mimetype:n})})}},U5=({files:e,children:t,openWithOptions:r,onReadFile:n})=>{const
|
|
3284
|
+
`,$E=function(e,t){const[r,n]=h.useState(t);return h.useEffect(()=>{const i=({key:a})=>{a===e&&!r&&n(!0)},o=({key:a})=>{a===e&&r&&n(!1)};return window.addEventListener("keydown",i),window.addEventListener("keyup",o),()=>{window.removeEventListener("keydown",i),window.removeEventListener("keyup",o)}},[e,r]),{keyPressed:r,setKeyPressed:n}},CL=25,O0e=({index:e,total:t,onRelease:r})=>{const n=$E("ArrowLeft",void 0),i=$E("ArrowRight",void 0);return h.useEffect(()=>{!n.keyPressed&&n.keyPressed!==void 0&&r("prev")},[n.keyPressed]),h.useEffect(()=>{!i.keyPressed&&i.keyPressed!==void 0&&r("next")},[i.keyPressed]),l.jsxs(T0e,{children:[l.jsx(wL,{onMouseDown:()=>n.setKeyPressed(!0),onMouseUp:()=>n.setKeyPressed(!1),children:l.jsx("div",{className:n.keyPressed?"left down":"left",children:l.jsx(ie,{name:"icon-angle-left",size:CL,color:"#fff"})})}),l.jsxs(I0e,{children:[e+1,"/",t]}),l.jsx(wL,{onMouseDown:()=>i.setKeyPressed(!0),onMouseUp:()=>i.setKeyPressed(!1),children:l.jsx("div",{className:i.keyPressed?"right down":"right",children:l.jsx(ie,{name:"icon-angle-right",size:CL,color:"#fff"})})})]})},j0e=({item:e,options:t})=>{const r=F.useIntl();return l.jsx(_a,{options:t.map(n=>({label:r.formatMessage({id:n.label}),onClick:()=>n.onClick(e)})),small:!0,label:r.formatMessage({id:"FILE_Viewer_Open_With"}),color:"primary"})},Xd=({item:e,options:t,children:r})=>{const n=F.useIntl(),i=e?.downloadHref;return l.jsxs(C0e,{children:[l.jsx(E0e,{children:r}),e!==void 0&&(i!==void 0||t!==void 0)&&l.jsxs(B0e,{children:[i!==void 0&&l.jsx(pe,{label:n.formatMessage({id:"GLOBAL_Download"}),onClick:()=>{const o=document.createElement("a");o.href=i,o.click(),o.remove()}}),t!==void 0&&l.jsx(j0e,{item:e,options:t})]})]})},P0e=({children:e})=>l.jsx(w0e,{children:e}),k0e=({children:e})=>l.jsx(S0e,{"data-cy":"file-viewer-image",children:e}),L0e=({children:e})=>l.jsx(D0e,{children:e}),M0e=({item:e,openWithOptions:t})=>{const r=N.getFileFamily(e.mimetype),n=e.mimetype,i=e.url,o=t.find(a=>a.condition(e))?.options;switch(r){default:return l.jsx(Xd,{item:e,options:o,children:l.jsx(ku,{mimetype:n})});case"application":return l.jsx(Xd,{item:e,options:o,children:l.jsx(ku,{mimetype:n})});case"audio":return i!==void 0?l.jsx(P0e,{children:l.jsx(EE,{uri:i,mimetype:n})}):l.jsx(Xd,{item:e,options:o,children:l.jsx(EE,{mimetype:n})});case"video":return i!==void 0?l.jsx(L0e,{children:l.jsx(Im,{uri:i,mimetype:n})}):l.jsx(Xd,{item:e,options:o,children:l.jsx(Im,{mimetype:n})});case"gif":case"image":return i!==void 0?l.jsx(k0e,{children:l.jsx(Iy,{uri:i,mimetype:n,size:1900})}):l.jsx(Xd,{item:e,options:o,children:l.jsx(ku,{mimetype:n})})}},U5=({files:e,children:t,openWithOptions:r,onReadFile:n,onOpen:i})=>{const o=F.useIntl(),[a,s]=h.useState(-1),A=e[a];h.useEffect(()=>{if(n&&a>-1){const d=e[a];d&&n(d)}},[a,e,n]);const c={open:a!==-1,portalId:"react-modal",variant:"full-screen",maxHeight:"100%",closeHandler:()=>{s(-1)}};return l.jsxs(l.Fragment,{children:[t(d=>{const u=e.find(g=>g.key===d);if(!u)return;const f=r.find(g=>g.condition(u));f&&f.options.length>0?f.options[0].onClick(u):(i?.(u),s(e.findIndex(g=>g.key===d)))}),l.jsx(Br,{...c,children:l.jsx(zr,{onClickIconClose:c.closeHandler,title:o.formatMessage({id:"FILE_Viewer_Preview"}),isFull:!0,children:l.jsxs(p0e,{"data-testid":"file-viewer",children:[l.jsx(m0e,{children:l.jsx(v0e,{children:A&&l.jsxs(l.Fragment,{children:[A.title,A.downloadHref!==void 0&&l.jsxs(y0e,{href:A.downloadHref,children:[l.jsx(Ae,{color:"grey4",children:o.formatMessage({id:"GLOBAL_Download"})}),l.jsx(ie,{name:"icon-download",color:"grey4",size:16})]})]})})}),l.jsx(b0e,{children:A&&l.jsx(M0e,{item:A,openWithOptions:r})}),l.jsx(x0e,{children:l.jsx(O0e,{total:e.length,index:a,onRelease:d=>{switch(d){case"next":s(a<e.length-1?a+1:0);break;case"prev":s(a===0?e.length-1:a-1);break}}})})]})})})]})},Zf=({files:e,size:t=Q5,children:r,openWithOptions:n,allowDownload:i=!0,onReadFile:o,onOpen:a})=>{const s=h.useMemo(()=>e.map(c=>g0e(c,t,i)),[e,t,i]),A=n.map(({condition:c,options:d})=>({condition:u=>c(u.file),options:d.map(u=>({label:u.label,onClick:f=>u.onClick(f.file)}))}));return l.jsx(U5,{files:s,openWithOptions:A,onReadFile:o&&(c=>o(c.file)),onOpen:a&&(c=>a(c.file)),children:r})};function z5(e,t=!0){const[r,n]=h.useState({left:!1,right:!1});return h.useEffect(()=>{if(!t)return;const i=e.current;if(!i)return;let o=0;const a=()=>{cancelAnimationFrame(o),o=requestAnimationFrame(()=>{const{scrollLeft:A,scrollWidth:c,clientWidth:d}=i;n({left:A>0,right:A+d<c-1})})};a(),i.addEventListener("scroll",a,{passive:!0});const s=new ResizeObserver(a);return s.observe(i),()=>{i.removeEventListener("scroll",a),s.disconnect(),cancelAnimationFrame(o)}},[e,t]),r}const zm={medium:{avatar:40,radius:"sm",space:"sm"},large:{avatar:80,radius:"md",space:"md"}},W5=v.div`
|
|
3285
3285
|
display: flex;
|
|
3286
3286
|
flex-direction: row;
|
|
3287
3287
|
align-items: center;
|