mirror of
https://github.com/dekuNukem/USB4VC.git
synced 2025-10-31 11:26:46 -07:00
30 lines
50 KiB
JavaScript
30 lines
50 KiB
JavaScript
"use strict";(()=>{var Q=Object.defineProperty;var c=(C,N)=>Q(C,"name",{value:N,configurable:!0});(globalThis.webpackChunk=globalThis.webpackChunk||[]).push([[1747,9753],{59753:(C,N,w)=>{w.d(N,{f:()=>V,on:()=>W});function p(){if(!(this instanceof p))return new p;this.size=0,this.uid=0,this.selectors=[],this.selectorObjects={},this.indexes=Object.create(this.indexes),this.activeIndexes=[]}c(p,"SelectorSet");var u=window.document.documentElement,b=u.matches||u.webkitMatchesSelector||u.mozMatchesSelector||u.oMatchesSelector||u.msMatchesSelector;p.prototype.matchesSelector=function(n,r){return b.call(n,r)},p.prototype.querySelectorAll=function(n,r){return r.querySelectorAll(n)},p.prototype.indexes=[];var S=/^#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/g;p.prototype.indexes.push({name:"ID",selector:c(function(r){var i;if(i=r.match(S))return i[0].slice(1)},"matchIdSelector"),element:c(function(r){if(r.id)return[r.id]},"getElementId")});var k=/^\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/g;p.prototype.indexes.push({name:"CLASS",selector:c(function(r){var i;if(i=r.match(k))return i[0].slice(1)},"matchClassSelector"),element:c(function(r){var i=r.className;if(i){if(typeof i=="string")return i.split(/\s/);if(typeof i=="object"&&"baseVal"in i)return i.baseVal.split(/\s/)}},"getElementClassNames")});var L=/^((?:[\w\u00c0-\uFFFF\-]|\\.)+)/g;p.prototype.indexes.push({name:"TAG",selector:c(function(r){var i;if(i=r.match(L))return i[0].toUpperCase()},"matchTagSelector"),element:c(function(r){return[r.nodeName.toUpperCase()]},"getElementTagName")}),p.prototype.indexes.default={name:"UNIVERSAL",selector:function(){return!0},element:function(){return[!0]}};var T;typeof window.Map=="function"?T=window.Map:T=function(){function n(){this.map={}}return c(n,"Map"),n.prototype.get=function(r){return this.map[r+" "]},n.prototype.set=function(r,i){this.map[r+" "]=i},n}();var m=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g;function $(n,r){n=n.slice(0).concat(n.default);var i=n.length,y,d,x,f,A=r,e,t,o=[];do if(m.exec(""),(x=m.exec(A))&&(A=x[3],x[2]||!A)){for(y=0;y<i;y++)if(t=n[y],e=t.selector(x[1])){for(d=o.length,f=!1;d--;)if(o[d].index===t&&o[d].key===e){f=!0;break}f||o.push({index:t,key:e});break}}while(x);return o}c($,"parseSelectorIndexes");function M(n,r){var i,y,d;for(i=0,y=n.length;i<y;i++)if(d=n[i],r.isPrototypeOf(d))return d}c(M,"findByPrototype"),p.prototype.logDefaultIndexUsed=function(){},p.prototype.add=function(n,r){var i,y,d,x,f,A,e,t,o=this.activeIndexes,a=this.selectors,l=this.selectorObjects;if(typeof n=="string"){for(i={id:this.uid++,selector:n,data:r},l[i.id]=i,e=$(this.indexes,n),y=0;y<e.length;y++)t=e[y],x=t.key,d=t.index,f=M(o,d),f||(f=Object.create(d),f.map=new T,o.push(f)),d===this.indexes.default&&this.logDefaultIndexUsed(i),A=f.map.get(x),A||(A=[],f.map.set(x,A)),A.push(i);this.size++,a.push(n)}},p.prototype.remove=function(n,r){if(typeof n=="string"){var i,y,d,x,f,A,e,t,o=this.activeIndexes,a=this.selectors=[],l=this.selectorObjects,v={},H=arguments.length===1;for(i=$(this.indexes,n),d=0;d<i.length;d++)for(y=i[d],x=o.length;x--;)if(A=o[x],y.index.isPrototypeOf(A)){if(e=A.map.get(y.key),e)for(f=e.length;f--;)t=e[f],t.selector===n&&(H||t.data===r)&&(e.splice(f,1),v[t.id]=!0);break}for(d in v)delete l[d],this.size--;for(d in l)a.push(l[d].selector)}};function s(n,r){return n.id-r.id}c(s,"sortById"),p.prototype.queryAll=function(n){if(!this.selectors.length)return[];var r={},i=[],y=this.querySelectorAll(this.selectors.join(", "),n),d,x,f,A,e,t,o,a;for(d=0,f=y.length;d<f;d++)for(e=y[d],t=this.matches(e),x=0,A=t.length;x<A;x++)a=t[x],r[a.id]?o=r[a.id]:(o={id:a.id,selector:a.selector,data:a.data,elements:[]},r[a.id]=o,i.push(o)),o.elements.push(e);return i.sort(s)},p.prototype.matches=function(n){if(!n)return[];var r,i,y,d,x,f,A,e,t,o,a,l=this.activeIndexes,v={},H=[];for(r=0,d=l.length;r<d;r++)if(A=l[r],e=A.element(n),e){for(i=0,x=e.length;i<x;i++)if(t=A.map.get(e[i]))for(y=0,f=t.length;y<f;y++)o=t[y],a=o.id,!v[a]&&this.matchesSelector(n,o.selector)&&(v[a]=!0,H.push(o))}return H.sort(s)};var R={},_={},E=new WeakMap,I=new WeakMap,D=new WeakMap,P=Object.getOwnPropertyDescriptor(Event.prototype,"currentTarget");function h(n,r,i){var y=n[r];return n[r]=function(){return i.apply(n,arguments),y.apply(n,arguments)},n}c(h,"before");function O(n,r,i){var y=[],d=r;do{if(d.nodeType!==1)break;var x=n.matches(d);if(x.length){var f={node:d,observers:x};i?y.unshift(f):y.push(f)}}while(d=d.parentElement);return y}c(O,"dist_matches");function q(){E.set(this,!0)}c(q,"trackPropagation");function B(){E.set(this,!0),I.set(this,!0)}c(B,"trackImmediate");function g(){return D.get(this)||null}c(g,"getCurrentTarget");function G(n,r){!P||Object.defineProperty(n,"currentTarget",{configurable:!0,enumerable:!0,get:r||P.get})}c(G,"defineCurrentTarget");function F(n){try{return n.eventPhase,!0}catch{return!1}}c(F,"canDispatch");function K(n){if(!!F(n)){var r=n.eventPhase===1?_:R,i=r[n.type];if(!!i){var y=O(i,n.target,n.eventPhase===1);if(!!y.length){h(n,"stopPropagation",q),h(n,"stopImmediatePropagation",B),G(n,g);for(var d=0,x=y.length;d<x&&!E.get(n);d++){var f=y[d];D.set(n,f.node);for(var A=0,e=f.observers.length;A<e&&!I.get(n);A++)f.observers[A].data.call(f.node,n)}D.delete(n),G(n)}}}}c(K,"dispatch");function W(n,r,i){var y=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},d=!!y.capture,x=d?_:R,f=x[n];f||(f=new p,x[n]=f,document.addEventListener(n,K,d)),f.add(r,i)}c(W,"on");function X(n,r,i){var y=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},d=!!y.capture,x=d?_:R,f=x[n];!f||(f.remove(r,i),!f.size&&(delete x[n],document.removeEventListener(n,K,d)))}c(X,"off");function V(n,r,i){return n.dispatchEvent(new CustomEvent(r,{bubbles:!0,cancelable:!0,detail:i}))}c(V,"fire")},70130:(C,N,w)=>{w.d(N,{Z:()=>S});var p=w(34782);const u=[];let b=0;function S($){(async function(){u.push($),await p.x,k()})()}c(S,"hashChange"),S.clear=()=>{u.length=b=0};function k(){const $=b;b=u.length,L(u.slice($),null,window.location.href)}c(k,"runRemainingHandlers");function L($,M,s){const R=window.location.hash.slice(1),_=R?document.getElementById(R):null,E={oldURL:M,newURL:s,target:_};for(const I of $)I.call(null,E)}c(L,"runHandlers");let T=window.location.href;window.addEventListener("popstate",function(){T=window.location.href}),window.addEventListener("hashchange",function($){const M=window.location.href;try{L(u,$.oldURL||T,M)}finally{T=M}});let m=null;document.addEventListener("pjax:start",function(){m=window.location.href}),document.addEventListener("pjax:end",function(){L(u,m,window.location.href)})},51374:(C,N,w)=>{w.d(N,{W:()=>u});var p=w(59753);async function u(b){const k=document.querySelector("#site-details-dialog").content.cloneNode(!0),L=k.querySelector("details"),T=L.querySelector("details-dialog"),m=L.querySelector(".js-details-dialog-spinner");b.detailsClass&&L.classList.add(...b.detailsClass.split(" ")),b.dialogClass&&T.classList.add(...b.dialogClass.split(" ")),b.label?T.setAttribute("aria-label",b.label):b.labelledBy&&T.setAttribute("aria-labelledby",b.labelledBy),document.body.append(k);const $=await b.content;return m.remove(),T.prepend($),L.addEventListener("toggle",()=>{L.hasAttribute("open")||((0,p.f)(T,"dialog:remove"),L.remove())}),T}c(u,"dialog")},34782:(C,N,w)=>{w.d(N,{C:()=>u,x:()=>p});const p=function(){return document.readyState==="interactive"||document.readyState==="complete"?Promise.resolve():new Promise(b=>{document.addEventListener("DOMContentLoaded",()=>{b()})})}(),u=function(){return document.readyState==="complete"?Promise.resolve():new Promise(b=>{window.addEventListener("load",b)})}()},52660:(C,N,w)=>{w.d(N,{D:()=>S,a:()=>b});var p=w(2699),u=w(10900);async function b(k,L,T){const m=new Request(L,T);m.headers.append("X-Requested-With","XMLHttpRequest");const $=await self.fetch(m);if($.status<200||$.status>=300)throw new Error(`HTTP ${$.status}${$.statusText||""}`);return(0,p.t)((0,p.P)(k),$),(0,u.r)(k,await $.text())}c(b,"fetchSafeDocumentFragment");function S(k,L,T=1e3){return c(async function m($){const M=new Request(k,L);M.headers.append("X-Requested-With","XMLHttpRequest");const s=await self.fetch(M);if(s.status<200||s.status>=300)throw new Error(`HTTP ${s.status}${s.statusText||""}`);if(s.status===200)return s;if(s.status===202)return await new Promise(R=>setTimeout(R,$)),m($*1.5);throw new Error(`Unexpected ${s.status} response status from poll endpoint`)},"poll")(T)}c(S,"fetchPoll")},14037:(C,N,w)=>{w.d(N,{$z:()=>b,Kt:()=>p,Q:()=>u});function p(S,k=location.hash){return u(S,b(k))}c(p,"findFragmentTarget");function u(S,k){return k===""?null:S.getElementById(k)||S.getElementsByName(k)[0]}c(u,"findElementByFragmentName");function b(S){try{return decodeURIComponent(S.slice(1))}catch{return""}}c(b,"decodeFragmentValue")},2699:(C,N,w)=>{w.d(N,{P:()=>p,t:()=>b});function p(S){const k=[...S.querySelectorAll("meta[name=html-safe-nonce]")].map(L=>L.content);if(k.length<1)throw new Error("could not find html-safe-nonce on document");return k}c(p,"getDocumentHtmlSafeNonces");class u extends Error{constructor(k,L){super(`${k} for HTTP ${L.status}`);this.response=L}}c(u,"ResponseError");function b(S,k,L=!1){const T=k.headers.get("content-type")||"";if(!L&&!T.startsWith("text/html"))throw new u(`expected response with text/html, but was ${T}`,k);if(L&&!(T.startsWith("text/html")||T.startsWith("application/json")))throw new u(`expected response with text/html or application/json, but was ${T}`,k);const m=k.headers.get("x-html-safe");if(m){if(!S.includes(m))throw new u("response X-HTML-Safe nonce did not match",k)}else throw new u("missing X-HTML-Safe nonce",k)}c(b,"verifyResponseHtmlSafeNonce")},10900:(C,N,w)=>{w.d(N,{r:()=>p});function p(u,b){const S=u.createElement("template");return S.innerHTML=b,u.importNode(S.content,!0)}c(p,"parseHTML")},85830:(C,N,w)=>{w.d(N,{Z:()=>R});var p=w(51374),u=w(52660),b=w(64463);function S(_){return new Promise(E=>{_.addEventListener("dialog:remove",E,{once:!0})})}c(S,"waitForDialogClose");function k(_){const E=document.querySelector(".sso-modal");!E||(E.classList.remove("success","error"),_?E.classList.add("success"):E.classList.add("error"))}c(k,"setModalStatus");function L(_){const E=document.querySelector("meta[name=sso-expires-around]");E&&E.setAttribute("content",_)}c(L,"updateExpiresAroundTag");async function T(){const _=document.querySelector("link[rel=sso-modal]"),E=await(0,p.W)({content:(0,u.a)(document,_.href),dialogClass:"sso-modal"});let I=null;const D=window.external;if(D.ssoComplete=function(P){P.error?(I=!1,k(I)):(I=!0,k(I),L(P.expiresAround),window.focus()),D.ssoComplete=null},await S(E),!I)throw new Error("sso prompt canceled")}c(T,"ssoPrompt"),(0,b.N7)(".js-sso-modal-complete",function(_){if(window.opener&&window.opener.external.ssoComplete){const E=_.getAttribute("data-error"),I=_.getAttribute("data-expires-around");window.opener.external.ssoComplete({error:E,expiresAround:I}),window.close()}else{const E=_.getAttribute("data-fallback-url");E&&(window.location.href=E)}});function m(_){if(!(_ instanceof HTMLMetaElement))return!0;const E=parseInt(_.content);return new Date().getTime()/1e3>E}c(m,"expiresSoon");async function $(){const _=document.querySelector("link[rel=sso-session]"),E=document.querySelector("meta[name=sso-expires-around]");if(!(_ instanceof HTMLLinkElement)||!m(E))return!0;const I=_.href;return await(await fetch(I,{headers:{Accept:"application/json","X-Requested-With":"XMLHttpRequest"}})).json()}c($,"fetchSsoStatus");let M=null;function s(){M=null}c(s,"clearActiveSsoPrompt");async function R(){await $()||(M||(M=T().then(s).catch(s)),await M)}c(R,"__WEBPACK_DEFAULT_EXPORT__")},12585:(C,N,w)=>{w.d(N,{Z:()=>u});function p(b){return b.offsetWidth<=0&&b.offsetHeight<=0}c(p,"hidden");function u(b){return!p(b)}c(u,"visible")},94851:(C,N,w)=>{var p=w(64463),u=w(59753),b=w(85830);let S=!1,k;function L(e){k=window.setTimeout(T,5e3,e)}c(L,"queueCheck");async function T(e){const t=e.value,o=e.getAttribute("data-url");await(0,b.Z)();const l=await(await fetch(o,{headers:{"X-Requested-With":"XMLHttpRequest"}})).text();if(t===l)L(e);else if(!S){const v=document.querySelector("#gollum-editor-submit");v instanceof HTMLButtonElement&&(v.disabled=!0,document.querySelector("#gollum-error-message").classList.remove("d-none"))}}c(T,"checkHeadCommit"),(0,p.N7)("#wiki-current-version",{constructor:HTMLInputElement,initialize(e){L(e)},remove(){clearTimeout(k)}}),(0,u.on)("click","#gollum-editor-submit",function(){S=!0});const m={node1:null,node2:null,selectNodeRange(){const{node1:e,node2:t}=m;if(e&&t){if(m.nodeComesAfter(e,t)){const a=m.node1;m.node1=m.node2,m.node2=a}let o=e.nextElementSibling;for(;o&&o!==t;)o=o.nextElementSibling}},nodeComesAfter(e,t){let o=e.previousElementSibling;for(;o;){if(o===t)return!0;o=o.previousElementSibling}return!1},checkNode(e){const t=e.closest(".js-wiki-history-revision");e.checked?m.node1?m.node2?e.checked=!1:(m.node2=t,m.selectNodeRange()):m.node1=t:m.node1&&t===m.node1?(m.node1=null,m.node2&&(m.node1=m.node2,m.node2=null)):m.node2&&t===m.node2&&(m.node2=null)}};(0,p.N7)(".js-wiki-history-checkbox",function(e){e instanceof HTMLInputElement&&e.checked&&m.checkNode(e)}),(0,u.on)("change",".js-wiki-history-checkbox",function({currentTarget:e}){e instanceof HTMLInputElement&&m.checkNode(e)});var $=w(14037),M=w(70130);(0,M.Z)(function(){if(!document.querySelector("#wiki-wrapper"))return;const e=window.location.hash.match(/^#(wiki-(.+))$/);if(!e)return;const t=e[1],o=e[2];(0,$.Q)(document,t)||(window.location.hash=o)});const s={markupCreated:!1,markup:"",attachEvents(){document.querySelector("#gollum-dialog-action-ok").addEventListener("click",s.eventOK),document.querySelector("#gollum-dialog-action-cancel").addEventListener("click",s.eventCancel);for(const e of document.querySelectorAll('#gollum-dialog-dialog input[type="text"]'))e.addEventListener("keydown",s.eventKeydown)},detachEvents(){document.querySelector("#gollum-dialog-action-ok").removeEventListener("click",s.eventOK),document.querySelector("#gollum-dialog-action-cancel").removeEventListener("click",s.eventCancel)},createFieldMarkup(e){let t="<fieldset>";for(let o=0;o<e.length;o++)if(typeof e[o]=="object"){switch(t+="<div>",e[o].type){case"text":t+=s.createFieldText(e[o]);break;default:break}t+="</div>"}return t+="</fieldset>",t},createFieldText(e){let t="";return e.name&&(t+='<label class="d-block mb-1"',e.id&&(t+=` for="gollum-dialog-dialog-generated-field-${e.id}"`),t+=`>${e.name}</label>`),t+='<input type="text" class="mb-3 input-block"',e.id&&(t+=` name="${e.id}"`,t+=` id="gollum-dialog-dialog-generated-field-${e.id}">`),t},createMarkup(e,t){return s.markupCreated=!0,`
|
|
<div id="gollum-dialog-dialog">
|
|
<div class="Box-header">
|
|
<h3 class="Box-title">${e}</h3>
|
|
</div>
|
|
<div class="Box-body overflow-auto">
|
|
<div id="gollum-dialog-dialog-body">${t}</div>
|
|
<div id="gollum-dialog-dialog-buttons" class="pt-3 border-top">
|
|
<button type="button" id="gollum-dialog-action-cancel" class="ml-2 btn btn-sm btn-outline float-right" data-close-dialog>Cancel</a>
|
|
<button type="button" id="gollum-dialog-action-ok" class="btn btn-sm btn-outline float-right" data-close-dialog>OK</a>
|
|
</div>
|
|
</div>
|
|
</div>`},eventCancel(e){e.preventDefault(),s.hide()},eventOK(e){e.preventDefault();const t={};for(const o of document.querySelectorAll("#gollum-dialog-dialog-body input")){const a=o.getAttribute("name");a&&(t[a]=o.value)}s.getDetailsElement().addEventListener("toggle",function(){typeof s.okEventCallback=="function"&&s.okEventCallback(t)},{once:!0}),s.hide()},eventKeydown(e){e.key==="Enter"&&s.eventOK(e)},hide(){s.markupCreated=!1,s.getDetailsElement().removeAttribute("open"),s.detachEvents()},getDetailsElement(){return document.querySelector(".js-gollum-button-details")},init(e){let t="",o="";if(!e||typeof e!="object")return;e.body&&typeof e.body=="string"&&(o=`<p>${e.body}</p>`),e.fields&&typeof e.fields=="object"&&(o+=s.createFieldMarkup(e.fields)),e.title&&typeof e.title=="string"&&(t=e.title),s.okEventCallback=e.OK,s.markup=s.createMarkup(t,o),s.show(),s.attachEvents();const a=document.querySelector('#gollum-dialog-dialog input[type="text"]');a instanceof HTMLInputElement&&(a.autofocus=!0)},show(){s.markupCreated&&(document.querySelector(".js-gollum-button-dialog").innerHTML=s.markup,s.getDetailsElement().setAttribute("open",""))}};var R=w(10900),_=w(12585);const E={MarkupType:"markdown",EditorMode:"code",NewFile:!1,HasFunctionBar:!0};let I=E;function D(e){if(I=Object.assign(E,e),O.baseEditorMarkup()&&O.functionBar()){const t=document.querySelector("#gollum-editor-body").getAttribute("data-markup-lang");if(t&&(I.MarkupType=t),O.formatSelector()&&B.init(document.querySelector("#gollum-editor-format-selector select")),h.setActiveLanguage(I.MarkupType),O.help()){const o=document.getElementById("gollum-editor-help");o&&(o.style.display="none",o.classList.remove("jaws"))}}}c(D,"GollumEditor");function P(e,t){typeof t=="object"&&h.define(e,t)}c(P,"defineLanguage");const h={_ACTIVE_LANG:"",_LOADED_LANGS:[],_LANG:{},define(e,t){if(h._ACTIVE_LANG=e,h._LOADED_LANGS.push(e),typeof D.WikiLanguage=="object"){const o={};Object.assign(o,D.WikiLanguage,t),h._LANG[e]=o}else h._LANG[e]=t},getActiveLanguage(){return h._ACTIVE_LANG},setActiveLanguage(e){if(h.getHookFunctionFor("deactivate")){const o=h.getHookFunctionFor("deactivate");o&&o()}function t(){if(q.refresh(),h.isValid()&&O.formatSelector()&&B.updateSelected(),h.getHookFunctionFor("activate")){const o=h.getHookFunctionFor("activate");o&&o()}}c(t,"loaded"),h.isLoadedFor(e)?(h._ACTIVE_LANG=e,t()):(h._ACTIVE_LANG="",h.define(e,{}),t())},getHookFunctionFor(e,t){let o=t;return o||(o=h._ACTIVE_LANG),h.isLoadedFor(o)&&h._LANG[o][e]&&typeof h._LANG[o][e]=="function"?h._LANG[o][e]:null},getDefinitionFor(e,t){let o=t;return o||(o=h._ACTIVE_LANG),h.isLoadedFor(o)&&h._LANG[o][e]&&typeof h._LANG[o][e]=="object"?h._LANG[o][e]:null},isLoadedFor(e){if(h._LOADED_LANGS.length===0)return!1;for(let t=0;t<h._LOADED_LANGS.length;t++)if(h._LOADED_LANGS[t]===e)return!0;return!1},isValid(){return h._ACTIVE_LANG&&typeof h._LANG[h._ACTIVE_LANG]=="object"}},O={baseEditorMarkup(){return document.querySelector("#gollum-editor")!=null&&document.querySelector("#gollum-editor-body")!=null},formatSelector(){return document.querySelector("#gollum-editor-format-selector select")!=null},functionBar(){return I.HasFunctionBar&&document.querySelector("#gollum-editor-function-bar")!=null},ff4Environment(){return new RegExp(/Firefox\/4.0b/).test(navigator.userAgent)},editSummaryMarkup(){return document.querySelector("input#gollum-editor-message-field")!=null},help(){return document.querySelector("#gollum-editor #gollum-editor-help")!=null&&document.querySelector("#gollum-editor #function-help")!=null}},q={isActive:!1,activate(){const e=document.querySelector("#gollum-editor-function-bar");for(const t of e.querySelectorAll(".function-button"))h.getDefinitionFor(t.id)!=null?(t.addEventListener("click",q.evtFunctionButtonClick),t.classList.remove("disabled")):t.id!=="function-help"&&(t.removeEventListener("click",q.evtFunctionButtonClick),t.classList.add("disabled"));e.classList.add("active"),q.isActive=!0},deactivate(){const e=document.querySelector("#gollum-editor-function-bar");for(const t of e.querySelectorAll(".function-button"))t.removeEventListener("click",q.evtFunctionButtonClick);e.classList.remove("active"),q.isActive=!1},evtFunctionButtonClick(e){const{currentTarget:t}=e;e.preventDefault();const o=h.getDefinitionFor(t.id);typeof o=="object"&&o&&q.executeAction(o)},executeAction(e){const t=document.getElementById("gollum-editor-body"),o=t.value,a=q.getFieldSelection(t);let l=typeof a=="string"?a:"",v=!0,H=null;if(typeof e.exec=="function"&&typeof a=="string"){e.exec.call(e,o,a,t);return}let U=/([^\n]+)/gi;if(e.search&&typeof e.search=="object"&&(U=new RegExp(e.search)),e.replace&&typeof e.replace=="string"){const j=e.replace;l=l.replace(U,j),l=l.replace(/\$[\d]/g,""),l===""&&(H=j.indexOf("$1"),l=j.replace(/\$[\d]/g,""),H===-1&&(H=Math.floor(j.length/2)))}e.append&&typeof e.append=="string"&&(typeof a=="string"&&l===a&&(v=!1),l+=e.append),l&&q.replaceFieldSelection(t,l,v,H)},getFieldSelectionPosition(e){return{start:e.selectionStart,end:e.selectionEnd}},getFieldSelection(e){const t=q.getFieldSelectionPosition(e);return e.value.substring(t.start,t.end)},isShown(){const e=document.querySelector("#gollum-editor-function-bar");return e!=null&&(0,_.Z)(e)},refresh(){O.functionBar()&&(h.isValid()?(q.activate(),g&&g.setActiveHelp(h.getActiveLanguage())):(q.isShown()&&q.deactivate(),g.isShown()&&g.hide()))},replaceFieldSelection(e,t,o,a){const l=q.getFieldSelectionPosition(e),v=e.value;let H=!0;o===!1&&(H=!1);let U=null;e.scrollTop&&(U=e.scrollTop),e.value=v.substring(0,l.start)+t+v.substring(l.end),H&&(typeof a=="number"&&a>0?e.setSelectionRange(l.start+a,l.start+a):e.setSelectionRange(l.start,l.start+t.length)),e.focus(),U&&(e.scrollTop=U)}},B={SELECTOR:null,evtChangeFormat(){const e=this.value;h.setActiveLanguage(e)},init(e){B.SELECTOR!=null&&B.SELECTOR.removeEventListener("change",B.evtChangeFormat),B.SELECTOR=e,B.updateSelected();const t=B.SELECTOR;t&&t.addEventListener("change",B.evtChangeFormat)},updateSelected(){const e=h.getActiveLanguage(),t=B.SELECTOR;t&&(t.value=e)}},g={_ACTIVE_HELP:"",_ACTIVE_HELP_LANG:"",_LOADED_HELP_LANGS:[],_HELP:{},define(e,t){const o=document.querySelector("#function-help");if(g.isValidHelpFormat(t)){if(g._ACTIVE_HELP_LANG=e,g._LOADED_HELP_LANGS.push(e),g._HELP[e]=t,o){o.classList.remove("disabled"),o.addEventListener("click",g.evtHelpButtonClick),g.generateHelpMenuFor(e);const a=document.querySelector("#gollum-editor-help");a&&a.hasAttribute("data-autodisplay")&&g.show()}}else o&&(o.classList.add("disabled"),o.removeEventListener("click",g.evtHelpButtonClick))},clickFirstHelpLink(){const e=document.querySelector("#gollum-editor-help-list .menu-item");e&&e.click()},generateHelpMenuFor(e){if(!g._HELP[e])return!1;const t=g._HELP[e],o=document.querySelector("#gollum-editor-help-parent");o.innerHTML="",document.querySelector("#gollum-editor-help-list").innerHTML="",document.querySelector("#gollum-editor-help-content").innerHTML="";for(let a=0;a<t.length&&typeof t[a]=="object";a++){const l=(0,R.r)(document,`<a href="#" rel="${a}" class="menu-item border-bottom">${t[a].menuName}</a>`),v=l.querySelector("a");a===0&&v.classList.add("selected"),v.addEventListener("click",g.evtParentMenuClick),o.append(l)}g.generateSubMenu(t[0],0),g.clickFirstHelpLink()},generateSubMenu(e,t){const o=document.querySelector("#gollum-editor-help-list");o.innerHTML="",document.querySelector("#gollum-editor-help-content").innerHTML="";for(let a=0;a<e.content.length&&typeof e.content[a]=="object";a++){const l=(0,R.r)(document,`<a href="#" rel="${t}:${a}" class="menu-item border-bottom">${e.content[a].menuName}</a>`);for(const v of l.querySelectorAll("a"))v.addEventListener("click",g.evtSubMenuClick);o.append(l)}},hide(){const e=document.querySelector("#gollum-editor-help");e&&(e.style.display="none")},show(){const e=document.querySelector("#gollum-editor-help");e&&(e.style.display="")},showHelpFor(e,t){const o=g._HELP[g._ACTIVE_HELP_LANG][e].content[t].data;document.querySelector("#gollum-editor-help-content").innerHTML=o},isLoadedFor(e){for(let t=0;t<g._LOADED_HELP_LANGS.length;t++)if(e===g._LOADED_HELP_LANGS[t])return!0;return!1},isShown(){const e=document.querySelector("#gollum-editor-help");return e!=null&&(0,_.Z)(e)},isValidHelpFormat(e){return!!(typeof e=="object"&&e.length&&typeof e[0].menuName=="string"&&typeof e[0].content=="object"&&e[0].content.length)},setActiveHelp(e){const t=document.querySelector("#function-help");g.isLoadedFor(e)?(g._ACTIVE_HELP_LANG=e,t&&(t.classList.remove("disabled"),t.addEventListener("click",g.evtHelpButtonClick),g.generateHelpMenuFor(e))):(t&&(t.classList.add("disabled"),t.removeEventListener("click",g.evtHelpButtonClick)),g.isShown()&&g.hide())},evtHelpButtonClick(e){const{currentTarget:t}=e;if(e.preventDefault(),g.isShown()){const o=document.querySelector("#gollum-editor-help");if(o.hasAttribute("data-autodisplay")){const a=t.getAttribute("data-dismiss-help-url"),l=t.parentElement.querySelector(".js-data-dismiss-help-url-csrf"),v=new URLSearchParams;fetch(a,{method:"delete",mode:"same-origin",body:v,headers:{"Scoped-CSRF-Token":l.value,"X-Requested-With":"XMLHttpRequest"}}),o.removeAttribute("data-autodisplay")}g.hide()}else g.show()},evtParentMenuClick(e){e.preventDefault();const{currentTarget:t}=e;if(t.classList.contains("selected"))return;const o=t.rel,a=g._HELP[g._ACTIVE_HELP_LANG][o];for(const l of document.querySelectorAll("#gollum-editor-help-parent .menu-item"))l.classList.remove("selected");t.classList.add("selected"),g.generateSubMenu(a,o),g.clickFirstHelpLink()},evtSubMenuClick(e){e.preventDefault();const{currentTarget:t}=e;if(t.classList.contains("selected"))return;const o=t.rel.split(":");for(const a of document.querySelectorAll("#gollum-editor-help-list .menu-item"))a.classList.remove("selected");t.classList.add("selected"),g.showHelpFor(o[0],o[1])}},G=g.define;function F(e){const t=document.querySelector("#gollum-editor-body");q.replaceFieldSelection(t,e)}c(F,"replaceSelection");const K={"function-bold":{search:/(^[\n]+)([\n\s]*)/g,replace:"*$1*$2"},"function-italic":{search:/(^[\n]+)([\n\s]*)/g,replace:"_$1_$2"},"function-code":{search:/(^[\n]+)([\n\s]*)/g,replace:"+$1+$2"},"function-ul":{search:/(^[\n]+)([\n\s]*)/g,replace:"* $1$2"},"function-ol":{search:/(.+)([\n]?)/g,replace:". $1$2"},"function-blockquote":{search:/(.+)([\n]?)/g,replace:`----
|
|
$1$2
|
|
----
|
|
`},"function-link":{exec(){s.init({title:"Insert Link",fields:[{id:"text",name:"Link Text",type:"text",help:"The text to display to the user."},{id:"href",name:"URL",type:"text",help:"The URL to link to."}],OK(e){let t="";e.text&&e.href&&(t=`${e.href}[${e.text}]`),F(t)}})}},"function-image":{exec(){s.init({title:"Insert Image",fields:[{id:"url",name:"Image URL",type:"text"},{id:"alt",name:"Alt Text",type:"text"}],OK(e){let t="";e.url&&e.alt&&(t=`image::${e.url}[${e.alt}]`),F(t)}})}}},W=[{menuName:"Text Formatting",content:[{menuName:"Headers",data:"<p>ASCIIDoc headers can be written in two ways: with differing underlines or with different indentation using <code>=</code> (equals sign). ASCIIDoc supports headings 1-4. The editor will automatically use the <code>=</code> notation. To create a level one header, prefix your line with one <code>=</code>. Level two headers are created with <code>==</code> and so on.</p>"},{menuName:"Bold / Italic",data:"<p>To display text as <strong>bold</strong>, wrap the text in <code>*</code> (asterisks). To display text as <em>italic</em>, wrap the text in <code>_</code> (underscores). To create <code>monospace</code> text, wrap the text in <code>+</code> (plus signs)."},{menuName:"Scripts",data:"<p>Superscript and subscript is created the same way as other inline formats. To create superscript text, wrap your text in <code>^</code> (carats). To create subscript text, wrap your text in <code>~</code> (tildes).</p>"},{menuName:"Special Characters",data:"<p>ASCIIDoc will automatically convert textual representations of commonly-used special characters. For example, <code>(R)</code> becomes ®, <code>(C)</code> becomes © and <code>(TM)</code> becomes ™.</p>"}]},{menuName:"Blocks",content:[{menuName:"Paragraphs",data:"<p>ASCIIDoc allows paragraphs to have optional titles or icons to denote special sections. To make a normal paragraph, simply add a line between blocks and a new paragraph will start. If you want to title your paragraphs, adda line prefixed by <code>.</code> (full stop). An example paragraph with optional title is displayed below:<br><br><code>.Optional Title<br><br>This is my paragraph. It is two sentences long.</code></p>"},{menuName:"Source Blocks",data:"<p>To create source blocks (long blocks of code), follow the same syntax as above but with an extra line denoting the inline source and lines of four dashes (<code>----</code>) delimiting the source block.. An example of Python source is below:<br><br><code>.python.py<br>[source,python]<br>----<br># i just wrote a comment in python<br># and maybe one more<br>----</code></p>"},{menuName:"Comment Blocks",data:"<p>Comment blocks are useful if you want to keep notes for yourself inline but do not want them displayed to the public. To create a comment block, simply wrap the paragraph in dividers with four slashes (<code>////</code>). An example comment block is below:<br><br><code>////<br>My comment block is here now<br><br>It can be multiple paragraphs. Really.<br>////</p>"},{menuName:"Quote Blocks",data:"<p>Quote blocks work much like comment blocks — simply create dividers using four underscores (<code>____</code>) around your quote. An example quote block is displayed below:<br><code>____<br>This is my quote block. Quote something nice here, otherwise there is no point in quoting.<br>____</code></p>"}]},{menuName:"Macros",content:[{menuName:"Links",data:'<p>To create links to external pages, you can simply write the URI if you want the URI to link to itself. (i.e., <code>https://github.com/</code> will automatically be parsed to <a href="javascript:void(0);">https://github.com/</a>. If you want different text to be displayed, simply append it to the end of the URI in between <code>[</code> (brackets.) For example, <code>https://github.com/[GitHub]</code> will be parsed as <a href="javascript:void(0);">GitHub</a>, with the URI pointing to <code>https://github.com</code>.</p>'},{menuName:"Images",data:"<p>Images in ASCIIDoc work much like hyperlinks, but image URLs are prefixed with <code>image:</code>. For example, to link to an image at <code>images/icons/home.png</code>, write <code>image:images/icons/home.png</code>. Alt text can be added by appending the text to the URI in <code>[</code> (brackets).</p>"}]}],X={"function-bold":{search:/([^\n]+)([\n\s]*)/g,replace:"**$1**$2"},"function-italic":{search:/([^\n]+)([\n\s]*)/g,replace:"_$1_$2"},"function-code":{search:/([^\n]+)([\n\s]*)/g,replace:"`$1`$2"},"function-hr":{append:`
|
|
***
|
|
`},"function-ul":{search:/(.+)([\n]?)/g,replace:"* $1$2"},"function-ol":{search:/(.+)([\n]?)/g,replace:"1. $1$2"},"function-blockquote":{search:/(.+)([\n]?)/g,replace:"> $1$2"},"function-h1":{search:/(.+)([\n]?)/g,replace:"# $1$2"},"function-h2":{search:/(.+)([\n]?)/g,replace:"## $1$2"},"function-h3":{search:/(.+)([\n]?)/g,replace:"### $1$2"},"function-link":{exec(){s.init({title:"Insert Link",fields:[{id:"text",name:"Link Text",type:"text"},{id:"href",name:"URL",type:"text"}],OK(e){let t="";e.text&&e.href&&(t=`[${e.text}](${e.href})`),F(t)}})}},"function-image":{exec(){s.init({title:"Insert Image",fields:[{id:"url",name:"Image URL",type:"text"},{id:"alt",name:"Alt Text",type:"text"}],OK(e){let t="";e.url&&(t=``),F(t)}})}}},V=[{menuName:"Block Elements",content:[{menuName:"Paragraphs & Breaks",data:"<p>To create a paragraph, simply create a block of text that is not separated by one or more blank lines. Blocks of text separated by one or more blank lines will be parsed as paragraphs.</p><p>If you want to create a line break, end a line with two or more spaces, then hit Return/Enter.</p>"},{menuName:"Headers",data:"<p>Markdown supports two header formats. The wiki editor uses the “atx”-style headers. Simply prefix your header text with the number of <code>#</code> characters to specify heading depth. For example: <code># Header 1</code>, <code>## Header 2</code> and <code>### Header 3</code> will be progressively smaller headers. You may end your headers with any number of hashes.</p>"},{menuName:"Blockquotes",data:"<p>Markdown creates blockquotes email-style by prefixing each line with the <code>></code>. This looks best if you decide to hard-wrap text and prefix each line with a <code>></code> character, but Markdown supports just putting <code>></code> before your paragraph.</p>"},{menuName:"Lists",data:"<p>Markdown supports both ordered and unordered lists. To create an ordered list, simply prefix each line with a number (any number will do — this is why the editor only uses one number.) To create an unordered list, you can prefix each line with <code>*</code>, <code>+</code> or <code>-</code>.</p> List items can contain multiple paragraphs, however each paragraph must be indented by at least 4 spaces or a tab."},{menuName:"Code Blocks",data:"<p>Markdown wraps code blocks in pre-formatted tags to preserve indentation in your code blocks. To create a code block, indent the entire block by at least 4 spaces or one tab. Markdown will strip the extra indentation you\u2019ve added to the code block.</p>"},{menuName:"Horizontal Rules",data:"Horizontal rules are created by placing three or more hyphens, asterisks or underscores on a line by themselves. Spaces are allowed between the hyphens, asterisks or underscores."}]},{menuName:"Span Elements",content:[{menuName:"Links",data:"<p>Markdown has two types of links: <strong>inline</strong> and <strong>reference</strong>. For both types of links, the text you want to display to the user is placed in square brackets. For example, if you want your link to display the text “GitHub”, you write <code>[GitHub]</code>.</p><p>To create an inline link, create a set of parentheses immediately after the brackets and write your URL within the parentheses. (e.g., <code>[GitHub](https://github.com/)</code>). Relative paths are allowed in inline links.</p><p>To create a reference link, use two sets of square brackets. <code>[[my internal link|internal-ref]]</code> will link to the internal reference <code>internal-ref</code>.</p>"},{menuName:"Emphasis",data:"<p>Asterisks (<code>*</code>) and underscores (<code>_</code>) are treated as emphasis and are wrapped with an <code><em></code> tag, which usually displays as italics in most browsers. Double asterisks (<code>**</code>) or double underscores (<code>__</code>) are treated as bold using the <code><strong></code> tag. To create italic or bold text, simply wrap your words in single/double asterisks/underscores. For example, <code>**My double emphasis text**</code> becomes <strong>My double emphasis text</strong>, and <code>*My single emphasis text*</code> becomes <em>My single emphasis text</em>.</p>"},{menuName:"Code",data:"<p>To create inline spans of code, simply wrap the code in backticks (<code>`</code>). Markdown will turn <code>`myFunction`</code> into <code>myFunction</code>.</p>"},{menuName:"Images",data:"<p>Markdown image syntax looks a lot like the syntax for links; it is essentially the same syntax preceded by an exclamation point (<code>!</code>). For example, if you want to link to an image at <code>https://github.com/unicorn.png</code> with the alternate text <code>My Unicorn</code>, you would write <code></code>.</p>"}]},{menuName:"Miscellaneous",content:[{menuName:"Automatic Links",data:'<p>If you want to create a link that displays the actual URL, markdown allows you to quickly wrap the URL in <code><</code> and <code>></code> to do so. For example, the link <a href="javascript:void(0);">https://github.com/</a> is easily produced by writing <code><https://github.com/></code>.</p>'},{menuName:"Escaping",data:"<p>If you want to use a special Markdown character in your document (such as displaying literal asterisks), you can escape the character with the backslash (<code>\\</code>). Markdown will ignore the character directly after a backslash."}]}],n={"function-bold":{search:/([^\n]+)([\n\s]*)/g,replace:"*$1*$2"},"function-italic":{search:/([^\n]+)([\n\s]*)/g,replace:"/$1/$2"},"function-code":{search:/(^[\n]+)([\n\s]*)/g,replace:"=$1=$2"},"function-ul":{search:/(.+)([\n]?)/g,replace:"* $1$2"},"function-ol":{search:/(.+)([\n]?)/g,replace:"1. $1$2"},"function-blockquote":{search:/(.+)([\n]?)/g,replace:`#+BEGIN_QUOTE
|
|
$1$2
|
|
#+END_QUOTE
|
|
`},"function-h1":{search:/(.+)([\n]?)/g,replace:"* $1$2"},"function-h2":{search:/(.+)([\n]?)/g,replace:"** $1$2"},"function-h3":{search:/(.+)([\n]?)/g,replace:"*** $1$2"},"function-link":{exec(){s.init({title:"Insert Link",fields:[{id:"text",name:"Link Text",type:"text"},{id:"href",name:"URL",type:"text"}],OK(e){let t="";e.text&&e.href?t=`[[${e.href}][${e.text}]]`:e.href&&(t=`[[${e.href}]]`),F(t)}})}},"function-image":{exec(){s.init({title:"Insert Image",fields:[{id:"url",name:"Image URL",type:"text"}],OK(e){let t="";e.url&&(t=`[[${e.url}]]`),F(t)}})}}},r=[{menuName:"Block Elements",content:[{menuName:"Paragraphs & Breaks",data:"<p>To create a paragraph, simply create a block of text that is not separated by one or more blank lines. Blocks of text separated by one or more blank lines will be parsed as paragraphs.</p>"},{menuName:"Headers",data:"<p>Simply prefix your header text with the number of <code>*</code> characters to specify heading depth. For example: <code>* Header 1</code>, <code>** Header 2</code> and <code>*** Header 3</code> will be progressively smaller headers.</p>"},{menuName:"Blockquotes",data:"<p>To create a blockquote, simple embed the text between <code>#+BEGIN_QUOTE</code> and <code>#+END_QUOTE</code>. An example quote block is displayed below:<br><code>#+BEGIN_QUOTE<br>This is my quote block. Quote something nice here, otherwise there is no point in quoting.<br>#+END_QUOTE</code></p>"},{menuName:"Lists",data:"<p>Org-mode supports both ordered and unordered lists. To create an ordered list, simply prefix each line with a number (any number will do — this is why the editor only uses one number.) To create an unordered list, you can prefix each line with <code>+</code> or <code>-</code>.</p>"},{menuName:"Code Blocks",data:"<p>Code Blocks are similar to blockquote, except that <code>#+BEGIN_EXAMPLE</code> and <code>#+END_EXAMPLE</code> are used.</p>"},{menuName:"Tables",data:"<p>Org-mode supports simple tables (tables with equal number of cells in each row). To create a simple table, just separate the contents of each cell with a <code>|</code> character. For example, <br><br><code>|one|two|three|<br>|four|five|six|</code><br><br> will appear as a table with two rows and three columns. Additionally, <br><br><code>|one|two|three|<br>|---+---+-----|<br>|four|five|six|</code><br><br> will also appear as a table, but the first row will be interpreted as a header row and the <code><th></code> tag will be used to render it. </p>"}]},{menuName:"Span Elements",content:[{menuName:"Links",data:'<p>To create links to external pages, you need to enclose the URI in double square brackets. (i.e., <code>[[https://github.com/]]</code> will automatically be parsed to <a href="javascript:void(0);">https://github.com/</a>)If you want to add text, to be displayed to the user, you write the URI and the text next to each other, both enclosed in square brackets and both of them together enclosed in another pair of square brackets. For example, if you want your link to display the text “GitHub”, you write <code>[[https://github.com][GitHub]]</code>.</p>'},{menuName:"Emphasis",data:"<p>Forward slashes (<code>/</code>) are treated as emphasis and are wrapped with an <code><i></code> tag. Asterisks (<code>*</code>) are treated as bold using the <code><b></code> tag.</p>"},{menuName:"Code",data:"<p>To create inline spans of code, simply wrap the code in equal signs (<code>=</code>). Orgmode will turn <code>=myFunction=</code> into <code>myFunction</code>.</p>"},{menuName:"Images",data:"<p>Org-mode image syntax is exactly same as the syntax that you would use for a URI to link to itself. The image URI is enclosed in double square brackets. Alt text on images is not currently supported by Gollum's Org-mode parser.</p>"}]}],i={"function-bold":{search:/(^[\n]+)([\n\s]*)/g,replace:"B<$1>$2"},"function-italic":{search:/(^[\n]+)([\n\s]*)/g,replace:"I<$1>$2"},"function-code":{search:/(^[\n]+)([\n\s]*)/g,replace:"C<$1>$2"},"function-h1":{search:/(.+)([\n]?)/gi,replace:"=head1 $1$2"},"function-h2":{search:/(.+)([\n]?)/gi,replace:"=head2 $1$2"},"function-h3":{search:/(.+)([\n]?)/gi,replace:"=head3 $1$2"},"function-link":{exec(){s.init({title:"Insert Link",fields:[{id:"text",name:"Link Text",type:"text"},{id:"href",name:"URL",type:"text"}],OK(e){let t="";e.text&&e.href&&(t=`L<${e.text}|${e.href}>`),F(t)}})}}},y=[{menuName:"Command Paragraphs",content:[{menuName:"Headings",data:"<p>All command paragraphs start with <code>=</code> (equals sign).</p><p>To create headings 1 through 4, begin your command paragraph with <code>=headN</code>, where <code>N</code> is the number of the heading 1 through 4. For example, to make a first-order heading (the largest possible,) write <code>=head1</code>, then on the next line begin your paragraph that you want under the heading.</p>"},{menuName:"Beginning & Ending",data:"<p>Perl pod blocks should begin with <code>=pod</code> and end with <code>=cut</code>, signifying to Pod parsers that the pod block has begun and ended. These command paragraphs only signal the beginning and end of a pod block.</p>"},{menuName:"Other Formats",data:"<p>pod also allows blocks in other formats, such as HTML or plain text. To create one of these blocks, use the <code>=format SYNTAX</code> command paragraph, where <code>SYNTAX</code> is the syntax of the block (e.g. <code>html</code> or <code>txt</code>). At the end of your block, use the <code>=end SYNTAX</code> block.</p>"},{menuName:"Encoding",data:"<p>If you are having encoding troubles, use the <code>=encoding ENC_TYPE</code> command, where <code>ENC_TYPE</code> is the encoding type (e.g. <code>utf8</code>, <code>koi8-r</code>). This will affect the entire document, not just the block below the command.</p>"}]},{menuName:"Formatting",content:[{menuName:"Text",data:"<p>Formatting text as <strong>bold</strong>, <em>italic</em> or <code>code</code> works in the <code>S<word></code> syntax, where <code>S</code> is an abbreviation for the type of text you are trying to create. For example, <code>B<my bold text></code> becomes <strong>my bold text</strong>, <code>I<italic text></code> becomes <em>italic text</em> and <code>C<code here()></code> becomes <code>code here()</code>.</p>"},{menuName:"Hyperlinks",data:"<p>Writing hyperlinks in pod is much like formatting text, using the same <code>S<></code> syntax. Instead of <code>B</code>, <code>I</code> or <code>C</code>, use <code>L</code> to begin a hyperlink.</p><p>pod allows you to hyperlink to a <code>man</code> page, a Perl documentation page, or another web page. To link to a <code>man</code> or Perl documentation page, simply include the page name in the link (e.g. <code>L<perl(1)></code> or <code>L<Net::Ping></code>). If you want to link to a web page, separate the URL and the link text with a pipe (e.g. to link to github.com, write <code>L<GitHub|https://github.com/></code>)."}]}],d={"function-bold":{search:/(^[\n]+)([\n\s]*)/g,replace:"*$1*$2"},"function-italic":{search:/(^[\n]+)([\n\s]*)/g,replace:"_$1_$2"},"function-hr":{append:`
|
|
***
|
|
`},"function-code":{search:/(^[\n]+)([\n\s]*)/g,replace:"<pre><code>$1</code></pre>$2"},"function-ul":{search:/(.+)([\n]?)/gi,replace:"* $1$2"},"function-ol":{search:/(.+)([\n]?)/gi,replace:"# $1$2"},"function-blockquote":{search:/(.+)([\n]?)/gi,replace:"bq. $1$2"},"function-link":{exec(){s.init({title:"Insert Link",fields:[{id:"text",name:"Link Text",type:"text",help:"The text to display to the user."},{id:"href",name:"URL",type:"text",help:"The URL to link to."}],OK(e){let t="";e.text&&e.href&&(t=`"${e.text}":${e.href}`),F(t)}})}},"function-image":{exec(){s.init({title:"Insert Image",fields:[{id:"url",name:"Image URL",type:"text"},{id:"alt",name:"Alt Text",type:"text"}],OK(e){if(e.url){let t=`!${e.url}`;e.alt!==""&&(t+=`(${e.alt})`),t+="!",F(t)}}})}}},x=[{menuName:"Phrase Modifiers",content:[{menuName:"Emphasis / Strength",data:"<p>To place emphasis or strength on inline text, simply place <code>_</code> (underscores) around the text for emphasis or <code>*</code> (asterisks) around the text for strength. In most browsers, <code>_mytext_</code> will appear as italics and <code>*mytext*</code> will appear as bold.</p><p>To force italics or bold, simply double the characters: <code>__mytext__</code> will appear italic and <code>**mytext**</code> will appear as bold text.</p>"},{menuName:"Citations / Editing",data:'<p>To display citations, wrap your text in <code>??</code> (two question marks).</p><p>To display edit marks such as deleted text (strikethrough) or inserted text (underlined text), wrap your text in <code>-</code> (minuses) or <code>+</code> (pluses). For example <code>-mytext-</code> will be rendered as <span style="text-decoration: line-through;">mytext</span> and <code>+mytext+</code> will be rendered as <span style="text-decoration: underline;">mytext</span></p>'},{menuName:"Superscript / Subscript",data:"<p>To display superscript, wrap your text in <code>^</code> (carets). To display subscript, wrap your text in <code>~</code> (tildes).</p>"},{menuName:"Code",data:"<p>To display monospace code, wrap your text in <code>@</code> (at symbol). For example, <code>@mytext@</code> will appear as <code>mytext</code>.</p>"},{menuName:"Acronyms",data:'<p>To create an acronym, suffix the acronym with the definition in parentheses. For example, <code>JS(JavaScript)</code> will be displayed as <abbr title="JavaScript">JS</abbr>.</p>'}]},{menuName:"Block Modifiers",content:[{menuName:"Headings",data:"<p>To display a heading in Textile, prefix your line of text with <code>hn.</code>, where <code>n</code> equals the heading size you want (1 is largest, 6 is smallest).</p>"},{menuName:"Paragraphs / Quotes",data:"<p>To create a new paragraph, prefix your first line of a block of text with <code>p.</code>.</p><p>To create a blockquote, make sure at least one blank line exists between your text and any surrounding text, and then prefix that block with <code>bq.</code> If you need to extend a blockquote to more than one text block, write <code>bq..</code> (note the two periods) and prefix your next normal paragraph with <code>p.</code></p>"},{menuName:"Code Blocks",data:"<p>Code blocks in textile are simply prefixed like any other block. To create a code block, place the beginning of the block on a separate line and prefix it with <code>bc.</code></p><p>To display a preformatted block, prefix the block with <code>pre.</code></p>"},{menuName:"Lists",data:"<p>To create ordered lists, prefix each line with <code>#</code>. To create unordered lists, prefix each line with <code>*</code>.</p>"}]},{menuName:"Links / Images",content:[{menuName:"Links",data:'<p>To display a link, put the text you want to display in quotes, then a colon (<code>:</code>), then the URL after the colon. For example <code>"GitHub":https://github.com/</code> will appear as <a href="javascript:void(0);">GitHub</a>.</p>'},{menuName:"Images",data:"<p>To display an image, simply wrap the image\u2019s URL in <code>!</code> (exclamation points). If you want to link the image to a URL, you can blend the image and link syntax: place your image URL in the exclamation points and suffix that with a colon and your URL. For example, an image at <code>http://myurl/image.png</code> that should link to <code>http://myurl/</code> should be written as <code>!http://myurl/image.png!:http://myurl/</code>.</p>"}]}],f={"function-bold":{search:/([^\n]+)([\n]*)/gi,replace:"**$1**$2"},"function-italic":{search:/([^\n]+)([\n]*)/gi,replace:"//$1//$2"},"function-code":{search:/([^\n]+)([\n]*)/gi,replace:"{{{$1}}}$2"},"function-hr":{append:`
|
|
|
|
----
|
|
|
|
`},"function-ul":{search:/(.+)([\n]?)/gi,replace:"* $1$2"},"function-ol":{search:/(.+)([\n]?)/gi,replace:"# $1$2"},"function-link":{exec(){s.init({title:"Insert Link",fields:[{id:"text",name:"Link Text",type:"text",help:"The text to display to the user."},{id:"href",name:"URL",type:"text",help:"The URL to link to."}],OK(e){const t=`[[${e.href}|${e.text}]]`;F(t)}})}},"function-image":{exec(){s.init({title:"Insert Image",fields:[{id:"url",name:"Image URL",type:"text"},{id:"alt",name:"Alt Text",type:"text"}],OK(e){let t="";e.url&&e.alt&&(t=`{{${e.url}`,e.alt!==""&&(t+=`|${e.alt}}}`)),F(t)}})}}},A={"function-bold":{search:/([^\n]+)([\n\s]*)/g,replace:"((*$1*))$2"},"function-code":{search:/([^\n]+)([\n\s]*)/g,replace:"(({$1}))$2"},"function-ul":{search:/(.+)([\n]?)/gi,replace:"* $1$2"},"function-ol":{exec(e,t){let o="";const a=t.split(`
|
|
`),l=/[\w]+/;for(let v=0;v<a.length;v++)l.test(a[v])&&(o+=`(${(v+1).toString()}) ${a[v]}`);F(o)}},"function-h1":{search:/(.+)([\n]?)/gi,replace:"= $1$2"},"function-h2":{search:/(.+)([\n]?)/gi,replace:"== $1$2"},"function-h3":{search:/(.+)([\n]?)/gi,replace:"=== $1$2"}};(0,p.N7)("#gollum-editor",function(e){D({NewFile:e.classList.contains("create")})}),D.WikiLanguage={"function-internal-link":{exec(){return s.init({title:"Insert Wiki Link",fields:[{id:"name",name:"Link Name",type:"text"}],OK(e){const t=e.name?`[[${e.name}]]`:"";return F(t)}})}}},(0,u.on)("click",".js-wiki-sidebar-toc-toggle-chevron-button",function(e){var t,o;(o=(t=e.currentTarget.querySelector(".js-wiki-sidebar-toc-toggle-chevron"))==null?void 0:t.classList)==null||o.toggle("js-wiki-sidebar-toc-toggle-chevron-open")}),(0,p.N7)(".js-wiki-sidebar-toc-fragment",function(e){function t(a,l){l?a.setAttribute("hidden",""):a.removeAttribute("hidden")}c(t,"toggleHidden");function o(a,l){if(l){const v=l.querySelector(".js-wiki-sidebar-toc-toggle-chevron"),H=l.querySelector(".js-wiki-sidebar-toc-spinner");t(v,a),t(H,!a)}}c(o,"toggleSpinner"),e.addEventListener("loadstart",a=>o(!0,a.currentTarget.parentElement)),e.addEventListener("include-fragment-replace",a=>{var l;const v=a.currentTarget;if(!v)return;o(!1,v.parentElement);const H=(l=a.detail)==null?void 0:l.fragment;if(!H||H.textContent!=="")return;const U=v.parentElement;if(!U)return;const j=U.querySelector(".js-wiki-sidebar-toc-toggle-chevron-button");!j||j.classList.toggle("v-hidden")})}),(0,u.on)("click",".js-wiki-toggle-collapse",function(e){const t=e.currentTarget.closest(".js-wiki-pages-box");for(const o of t.querySelectorAll(".js-wiki-sidebar-toggle-display"))o.classList.toggle("d-none")}),(0,u.on)("click",".js-wiki-more-pages-link",function(e){e.preventDefault(),e.currentTarget.closest(".js-wiki-pages-box").classList.toggle("wiki-show-more")}),(0,u.on)("preview:setup",".js-previewable-comment-form",function(e){const t=e.currentTarget.querySelector("#wiki_format");t&&e.detail.data.append("wiki_format",t.value)}),(0,u.on)("change","#wiki_format",function(e){const o=e.currentTarget.closest(".js-previewable-comment-form");o.classList.contains("preview-selected")&&o.dispatchEvent(new CustomEvent("preview:render",{bubbles:!0,cancelable:!1}))}),G("asciidoc",W),G("markdown",V),G("org",r),G("pod",y),G("textile",x),P("asciidoc",K),P("creole",f),P("markdown",X),P("org",n),P("pod",i),P("rdoc",A),P("textile",d)}},C=>{var N=c(p=>C(C.s=p),"__webpack_exec__");C.O(0,[5724],()=>N(94851));var w=C.O()}]);})();
|
|
|
|
//# sourceMappingURL=wiki-244094dc4426.js.map
|