Wiki Settings
Feather Wiki Version: Dove_1.3.1
/g,">")}function J(a,d){function b(u){var t=S[u[1]||""],r=k[k.length-1]==u;return t?t[1]?(r?k.pop():k.push(u),t[0|r]):t[0]:u}function g(){for(var u="";k.length;)u+=b(k[k.length-1]);return u}var e,f,c,h=/((?:^|\n+)(?:\n---+|\* \*(?: \*)+)\n)|(?:^``` *(\w*)\n([\s\S]*?)\n```$)|((?:(?:^|\n+)(?:\t| {2,}).+)+\n*)|((?:(?:^|\n)([>*+-]|\d+\.)\s+.*)+)|(?:!\[([^\]]*?)\]\(([^)]+?)\))|(\[)|(\](?:\(([^)]+?)\))?)|(?:(?:^|\n+)([^\s].*)\n(-{3,}|={3,})(?:\n+|$))|(?:(?:^|\n+)(#{1,6})\s*(.+)(?:\n+|$))|(?:`([^`].*?)`)|( \n\n*|\n{2,}|__|\*\*|[_*]|~~)/gm, k=[],l="",m=d||{},n=0;for(a=a.replace(/^\[(.+?)\]:\s*(.+)$/gm,function(u,t,r){return m[t.toLowerCase()]=r,""}).replace(/^\n+|\n+$/g,"");e=h.exec(a);){var p=a.substring(n,e.index);n=h.lastIndex;d=e[0];p.match(/[^\\](\\\\)*\\$/)||((c=e[3]||e[4])?d='
"+R(F(c).replace(/^\n+|\n+$/g,""))+"
":(c=e[6])?(c.match(/\./)&&(e[5]=e[5].replace(/^\d+/gm,"")),f=J(R(e[5].replace(/^\s*[>*+.-]/gm,
""))),">"==c?c="blockquote":(c=c.match(/\./)?"ol":"ul",f=f.replace(/^(.*)(\n|$)/gm,""+F(e[16])+"
":(e[17]||e[1])&&(d=b(e[17]||"--")));l+=p;l+=d}return(l+a.substring(n)+g()).replace(/^\n+|\n+$/g,
"")}function ta(a){var d;(null!=(d=a.match(/<.*?[_*].*?(?=>)|\[\[.+?\]\]/gs))?d:[]).forEach(g=>{a=a.replace(g,g.replace(/_/g,"\ufffe").replace(/\*/g,"\uffff").replace(/\[\[/g,"\ufffd").replace(/\]\]/g,"\ufffc"))});let b=!1;return a.split(/(?:\r?\n){2,}/).map(g=>{let e=g.trim();if(g.includes("```")){let f=g.replace(//g,">").replace("```",`<${b?"/":""}pre>`).replace("```","");return b=!e.endsWith("```")||!b&&"```"===e,f}return!b&&e.match(/^[-*]{2,}$/)?"${J(g)}
`}).join("\n").replace(RegExp("\ufffe","g"),"_").replace(RegExp("\uffff","g"),"*").replace(RegExp("\ufffd","g"),"[[").replace(RegExp("\ufffc","g"),"]]")}function K(a,d,b){b=`\\s<${d} id=${b}>`;a=a.match(new RegExp(b+`.+?(?=${d}>)`,"s"));return(null!=a?a:[]).length?a[0].replace(b.replace("\\s",""),"").trim():""}function ua(a){return T(this,null,function*(){let d=Object.keys(a);return d.length&&!a[d[0]].img&& (yield Promise.all(d.map(b=>new Promise(g=>{let e=new Image;e.src=a[b];e.onload=()=>{a[b]={img:a[b],alt:"image",size:[e.width,e.height]};g()}})))),a})}function va(){function a(f){var c;return(null!=(c=null==f?void 0:f.match(/\[\[.+?(?=\]\])/g))?c:[]).forEach(h=>{let k=h.replace("[[","").split("|"),l=k[1]?k[1].trim():FW.slug(k[0]);f=f.replace(`${h}]]`,`${k[0]}`)}),f}let {state:d}=FW,{pages:b}=d.p,{img:g,out:e}=FW.inject;return html`")}},quote:{icon:"“ ”",title:"Quote",result:function(){return e("formatBlock", "
")}},olist:{icon:"#",title:"Ordered List",result:function(){return e("insertOrderedList")}},ulist:{icon:"•",title:"Unordered List",result:function(){return e("insertUnorderedList")}},code:{icon:"</>",title:"Code",result:function(){return e("formatBlock","")}},line:{icon:"―",title:"Horizontal Line",result:function(){return e("insertHorizontalRule")}},link:{icon:"🔗",title:"Link",result:function(){var l=window.prompt("Enter the link URL");l&&e("createLink", l)}},image:{icon:"📷",title:"Image",result:function(){var l=window.prompt("Enter the image URL");l&&e("insertImage",l)}}},c={actionbar:"pell-actionbar",button:"pell-button",content:"pell-content",selected:"pell-button-selected"},h=function(l){var m=l.actions?l.actions.map(function(r){return"string"==typeof r?f[r]:f[r.name]?g({},f[r.name],r):r}):Object.keys(f).map(function(r){return f[r]}),n=g({},c,l.classes),p=l.defaultParagraphSeparator||"div",u=document.createElement("div");u.className=n.actionbar; l.element.appendChild(u);var t=l.element.content=document.createElement("div");return t.contentEditable=!0,t.className=n.content,t.oninput=function(r){(r=r.target.firstChild)&&3===r.nodeType?e("formatBlock","<"+p+">"):"
"===t.innerHTML&&(t.innerHTML="");l.onChange(t.innerHTML)},t.onkeydown=function(r){"Enter"===r.key&&"blockquote"===document.queryCommandValue("formatBlock")&&setTimeout(function(){return e("formatBlock","<"+p+">")},0)},l.element.appendChild(t),m.forEach(function(r){var q=document.createElement("button"); if(q.className=n.button,q.innerHTML=r.icon,q.title=r.title,q.setAttribute("type","button"),q.onclick=function(){return r.result()&&t.focus()},r.state){var v=function(){return q.classList[r.state()?"add":"remove"](n.selected)};t.addEventListener("keyup",v);t.addEventListener("mouseup",v);q.addEventListener("click",v)}u.appendChild(q)}),l.styleWithCSS&&e("styleWithCSS"),e("defaultParagraphSeparator",p),l.element},k={exec:e,init:h};b.exec=e;b.init=h;b.default=k;Object.defineProperty(b,"__esModule",{value:!0})})}), S,qb=I(()=>{S={"":["",""],_:["",""],"*":["",""],"~":["",""],"\n":["
"]," ":["
"],"-":["
"]}}),oa={};E(oa,{default:()=>ta});var rb=I(()=>{qb()}),sb=((a,d,b)=>(b=null!=a?Fa(Ka(a)):{},ia(!d&&a&&a.__esModule?b:H(b,"default",{value:a,enumerable:!0}),a)))(bb(),1),tb=(a,d)=>{let {p:b,help:g}=a;return[html``,html` All Pages
`]};P();var ub=(a,d)=>{function b(){FW.upload("text/html",p=>{FW.xtr(p,u=>{u&&(a.p=u[0],g(u[1]),e(u[2]),d(h.DOMCONTENTLOADED),d(h.CHECK_CHANGED),d(h.NOTIFY,"Wiki Loaded"))})})}function g(p){let u=document.getElementById("c");p.trim()?(a.c=p,u?u.innerHTML=p:document.head.innerHTML+=``):(delete a.c,u&&document.head.removeChild(u))}function e(p){p.trim()?(a.j!==p&&alert("You must save & reload to run your JavaScript"),a.j= p):delete a.j}var f,c;let {events:h,p:k,c:l,j:m}=a,n=k.pages.map(p=>p.slug).join("\n");return[html` This wiki has ${b.pages.length} page${1!==b.pages.length?"s":""}:
${b.pages.filter(e=> !e.parent).map(e=>g.getChildList(e))}
`,html` Wiki Settings
`]}, vb=(a,d)=>{let {p:b,query:g}=a;a=b.pages.filter(e=>{var f;return null==(f=e.tags)?void 0:f.includes(g.tag)});return[html` ${N(a,d,{showDelete:!0,showUsed:!0})}Feather Wiki Version: Dove_1.3.1
`,html` Pages Tagged
${g.tag}
${0 `]},wb=(a,d,b)=>{var g;let {img:e,pg:f,out:c,hLink:h}=FW.inject,{help:k}=a;d=b.content;d="md"===b.editor?md(d):d;d=e(f(h(c(d)),a),a);a=k.getChildren(b);return[null!=b&&b.e||null== (g=null==b?void 0:b.tags)||!g.length?"":html``,html`${a.map(e=>html` ${e.name} `)} `:"None Found"}${d?html.raw(d):"No Page Content"} `,0Sub Pages
${a.map(l=>k.getChildList(l,!0))}
`:null]},xb=(a,d,b)=>{function g(p){p=p.target;a.edits[p.id]=p.value;d(f.RENDER)}function e(){return FW.tidy(document.getElementById("tags").value.split(","))}let {events:f, edits:c,p:h,help:k}=a,l=k.getChildren(b).map(p=>p.id),m=!h.pages.some(p=>p.id===b.id);({useMd:n}=c);var n=[html``,(n?(cb(),M(ka)):(db(),M(ma))).editor(a,d)];return html``},yb=(a,d,b)=>{let {root:g,edit:e,help:f,p:c,events:h}=a,{cd:k,md:l}=b;if(e)return xb(a,d,b);let m=f.breadcrumb(b),n=FW.date(new Date(k)),p=new Date(null!=l?l:k),u=FW.date(p);return[html`${m.map(t=> [html`${t.name}`," / "])} `,wb(a,d,b)]},pa={};E(pa,{abbr:()=>ya,put:()=>xa,resizeImage:()=>U,upload:()=>wa});var qa={};E(qa,{object:()=>za,string:()=>V});var ra={};E(ra,{hLink:()=>Da, img:()=>Ba,out:()=>Ca,pg:()=>Aa});var sa={};E(sa,{compress:()=>W,decompress:()=>aa});var G=-1;window.html=mb();html.raw=ob();window.pell=pb();window.md=(rb(),M(oa)).default;window.FW=(0,sb.default)({hash:!0});FW.slug=a=>a.toLowerCase().replace(/\s/g,"_").replace(/\W/g,"-");FW.date=a=>`${a.getFullYear()}-${(a.getMonth()+1).toString().padStart(2,"0")}-${a.getDate().toString().padStart(2,"0")} ${a.getHours()%12}:${a.getMinutes().toString().padStart(2,"0")} ${1>a.getHours()/12?"a":"p"}m`;FW.tidy=a=>{let d= a.map(b=>b.trim());return d.filter((b,g)=>b.length&&d.indexOf(b)===g).sort()};FW.xtr=function(a,d=()=>{}){let b=new FileReader;b.onload=g=>T(this,null,function*(){let e=g.target.result;var f=K(e,"script","p type=application/json");if(!f.length||"{"!==f[0])return alert("Could not find Feather Wiki data.");f=FW.json.decompress(JSON.parse(f));f.img=yield ua(f.img);d([f,K(e,"style","c"),K(e,"script","j")])});b.onerror=function(g){d(null)};b.readAsText(a)};FW.gen=function(a){let {c:d,p:b,j:g, views:e}=a;a=(b.static?va():e.a(a)[1]).outerHTML;return`${b.name}
${b.e?"":html`${c.published?"":html` `}`}${b.name} ${b.desc?``:""} ${d?``: ""}Wiki Settings
Feather Wiki Version: Dove_1.3.1
Existing Images