@squeed/flow-sdk 2.0.34 → 2.0.36
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/README.md +88 -0
- package/dist/{contentPreviewDocument-C2D0H-Lr.js → contentPreviewDocument-Bhsc4K4s.js} +283 -270
- package/dist/{contentPreviewDocument-C2D0H-Lr.js.map → contentPreviewDocument-Bhsc4K4s.js.map} +1 -1
- package/dist/contentPreviewDocument-i1zWN5gw.cjs +23 -0
- package/dist/{contentPreviewDocument-BsKd0dD4.cjs.map → contentPreviewDocument-i1zWN5gw.cjs.map} +1 -1
- package/dist/index.cjs +10 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +30 -9
- package/dist/index.d.ts +30 -9
- package/dist/index.js +10938 -10306
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/contentPreviewDocument-BsKd0dD4.cjs +0 -10
package/package.json
CHANGED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";var Gn=Object.create;var je=Object.defineProperty;var Wn=Object.getOwnPropertyDescriptor;var Bn=Object.getOwnPropertyNames;var jn=Object.getPrototypeOf,Yn=Object.prototype.hasOwnProperty;var $n=(n,r,s,c)=>{if(r&&typeof r=="object"||typeof r=="function")for(let u of Bn(r))!Yn.call(n,u)&&u!==s&&je(n,u,{get:()=>r[u],enumerable:!(c=Wn(r,u))||c.enumerable});return n};var Xn=(n,r,s)=>(s=n!=null?Gn(jn(n)):{},$n(r||!n||!n.__esModule?je(s,"default",{value:n,enumerable:!0}):s,n));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});/*! @license DOMPurify 3.4.15 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.15/LICENSE */function Ye(n,r){(r==null||r>n.length)&&(r=n.length);for(var s=0,c=Array(r);s<r;s++)c[s]=n[s];return c}function Vn(n){if(Array.isArray(n))return n}function qn(n,r){var s=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(s!=null){var c,u,d,E,P=[],R=!0,F=!1;try{if(d=(s=s.call(n)).next,r!==0)for(;!(R=(c=d.call(s)).done)&&(P.push(c.value),P.length!==r);R=!0);}catch(z){F=!0,u=z}finally{try{if(!R&&s.return!=null&&(E=s.return(),Object(E)!==E))return}finally{if(F)throw u}}return P}}function Kn(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Zn(n,r){return Vn(n)||qn(n,r)||Jn(n,r)||Kn()}function Jn(n,r){if(n){if(typeof n=="string")return Ye(n,r);var s={}.toString.call(n).slice(8,-1);return s==="Object"&&n.constructor&&(s=n.constructor.name),s==="Map"||s==="Set"?Array.from(n):s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?Ye(n,r):void 0}}const sn=Object.entries,$e=Object.setPrototypeOf,Qn=Object.isFrozen,to=Object.getPrototypeOf,eo=Object.getOwnPropertyDescriptor;let b=Object.freeze,S=Object.seal,ct=Object.create,ln=typeof Reflect<"u"&&Reflect,se=ln.apply,le=ln.construct;b||(b=function(r){return r});S||(S=function(r){return r});se||(se=function(r,s){for(var c=arguments.length,u=new Array(c>2?c-2:0),d=2;d<c;d++)u[d-2]=arguments[d];return r.apply(s,u)});le||(le=function(r){for(var s=arguments.length,c=new Array(s>1?s-1:0),u=1;u<s;u++)c[u-1]=arguments[u];return new r(...c)});const J=y(Array.prototype.forEach),no=y(Array.prototype.lastIndexOf),Xe=y(Array.prototype.pop),Tt=y(Array.prototype.push),oo=y(Array.prototype.splice),ut=Array.isArray,Et=y(String.prototype.toLowerCase),ee=y(String.prototype.toString),Ve=y(String.prototype.match),_t=y(String.prototype.replace),qe=y(String.prototype.indexOf),ro=y(String.prototype.trim),io=y(Number.prototype.toString),ao=y(Boolean.prototype.toString),Ke=typeof BigInt>"u"?null:y(BigInt.prototype.toString),Ze=typeof Symbol>"u"?null:y(Symbol.prototype.toString),N=y(Object.prototype.hasOwnProperty),gt=y(Object.prototype.toString),O=y(RegExp.prototype.test),Z=so(TypeError);function y(n){return function(r){r instanceof RegExp&&(r.lastIndex=0);for(var s=arguments.length,c=new Array(s>1?s-1:0),u=1;u<s;u++)c[u-1]=arguments[u];return se(n,r,c)}}function so(n){return function(){for(var r=arguments.length,s=new Array(r),c=0;c<r;c++)s[c]=arguments[c];return le(n,s)}}function p(n,r){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Et;if($e&&$e(n,null),!ut(r))return n;let c=r.length;for(;c--;){let u=r[c];if(typeof u=="string"){const d=s(u);d!==u&&(Qn(r)||(r[c]=d),u=d)}n[u]=!0}return n}function lo(n){for(let r=0;r<n.length;r++)N(n,r)||(n[r]=null);return n}function C(n){const r=ct(null);for(const c of sn(n)){var s=Zn(c,2);const u=s[0],d=s[1];N(n,u)&&(ut(d)?r[u]=lo(d):d&&typeof d=="object"&&d.constructor===Object?r[u]=C(d):r[u]=d)}return r}function co(n){switch(typeof n){case"string":return n;case"number":return io(n);case"boolean":return ao(n);case"bigint":return Ke?Ke(n):"0";case"symbol":return Ze?Ze(n):"Symbol()";case"undefined":return gt(n);case"function":case"object":{if(n===null)return gt(n);const r=n,s=x(r,"toString");if(typeof s=="function"){const c=s(r);return typeof c=="string"?c:gt(c)}return gt(n)}default:return gt(n)}}function x(n,r){for(;n!==null;){const c=eo(n,r);if(c){if(c.get)return y(c.get);if(typeof c.value=="function")return y(c.value)}n=to(n)}function s(){return null}return s}function uo(n){try{return O(n,""),!0}catch{return!1}}const Je=b(["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"]),ne=b(["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"]),oe=b(["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"]),fo=b(["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"]),re=b(["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"]),po=b(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Qe=b(["#text"]),tn=b(["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"]),ie=b(["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","pointer-events","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","vector-effect","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"]),en=b(["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"]),xt=b(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),mo=S(/{{[\w\W]*|^[\w\W]*}}/g),ho=S(/<%[\w\W]*|^[\w\W]*%>/g),To=S(/\${[\w\W]*/g),_o=S(/^data-[\-\w.\u00B7-\uFFFF]+$/),go=S(/^aria-[\-\w]+$/),nn=S(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Eo=S(/^(?:\w+script|data):/i),Ao=S(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),yo=S(/^html$/i),bo=S(/^[a-z][.\w]*(-[.\w]+)+$/i),on=S(/<[/\w!]/g),rn=S(/<[/\w]/g),So=S(/<\/no(script|embed|frames)/i),Oo=S(/\/>/i),M={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},cn=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],Ro=b(p({},cn)),wo=(function(){const n={};return J(cn,r=>{n[r]=S(new RegExp("</"+r+"(?=[\\t\\n\\f\\r />])","i"))}),b(n)})(),Do=function(){return typeof window>"u"?null:window},Lo=function(r,s){if(typeof r!="object"||typeof r.createPolicy!="function")return null;let c=null;const u="data-tt-policy-suffix";s&&s.hasAttribute(u)&&(c=s.getAttribute(u));const d="dompurify"+(c?"#"+c:"");try{return r.createPolicy(d,{createHTML(E){return E},createScriptURL(E){return E}})}catch{return console.warn("TrustedTypes policy "+d+" could not be created."),null}},an=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Y=function(r,s,c,u){return N(r,s)&&ut(r[s])?p(u.base?C(u.base):{},r[s],u.transform):c},ae=function(r,s,c){const u=N(r,s)?r[s]:void 0;return u&&typeof u=="object"?C(u):c()};function un(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Do();const r=i=>un(i);if(r.version="3.4.15",r.removed=[],!n||!n.document||n.document.nodeType!==M.document||!n.Element)return r.isSupported=!1,r;let s=n.document;const c=s,u=c.currentScript;n.DocumentFragment;const d=n.HTMLTemplateElement,E=n.Node,P=n.Element,R=n.NodeFilter,F=n.NamedNodeMap;F===void 0&&(n.NamedNodeMap||n.MozNamedAttrMap),n.HTMLFormElement;const z=n.DOMParser,H=n.trustedTypes,G=P.prototype,fn=x(G,"cloneNode"),vt=x(G,"remove"),ce=x(G,"removeAttributeNode"),pn=x(G,"nextSibling"),Q=x(G,"childNodes"),tt=x(G,"parentNode"),ue=x(G,"shadowRoot"),kt=x(G,"attributes"),$=E&&E.prototype?x(E.prototype,"nodeType"):null,et=E&&E.prototype?x(E.prototype,"nodeName"):null,At=E&&E.prototype?x(E.prototype,"ownerDocument"):null,ft=function(t){return $?$(t):t.nodeType},Ut=function(t){return et?et(t):t.nodeName};if(typeof d=="function"){const i=s.createElement("template");i.content&&i.content.ownerDocument&&(s=i.content.ownerDocument)}let D,X="",Ft,fe=!1,pt=0;const pe=function(){if(pt>0)throw Z('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.')},nt=function(t){pe(),pt++;try{return D.createHTML(t)}finally{pt--}},mn=function(t){pe(),pt++;try{return D.createScriptURL(t)}finally{pt--}},dn=function(){return fe||(Ft=Lo(H,u),fe=!0),Ft},yt=s,zt=yt.implementation,me=yt.createNodeIterator,hn=yt.createDocumentFragment,Tn=yt.getElementsByTagName,_n=c.importNode;let h=an();r.isSupported=typeof sn=="function"&&typeof tt=="function"&&zt&&zt.createHTMLDocument!==void 0;const gn=mo,En=ho,An=To,yn=_o,bn=go,Sn=Eo,de=Ao,On=bo;let he=nn,T=null;const Ht=p({},[...Je,...ne,...oe,...re,...Qe]);let _=null;const Gt=p({},[...tn,...ie,...en,...xt]);let v=Object.seal(ct(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}})),mt=null,Te=null;const W=Object.seal(ct(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let _e=!0,Wt=!0,ge=!1,Ee=!0,B=!1,V=!0,q=!1,Bt=!1,bt=null,St=null,jt=!1,ot=!1,Ot=!1,Rt=!1,Ae=!0,ye=!1;const be="user-content-";let Yt=!0,$t=!1,rt={},it=null;const Se=p({},["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 Oe=null;const Re=p({},["audio","video","img","source","image","track"]);let we=null;const De=p({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),wt="http://www.w3.org/1998/Math/MathML",Dt="http://www.w3.org/2000/svg",k="http://www.w3.org/1999/xhtml";let at=k,Xt=!1,Vt=null;const Rn=p({},[wt,Dt,k],ee),Le=b(["mi","mo","mn","ms","mtext"]);let qt=p({},Le);const Ie=b(["annotation-xml"]);let Kt=p({},Ie);const wn=p({},["title","style","font","a","script"]);let dt=null;const Dn=["application/xhtml+xml","text/html"],Ln="text/html";let A=null,st=null;const In=s.createElement("form"),Ne=function(t){return t instanceof RegExp||t instanceof Function},Zt=function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(st&&st===t)return;(!t||typeof t!="object")&&(t={}),t=C(t),dt=Dn.indexOf(t.PARSER_MEDIA_TYPE)===-1?Ln:t.PARSER_MEDIA_TYPE,A=dt==="application/xhtml+xml"?ee:Et,T=Y(t,"ALLOWED_TAGS",Ht,{transform:A}),_=Y(t,"ALLOWED_ATTR",Gt,{transform:A}),Vt=Y(t,"ALLOWED_NAMESPACES",Rn,{transform:ee}),we=Y(t,"ADD_URI_SAFE_ATTR",De,{transform:A,base:De}),Oe=Y(t,"ADD_DATA_URI_TAGS",Re,{transform:A,base:Re}),it=Y(t,"FORBID_CONTENTS",Se,{transform:A}),mt=Y(t,"FORBID_TAGS",C({}),{transform:A}),Te=Y(t,"FORBID_ATTR",C({}),{transform:A}),rt=N(t,"USE_PROFILES")?t.USE_PROFILES&&typeof t.USE_PROFILES=="object"?C(t.USE_PROFILES):t.USE_PROFILES:!1,_e=t.ALLOW_ARIA_ATTR!==!1,Wt=t.ALLOW_DATA_ATTR!==!1,ge=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Ee=t.ALLOW_SELF_CLOSE_IN_ATTR!==!1,B=t.SAFE_FOR_TEMPLATES||!1,V=t.SAFE_FOR_XML!==!1,q=t.WHOLE_DOCUMENT||!1,ot=t.RETURN_DOM||!1,Ot=t.RETURN_DOM_FRAGMENT||!1,Rt=t.RETURN_TRUSTED_TYPE||!1,jt=t.FORCE_BODY||!1,Ae=t.SANITIZE_DOM!==!1,ye=t.SANITIZE_NAMED_PROPS||!1,Yt=t.KEEP_CONTENT!==!1,$t=t.IN_PLACE||!1,he=uo(t.ALLOWED_URI_REGEXP)?t.ALLOWED_URI_REGEXP:nn,at=typeof t.NAMESPACE=="string"?t.NAMESPACE:k,qt=ae(t,"MATHML_TEXT_INTEGRATION_POINTS",()=>p({},Le)),Kt=ae(t,"HTML_INTEGRATION_POINTS",()=>p({},Ie));const e=ae(t,"CUSTOM_ELEMENT_HANDLING",()=>ct(null));if(v=ct(null),N(e,"tagNameCheck")&&Ne(e.tagNameCheck)&&(v.tagNameCheck=e.tagNameCheck),N(e,"attributeNameCheck")&&Ne(e.attributeNameCheck)&&(v.attributeNameCheck=e.attributeNameCheck),N(e,"allowCustomizedBuiltInElements")&&typeof e.allowCustomizedBuiltInElements=="boolean"&&(v.allowCustomizedBuiltInElements=e.allowCustomizedBuiltInElements),S(v),B&&(Wt=!1),Ot&&(ot=!0),rt&&(T=p({},Qe),_=ct(null),rt.html===!0&&(p(T,Je),p(_,tn)),rt.svg===!0&&(p(T,ne),p(_,ie),p(_,xt)),rt.svgFilters===!0&&(p(T,oe),p(_,ie),p(_,xt)),rt.mathMl===!0&&(p(T,re),p(_,en),p(_,xt))),W.tagCheck=null,W.attributeCheck=null,N(t,"ADD_TAGS")&&(typeof t.ADD_TAGS=="function"?W.tagCheck=t.ADD_TAGS:ut(t.ADD_TAGS)&&(T===Ht&&(T=C(T)),p(T,t.ADD_TAGS,A))),N(t,"ADD_ATTR")&&(typeof t.ADD_ATTR=="function"?W.attributeCheck=t.ADD_ATTR:ut(t.ADD_ATTR)&&(_===Gt&&(_=C(_)),p(_,t.ADD_ATTR,A))),N(t,"ADD_FORBID_CONTENTS")&&ut(t.ADD_FORBID_CONTENTS)&&(it===Se&&(it=C(it)),p(it,t.ADD_FORBID_CONTENTS,A)),Yt&&(T["#text"]=!0),q&&p(T,["html","head","body"]),T.table&&(p(T,["tbody"]),delete mt.tbody),t.TRUSTED_TYPES_POLICY){if(typeof t.TRUSTED_TYPES_POLICY.createHTML!="function")throw Z('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof t.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Z('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const o=D;D=t.TRUSTED_TYPES_POLICY;try{X=nt("")}catch(a){throw D=o,a}}else t.TRUSTED_TYPES_POLICY===null?(D=void 0,X=""):(D===void 0&&(D=dn()),D&&typeof X=="string"&&(X=nt("")));b&&b(t),st=t},Me=p({},[...ne,...oe,...fo]),Ce=p({},[...re,...po]),Nn=function(t,e,o){return e.namespaceURI===k?t==="svg":e.namespaceURI===wt?t==="svg"&&(o==="annotation-xml"||qt[o]):!!Me[t]},Mn=function(t,e,o){return e.namespaceURI===k?t==="math":e.namespaceURI===Dt?t==="math"&&Kt[o]:!!Ce[t]},Cn=function(t,e,o){return e.namespaceURI===Dt&&!Kt[o]||e.namespaceURI===wt&&!qt[o]?!1:!Ce[t]&&(wn[t]||!Me[t])},Pn=function(t){let e=tt(t);(!e||!e.tagName)&&(e={namespaceURI:at,tagName:"template"});const o=Et(t.tagName),a=Et(e.tagName);return Vt[t.namespaceURI]?t.namespaceURI===Dt?Nn(o,e,a):t.namespaceURI===wt?Mn(o,e,a):t.namespaceURI===k?Cn(o,e,a):!!(dt==="application/xhtml+xml"&&Vt[t.namespaceURI]):!1},j=function(t){Tt(r.removed,{element:t});try{tt(t).removeChild(t)}catch{if(vt(t),!tt(t))throw Z("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Pe=function(t,e,o){try{ce(t,e)}catch{try{t.removeAttribute(o)}catch{}}},Lt=function(t){It(t);const e=Q(t);if(e){const a=[];J(e,l=>{Tt(a,l)}),J(a,l=>{try{vt(l)}catch{}})}const o=kt(t);if(o)for(let a=o.length-1;a>=0;--a){const l=o[a],f=l&&l.name;typeof f=="string"&&Pe(t,l,f)}},K=function(t,e,o){if(!o)try{o=e.getAttributeNode(t)}catch{o=null}Tt(r.removed,{attribute:o||null,from:e});try{o?ce(e,o):e.removeAttribute(t)}catch{try{e.removeAttribute(t)}catch{}}if(t==="is")if(ot||Ot)try{j(e)}catch{}else try{e.setAttribute(t,"")}catch{}},xn=function(t){const e=kt(t);if(e)for(let o=e.length-1;o>=0;--o){const a=e[o],l=a&&a.name;typeof l!="string"||_[A(l)]||Pe(t,a,l)}},It=function(t){const e=[t];for(;e.length>0;){const o=e.pop();ft(o)===M.element&&xn(o);const l=Q(o);if(l)for(let f=l.length-1;f>=0;--f)e.push(l[f])}},xe=function(t,e){return V?t==="patchsrc"?!0:t==="for"&&e!=="label"&&e!=="output":!1},vn=function(t){if(!V)return;const e=[t];for(;e.length>0;){const o=e.pop(),a=ft(o);if(a===M.processingInstruction||a===M.comment&&O(rn,o.data)){try{vt(o)}catch{}continue}if(a===M.element){const f=o,m=A(Ut(o));try{f.hasAttribute&&f.hasAttribute("patchsrc")&&f.removeAttribute("patchsrc"),f.hasAttribute&&f.hasAttribute("for")&&xe("for",m)&&f.removeAttribute("for")}catch{}}const l=Q(o);if(l)for(let f=l.length-1;f>=0;--f)e.push(l[f])}},ve=function(t){let e=null,o=null;if(jt)t="<remove></remove>"+t;else{const f=Ve(t,/^[\r\n\t ]+/);o=f&&f[0]}dt==="application/xhtml+xml"&&at===k&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const a=D?nt(t):t;if(at===k)try{e=new z().parseFromString(a,dt)}catch{}if(!e||!e.documentElement){e=zt.createDocument(at,"template",null);try{e.documentElement.innerHTML=Xt?X:a}catch{}}const l=e.body||e.documentElement;return t&&o&&l.insertBefore(s.createTextNode(o),l.childNodes[0]||null),at===k?Tn.call(e,q?"html":"body")[0]:q?e.documentElement:l},ke=function(t){const e=At?At(t):t.ownerDocument;return me.call(e||t,t,R.SHOW_ELEMENT|R.SHOW_COMMENT|R.SHOW_TEXT|R.SHOW_PROCESSING_INSTRUCTION|R.SHOW_CDATA_SECTION,null)},Nt=function(t){return t=_t(t,gn," "),t=_t(t,En," "),t=_t(t,An," "),t},Jt=function(t){var e;t.normalize();const o=At?At(t):t.ownerDocument,a=me.call(o||t,t,R.SHOW_TEXT|R.SHOW_COMMENT|R.SHOW_CDATA_SECTION|R.SHOW_PROCESSING_INSTRUCTION,null);let l=a.nextNode();for(;l;)l.data=Nt(l.data),l=a.nextNode();const f=(e=t.querySelectorAll)===null||e===void 0?void 0:e.call(t,"template");f&&J(f,m=>{lt(m.content)&&Jt(m.content)})},Mt=function(t){const e=et?et(t):null;return typeof e!="string"||A(e)!=="form"?!1:typeof t.nodeName!="string"||typeof t.textContent!="string"||typeof t.removeChild!="function"||t.attributes!==kt(t)||typeof t.removeAttribute!="function"||typeof t.removeAttributeNode!="function"||typeof t.getAttributeNode!="function"||typeof t.setAttribute!="function"||typeof t.namespaceURI!="string"||typeof t.insertBefore!="function"||typeof t.hasChildNodes!="function"||t.nodeType!==$(t)||t.childNodes!==Q(t)},lt=function(t){if(!$||typeof t!="object"||t===null)return!1;try{return $(t)===M.documentFragment}catch{return!1}},ht=function(t){if(!$||typeof t!="object"||t===null)return!1;try{return typeof $(t)=="number"}catch{return!1}};function U(i,t,e){i.length!==0&&J(i,o=>{o.call(r,t,e,st)})}const kn=function(t,e){return!!(V&&t.hasChildNodes()&&!ht(t.firstElementChild)&&O(on,t.textContent)&&O(on,t.innerHTML)||V&&t.namespaceURI===k&&Ro[e]&&(ht(t.firstElementChild)||typeof t.textContent=="string"&&O(wo[e],t.textContent))||t.nodeType===M.processingInstruction||V&&t.nodeType===M.comment&&O(rn,t.data))},Ct=function(t,e){if(t instanceof RegExp)return O(t,e);if(t instanceof Function){for(var o=arguments.length,a=new Array(o>2?o-2:0),l=2;l<o;l++)a[l-2]=arguments[l];return!!t(e,...a)}return!1},Un=function(t,e,o){if(!mt[e]&&Ge(e)&&Ct(v.tagNameCheck,e))return!1;if(Yt&&!it[e]){const a=tt(t),l=Q(t);if(l&&a){const f=l.length;for(let m=f-1;m>=0;--m){const g=t===o?fn(l[m],!0):l[m];a.insertBefore(g,pn(t))}}}return j(t),!0},Ue=function(t,e,o,a){return t.length===0?e:e===o||e===a?C(e):e},Fe=function(t,e){return t===e||tt(t)!==null?!1:($t&&It(t),!0)},ze=function(t,e){if(U(h.beforeSanitizeElements,t,null),Fe(t,e))return!0;if(Mt(t))return j(t),!0;const o=A(Ut(t));if(T=Ue(h.uponSanitizeElement,T,Ht,bt),U(h.uponSanitizeElement,t,{tagName:o,allowedTags:T}),Fe(t,e))return!0;if(kn(t,o))return j(t),!0;if(mt[o]||!(W.tagCheck instanceof Function&&W.tagCheck(o))&&!T[o]){const l=Un(t,o,e);return l===!1&&U(h.afterSanitizeElements,t,null),l}if(ft(t)===M.element&&!Pn(t)||(o==="noscript"||o==="noembed"||o==="noframes")&&O(So,t.innerHTML))return j(t),!0;if(B&&t.nodeType===M.text){const l=Nt(t.textContent);t.textContent!==l&&(Tt(r.removed,{element:t.cloneNode()}),t.textContent=l)}return U(h.afterSanitizeElements,t,null),!1},He=function(t,e,o){if(Te[e]||xe(e,t)||Ae&&(e==="id"||e==="name")&&(o in s||o in In))return!1;const a=_[e]||W.attributeCheck instanceof Function&&W.attributeCheck(e,t);return Wt&&O(yn,e)||_e&&O(bn,e)?!0:a?we[e]||O(he,_t(o,de,""))||(e==="src"||e==="xlink:href"||e==="href")&&t!=="script"&&qe(o,"data:")===0&&Oe[t]||ge&&!O(Sn,_t(o,de,""))?!0:!o:Ge(t)&&Ct(v.tagNameCheck,t)&&Ct(v.attributeNameCheck,e,t)||e==="is"&&v.allowCustomizedBuiltInElements&&Ct(v.tagNameCheck,o)},Fn=p({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Ge=function(t){return!Fn[Et(t)]&&O(On,t)},zn=function(t,e,o,a){if(D&&typeof H=="object"&&typeof H.getAttributeType=="function"&&!o)switch(H.getAttributeType(t,e)){case"TrustedHTML":return nt(a);case"TrustedScriptURL":return mn(a)}return a},Hn=function(t,e,o,a){try{return o?t.setAttributeNS(o,e,a):t.setAttribute(e,a),Mt(t)?(j(t),!1):!0}catch{return K(e,t),!1}},We=function(t){U(h.beforeSanitizeAttributes,t,null);const e=t.attributes;if(!e||Mt(t))return;_=Ue(h.uponSanitizeAttribute,_,Gt,St);const o={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:_,forceKeepAttr:void 0};let a=e.length;const l=A(t.nodeName);for(;a--;){const f=e[a],m=f.name,g=f.namespaceURI,L=f.value,I=A(m),te=L;let w=m==="value"?te:ro(te),Be=!1;if(o.attrName=I,o.attrValue=w,o.keepAttr=!0,o.forceKeepAttr=void 0,U(h.uponSanitizeAttribute,t,o),w=o.attrValue,ye&&(I==="id"||I==="name")&&qe(w,be)!==0&&(K(m,t,f),w=be+w,Be=!0),V&&O(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,w)){K(m,t,f);continue}if(I==="attributename"&&Ve(w,"href")){K(m,t,f);continue}if(!o.forceKeepAttr){if(!o.keepAttr){K(m,t,f);continue}if(!Ee&&O(Oo,w)){K(m,t,f);continue}if(B&&(w=Nt(w)),!He(l,I,w)){K(m,t,f);continue}w=zn(l,I,g,w),w!==te&&Hn(t,m,g,w)&&Be&&Xe(r.removed)}}U(h.afterSanitizeAttributes,t,null)},Pt=function(t){let e=null;const o=ke(t);for(U(h.beforeSanitizeShadowDOM,t,null);e=o.nextNode();)if(U(h.uponSanitizeShadowNode,e,null),ze(e,t),We(e),lt(e.content)&&Pt(e.content),ft(e)===M.element){const a=ue(e);lt(a)&&(Qt(a),Pt(a))}U(h.afterSanitizeShadowDOM,t,null)},Qt=function(t){const e=[{node:t,shadow:null}];for(;e.length>0;){const o=e.pop();if(o.shadow){Pt(o.shadow);continue}const a=o.node,f=ft(a)===M.element,m=Q(a);if(m)for(let g=m.length-1;g>=0;--g)e.push({node:m[g],shadow:null});if(f){const g=et?et(a):null;if(typeof g=="string"&&A(g)==="template"){const L=a.content;lt(L)&&e.push({node:L,shadow:null})}}if(f){const g=ue(a);lt(g)&&e.push({node:null,shadow:g},{node:g,shadow:null})}}};return r.sanitize=function(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},e=null,o=null,a=null,l=null;if(Xt=!i,Xt&&(i="<!-->"),typeof i!="string"&&!ht(i)&&(i=co(i),typeof i!="string"))throw Z("dirty is not a string, aborting");if(!r.isSupported)return i;Bt?(T=bt,_=St):Zt(t),(h.uponSanitizeElement.length>0||h.uponSanitizeAttribute.length>0)&&(T=C(T)),h.uponSanitizeAttribute.length>0&&(_=C(_)),r.removed=[];const f=$t&&typeof i!="string"&&ht(i);if(f){vn(i);const L=Ut(i);if(typeof L=="string"){const I=A(L);if(!T[I]||mt[I])throw Lt(i),Z("root node is forbidden and cannot be sanitized in-place")}if(Mt(i))throw Lt(i),Z("root node is clobbered and cannot be sanitized in-place");try{Qt(i)}catch(I){throw Lt(i),I}}else if(ht(i))e=ve("<!---->"),o=e.ownerDocument.importNode(i,!0),o.nodeType===M.element&&o.nodeName==="BODY"||o.nodeName==="HTML"?e=o:e.appendChild(o),Qt(e);else{if(!ot&&!B&&!q&&i.indexOf("<")===-1)return D&&Rt?nt(i):i;if(e=ve(i),!e)return ot?null:Rt?X:""}e&&jt&&j(e.firstChild);const m=f?i:e;try{const L=ke(m);for(;a=L.nextNode();)ze(a,m),We(a),lt(a.content)&&Pt(a.content)}catch(L){throw f&&(Lt(i),J(r.removed,I=>{I.element&&It(I.element)})),L}if(f)return J(r.removed,L=>{L.element&&It(L.element)}),B&&Jt(i),i;if(ot){if(B&&Jt(e),Ot)for(l=hn.call(e.ownerDocument);e.firstChild;)l.appendChild(e.firstChild);else l=e;return(_.shadowroot||_.shadowrootmode)&&(l=_n.call(c,l,!0)),l}let g=q?e.outerHTML:e.innerHTML;return q&&T["!doctype"]&&e.ownerDocument&&e.ownerDocument.doctype&&e.ownerDocument.doctype.name&&O(yo,e.ownerDocument.doctype.name)&&(g="<!DOCTYPE "+e.ownerDocument.doctype.name+`>
|
|
3
|
-
`+g),B&&(g=Nt(g)),D&&Rt?nt(g):g},r.setConfig=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Zt(i),Bt=!0,bt=T,St=_},r.clearConfig=function(){st=null,Bt=!1,bt=null,St=null,D=Ft,X=""},r.isValidAttribute=function(i,t,e){st||Zt({});const o=A(i),a=A(t);return He(o,a,e)},r.addHook=function(i,t){typeof t=="function"&&N(h,i)&&Tt(h[i],t)},r.removeHook=function(i,t){if(N(h,i)){if(t!==void 0){const e=no(h[i],t);return e===-1?void 0:oo(h[i],e,1)[0]}return Xe(h[i])}},r.removeHooks=function(i){N(h,i)&&(h[i]=[])},r.removeAllHooks=function(){h=an()},r}var Io=un();async function No(n,r,s=!1){var E;if(n.length>1e5)throw new Error("Preview source exceeds 100,000 characters.");const c=crypto.randomUUID();let u;if(r==="html")u=Io.sanitize(n,{WHOLE_DOCUMENT:!0,ADD_TAGS:["style"],FORBID_TAGS:["script","meta","base","link","iframe","object","embed","form"],FORBID_ATTR:["href","action","formaction","srcset"]});else{const[P,{default:R}]=await Promise.all([import("typescript"),Promise.resolve().then(()=>require("./_virtual_content-preview-runtime-Deui59HN.cjs"))]),F=P.transpileModule(n,{fileName:"preview.tsx",reportDiagnostics:!0,compilerOptions:{jsx:P.JsxEmit.React,module:P.ModuleKind.CommonJS,target:P.ScriptTarget.ES2020,esModuleInterop:!0}}),z=(E=F.diagnostics)==null?void 0:E.filter(H=>H.category===P.DiagnosticCategory.Error);if(z!=null&&z.length)throw new Error(z.map(H=>P.flattenDiagnosticMessageText(H.messageText,`
|
|
4
|
-
`)).join(`
|
|
5
|
-
`));u=`<div id="preview"></div><script type="application/json" id="source">${JSON.stringify(F.outputText).replace(/</g,"\\u003c")}<\/script><script nonce="${c}">${R.replace(/<\/script/gi,"<\\/script")}<\/script>`}return s&&(u+=`<script nonce="${c}">document.addEventListener('dblclick', function(event) {
|
|
6
|
-
if (event.defaultPrevented || !(event.target instanceof Element) || event.target.closest('button, a, input, textarea, select, video, audio, [contenteditable], [role="button"], [role="textbox"]')) return;
|
|
7
|
-
event.preventDefault();
|
|
8
|
-
parent.postMessage({type: 'squeed:content-edit'}, '*');
|
|
9
|
-
});<\/script>`),`<!doctype html><html><head><meta http-equiv="Content-Security-Policy" content="${`default-src 'none'; script-src ${r==="jsx"?`'nonce-${c}' 'unsafe-eval'`:s?`'nonce-${c}'`:"'none'"}; style-src 'unsafe-inline'; img-src data: blob:; media-src https: data: blob:; connect-src 'none'; base-uri 'none'; form-action 'none'; frame-src 'none';`}"><meta name="referrer" content="no-referrer"><style>html{color-scheme:light}body{margin:0;padding:0;font:16px/1.5 sans-serif;color:#18181b;background:white;overflow-wrap:anywhere}*{box-sizing:border-box}img{max-width:100%}pre{white-space:pre-wrap}</style></head><body>${u}</body></html>`}exports.contentPreviewDocument=No;
|
|
10
|
-
//# sourceMappingURL=contentPreviewDocument-BsKd0dD4.cjs.map
|