1var $2sxcJsApi;(()=>{"use strict";var t={};(t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})})(t);var e=function(){function t(){this.frame=void 0,this.callback=void 0}return t.prototype.open=function(t,e){for(var n=10000010,o=window;o!==window.top&&n<10000100;)n++,o=o.parent;var r=document.createElement("div");r.setAttribute("style"," top: 0;left: 0;width: 100%;height: 100%; position:fixed; z-index:"+n),document.body.appendChild(r);var i=document.createElement("iframe");i.setAttribute("allowtransparency","true"),i.setAttribute("style","top: 0;left: 0;width: 100%;height: 100%;"),i.setAttribute("src",t),r.appendChild(i),document.body.className+=" sxc-popup-open",this.frame=i,this.callback=e},t.prototype.close=function(){if(this.frame){document.body.className=document.body.className.replace("sxc-popup-open","");var t=this.frame;t.parentNode.parentNode.removeChild(t.parentNode),this.callback()}},t.prototype.closeThis=function(){window.parent.$2sxc.totalPopup.close()},t}(),n=".",o="~",r="_",i=["true","false"],a=i.concat(["null"]),s=function(){function t(){}return t.prototype.toUrl=function(t,e){if(void 0===e&&(e=!0),!t)return"";if(Array.isArray(t))throw new Error("only objects can be toUrl(), arrays don't work. Put the array in an object property.");var n=this.toUrlRecursive(t,null,0,e).filter((function(t){return null!=t&&t.length>0})).join(o);return n?o+n:""},t.prototype.toObj=function(t,e,o){void 0===e&&(e=!0),void 0===o&&(o=!1);var r=this.back(t,e);return o?r:function(t){var e={};for(var o in t){var r=o.split(n);r.reduce((function(e,n,i){return e[n]||(e[n]=isNaN(Number(r[i+1]))?r.length-1==i?t[o]:{}:[])}),e)}return e}(r)},t.prototype.toUrlRecursive=function(t,e,i,s){var l=this;if(null==t)return[];var p,d,h=i>0?n.repeat(i):"";if("object"!=typeof t)return["".concat(h).concat(e,"=").concat(s?(p=t,d=!1,"string"==typeof p&&((a.includes(p)||u(p))&&(d=!0),p=p.replaceAll(o,"~~").replaceAll(r,"~_").replaceAll(" ",r)),(d?"~":"")+encodeURIComponent(p)):t)];var f=Object.keys(t).map((function(e){return l.toUrlRecursive(t[e],e,i+1,s)}));if(0===f.length)return[];var y=f.reduce((function(t,e){return t.concat(Array.isArray(e)?c(e,2):e)}),[]);return(i>0?["".concat(h).concat(e),null]:[]).concat(y)},t.prototype.back=function(t,e){if(!t||0===t.length)return[];for(var r=t.replaceAll("=~","=¶").replaceAll("~~","#").split("~.").map((function(t){return null==t?void 0:t.replaceAll("#",o)})).filter((function(t){return t.length>0})),a={},s=[],c=0;c<r.length;c++){var p=r[c].split("="),d=p[0],h=d.match(/^\.*/g)[0].length;if(0===h)s=d.split(n);else{if(h>s.length)throw new Error("Invalid key: ".concat(d," when current stack is ").concat(s.join(n)));var f=d.substring(h);(s=s.slice(0,h)).push(f),p[0]=s.join(n)}a[p[0]]=p.length>1?e?(null==(y=decodeURIComponent(p[1]))?void 0:y.length)>0&&"¶"===y[0]?l(y.slice(1)):i.includes(y)?"true"===y:u(y)?parseFloat(y):l(y):p[1]:null}var y;return a},t}();function c(t,e){return e<1?t.slice():t.reduce((function(t,n){return t.concat(Array.isArray(n)?c(n,e-1):n)}),[])}function u(t){return"string"==typeof t&&!isNaN(t)&&!isNaN(parseFloat(t))}function l(t){var e=String.fromCharCode(1);return t.replaceAll("~_",e).replaceAll(r," ").replaceAll(e,r)}var p,d=function(){function t(){}return t.prototype.get=function(t){t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var e,n=new RegExp("[\\?&]"+t+"=([^&#]*)","i").exec(location.search);if(null===n&&(n=new RegExp("[#&]"+t+"=([^&#]*)","i").exec(location.hash)),null===n){var o=location.pathname.match(new RegExp("/"+t+"/([^/]+)","i"));o&&o.length>1&&(e=o.reverse()[0])}else e=n[1];return null==e?"":decodeURIComponent(e.replace(/\+/g," "))},t.prototype.require=function(t){var e=this.get(t);if(""===e){var n="Required parameter (".concat(t,") missing from url - cannot continue");throw alert(n),n}return e},t.prototype.isDebug=function(){var t;return"true"===(null===(t=this.get("debug"))||void 0===t?void 0:t.toLocaleLowerCase())},t.prototype.toUrl=function(t){return(new s).toUrl(t,!0)},t.prototype.toObj=function(t){return(new s).toObj(t,!0)},t}(),h=function(){this.watchDomChanges=0};
1!function(t){t[t.Undefined=0]="Undefined",t[t.None=1]="None",t[t.Attribute=2]="Attribute",t[t.App=3]="App",t[t.Entity=4]="Entity",t[t.ContentType=5]="ContentType",t[t.Zone=6]="Zone",t[t.CmsItem=10]="CmsItem",t[t.System=11]="System",t[t.Site=12]="Site",t[t.SiteVariant=13]="SiteVariant",t[t.Page=14]="Page",t[t.PageVariant=15]="PageVariant",t[t.Module=16]="Module",t[t.ModuleVariant=17]="ModuleVariant",t[t.User=18]="User",t[t.Custom=90]="Custom",t[t.Custom1=91]="Custom1",t[t.Custom2=92]="Custom2",t[t.Custom3=93]="Custom3",t[t.Custom4=94]="Custom4",t[t.Custom5=95]="Custom5",t[t.Custom6=96]="Custom6",t[t.Custom7=97]="Custom7",t[t.Custom8=98]="Custom8",t[t.Custom9=99]="Custom9"}(p||(p={}));var f,y="2sxc",g="14.12.03",v=["app","app-sys","app-api","app-query","app-content","eav","view","dnn"];!function(t){t.log="log",t.warn="warn",t.error="error",t.throw="throw"}(f||(f={}));var m,w=function(){function t(t,e,n){var o=this;this.parentLog=e,this.initLog=function(t,e,n){return o.initLogInternal(t,e,n)},this.initLogInternal(t,e,n)}return t.prototype.initLogInternal=function(t,e,n){null==this.log?this.log=new _(t,e,n):(this.log.rename(t),this.log.linkLog(e),null!=n&&this.log.add(n))},t}(),b=-1!==location.search.indexOf("debug=true"),_=function(){function t(t,e,n){var o=this;this.entries=new Array,this.depth=0,this.callDepths=[],this.maxEntries=1e3,this.liveDump=!1,this._parentHasLiveDump=!1,this.keepData=b,this._parentHasKeepData=!1,this.fullIdentifier=function(){return"".concat(o.parent?o.parent.fullIdentifier():"").concat(o.identifier())},this.linkLog=function(t){o.parent=t||o.parent,o.parent&&(o._parentHasLiveDump=o.parent.liveDump||o.parent._parentHasLiveDump,o._parentHasKeepData=o.parent.keepData||o.parent._parentHasKeepData)},this.scope="tdo",this.name="unknwn",this.id=function(){return o.idCache||(o.idCache=o.randomString(2))},this.identifier=function(){return"".concat(o.scope).concat(o.name,"(").concat(o.id(),")")},this.rename(t),this.linkLog(e),this.startTime=(new Date).getTime(),null!=n&&this.add(n)}return t.prototype.rename=function(t){try{var e=t.indexOf(".");this.scope=e>0?t.substr(0,Math.min(e,3))+".":"";var n=e>0?t.substr(e+1):t;this.name=n.substr(0,Math.min(n.length,6)),this.name=this.name.substr(0,Math.min(this.name.length,6))}catch(t){}},t.prototype.add=function(t,e){if(this.entries.length>this.maxEntries)return this._prepareMessage(t);this.entries.length===this.maxEntries&&this._addEntry(this._prepareEntry("Maximum amount of entries added to log, will stop adding more"));var n=this._prepareEntry(t,e);return this._addEntry(n),n.message},t.prototype.addData=function(t,e){this.logData()&&this.add(t,e)},t.prototype.logData=function(){return this.keepData||this._parentHasKeepData},t.prototype._prepareEntry=function(t,e){var n=this._prepareMessage(t),o=(new Date).getTime()-this.startTime;return new I(this,n,this.depth,o,e)},t.prototype._prepareMessage=function(t){if(t instanceof Function)try{return t()}catch(t){return"err: message undefined"}return t.toString()},t.prototype.call=function(t,e,n,o){return new O(this,t,e,n,o)},t.prototype._callDepthAdd=function(t){this.depth++,this.callDepths.push(t)},t.prototype._callDepthRemove=function(t){this.depth--;var e=this.callDepths.pop();e!==t&&console.warn("log: call depth reduced by '".concat(t,"' but last was '").concat(e,"'"))},t.prototype.dump=function(t,e){void 0===t&&(t=null),void 0===e&&(e=" - "),t?this.dumpOne(0,t,e):this.dumpList()},t.prototype.dumpList=function(t,e){var n=this;void 0===t&&(t=0);var o=t;this.entries.slice(t,e?t+e:void 0).forEach((function(t){return n.dumpOne(o++,t)}))},t.prototype.dumpOne=function(t,e,n){void 0===n&&(n=" - ");var o=e.result?" ="+e.result:"",r=("0000"+t).slice(-4)+" "+e.source()+n+"..".repeat(e.depth)+e.message+o;e.data?console.log(r,e.data):console.log(r)},t.prototype._addEntry=function(t){this.liveDump&&this.dump(t),this.entries.push(t),this.parent&&this.parent._addEntry(t)},t.prototype.randomString=function(t){for(var e="0123456789abcdefghiklmnopqrstuvwxyz",n="",o=0;o<t;o++){var r=Math.floor(Math.random()*e.length);n+=e.substring(r,r+1)}return n},t}(),O=function(){function t(t,e,n,o,r){if(this.log=t,this.name=e,this.initialEntry=this.log._prepareEntry(e+"("+(n||"")+")"),this.log._callDepthAdd(e),this.log._addEntry(this.initialEntry),"string"==typeof o&&this.add(o),r)for(var i in r)this.data("initial:"+i,r[i])}return t.prototype.add=function(t,e,n){this.lastMessage=t,this.log.add(t,e),n&&this.processExtraBehavior(n,t,e)},t.prototype.onlyAddIfNew=function(t,e){this.lastMessage!==t&&this.add(t),e&&this.processExtraBehavior(e,t,void 0)},t.prototype.data=function(t,e){this.log.addData(t,e)},t.prototype.done=function(t,e){this.return(null,t||"ð",e)},t.prototype.return=function(t,e,n){return e=e||"ð",this.initialEntry.result=e,this.log._callDepthRemove(this.name),this.initialEntry.data=t,(this.log.liveDump||this.log._parentHasLiveDump)&&this.add(this.name+" = "+e,t),n&&this.processExtraBehavior(n,e,t),t},t.prototype.processExtraBehavior=function(t,e,n){if(t===f.log&&console.log(e,n),t===f.warn&&console.warn(e,n
1),t!==f.error&&t!==f.throw||console.error(e,n),t===f.throw)throw e},t}(),x=function(){function t(){}return t.TypeSafeAssign=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];t.reduce((function(t,e){return Object.keys(e).reduce((function(t,n){return t[n]=e[n],t}),t)}),t[0])},t.DeepClone=function(t,e){if(void 0===e&&(e=!1),null==t)return t;var n=e?JSON.stringify(t,A):JSON.stringify(t);return null==n?t:JSON.parse(n)},t}(),A=function(){var t=new WeakSet;return function(e,n){if("object"==typeof n&&null!==n){if(t.has(n))return;t.add(n)}return n}},C=function(){function t(){}return t.ready=function(t){"complete"===document.readyState?t():document.addEventListener("DOMContentLoaded",(function(){return t()}),{once:!0})},t.param=function(t){return Object.entries(t).map((function(t){var e=t[0],n=t[1];return"".concat(encodeURIComponent(e),"=").concat(null==n?"":"string"==typeof n?encodeURIComponent(n):encodeURIComponent(JSON.stringify(n)))})).join("&")},t.domFromString=function(e){var n=document.createElement("div");n.insertAdjacentHTML("afterbegin",e),Array.from(n.querySelectorAll("script")).forEac
1h((function(e){var n=document.createElement("script");Array.from(e.attributes).forEach((function(t){n.setAttribute(t.nodeName,t.nodeValue)})),n.textContent=e.textContent,t.replaceWith(e,n,!1)}));var o=Array.from(n.children);return o.forEach((function(t){n.removeChild(t)})),o},t.offset=function(t){var e=t.getBoundingClientRect();return{top:e.top+window.scrollY,left:e.left+window.scrollX}},t.width=function(t){var e=getComputedStyle(t);return 0===t.offsetWidth?0:t.offsetWidth-(parseInt(e.getPropertyValue("border-left-width"),10)+parseInt(e.getPropertyValue("border-right-width"),10))-(parseInt(e.getPropertyValue("padding-left"),10)+parseInt(e.getPropertyValue("padding-right"),10))},t.height=function(t){var e=getComputedStyle(t);return 0===t.offsetHeight?0:t.offsetHeight-(parseInt(e.getPropertyValue("border-top-width"),10)+parseInt(e.getPropertyValue("border-bottom-width"),10))-(parseInt(e.getPropertyValue("padding-top"),10)+parseInt(e.getPropertyValue("padding-bottom"),10))},t.outerWidth=function(t){return t.offsetWidth},t.empty=function(t){Array.from(t.childNodes).forEach((function(e){t.removeChild(e)}))},t.replaceWith=function(t,e,n){var o=t.parentElement,r=Array.from(e.querySelectorAll("script")),i=[];r.forEach((function(t){i.push({script:t,type:t.type}),t.type=null})),o.replaceChild(e,t),i.forEach((function(t){t.script.type=t.type})),n&&S.runScripts(r,void 0)},t.append=function(t,e,n){var o=[];e.forEach((function(e){if("script"===e.tagName.toLocaleLowerCase()){var n=e,r=n.type;n.type=null,t.appendChild(n),n.type=r,o.push(n)}else t.appendChild(e)})),n&&o.length>0&&S.runScripts(o,void 0)},t}(),S=function(){function t(){}return t.runScripts=function(t,e){var n=this,o=t[0],r=t.slice(1);if(null!=o){var i=document.createElement("script");if(Array.from(o.attributes).forEach((function(t){i.setAttribute(t.nodeName,t.nodeValue)})),i.textContent=o.textContent,i.type&&i.src){var a=function(){i.onload=null,i.onerror=null,document.head.removeChild(i),n.runScripts(r,e)};return i.onload=a,i.onerror=a,void document.head.appendChild(i)}setTimeout((function(){document.head.appendChild(i),document.head.removeChild(i),n.runScripts(r,e)}))}else null==e||e()},t}(),I=function(){function t(t,e,n,o,r){var i=this;this.log=t,this.message=e,this.depth=n,this.time=o,this.source=function(){return i.log.fullIdentifier()},r&&(this.data=r)}return Object.defineProperty(t.prototype,"data",{get:function(){return this._data},set:function(t){void 0!==t&&this.log.logData()&&(this._data=x.DeepClone(t,!0))},enumerable:!1,configurable:!0}),t}(),E=(m=function(t,e){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},m(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}m(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),j=function(t){function e(){var e=t.call(this,"Sys.Insght")||this;return e.history={},e.add("system","insights",e.log),e.log.add("this log is usually empty, as it's just a helper tool"),e}return E(e,t),e.prototype.add=function(t,e,n){t in this.history||(this.history[t]=new T(t)),this.history[t].logs.push({key:e,log:n})},e.prototype.show=function(t,e,n,o){if(t){var r=this.history[t];if(r)if(void 0!==e){var i=r.logs.length>=e&&r.logs[e];if(i)if(i.log){console.log("Will dump the log for ".concat(t,"[").concat(e,"] '").concat(i.key,"'"));var a=!1;void 0===n&&(a=!0,n=0,o=25),i.log.dumpList(n||0,o),a&&i.log.entries.length>o&&console.warn("Only showing ".concat(o," of ").concat(i.log.entries.length," logs. To show all, add start param '..., 0)' or start/length '..., 0, 100)'"))}else console.error("found index ".concat(e," on part '").concat(t,"' but it has no logs"));else console.error("index ".concat(e," not found in part '").concat(t,"'"))}else{var s=0,c=r.logs.map((function(e){return"$2sxc.insights('".concat(t,"', ").concat(s++,"); - will show for '").concat(e.key,"'")})).join("\n");console.log("'".concat(t,"' contains ").concat(r.logs.length," entries. Copy/paste the code to to see the logs: \n")+c)}else console.error("part '".concat(t,"' not found"))}else{var u=Object.keys(this.history);console.log("".concat("This is the $2sxc JS Insights - see https://r.2sxc.org/insights \nAdd ?debug=true to the url to log more data. \nCopy/paste code lines below to see details. \n----------------------------------------------------------------------\n").concat(u.length," insights-sections foun
1d: \n")+u.map((function(t){return"$2sxc.insights('".concat(t,"');")})).join("\n"))}},e}(w),T=function(t){this.name=t,this.logs=[]},R=window.$2sxc&&window.$2sxc._insights||new j,P="/desktopmodules/tosic_sexycontent/",M="RequestVerificationToken",D=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),k="You must either include jQuery on the page or inject the jsApi parameters to prevent auto-detection.",L=function(t){function e(e){var n=t.call(this,"Env.DnnLdr",e.log)||this;return n.env=e,n}return D(e,t),e.prototype.dnnSfFallback=function(){var t=this,e=this.log.call("dnnSfFallback");C.ready((function(){return t.dnnSfLoadWhenDocumentReady()})),e.done("started dom-ready watcher")},e.prototype.dnnSfLoadWhenDocumentReady=function(){var t=this.log.call("dnnSfLoadWhenDocumentReady");if(void 0===window.$)throw t.done("error"),"Can't load pageid, moduleid, etc. and $ is not available. \n ".concat(k);var e=window.$.ServicesFramework;if(void 0===e)throw t.done("error"),"Can't load pageid, moduleid etc. and DNN SF is not available. \n ".concat(k);var n=e(0),o=n.getServiceRoot("2sxc"),r={page:n.getTabId(),root:"unknown",api:o,appApi:o,rvtHeader:M,rvt:n.getAntiForgeryValue(),uiRoot:P,platform:"dnn"};this.env.load(r,"dnn SF"),t.done()},e}(w),N="input[name=__RequestVerificationToken]",H=function(){function t(t){this.mainLoader=t,this.log=new _("ldr.dynmic",t.log)}return t.prototype.startMetaTagObserver=function(t){var e=this;this.observer||(this.observer=new MutationObserver((function(n){for(var o=0,r=n;o<r.length;o++){var i=r[o];"attributes"===i.type&&i.attributeName===t&&e.mainLoader.updateEnv(JSON.parse(e.mainLoader.getMetaContent()))}})),this.log.add("start observing meta tag"),this.observer.observe(this.mainLoader.getJsApiMetaTag(),{attributes:!0,childList:!1,subtree:!1}))},t.prototype.startInputRvtObserver=function(){var t=this;if(!this.inputRvtObserver){this.inputRvtObserver=new MutationObserver((function(e){for(var n=0,o=e;n<o.length;n++){var r=o[n];"attributes"===r.type&&"value"===r.attributeName&&t.loadRvtFromHiddenInput(r.target)}})),this.log.add("start observing Rvt Input");var e=document.querySelector(N);null!=e?(this.loadRvtFromHiddenInput(e),this.inputRvtObserver.observe(e,{attributes:!0,childList:!1,subtree:!1})):console.error("Can't find Oqtane RVT field with selector ".concat(N,"\n")+"So we cannot watch it for changes.\nThis will probably cause the $2sxc to fail.")}},t.prototype.loadRvtFromHiddenInput=function(t){this.log.add("Input Rvt updated"),t&&t.value&&this.mainLoader.env.updateRvt(t.value)},t}(),J=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),U="content",F=function(t){function e(e){var n=t.call(this,"Env.MetaLd",e.log)||this;return n.env=e,n.retries=0,n.dynamicPageHelper=new H(n),n}return J(e,t),e.prototype.loadMetaFromHeader=function(t){var e=this;void 0===t&&(t=!1);var n=this.log.call("loadMetaFromHeader","".concat(t));if(this.env.ready)return n.done("loadMeta - ready");this.log.add("loadMetaFromHeader: start, retry:"+this.retries+", force fallback: "+t);var o=this.getMetaContent();if(!o)return this.retries++,t||this.retries>=100?(new L(this.env).dnnSfFallback(),n.done()):(setTimeout((function(){e.loadMetaFromHeader()}),10),n.done("will retry"));this.updateEnv(JSON.parse(o)),this.dynamicPageHelper.startMetaTagObserver(U),n.done()},e.prototype.updateEnv=function(t){this.log.add("meta env info updated"),this.env.load(t,"meta header"),"oqtane"===t.platform&&this.dynamicPageHelper.startInputRvtObserver()},e.prototype.getMetaContent=function(){var t=this.getJsApiMetaTag();return t?t.getAttribute(U):null},e.prototype.getJsApiMetaTag=function(){return document.querySelector("meta[name=".concat("_jsApi","]"))},e.prototype.startMetaTagObserver=function(){var t=this;this.observer||(this.observer=new MutationObserver((function(e){for(var n=0,o=e;n<o.length;n++){var r=o[n];"attributes"===r.type&&r.attributeName===U&&t.updateEnv(JSON.parse(t.getMetaContent()))}})),this.log.add("start observing meta tag"),this.observer.observe(this.getJsApiMetaTag(),{attributes:!0,childList:!1,subtree:!1}))},e}(w),q=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),V=function(t){function e(){var e=t.call(this,"Environment",null,"starting")||this;return e.ready=!1,e.source="",e.log.keepData=!0,R.add("system","environment",e.log),e.metaLoader=new F(e),"undefined"!=typeof _jsApi?(e.log.add("found _jsApi, will use"),e.load(_jsApi,"global variable _jsApi")):(e.log.add("will start initializing"),e.metaLoader.loadMetaFromHeader()),e}return q(e,t),e.prototype.load=function(t,e){var n=this.log.call("load");if(t.root&&!t.api){n.add("root provided, api missing, will auto-complete");var o=t.root.endsWith("/")?"":"/";t.api="".concat(t.root).concat(o).concat("desktopmodules/2sxc/api/")}this.header=t,this.replacedRvt&&(this.header.rvt=this.replacedRvt),this.ready=!0,this.source=e||"external/unknown"+(this.replacedRvt?"+rvt":""),n.return(t,"loaded from "+this.source)},e.prototype.updateRvt=function(t){t&&(this.replacedRvt=t,this.header.rvt=t)},e.prototype.api=function(){return this.ensureReadyOrThrow("api"),this.header.api},e.prototype.appApi=function(){return this.ensureReadyOrThrow("appApi"),this.header.appApi},e.prototype.page=function(){return this.ensureReadyOrThrow("page"),this.header.page},e.prototype.rvtHeader=function(){return this.ensureReadyOrThrow("rvtHeader"),this.header.rvtHeader||M},e.prototype.rvt=function(){return this.ensureReadyOrThrow("rvt"),this.header.rvt},e.prototype.uiRoot=function(){return this.ensureReadyOrThrow("uiRoot"),this.header.uiRoot||P},e.prototype.platform=function(){return this.ensureReadyOrThrow("platform"),this.header.platform||"dnn"},e.prototype.dialogQuery=function(){var t;return null!==(t=this.header.dialogQuery)&&void 0!==t?t:null},e.prototype.ensureReadyOrThrow=function(t){if(!this.ready&&(this.log.add("ensureReady - force last attempt to load MetaHeader for "+t),this.metaLoader.loadMetaFromHeader(!0),!this.ready))throw"Can't find ".concat(t," - something went wrong, pls contact 2sxc.org")},e}(w),$=function(){function t(t,e){this.api=t,this.sxc=e}return t.prototype.makePromise=function(t){var e=this.api.headers();if(null==window.$)throw new Error("JQuery is now removed from 2sxc installation. Please use newer api like fetch or include JQuery in your project");var n=window.$.ajax({async:!0,dataType:t.dataType||"json",data:JSON.stringify(t.data),contentType:"application/json",type:t.method,url:this.getActionUrl(t),beforeSend:function(t){for(var n in e)e.hasOwnProperty(n)&&t.setRequestHeader(n,e[n])}});
1return t.preventAutoFail||n.fail(this.sxc.showDetailedHttpError),n},t.prototype.getActionUrl=function(t){var e=t.url||"app/auto/api/"+t.controller+"/"+t.action;return this.sxc.root.http.apiUrl(e,t.endpoint)+(t.params?"?"+C.param(t.params):"")},t}(),W=function(){return W=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},W.apply(this,arguments)},z=function(){function t(t){this.sxc=t,this.env=t.root.env}return t.prototype.get=function(t,e,n,o){return this.request(t,e,n,o,"GET")},t.prototype.post=function(t,e,n,o){return this.request(t,e,n,o,"POST")},t.prototype.delete=function(t,e,n,o){return this.request(t,e,n,o,"DELETE")},t.prototype.put=function(t,e,n,o){return this.request(t,e,n,o,"PUT")},t.prototype.request=function(t,e,n,o,r){if("object"!=typeof e&&void 0!==e&&(e={id:e}),"string"==typeof t){var i=t.split("/"),a=i[0],s=i[1];""!==a&&""!==s||console.warn("Error: controller or action not defined. Will continue with likely errors."),t={controller:a,action:s,params:e,data:n,url:i.length>2?t:null,preventAutoFail:o}}var c={method:null===r?"POST":r,params:null,preventAutoFail:!1},u=new $(this,this.sxc);return t=Object.assign({},c,t),u.makePromise(t)},t.prototype.fetchRaw=function(t,e,n){var o={},r=this.sxc.ctx,i=t.toLocaleLowerCase();(null==r?void 0:r._autoAppIdsInUrl)&&i.includes("app/auto/")&&((null==r?void 0:r.appId)&&!i.includes("appid=")&&(o.appId=r.appId),(null==r?void 0:r.zoneId)&&!i.includes("zoneid=")&&(o.zoneId=r.zoneId)),t=this.url(t,o),n=n||(e?"POST":"GET");var a=this.headers(n);if(e)try{JSON.parse(e)}catch(t){e=JSON.stringify(e)}return fetch(t,W({headers:a,method:n},e&&{body:e}))},t.prototype.fetch=function(t,e,n){return console.warn("You are calling 'fetch' on the sxc.webApi. This is deprecated will stop in 2sxc v15, please use fetchRaw(...) or fetchJson(...) instead."),this.fetchJson(t,e,n)},t.prototype.fetchJson=function(t,e,n){return this.fetchRaw(t,e,n).then((function(t){return t.json()}))},t.prototype.headers=function(t){var e=this.sxc.root.http.headers(this.sxc.id,this.sxc.cbid,this.sxc.ctx);return t?("GET"===t.toLocaleUpperCase()?e.Accept="application/json":(e.Accept="application/json",e["Content-Type"]="application/json"),e):e},t.prototype.url=function(t,e){if(null==t)return t;var n=t.split("#")[0].split("?"),o=(t=n[0]).split("/");if(2===o.length&&o[0]&&o[1]){var r=o[0],i=o[1];t="app/auto/api/".concat(r,"/").concat(i)}return[t=this.sxc.root.http.apiUrl(t),e="".concat(n[1]||"","&").concat(e?"string"==typeof e?e:C.param(e):"").split("&").filter((function(t){return!!t})).join("&")].filter((function(t){return!!t})).join("?")},t}(),K=function(t,e){this.sxc=t,this.partName=e},B=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),G=function(t){function e(e,n,o){var r=t.call(this,e,"data")||this;if(r.name=n,r.webApi=e.webApi,o+=" name ",null==n)throw o+"is empty";if(-1!=n.indexOf("/")||-1!=n.indexOf("\\"))throw o+"has slashes - not allowed";if(-1!=n.indexOf("?"))throw o+'has "?" - not allowed';return r}return B(e,t),e}(K),Q=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),Y="app/auto/data",Z=function(t){function e(e,n){var o=t.call(this,e,n,"ContentType")||this;return o.name=n,o}return Q(e,t),e.prototype.getAll=function(){return this.getInternal()},e.prototype.getOne=function(t){return this.getInternal(t)},e.prototype.getMany=function(t,e){throw"not implemented - probably v13.5 or something"},e.prototype.getInternal=function(t,e){var n="".concat(Y,"/").concat(this.name);return!t||"string"!=typeof t&&"number"!=typeof t||(n+="/"+t),this.webApi.fetchJson(this.webApi.url(n,e))},e.prototype.create=function(t,e){var n="".concat(Y,"/").concat(this.name);if(null!=e){"string"==typeof e&&(e={Target:p.Entity,Guid:e});try{t.For=e}catch(t){}}return this.webApi.fetchJson(this.webApi.url(n),t,"POST")},e.prototype.update=function(t,e){var n="".concat(Y,"/").concat(this.name,"/").concat(t);return this.webApi.fetchJson(this.webApi.url(n),e,"POST")},e.prototype.delete=function(t){var e="".concat(Y,"/").concat(this.name,"/").concat(t);
1return this.webApi.fetchRaw(this.webApi.url(e),void 0,"DELETE").then((function(t){return null}))},e}(G),X=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),tt=function(t){function e(e,n){var o=t.call(this,e,n,"Query")||this;return o.name=n,o}return X(e,t),e.prototype.getAll=function(t,e){return this.getInternal(void 0,t,e)},e.prototype.getStream=function(t,e,n){if(-1!==t.indexOf(","))throw"parameter 'stream' can only contain one stream name for 'getStream'";return this.getInternal(t,e,n).then((function(e){return null!=e&&e.hasOwnProperty(t)?e[t]:[]}))},e.prototype.getStreams=function(t,e,n){return this.getInternal(t,e,n)},e.prototype.getInternal=function(t,e,n){var o="app/auto/query/"+this.name;return t&&"string"==typeof t&&(o+="?stream="+t),this.webApi.fetchJson(this.webApi.url(o,e),n)},e}(G),et=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),nt=function(t){function e(e){return t.call(this,e,"cms")||this}return et(e,t),e.prototype.run=function(t){throw'cms.run() requires editing to be on, or page-feature "2sxc.JsCms" to be enabled to work'},e}(K),ot=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),rt=function(t){function e(e,n,o,r,i){var a,s=t.call(this,"SxcInstance",null,"Generating for "+e+":"+n)||this;s.id=e,s.cbid=n,s.cacheKey=o,s.root=r,s.ctx=i,s._isSxcInstance=!0,s.manage=null,s.cms=new nt(s),s.webApi=new z(s);try{r._manage&&r._manage.initInstance(s)}catch(t){console.error("error in 2sxc - will only log but not throw",t)}return(a=s.data).on||(a.on=function(){throw it},Object.defineProperty(a,"sourceUrl",{get:function(){throw it}})),r._translateInit&&s.manage&&s.manage.context&&s.manage.context.app&&s.manage.context.app.currentLanguage&&r._translateInit(s.manage),s}return ot(e,t),e.is=function(t){return t._isSxcInstance},e.prototype.data=function(t){return new Z(this,t)},e.prototype.query=function(t){return new tt(this,t)},e.prototype.resolveServiceUrl=function(t){var e=t.split("/")[0].toLowerCase();return-1===v.indexOf(e)?t:this.root.http.apiRoot(y)+e+"/"+t.substring(t.indexOf("/")+1)},e.prototype.showDetailedHttpError=function(t){if(window.console&&console.log(t),404===t.status&&t.config&&t.config.url&&t.config.url.indexOf("/dist/i18n/")>-1)return window.console&&console.log("just fyi: failed to load language resource; will have to use default"),t;if(0===t.status||-1===t.status)return t;var e="Had an error talking to the server (status "+t.status+").",n=t.responseText?JSON.parse(t.responseText):t.data;if(n){var o=n.Message;o&&(e+="\nMessage: "+o);var r=n.MessageDetail||n.ExceptionMessage;r&&(e+="\nDetail: "+r),r&&0===r.indexOf("No action was found")&&(r.indexOf("that matches the name")>0?e+="\n\nTip from 2sxc: you probably got the action-name wrong in your JS.":r.indexOf("that matches the request.")>0&&(e+="\n\nTip from 2sxc: Seems like the parameters are the wrong amount or type.")),o&&0===o.indexOf("Controller")&&o.indexOf("not found")>0&&(e+="\n\nTip from 2sxc: you probably spelled the controller name wrong or forgot to remove the word 'controller' from the call in JS. To call a controller called 'DemoController' only use 'Demo'.")}return e+="\n\nif you are an advanced user you can learn more about what went wrong - discover how on 2sxc.org/help?tag=debug",alert(e),t},e.prototype.isEditMode=function(){var t;return!0===(null===(t=this.manage)||void 0===t?void 0:t._isEditMode())},e.prototype.recreate=function(t){return t&&delete this.root._controllers[this.cacheKey],this.root(this.id,this.cbid)},e}(w),it='Warning Obsolete Feature on 2sxc JS: the .data has been obsolete for a long time and is repurposed. \nIf you are calling ".data.on(...)" or ".data.sourceUrl" you are running very old code. \nGuidance to fix this: https://r.2sxc.org/brc-13-id.',at=function(){function t(){}return t.is=function(t){var e=t;return void 0!==e.zoneId&&void 0!==e.appId},t.ensureCompleteOrThrow=function(t){if(t.zoneId&&t.appId)return t;var e="It looks like the id given is a ContextIdentifier, but it's missing either zoneId or appId.";throw console.error(e,t),e},t.toCacheKey=function(t){return this.ensureCompleteOrThrow(t),"".concat(t.zoneId,"/").concat(t.appId,"/").concat(t.pageId,"/").concat(t.moduleId,"/").concat(t.blockId)},t}(),st=new d,ct=!0===st.isDebug(),ut=function(){this.load=ct,this.uncache=st.get("sxcver")},lt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),pt=function(t){function e(e){var n=t.call(this,"Sxc.Http")||this;return n.env=e,n}return lt(e,t),e.prototype.headers=function(t,e,n){var o,r,i,a=this.log.call("headers","".concat(t,", ").concat(e)),s={},c=(null!==(o=null==n?void 0:n.pageId)&&void 0!==o?o:this.env.page()).toString();return t=null!==(r=null==n?void 0:n.moduleId)&&void 0!==r?r:t,e=null!==(i=null==n?void 0:n.blockId)&&void 0!==i?i:e,(null==n?void 0:n._noContextInHttpHeaders)||(t&&(s.ModuleId=t.toString()),e&&(s.ContentBlockId=e.toString()),s.TabId=c,s.PageId=c),s[this.env.rvtHeader()]=this.env.rvt(),a.return(s,"headers(id:".concat(t,", cbid:").concat(e,")"))},e.prototype.apiRoot=function(t){var e=this.log.call("apiRoot"),n=this.env.api().replace("e.x.t",t);return e.return(n,"apiRoot('".concat(t,"')"))},e.prototype.appApiRoot=function(){var t,e=this.log.call("appApiRoot"),n=null!==(t=this.env.appApi())&&void 0!==t?t:this.apiRoot(y);return e.return(n,"appApiRoot()")},e.prototype.apiUrl=function(t,e){var n=this.log.call("apiUrl");if(this.log.add("apiUrl(url:'".concat(t,"', endpointName:'").concat(e,"')")),null==t)return t;if(!t||0==t.indexOf("http:")||0==t.indexOf("https:")||0==t.indexOf("//"))return n.return(t);if(!e&&(0==t.indexOf("/")||0==t.indexOf(".")))return n.return(t);var o=t.toLocaleLowerCase().startsWith("app")?this.appApiRoot():this.apiRoot(e||y);return"/"!=o[o.length-1]&&(o+="/"),"/"==t[0]&&(t=t.slice(1)),n.return(o+t)},e}(w);function dt(t,e){var n,o=window.$2sxc;if(o.log.add("FindSxcInstance("+t+","+e),!o._controllers)throw new Error("$2sxc not initialized yet");if(rt.is(t))return t;var r=null;if(at.is(t))t=null!==(n=(r=at.ensureCompleteOrThrow(t)).moduleId)&&void 0!==n?n:1e5*r.zoneId+r.appId;else if(t instanceof HTMLElement&&t.matches(".sc-menu[toolbar],.sc-menu[data-toolbar],[sxc-toolbar]")&&!t.closest("div[data-edit-context]")){var i="sxc-context",a=t.getAttribute(i),s=JSON.parse(a);if(null==s)throw new Error("Toolbar outside of module without ".concat(i," attribute found."));return dt(s)}if("object"==typeof t){var c=function(t){var e=t.closest(".sc-content-block");if(!e)return null;var n=e.getAttribute("data-cb-instance"),o=e.getAttribute("data-cb-id");return n&&o?[parseInt(n,10),parseInt(o,10)]:null}(t);t=c[0],e=c[1]}e||(e=t);var u=null!=r?at.toCacheKey(r):t+":"+e;
1return o._controllers[u]?(o.log.add("Cache found for: "+u),o._controllers[u]):o._controllers[u]=new rt(t,e,u,o,r)}window.$2sxc||(window.$2sxc=function(){var t,n,o=(t=new _("$2sxc",null,"building"),n=new V,{sysinfo:{version:g,description:"The 2sxc Controller - read more about it on docs.2sxc.org"},env:n,http:new pt(n),log:t}),r=new d,i=new ut,a=new h,s={get:dt,_controllers:{},beta:{},totalPopup:new e,urlParams:r,debug:i,stats:a,insights:function(t,e,n,o){return R.show(t,e,n,o)},_insights:R},c=Object.assign(dt,s,o);return c.log.add("sxc controller built"),console.log("$2sxc ".concat(g," with insights-logging - see https://r.2sxc.org/insights")),c}()),$2sxcJsApi=t})(); 2//# sourceMappingURL=https://sources.2sxc.org/14.12.03/js/2sxc.api.min.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.