1"use strict";(self.webpackChunksocialUX=self.webpackChunksocialUX||[]).push([[2184,7127],{2184:function(t,e,n){n.r(e),n.d(e,{default:function(){return S}});var r=n(298),o=n(3964),c=n(7127);const a=new DOMParser,s="rm-lddebugger-ablists";function u(t){return window.localStorage.setItem(s,JSON.stringify(t)),t}const d=(0,o.A)((function(t,e){const n=e.getAttribute("query-param"),r=e.getAttribute("query-value"),o=e.getAttribute("data-rm-created-by");return[n,r,e.getAttribute("name"),e.getAttribute("data-rm-created-on"),parseInt(o,10)in t?t[o].title:"Anonymous"]}));function i(t,e){return Array.from(e.querySelectorAll("abtest")).map(d(t))}const l=(0,o.A)((function(t,e){const{title:n,content:r}=e;return[n,i(t,a.parseFromString(r,"application/xml"))]})),m=(0,o.A)((function(t,e){return(n=e.name,(0,r.mQ)(`/core/v1/sites/${window.REBELMOUSE_BOOTSTRAP_DATA.runner.id}/layouts/${n}`)).then(l(t));var n}));function f(t){return[t.id,t]}function b(t){const[e,n]=t;return n.length>0}function p(t){return t.filter(b)}function g(t){const{layouts:e,authors:n}=t,r=Object.fromEntries(Object.values(n).map(f));return Promise.all(e.map(m(r))).then(p).then(u)}function h(t){const[e,n]=t;return[e,n]}function w(t){const[e,n]=t;return n.map(h)}function v(t){const e=new URLSearchParams(document.location.search),n=document.createElement("div");n.classList.add("rm-lddebugger-btests-dropdown-holder");const r=document.createElement("select");r.classList.add("rm-lddebugger-btests-dropdown");const o=t.flatMap(w),a=document.createElement("button");a.classList.add("rm-lddebugger-button","rm-lddebugger-btests-dropdown-button","rm-lddebugger-btests-dropdown-button-pin"),a.textContent="pin",a.addEventListener("click",(function(){const t=r.value.split(":");(0,c.makeSticky)([t])}),{passive:!0});const s=document.createElement("button");s.classList.add("rm-lddebugger-button","rm-lddebugger-btests-dropdown-button","rm-lddebugger-btests-dropdown-button-go-to"),s.textContent="go to",s.addEventListener("click",(function(){const[t,e]=r.value.split(":"),n=new URL(document.location.href),c=new URLSearchParams(n.search);for(const[t,e]of o)c.has(t)&&c.get(t)===e&&c.delete(t);c.set(t,e),n.search=`?${c.toString()}`,document.location.href=n.href}),{passive:!0});const u=document.createElement("button");u.classList.add("rm-lddebugger-button","rm-lddebugger-btests-dropdown-button","rm-lddebugger-btests-dropdown-button-fetch"),u.textContent="fetch",u.title="Reloads UI and refetches data from back end, use with caution",u.addEventListener("click",(function(){n.remove(),S("clear")}),{passive:!0}),function(t,e,n){let r=!1;function o(t,e){const[o,c,a,s,u]=e,d=document.createElement("option");return d.value=`${o}:${c}`,d.textContent=`${a} - ${u} - ${s}`,n.get(o)!==c||r||(r=!0,d.selected=!0),t.appendChild(d),t}for(const[n,r]of e){const e=document.createElement("optgroup");e.label=n,r.reduce(o,e),t.appendChild(e)}}(r,t,e),n.appendChild(r),n.appendChild(s),n.appendChild(a),n.appendChild(u),document.body.appendChild(n)}function S(t){"clear"===t&&window.localStorage.removeItem(s),function(){const t=function(){const t=window.localStorage.getItem(s);return t?JSON.parse(t):null}();return t?Promise.resolve(t):(0,r.mQ)(`/core/v1/sites/${window.REBELMOUSE_BOOTSTRAP_DATA.runner.id}/layouts/editor`).then(g)}().then(v)}},7127:function(t,e,n){n.r(e),n.d(e,{default:function(){return l},makeSticky:function(){return i}});var r=n(4361);function o(t,e){return e?`${t}:${e}`:t}function c(t){const[e,n]=t.split(":");return[e,n]}function a([t,e]){return o(t,e)}function s(t,e){const[n,r]=e;return t.set(n,r),t}const u=(0,n(3964).A)((function(t,e){let n;const r=e.dataset.ogHref||e.href;try{n=new URL(r)}catch{return}if(n.host!==document.location.host||n.pathname.indexOf("/r/layouts-editor/")>=0)return;const u=new URLSearchParams(n.search);t.reduce(s,u),u.set("debugld",function(t,e){const n=new URLSearchParams(document.location.search).get("debugld");if(!n)return o(t,e);const r=n.split(","),s=Object.fromEntries(r.map(c));if(t in s)return s[t]=e,Object.entries(s).map(a).join(",");{const n=o(t,e);return r.push(n),r.join(",")}}("stickybtest")),n.search=`?${u.toString()}`,e.href=n.href,e.dataset.ogHref=r}));function d([t,e]){return!!document.querySelector(`script[data-abtest-name="${t}"][data-abtest-value="${e}"]`)}function i(t){var e;e=t,(0,r.A)("a[href]",u(e))}function l(){const t=Array.from(new URLSearchParams(document.location.search));let e;const n=function(t){return[...t].find(d)}(t);e=n?[n]:t,i(e)}}}]); 2//# sourceMappingURL=2184.1013088cbed5242242c5.bundle.mjs.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.