1 line
20 KiB
JavaScript
1 line
20 KiB
JavaScript
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=0)}([function(e,t,n){n(1),e.exports=n(2)},function(e,t,n){"use strict"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(3),o=n.n(r),i=n(4);o()(window).on("et_builder_api_ready",function(e,t){t.registerModules(i.a)})},function(e,t){e.exports=jQuery},function(e,t,n){"use strict";var r=n(5);t.a=[r.a]},function(e,t,n){"use strict";var r=n(6),o=n.n(r),i=n(7),a=n.n(i);function l(e){return(l="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return!t||"object"!==l(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}var u=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))).state={output:null,endpoint:"".concat(window.wpApiSettings.root,"ssa/v1/embed")},n}var n,i,l;return function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,r["Component"]),n=t,(i=[{key:"propsToParams",value:function(){var e={};if(this.props.appointment_type&&(e.appointment_type=this.props.appointment_type),this.props.accent_color&&(e.accent_color=this.props.accent_color.replace("#","")),this.props.background_color&&(e.background_color=this.props.background_color.replace("#","")),this.props.font_family){var t=this.props.font_family.split("|");e.font=t[0]}return this.props.padding&&this.props.padding_css_unit&&(e.padding="".concat(this.props.padding).concat(this.props.padding_css_unit)),e}},{key:"getShortcodeOutput",value:function(e){var t=this;window.jQuery.ajax({url:this.state.endpoint,data:e,method:"GET",beforeSend:function(e){e.setRequestHeader("X-WP-Nonce",window.wpApiSettings.nonce)}}).done(function(e){t.setState(function(t){return{output:a.a.sanitize(e,{ADD_TAGS:["iframe"],ADD_ATTR:["allow","allowfullscreen","frameborder","scrolling"]})}})}).fail(function(e){console.log(e)})}},{key:"getRenderedOutput",value:function(){return{__html:this.state.output}}},{key:"componentDidUpdate",value:function(e){if(null===this.state.output||e.appointment_type!==this.props.appointment_type||e.font_family!==this.props.font_family||e.accent_color!==this.props.accent_color||e.background_color!==this.props.background_color||e.padding!==this.props.padding||e.padding_css_unit!==this.props.padding_css_unit){var t=this.propsToParams();this.getShortcodeOutput(t)}}},{key:"render",value:function(){return o.a.createElement("div",{className:"divi-module-ssa-booking-wrapper"},o.a.createElement("div",{className:"ssa-booking",dangerouslySetInnerHTML:this.getRenderedOutput()}))}}])&&c(n.prototype,i),l&&c(n,l),t}();Object.defineProperty(u,"slug",{configurable:!0,enumerable:!0,writable:!0,value:"ssa_divi_booking_module"}),t.a=u},function(e,t){e.exports=React},function(e,t,n){var r,o,i;function a(e){return(a="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}i=function(){"use strict";var e=Object.hasOwnProperty,t=Object.setPrototypeOf,n=Object.isFrozen,r=Object.keys,o=Object.freeze,i=Object.seal,l="undefined"!==typeof Reflect&&Reflect,c=l.apply,s=l.construct;c||(c=function(e,t,n){return e.apply(t,n)}),o||(o=function(e){return e}),i||(i=function(e){return e}),s||(s=function(e,t){return new(Function.prototype.bind.apply(e,[null].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(t))))});var u=x(Array.prototype.forEach),p=x(Array.prototype.indexOf),f=x(Array.prototype.join),d=x(Array.prototype.pop),m=x(Array.prototype.push),y=x(Array.prototype.slice),h=x(String.prototype.toLowerCase),g=x(String.prototype.match),b=x(String.prototype.replace),v=x(String.prototype.indexOf),T=x(String.prototype.trim),_=x(RegExp.prototype.test),A=k(RegExp),S=k(TypeError);function x(e){return function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return c(e,t,r)}}function k(e){return function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return s(e,n)}}function w(e,r){t&&t(e,null);for(var o=r.length;o--;){var i=r[o];if("string"===typeof i){var a=h(i);a!==i&&(n(r)||(r[o]=a),i=a)}e[i]=!0}return e}function O(t){var n={},r=void 0;for(r in t)c(e,t,[r])&&(n[r]=t[r]);return n}var E=o(["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","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","section","select","shadow","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"]),L=o(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","audio","canvas","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","video","view","vkern"]),D=o(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),M=o(["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"]),R=o(["#text"]),N=o(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","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","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","title","translate","type","usemap","valign","value","width","xmlns"]),H=o(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","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","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","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","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","tabindex","targetx","targety","transform","text-anchor","text-decoration","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"]),C=o(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","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"]),F=o(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),j=i(/\{\{[\s\S]*|[\s\S]*\}\}/gm),z=i(/<%[\s\S]*|[\s\S]*%>/gm),P=i(/^data-[\-\w.\u00B7-\uFFFF]/),I=i(/^aria-[\-\w]+$/),U=i(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),G=i(/^(?:\w+script|data):/i),W=i(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g),B="function"===typeof Symbol&&"symbol"===a(Symbol.iterator)?function(e){return a(e)}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":a(e)};function q(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var K=function(){return"undefined"===typeof window?null:window},V=function(e,t){if("object"!==("undefined"===typeof e?"undefined":B(e))||"function"!==typeof e.createPolicy)return null;var n=null;t.currentScript&&t.currentScript.hasAttribute("data-tt-policy-suffix")&&(n=t.currentScript.getAttribute("data-tt-policy-suffix"));var r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}};return function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:K(),n=function(t){return e(t)};if(n.version="2.0.11",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;var i=t.document,a=!1,l=t.document,c=t.DocumentFragment,s=t.HTMLTemplateElement,x=t.Node,k=t.NodeFilter,Y=t.NamedNodeMap,Q=void 0===Y?t.NamedNodeMap||t.MozNamedAttrMap:Y,X=t.Text,$=t.Comment,J=t.DOMParser,Z=t.trustedTypes;if("function"===typeof s){var ee=l.createElement("template");ee.content&&ee.content.ownerDocument&&(l=ee.content.ownerDocument)}var te=V(Z,i),ne=te?te.createHTML(""):"",re=l,oe=re.implementation,ie=re.createNodeIterator,ae=re.getElementsByTagName,le=re.createDocumentFragment,ce=i.importNode,se={};n.isSupported=oe&&"undefined"!==typeof oe.createHTMLDocument&&9!==l.documentMode;var ue=j,pe=z,fe=P,de=I,me=G,ye=W,he=U,ge=null,be=w({},[].concat(q(E),q(L),q(D),q(M),q(R))),ve=null,Te=w({},[].concat(q(N),q(H),q(C),q(F))),_e=null,Ae=null,Se=!0,xe=!0,ke=!1,we=!1,Oe=!1,Ee=!1,Le=!1,De=!1,Me=!1,Re=!1,Ne=!1,He=!1,Ce=!0,Fe=!0,je=!1,ze={},Pe=w({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","plaintext","script","style","svg","template","thead","title","video","xmp"]),Ie=null,Ue=w({},["audio","video","img","source","image","track"]),Ge=null,We=w({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),Be=null,qe=l.createElement("form"),Ke=function(e){Be&&Be===e||(e&&"object"===("undefined"===typeof e?"undefined":B(e))||(e={}),ge="ALLOWED_TAGS"in e?w({},e.ALLOWED_TAGS):be,ve="ALLOWED_ATTR"in e?w({},e.ALLOWED_ATTR):Te,Ge="ADD_URI_SAFE_ATTR"in e?w(O(We),e.ADD_URI_SAFE_ATTR):We,Ie="ADD_DATA_URI_TAGS"in e?w(O(Ue),e.ADD_DATA_URI_TAGS):Ue,_e="FORBID_TAGS"in e?w({},e.FORBID_TAGS):{},Ae="FORBID_ATTR"in e?w({},e.FORBID_ATTR):{},ze="USE_PROFILES"in e&&e.USE_PROFILES,Se=!1!==e.ALLOW_ARIA_ATTR,xe=!1!==e.ALLOW_DATA_ATTR,ke=e.ALLOW_UNKNOWN_PROTOCOLS||!1,we=e.SAFE_FOR_JQUERY||!1,Oe=e.SAFE_FOR_TEMPLATES||!1,Ee=e.WHOLE_DOCUMENT||!1,Me=e.RETURN_DOM||!1,Re=e.RETURN_DOM_FRAGMENT||!1,Ne=e.RETURN_DOM_IMPORT||!1,He=e.RETURN_TRUSTED_TYPE||!1,De=e.FORCE_BODY||!1,Ce=!1!==e.SANITIZE_DOM,Fe=!1!==e.KEEP_CONTENT,je=e.IN_PLACE||!1,he=e.ALLOWED_URI_REGEXP||he,Oe&&(xe=!1),Re&&(Me=!0),ze&&(ge=w({},[].concat(q(R))),ve=[],!0===ze.html&&(w(ge,E),w(ve,N)),!0===ze.svg&&(w(ge,L),w(ve,H),w(ve,F)),!0===ze.svgFilters&&(w(ge,D),w(ve,H),w(ve,F)),!0===ze.mathMl&&(w(ge,M),w(ve,C),w(ve,F))),e.ADD_TAGS&&(ge===be&&(ge=O(ge)),w(ge,e.ADD_TAGS)),e.ADD_ATTR&&(ve===Te&&(ve=O(ve)),w(ve,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&w(Ge,e.ADD_URI_SAFE_ATTR),Fe&&(ge["#text"]=!0),Ee&&w(ge,["html","head","body"]),ge.table&&(w(ge,["tbody"]),delete _e.tbody),o&&o(e),Be=e)},Ve=function(e){m(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){e.outerHTML=ne}},Ye=function(e,t){try{m(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){m(n.removed,{attribute:null,from:t})}t.removeAttribute(e)},Qe=function(e){var t=void 0,n=void 0;if(De)e="<remove></remove>"+e;else{var r=g(e,/^[\r\n\t ]+/);n=r&&r[0]}var o=te?te.createHTML(e):e;try{t=(new J).parseFromString(o,"text/html")}catch(e){}if(a&&w(_e,["title"]),!t||!t.documentElement){var i=(t=oe.createHTMLDocument("")).body;i.parentNode.removeChild(i.parentNode.firstElementChild),i.outerHTML=o}return e&&n&&t.body.insertBefore(l.createTextNode(n),t.body.childNodes[0]||null),ae.call(t,Ee?"html":"body")[0]};n.isSupported&&function(){try{var e=Qe("<x/><title></title><img>");_(/<\/title/,e.querySelector("title").innerHTML)&&(a=!0)}catch(e){}}();var Xe=function(e){return ie.call(e.ownerDocument||e,e,k.SHOW_ELEMENT|k.SHOW_COMMENT|k.SHOW_TEXT,function(){return k.FILTER_ACCEPT},!1)},$e=function(e){return"object"===("undefined"===typeof x?"undefined":B(x))?e instanceof x:e&&"object"===("undefined"===typeof e?"undefined":B(e))&&"number"===typeof e.nodeType&&"string"===typeof e.nodeName},Je=function(e,t,r){se[e]&&u(se[e],function(e){e.call(n,t,r,Be)})},Ze=function(e){var t,r=void 0;if(Je("beforeSanitizeElements",e,null),!((t=e)instanceof X||t instanceof $)&&!("string"===typeof t.nodeName&&"string"===typeof t.textContent&&"function"===typeof t.removeChild&&t.attributes instanceof Q&&"function"===typeof t.removeAttribute&&"function"===typeof t.setAttribute&&"string"===typeof t.namespaceURI))return Ve(e),!0;var o=h(e.nodeName);if(Je("uponSanitizeElement",e,{tagName:o,allowedTags:ge}),("svg"===o||"math"===o)&&0!==e.querySelectorAll("p, br").length)return Ve(e),!0;if(!ge[o]||_e[o]){if(Fe&&!Pe[o]&&"function"===typeof e.insertAdjacentHTML)try{var i=e.innerHTML;e.insertAdjacentHTML("AfterEnd",te?te.createHTML(i):i)}catch(e){}return Ve(e),!0}return"noscript"===o&&_(/<\/noscript/i,e.innerHTML)?(Ve(e),!0):"noembed"===o&&_(/<\/noembed/i,e.innerHTML)?(Ve(e),!0):(!we||e.firstElementChild||e.content&&e.content.firstElementChild||!_(/</g,e.textContent)||(m(n.removed,{element:e.cloneNode()}),e.innerHTML?e.innerHTML=b(e.innerHTML,/</g,"<"):e.innerHTML=b(e.textContent,/</g,"<")),Oe&&3===e.nodeType&&(r=e.textContent,r=b(r,ue," "),r=b(r,pe," "),e.textContent!==r&&(m(n.removed,{element:e.cloneNode()}),e.textContent=r)),Je("afterSanitizeElements",e,null),!1)},et=function(e,t,n){if(Ce&&("id"===t||"name"===t)&&(n in l||n in qe))return!1;if(xe&&_(fe,t));else if(Se&&_(de,t));else{if(!ve[t]||Ae[t])return!1;if(Ge[t]);else if(_(he,b(n,ye,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==v(n,"data:")||!Ie[e])if(ke&&!_(me,b(n,ye,"")));else if(n)return!1}return!0},tt=function(e){var t=void 0,o=void 0,i=void 0,a=void 0,l=void 0;Je("beforeSanitizeAttributes",e,null);var c=e.attributes;if(c){var s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ve};for(l=c.length;l--;){var u=t=c[l],m=u.name,g=u.namespaceURI;if(o=T(t.value),i=h(m),s.attrName=i,s.attrValue=o,s.keepAttr=!0,s.forceKeepAttr=void 0,Je("uponSanitizeAttribute",e,s),o=s.attrValue,!s.forceKeepAttr){if("name"===i&&"IMG"===e.nodeName&&c.id)a=c.id,c=y(c,[]),Ye("id",e),Ye(m,e),p(c,a)>l&&e.setAttribute("id",a.value);else{if("INPUT"===e.nodeName&&"type"===i&&"file"===o&&s.keepAttr&&(ve[i]||!Ae[i]))continue;"id"===m&&e.setAttribute(m,""),Ye(m,e)}if(s.keepAttr)if(we&&_(/\/>/i,o))Ye(m,e);else if(_(/svg|math/i,e.namespaceURI)&&_(A("</("+f(r(Pe),"|")+")","i"),o))Ye(m,e);else{Oe&&(o=b(o,ue," "),o=b(o,pe," "));var v=e.nodeName.toLowerCase();if(et(v,i,o))try{g?e.setAttributeNS(g,m,o):e.setAttribute(m,o),d(n.removed)}catch(e){}}}}Je("afterSanitizeAttributes",e,null)}},nt=function e(t){var n=void 0,r=Xe(t);for(Je("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)Je("uponSanitizeShadowNode",n,null),Ze(n)||(n.content instanceof c&&e(n.content),tt(n));Je("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(e,r){var o=void 0,a=void 0,l=void 0,s=void 0,u=void 0;if(e||(e="\x3c!--\x3e"),"string"!==typeof e&&!$e(e)){if("function"!==typeof e.toString)throw S("toString is not a function");if("string"!==typeof(e=e.toString()))throw S("dirty is not a string, aborting")}if(!n.isSupported){if("object"===B(t.toStaticHTML)||"function"===typeof t.toStaticHTML){if("string"===typeof e)return t.toStaticHTML(e);if($e(e))return t.toStaticHTML(e.outerHTML)}return e}if(Le||Ke(r),n.removed=[],"string"===typeof e&&(je=!1),je);else if(e instanceof x)1===(a=(o=Qe("\x3c!--\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===a.nodeName?o=a:"HTML"===a.nodeName?o=a:o.appendChild(a);else{if(!Me&&!Oe&&!Ee&&He&&-1===e.indexOf("<"))return te?te.createHTML(e):e;if(!(o=Qe(e)))return Me?null:ne}o&&De&&Ve(o.firstChild);for(var p=Xe(je?e:o);l=p.nextNode();)3===l.nodeType&&l===s||Ze(l)||(l.content instanceof c&&nt(l.content),tt(l),s=l);if(s=null,je)return e;if(Me){if(Re)for(u=le.call(o.ownerDocument);o.firstChild;)u.appendChild(o.firstChild);else u=o;return Ne&&(u=ce.call(i,u,!0)),u}var f=Ee?o.outerHTML:o.innerHTML;return Oe&&(f=b(f,ue," "),f=b(f,pe," ")),te&&He?te.createHTML(f):f},n.setConfig=function(e){Ke(e),Le=!0},n.clearConfig=function(){Be=null,Le=!1},n.isValidAttribute=function(e,t,n){Be||Ke({});var r=h(e),o=h(t);return et(r,o,n)},n.addHook=function(e,t){"function"===typeof t&&(se[e]=se[e]||[],m(se[e],t))},n.removeHook=function(e){se[e]&&d(se[e])},n.removeHooks=function(e){se[e]&&(se[e]=[])},n.removeAllHooks=function(){se={}},n}()},"object"===a(t)&&"undefined"!==typeof e?e.exports=i():void 0===(o="function"===typeof(r=i)?r.call(t,n,t,e):r)||(e.exports=o)}]); |