xrfragment/index.html

4390 lines
12 MiB
HTML
Raw Normal View History

2023-04-27 17:35:20 +02:00
<!doctype html>
<!-- The following comment is called a MOTW comment and is necessary for the TiddlyIE Internet Explorer extension -->
<!-- saved from url=(0021)https://tiddlywiki.com -->
<html lang="en-GB">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<!--~~ Raw markup for the top of the head section ~~-->
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
<meta name="application-name" content="TiddlyWiki" />
<meta name="generator" content="TiddlyWiki" />
<meta name="tiddlywiki-version" content="5.2.7" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="mobile-web-app-capable" content="yes"/>
<meta name="format-detection" content="telephone=no" />
<meta name="copyright" content="TiddlyWiki created by Jeremy Ruston, (jeremy [at] jermolene [dot] com)
Copyright (c) 2004-2007, Jeremy Ruston
Copyright (c) 2007-2023, UnaMesa Association
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS'
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." />
<link id="faviconLink" rel="shortcut icon" href="favicon.ico">
2023-06-22 11:35:38 +02:00
<title>XR Fragments — specification for 4D URLs to surf (un)hosted 3D assets
2023-04-28 14:21:22 +02:00
Home
2023-04-28 17:16:13 +02:00
How it works
2023-05-08 18:07:27 +02:00
Philosophy
2023-04-28 17:16:13 +02:00
</title>
2023-04-27 17:35:20 +02:00
<!--~~ This is a Tiddlywiki file. The points of interest in the file are marked with this pattern ~~-->
<!--~~ Raw markup ~~-->
<!-- aframe v1.4.0 -->
<script>
/*! For license information please see aframe.min.js.LICENSE.txt */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.AFRAME=t():e.AFRAME=t()}(self,(()=>(()=>{var e={651:()=>{!function(){"use strict";var e=function(e,t){var n=function(e){for(var t=0,n=e.length;t<n;t++)i(e[t])},i=function(e){var t=e.target,n=e.attributeName,i=e.oldValue;t.attributeChangedCallback(n,i,t.getAttribute(n))};return function(r,s){var o=r.constructor.observedAttributes;return o&&e(s).then((function(){new t(n).observe(r,{attributes:!0,attributeOldValue:!0,attributeFilter:o});for(var e=0,s=o.length;e<s;e++)r.hasAttribute(o[e])&&i({target:r,attributeName:o[e],oldValue:null})})),r}};function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function n(e,n){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=function(e,n){if(e){if("string"==typeof e)return t(e,n);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?t(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){i&&(e=i);var r=0,s=function(){};return{s,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return a=e.done,e},e:function(e){l=!0,o=e},f:function(){try{a||null==i.return||i.return()}finally{if(l)throw o}}}}var i=!0,r=!1,s="querySelectorAll",o="querySelectorAll",a=self,l=a.document,c=a.Element,h=a.MutationObserver,u=a.Set,d=a.WeakMap,p=function(e){return o in e},A=[].filter,f=function(e){var t=new d,a=function(n,i){var r;if(i)for(var s,o=function(e){return e.matches||e.webkitMatchesSelector||e.msMatchesSelector}(n),a=0,l=m.length;a<l;a++)o.call(n,s=m[a])&&(t.has(n)||t.set(n,new u),(r=t.get(n)).has(s)||(r.add(s),e.handle(n,i,s)));else t.has(n)&&(r=t.get(n),t.delete(n),r.forEach((function(t){e.handle(n,i,t)})))},f=function(e){for(var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=0,i=e.length;n<i;n++)a(e[n],t)},m=e.query,g=e.root||l,v=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:MutationObserver,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:["*"],l=function t(r,o,a,l,c,h){var u,d=n(r);try{for(d.s();!(u=d.n()).done;){var p=u.value;(h||s in p)&&(c?a.has(p)||(a.add(p),l.delete(p),e(p,c)):l.has(p)||(l.add(p),a.delete(p),e(p,c)),h||t(p[s](o),o,a,l,c,i))}}catch(e){d.e(e)}finally{d.f()}},c=new o((function(e){if(a.length){var t,s=a.join(","),o=new Set,c=new Set,h=n(e);try{for(h.s();!(t=h.n()).done;){var u=t.value,d=u.addedNodes,p=u.removedNodes;l(p,s,o,c,r,r),l(d,s,o,c,i,r)}}catch(e){h.e(e)}finally{h.f()}}})),h=c.observe;return(c.observe=function(e){return h.call(c,e,{subtree:i,childList:i})})(t),c}(a,g,h,m),y=c.prototype.attachShadow;return y&&(c.prototype.attachShadow=function(e){var t=y.call(this,e);return v.observe(t),t}),m.length&&f(g[o](m)),{drop:function(e){for(var n=0,i=e.length;n<i;n++)t.delete(e[n])},flush:function(){for(var e=v.takeRecords(),t=0,n=e.length;t<n;t++)f(A.call(e[t].removedNodes,p),!1),f(A.call(e[t].addedNodes,p),!0)},observer:v,parse:f}},m=self,g=m.document,v=m.Map,y=m.MutationObserver,E=m.Object,b=m.Set,x=m.WeakMap,w=m.Element,C=m.HTMLElement,M=m.Node,_=m.Error,I=m.TypeError,B=m.Reflect,S=E.defineProperty,T=E.keys,L=E.getOwnPropertyNames,D=E.setPrototypeOf,R=!self.customElements,P=function(e){for(var t=T(e),n=[],i=t.length,r=0;r<i;r++)n[r]=e[t[r]],delete e[t[r]];return function(){for(var r=0;r<i;r++)e[t[r]]=n[r]}};if(R){var k=function(){var e=this.constructor;if(!O.has(e))throw new I("Illegal constructor");var t=O.get(e);if(H)return W(H,t);var n=F.call(g,t);return W(D(n,e.prototype
</script><script>
window.onerror=null
if( typeof $tw != 'undefined' ) $tw.config.htmlUnsafeElements = [];
</script>
<!-- browser console -->
<script>
2023-05-04 19:45:06 +02:00
(function(){
2023-04-27 17:35:20 +02:00
$ = (s) => document.querySelector(s)
window.errcolor = '#000c'
2023-04-28 14:21:22 +02:00
2023-04-27 17:35:20 +02:00
let isLocalHost = () => document.location.hostname == 'localhost'
2023-04-28 17:17:29 +02:00
if( !isLocalHost() ) setTimeout( () => window.document.body.id = "p",50)
2023-04-27 17:35:20 +02:00
window.log = (str,line,bgcolor) => {
line = line || 0
$scene = $('.scene')
$console = $('.console')
if( !$scene ) return;
$scene.style.position = 'relative'
if( !$console ){
let el = $console = document.createElement("pre")
el.className = "console"
el.style.position = 'absolute';
el.style.top = el.style.left = el.style.bottom = el.style.right = '0'
el.style.zIndex = 1000;
el.style.fontSize = '12px'
el.style.padding = '10px'
el.style.color = '#0CF'
el.style.pointerEvents = 'none'
$scene.appendChild($console)
}
$console.style.background = bgcolor ? bgcolor : 'transparent'
let lines = String($console.innerHTML).split("\n")
lines[line] = str
$console.innerHTML = lines.join("\n")
}
var error = (event, source, lineno, colno, error) => {
log(lineno+":"+colno+" "+error, errcolor)
}
window.onerror = log
console.error = (s) => log("error: "+s.toString(),errcolor)
})()
</script>
<!-- PWA service worker -->
<script>
(function(){
let isLocalHost = () => document.location.hostname == 'localhost'
const registerServiceWorker = async () => {
if( isLocalHost() ) return
if ('serviceWorker' in navigator) {
try {
const registration = await navigator.serviceWorker.register(
"./sw.js",
{
scope: './',
}
);
if (registration.installing) {
console.log('Service worker installing');
} else if (registration.waiting) {
console.log('Service worker installed');
} else if (registration.active) {
console.log('Service worker active');
}
} catch (error) {
console.error("Registration failed with "+error);
}
}
};
if (document.readyState === 'complete') registerServiceWorker();
else document.addEventListener("DOMContentLoaded", registerServiceWorker);
if ( !isLocalHost() && "serviceWorker" in navigator) {
window.addEventListener("load", async () => {
try {
const registration = await navigator.serviceWorker.register("./sw.js");
} catch (e) { console.error(e) }
});
window.addEventListener("beforeinstallprompt", function (e) {
e.userChoice.then(function (choiceResult) {
if (choiceResult.outcome == "dismissed") {
console.log("User cancelled home screen install");
} else console.log("User added to home screen");
});
});
}
})()
2023-04-27 18:34:23 +02:00
</script>
<!-- sandboxify textareas with class 'sandboxify' -->
2023-04-27 17:35:20 +02:00
<script>
function sandboxify() {
let run = (t) => {
let $res = t.parentElement.children[1]
function log(res){
$res.innerHTML = typeof res == 'string' ? res : JSON.stringify(res,null,2)
}
let _log = console.log
console.log = log
try{
eval(t.value);
}catch(e){ log(e) }finally{ console.log = _log }
}
const textareas = document.querySelectorAll("textarea.sandboxify");
textareas.forEach(t => {
t.addEventListener("input", function (event) {
try {
run(t)
} catch (error) {
console.error(error);
}
});
run(t)
});
}
// call sandboxify once on page load
sandboxify();
// set up a MutationObserver to call sandboxify on any new textareas added to the DOM
const observer = new MutationObserver(mutations => {
mutations.forEach(mutation => {
if (mutation.addedNodes && mutation.addedNodes.length > 0) {
const addedNodes = mutation.addedNodes;
addedNodes.forEach(addedNode => {
if (addedNode.tagName === "TEXTAREA" && addedNode.classList.contains("sandboxify")) {
sandboxify();
}
});
}
});
});
observer.observe(document, { childList: true, subtree: true });
</script><!-- scriptie-talkie-embed.js -->
<script>
(function(e,t,n){function i(n,s){if(!t[n]){if(!e[n]){var o="function"==typeof require&&require;if(!s&&o)return o(n,!0);if(r)return r(n,!0);throw Error("Cannot find module '"+n+"'")}var u=t[n]={exports:{}};e[n][0](function(t){var r=e[n][1][t];return i(r?r:t)},u,u.exports)}return t[n].exports}for(var r="function"==typeof require&&require,s=0;n.length>s;s++)i(n[s]);return i})({1:[function(require){"use strict";var scriptieTalkieEmbed=require("../../");scriptieTalkieEmbed()},{"../../":2}],3:[function(require,module,exports){"use strict";module.exports=function(textarea){var opts={},data=textarea.getAttribute("data-scriptie-talkie");if(!data)return opts;try{opts=eval("("+data+")")}catch(e){console.error(e)}finally{return opts}}},{}],4:[function(require,module){"use strict";function trimEmpty(lines){for(;lines.length&&!lines[0].trim().length;)lines.shift();for(;lines.length&&!lines[lines.length-1].trim().length;)lines.length--}function leftAlign(lines){var indent=-1;if(lines.filter(function(line){return line.trim().length}).forEach(function(line){for(var lineIndent=0,col=0;" "===line.charAt(col++);)lineIndent++;indent=-1===indent?lineIndent:Math.min(indent,lineIndent)}),!indent)return lines;for(var i=0;lines.length>i;i++)lines[i]=lines[i].slice(indent)}module.exports=function(textarea,addRows){addRows=addRows||0;var lines=textarea.textContent.split("\n");return trimEmpty(lines),leftAlign(lines),textarea.rows=Math.max(lines.length+addRows,1),textarea.textContent=lines.join("\n"),lines}},{}],5:[function(require,module){"use strict";function replaceElement(replaceEl,withEl){replaceEl.parentNode.replaceChild(withEl,replaceEl)}var format=require("util").format;module.exports=function(textarea,opts){opts=opts||{};var minHeight=opts.minHeight||150,maxHeight=opts.maxHeight||600,minWidth=opts.minWidth||600,textareaWidth=textarea.clientWidth,width=Math.max(minWidth,textareaWidth),height=textarea.clientHeight+50;height=Math.max(minHeight,height),height=Math.min(maxHeight,height);var container=document.createElement("div");return container.setAttribute("class","scriptie-talkie-container"),container.setAttribute("style",format("width: %spx; height: %spx",width,height)),replaceElement(textarea,container),container}},{util:6}],7:[function(require,module){"use strict";module.exports=function(container){var link=document.createElement("a");return link.setAttribute("class","scriptie-talkie-link"),window.link=link,container.appendChild(link),link.textContent="full view",link}},{}],8:[function(require,module){"use script";module.exports=function(){var head=document.getElementsByTagName("head")[0],style=document.createElement("style");style.type="text/css",style.styleSheet?style.styleSheet.cssText=css:style.appendChild(document.createTextNode(css)),head.appendChild(style)};var css=["textarea.scriptie-talkie {"," visibility: hidden;"," display : block;","}",".scriptie-talkie-container {"," position: relative; "," margin: 10px 0px;","}",".scriptie-talkie-editor,",".scriptie-talkie-terminal {"," position: absolute;"," top: 0;"," bottom: 0;"," height: 100%;"," width: 50%;","}",".scriptie-talkie-editor {"," left: 0;"," right: 50%;","}",".scriptie-talkie-link {"," position : absolute;"," bottom : 1px;"," right : 4px;"," font-size : 14px;"," color : yellowgreen;"," z-index : 1;","}","textarea.scriptie-talkie, ",".scriptie-talkie-terminal,",".scriptie-talkie-editor {"," /* text area needs same font to determine editor size correctly */"," font-size : 14px;"," font-family : Terminus,Consolas,Profont,Monaco,Inconsolata,Inconsolata-g,",' Unifont,Lime,"ClearlyU PUA",Clean,"DejaVu Sans Mono","Lucida Console",',' "Bitstream Vera Sans Mono",Freemono,"Liberation Mono",Dina,Anka,Droid Sans Mono,',' Anonymous Pro,Proggy fonts,Envy Code R,Gamow,Courier,"Courier New",Terminal,monospace;',"}",".scriptie-talkie-terminal {"," background : black;"," right: 0;"," left: 50%;"," overflow: auto","}","/* tweak the ace editor a bit since we will never have >99 lines and need to save space */",".scriptie-t
};oop.inherits(JavaScriptHighlightRules,TextHighlightRules),exports.JavaScriptHighlightRules=JavaScriptHighlightRules}),ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(acequire,exports){var oop=acequire("../lib/oop"),TextHighlightRules=acequire("./text_highlight_rules").TextHighlightRules,DocCommentHighlightRules=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc.tag",regex:"\\bTODO\\b"},{defaultToken:"comment.doc"}]}};oop.inherits(DocCommentHighlightRules,TextHighlightRules),DocCommentHighlightRules.getStartRule=function(start){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:start}},DocCommentHighlightRules.getEndRule=function(start){return{token:"comment.doc",regex:"\\*\\/",next:start}},exports.DocCommentHighlightRules=DocCommentHighlightRules}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(acequire,exports){var Range=acequire("../range").Range,MatchingBraceOutdent=function(){};(function(){this.checkOutdent=function(line,input){return/^\s+$/.test(line)?/^\s*\}/.test(input):!1},this.autoOutdent=function(doc,row){var line=doc.getLine(row),match=line.match(/^(\s*\})/);if(!match)return 0;var column=match[1].length,openBracePos=doc.findMatchingBracket({row:row,column:column});if(!openBracePos||openBracePos.row==row)return 0;var indent=this.$getIndent(doc.getLine(openBracePos.row));doc.replace(new Range(row,0,row,column-1),indent)},this.$getIndent=function(line){return line.match(/^\s*/)[0]}}).call(MatchingBraceOutdent.prototype),exports.MatchingBraceOutdent=MatchingBraceOutdent}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(acequire,exports){var oop=acequire("../../lib/oop"),Behaviour=acequire("../behaviour").Behaviour,TokenIterator=acequire("../../token_iterator").TokenIterator,lang=acequire("../../lib/lang"),SAFE_INSERT_IN_TOKENS=["text","paren.rparen","punctuation.operator"],SAFE_INSERT_BEFORE_TOKENS=["text","paren.rparen","punctuation.operator","comment"],autoInsertedBrackets=0,autoInsertedRow=-1,autoInsertedLineEnd="",maybeInsertedBrackets=0,maybeInsertedRow=-1,maybeInsertedLineStart="",maybeInsertedLineEnd="",CstyleBehaviour=function(){CstyleBehaviour.isSaneInsertion=function(editor,session){var cursor=editor.getCursorPosition(),iterator=new TokenIterator(session,cursor.row,cursor.column);if(!this.$matchTokenType(iterator.getCurrentToken()||"text",SAFE_INSERT_IN_TOKENS)){var iterator2=new TokenIterator(session,cursor.row,cursor.column+1);if(!this.$matchTokenType(iterator2.getCurrentToken()||"text",SAFE_INSERT_IN_TOKENS))return!1}return iterator.stepForward(),iterator.getCurrentTokenRow()!==cursor.row||this.$matchTokenType(iterator.getCurrentToken()||"text",SAFE_INSERT_BEFORE_TOKENS)},CstyleBehaviour.$matchTokenType=function(token,types){return types.indexOf(token.type||token)>-1},CstyleBehaviour.recordAutoInsert=function(editor,session,bracket){var cursor=editor.getCursorPosition(),line=session.doc.getLine(cursor.row);this.isAutoInsertedClosing(cursor,line,autoInsertedLineEnd[0])||(autoInsertedBrackets=0),autoInsertedRow=cursor.row,autoInsertedLineEnd=bracket+line.substr(cursor.column),autoInsertedBrackets++},CstyleBehaviour.recordMaybeInsert=function(editor,session,bracket){var cursor=editor.getCursorPosition(),line=session.doc.getLine(cursor.row);this.isMaybeInsertedClosing(cursor,line)||(maybeInsertedBrackets=0),maybeInsertedRow=cursor.row,maybeInsertedLineStart=line.substr(0,cursor.column)+bracket,maybeInsertedLineEnd=line.substr(cursor.column),maybeInsertedBrackets++},CstyleBehaviour.isAutoInsertedClosing=function(cursor,line,bracket){return autoInsertedBrackets>0&&cursor.row===autoInsertedRow&&bracket===autoInsertedLineEnd[0]&&line.substr(cursor.column)===autoInsertedLineEnd},CstyleBehaviour.isMaybeInsertedClosing=function(cursor,line){return maybeInsertedBrackets>0&&cursor.row===maybeInsertedRow&&line.substr(cursor.colu
})()},{}],23:[function(){"use strict";Function.prototype.bind||(Function.prototype.bind=function(this_){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var args=Array.prototype.slice.call(arguments,1),fn=this,Noop=function(){},fnbound=function(){return fn.apply(this instanceof Noop&&this_?this:this_,args.concat(Array.prototype.slice.call(arguments)))};return Noop.prototype=this.prototype,fnbound.prototype=new Noop,fnbound})},{}],21:[function(require,module){"use strict";function scroll(elem){elem&&(elem.scrollTop=elem.scrollHeight)}var Terminal=require("./term"),through=require("through");module.exports=function(opts){var term=new Terminal(opts);term.open();var hypernal=through(term.write.bind(term));return hypernal.appendTo=function(elem){"string"==typeof elem&&(elem=document.querySelector(elem)),elem.appendChild(term.element),elem.setAttribute("style","overflow-y : auto;"),hypernal.container=elem,term.element.style.position="relative"},hypernal.writeln=function(line){term.writeln(line),hypernal.tail&&scroll(hypernal.container)},hypernal.write=function(data){term.write(data),hypernal.tail&&scroll(hypernal.container)},hypernal.reset=term.reset.bind(term),hypernal.element=term.element,hypernal.term=term,hypernal}},{"./term":24,through:25}],22:[function(require,module){(function(process){"use strict";function highlightLines(script){return highlight(script,{linenos:!0}).split("\n")}require("./lib/shim-bind");var highlight=require("cardinal").highlight,snippetify=require("snippetify"),evalSnippets=require("./lib/eval-snippets"),resolveTales=require("./lib/resolve-tales");process.browser,module.exports=function(script,scriptPath,opts){opts=opts||{};var toLines=opts.toLines||highlightLines,writeln=opts.writeln||(process.browser===!0?function(){}:console.log.bind(console)),snippets=snippetify(script,{nonstrict:!0});evalSnippets(snippets,scriptPath,opts.diff);var tales=resolveTales(snippets,opts),lines=toLines(script),offset=0;return tales.forEach(function(x){x.tale.length&&lines.splice(x.insertAfter+offset++,0,x.tale)}),lines=lines.filter(function(x){return x.length}),lines.forEach(function(line){writeln(line)}),lines}})(require("__browserify_process"))},{"./lib/shim-bind":23,"./lib/eval-snippets":26,"./lib/resolve-tales":27,cardinal:28,snippetify:29,__browserify_process:16}],20:[function(require,module){(function(){(function(){function exportAce(ns){var acequire=function(module,callback){return _acequire("",module,callback)},root=global;ns&&(global[ns]||(global[ns]={}),root=global[ns]),root.define&&root.define.packaged||(_define.original=root.define,root.define=_define,root.define.packaged=!0),root.acequire&&root.acequire.packaged||(_acequire.original=root.acequire,root.acequire=acequire,root.acequire.packaged=!0)}var ACE_NAMESPACE="ace",global=function(){return this}();if(ACE_NAMESPACE||"undefined"==typeof acequirejs){var _define=function(module,deps,payload){return"string"!=typeof module?(_define.original?_define.original.apply(window,arguments):(console.error("dropping module because define wasn't a string."),console.trace()),void 0):(2==arguments.length&&(payload=deps),_define.modules||(_define.modules={}),_define.modules[module]=payload,void 0)},_acequire=function(parentId,module,callback){if("[object Array]"===Object.prototype.toString.call(module)){for(var params=[],i=0,l=module.length;l>i;++i){var dep=lookup(parentId,module[i]);if(!dep&&_acequire.original)return _acequire.original.apply(window,arguments);params.push(dep)}callback&&callback.apply(null,params)}else{if("string"==typeof module){var payload=lookup(parentId,module);return!payload&&_acequire.original?_acequire.original.apply(window,arguments):(callback&&callback(),payload)}if(_acequire.original)return _acequire.original.apply(window,arguments)}},normalizeModule=function(parentId,moduleName){if(-1!==moduleName.indexOf("!")){var chunks=moduleName.split("!");return normalizeModule(parentId,chunks[0])+"!"+normalizeModule(parentId,chunks[1])}if("."==moduleName.charAt(0)){var base=parentId.spli
return function(ctor,superCtor){tempCtor.prototype=superCtor.prototype,ctor.super_=superCtor.prototype,ctor.prototype=new tempCtor,ctor.prototype.constructor=ctor}}(),exports.mixin=function(obj,mixin){for(var key in mixin)obj[key]=mixin[key];return obj},exports.implement=function(proto,mixin){exports.mixin(proto,mixin)}}),ace.define("ace/lib/useragent",["require","exports","module"],function(acequire,exports){if(exports.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},exports.getOS=function(){return exports.isMac?exports.OS.MAC:exports.isLinux?exports.OS.LINUX:exports.OS.WINDOWS},"object"==typeof navigator){var os=(navigator.platform.match(/mac|win|linux/i)||["other"])[0].toLowerCase(),ua=navigator.userAgent;exports.isWin="win"==os,exports.isMac="mac"==os,exports.isLinux="linux"==os,exports.isIE=("Microsoft Internet Explorer"==navigator.appName||navigator.appName.indexOf("MSAppHost")>=0)&&parseFloat(navigator.userAgent.match(/MSIE ([0-9]+[\.0-9]+)/)[1]),exports.isOldIE=exports.isIE&&9>exports.isIE,exports.isGecko=exports.isMozilla=window.controllers&&"Gecko"===window.navigator.product,exports.isOldGecko=exports.isGecko&&4>parseInt((navigator.userAgent.match(/rv\:(\d+)/)||[])[1],10),exports.isOpera=window.opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),exports.isWebKit=parseFloat(ua.split("WebKit/")[1])||void 0,exports.isChrome=parseFloat(ua.split(" Chrome/")[1])||void 0,exports.isAIR=ua.indexOf("AdobeAIR")>=0,exports.isIPad=ua.indexOf("iPad")>=0,exports.isTouchPad=ua.indexOf("TouchPad")>=0}}),ace.define("ace/editor",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config"],function(acequire,exports){acequire("./lib/fixoldbrowsers");var oop=acequire("./lib/oop"),lang=acequire("./lib/lang"),useragent=acequire("./lib/useragent"),TextInput=acequire("./keyboard/textinput").TextInput,MouseHandler=acequire("./mouse/mouse_handler").MouseHandler,FoldHandler=acequire("./mouse/fold_handler").FoldHandler,KeyBinding=acequire("./keyboard/keybinding").KeyBinding,EditSession=acequire("./edit_session").EditSession,Search=acequire("./search").Search,Range=acequire("./range").Range,EventEmitter=acequire("./lib/event_emitter").EventEmitter,CommandManager=acequire("./commands/command_manager").CommandManager,defaultCommands=acequire("./commands/default_commands").commands,config=acequire("./config"),Editor=function(renderer,session){var container=renderer.getContainerElement();this.container=container,this.renderer=renderer,this.commands=new CommandManager(useragent.isMac?"mac":"win",defaultCommands),this.textInput=new TextInput(renderer.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.keyBinding=new KeyBinding(this),this.$mouseHandler=new MouseHandler(this),new FoldHandler(this),this.$blockScrolling=0,this.$search=(new Search).set({wrap:!0}),this.setSession(session||new EditSession("")),config.resetOptions(this),config._emit("editor",this)};(function(){oop.implement(this,EventEmitter),this.setKeyboardHandler=function(keyboardHandler){if(keyboardHandler)if("string"==typeof keyboardHandler){this.$keybindingId=keyboardHandler;var _self=this;config.loadModule(["keybinding",keyboardHandler],function(module){_self.$keybindingId==keyboardHandler&&_self.keyBinding.setKeyboardHandler(module&&module.handler)})}else delete this.$keybindingId,this.keyBinding.setKeyboardHandler(keyboardHandler);else this.keyBinding.setKeyboardHandler(null)},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(session){if(this.session!=session){if(this.session){var oldSession=this.session;this.session.removeEventListener("change",this.$onDocumentChange),this.session.removeEventListener("changeMode",this.$onChangeMode),this.session.removeEventListener("tokenizerUpdate",this.$on
var range=this.selection.getRange();null==options.needle&&(needle=this.session.getTextRange(range)||this.$search.$options.needle,needle||(range=this.session.getWordRange(range.start.row,range.start.column),needle=this.session.getTextRange(range)),this.$search.set({needle:needle})),this.$search.set(options),options.start||this.$search.set({start:range});var newRange=this.$search.find(this.session);return options.preventScroll?newRange:newRange?(this.revealRange(newRange,animate),newRange):(options.backwards?range.start=range.end:range.end=range.start,this.selection.setRange(range),void 0)},this.findNext=function(options,animate){this.find({skipCurrent:!0,backwards:!1},options,animate)},this.findPrevious=function(options,animate){this.find(options,{skipCurrent:!0,backwards:!0},animate)},this.revealRange=function(range,animate){this.$blockScrolling+=1,this.session.unfold(range),this.selection.setSelectionRange(range),this.$blockScrolling-=1;var scrollTop=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(range.start,range.end,.5),0!=animate&&this.renderer.animateScrolling(scrollTop)},this.undo=function(){this.$blockScrolling++,this.session.getUndoManager().undo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.$blockScrolling++,this.session.getUndoManager().redo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.renderer.destroy(),this._emit("destroy",this)},this.setAutoScrollEditorIntoView=function(enable){if(enable!==!1){var rect,self=this,shouldScroll=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var scrollAnchor=this.$scrollAnchor;scrollAnchor.style.cssText="position:absolute",this.container.insertBefore(scrollAnchor,this.container.firstChild);var onChangeSelection=this.on("changeSelection",function(){shouldScroll=!0}),onBeforeRender=this.renderer.on("beforeRender",function(){shouldScroll&&(rect=self.renderer.container.getBoundingClientRect())}),onAfterRender=this.renderer.on("afterRender",function(){if(shouldScroll&&rect&&self.isFocused()){var renderer=self.renderer,pos=renderer.$cursorLayer.$pixelPos,config=renderer.layerConfig,top=pos.top-config.offset;shouldScroll=pos.top>=0&&0>top+rect.top?!0:pos.top<config.height&&pos.top+rect.top+config.lineHeight>window.innerHeight?!1:null,null!=shouldScroll&&(scrollAnchor.style.top=top+"px",scrollAnchor.style.left=pos.left+"px",scrollAnchor.style.height=config.lineHeight+"px",scrollAnchor.scrollIntoView(shouldScroll)),shouldScroll=rect=null}});this.setAutoScrollEditorIntoView=function(enable){enable!==!0&&(delete this.setAutoScrollEditorIntoView,this.removeEventListener("changeSelection",onChangeSelection),this.renderer.removeEventListener("afterRender",onAfterRender),this.renderer.removeEventListener("beforeRender",onBeforeRender))}}}}).call(Editor.prototype),config.defineOptions(Editor.prototype,"editor",{selectionStyle:{set:function(style){this.onSelectionChange(),this._emit("changeSelectionStyle",{data:style})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(readOnly){this.textInput.setReadOnly(readOnly);var cursorLayer=this.renderer.$cursorLayer;cursorLayer&&cursorLayer.setBlinking(!readOnly)},initialValue:!1},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},hScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",showGutter:"renderer",displayIndentGuides:"renderer",fontSize:"renderer",fontFamily:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",focusTimout:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",tabSize:"session",wrap:"session",foldStyle:"session"}),exports.Edit
function deHyphenate(str){return str.replace(/-(.)/g,function(m,m1){return m1.toUpperCase()})}var lang=acequire("./lib/lang"),oop=acequire("./lib/oop"),net=acequire("./lib/net"),EventEmitter=acequire("./lib/event_emitter").EventEmitter,global=function(){return this}(),options={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{}};exports.get=function(key){if(!options.hasOwnProperty(key))throw Error("Unknown config key: "+key);return options[key]},exports.set=function(key,value){if(!options.hasOwnProperty(key))throw Error("Unknown config key: "+key);options[key]=value},exports.all=function(){return lang.copyObject(options)},oop.implement(exports,EventEmitter),exports.moduleUrl=function(name,component){if(options.$moduleUrls[name])return options.$moduleUrls[name];var parts=name.split("/");component=component||parts[parts.length-2]||"";var base=parts[parts.length-1].replace(component,"").replace(/(^[\-_])|([\-_]$)/,"");!base&&parts.length>1&&(base=parts[parts.length-2]);var path=options[component+"Path"];return null==path&&(path=options.basePath),path&&"/"!=path.slice(-1)&&(path+="/"),path+component+"-"+base+this.get("suffix")},exports.setModuleUrl=function(name,subst){return options.$moduleUrls[name]=subst},exports.$loading={},exports.loadModule=function(moduleName,onLoad){var module,moduleType;Array.isArray(moduleName)&&(moduleType=moduleName[0],moduleName=moduleName[1]);try{module=acequire(moduleName)}catch(e){}if(module&&!exports.$loading[moduleName])return onLoad&&onLoad(module);if(exports.$loading[moduleName]||(exports.$loading[moduleName]=[]),exports.$loading[moduleName].push(onLoad),!(exports.$loading[moduleName].length>1)){var afterLoad=function(){acequire([moduleName],function(module){exports._emit("load.module",{name:moduleName,module:module});var listeners=exports.$loading[moduleName];exports.$loading[moduleName]=null,listeners.forEach(function(onLoad){onLoad&&onLoad(module)})})};return exports.get("packaged")?(net.loadScript(exports.moduleUrl(moduleName,moduleType),afterLoad),void 0):afterLoad()}},exports.init=function(){if(options.packaged=acequire.packaged||module.packaged||global.define&&define.packaged,!global.document)return"";for(var scriptOptions={},scriptUrl="",scripts=document.getElementsByTagName("script"),i=0;scripts.length>i;i++){var script=scripts[i],src=script.src||script.getAttribute("src");if(src){for(var attributes=script.attributes,j=0,l=attributes.length;l>j;j++){var attr=attributes[j];0===attr.name.indexOf("data-ace-")&&(scriptOptions[deHyphenate(attr.name.replace(/^data-ace-/,""))]=attr.value)}var m=src.match(/^(.*)\/ace(\-\w+)?\.js(\?|$)/);m&&(scriptUrl=m[1])}}scriptUrl&&(scriptOptions.base=scriptOptions.base||scriptUrl,scriptOptions.packaged=!0),scriptOptions.basePath=scriptOptions.base,scriptOptions.workerPath=scriptOptions.workerPath||scriptOptions.base,scriptOptions.modePath=scriptOptions.modePath||scriptOptions.base,scriptOptions.themePath=scriptOptions.themePath||scriptOptions.base,delete scriptOptions.base;for(var key in scriptOptions)scriptOptions[key]!==void 0&&exports.set(key,scriptOptions[key])};var optionsProvider={setOptions:function(optList){Object.keys(optList).forEach(function(key){this.setOption(key,optList[key])},this)},getOptions:function(a){var b={};return Object.keys(a).forEach(function(key){b[key]=this.getOption(key)},this),b},setOption:function(name,value){if(this["$"+name]!==value){var opt=this.$options[name];if(!opt)return void 0;if(opt.forwardTo)return this[opt.forwardTo]&&this[opt.forwardTo].setOption(name,value);opt.handlesSet||(this["$"+name]=value),opt&&opt.set&&opt.set.call(this,value)}},getOption:function(name){var opt=this.$options[name];return opt?opt.forwardTo?this[opt.forwardTo]&&this[opt.forwardTo].getOption(name):opt&&opt.get?opt.get.call(this):this["$"+name]:void 0}},defaultOptions={};exports.defineOptions=function(obj,path,options){return obj.$options||(defaultOptions[path]=obj.$options={}),Object.keys(options).forEach(function(key){var opt=options[key];"string"==typeof opt&&(opt={forwardTo:opt}),opt.name|
}for(idx;foldLines.length>idx;idx++){var foldLine=foldLines[idx];foldLine.start.row>=end.row&&foldLine.shiftRow(-len)}lastRow=firstRow}else{var args;if(useWrapMode){args=[firstRow,0];for(var i=0;len>i;i++)args.push([]);this.$wrapData.splice.apply(this.$wrapData,args)}else args=Array(len),args.unshift(firstRow,0),this.$rowLengthCache.splice.apply(this.$rowLengthCache,args);var foldLines=this.$foldData,foldLine=this.getFoldLine(firstRow),idx=0;if(foldLine){var cmp=foldLine.range.compareInside(start.row,start.column);0==cmp?(foldLine=foldLine.split(start.row,start.column),foldLine.shiftRow(len),foldLine.addRemoveChars(lastRow,0,end.column-start.column)):-1==cmp&&(foldLine.addRemoveChars(firstRow,0,end.column-start.column),foldLine.shiftRow(len)),idx=foldLines.indexOf(foldLine)+1}for(idx;foldLines.length>idx;idx++){var foldLine=foldLines[idx];foldLine.start.row>=firstRow&&foldLine.shiftRow(len)}}else{len=Math.abs(e.data.range.start.column-e.data.range.end.column),-1!=action.indexOf("remove")&&(removedFolds=this.getFoldsInRange(e.data.range),this.removeFolds(removedFolds),len=-len);var foldLine=this.getFoldLine(firstRow);foldLine&&foldLine.addRemoveChars(firstRow,start.column,len)}return useWrapMode&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,useWrapMode?this.$updateWrapData(firstRow,lastRow):this.$updateRowLengthCache(firstRow,lastRow),removedFolds},this.$updateRowLengthCache=function(firstRow,lastRow){this.$rowLengthCache[firstRow]=null,this.$rowLengthCache[lastRow]=null},this.$updateWrapData=function(firstRow,lastRow){var tokens,foldLine,lines=this.doc.getAllLines(),tabSize=this.getTabSize(),wrapData=this.$wrapData,wrapLimit=this.$wrapLimit,row=firstRow;for(lastRow=Math.min(lastRow,lines.length-1);lastRow>=row;)if(foldLine=this.getFoldLine(row,foldLine)){for(tokens=[],foldLine.walk(function(placeholder,row,column,lastColumn){var walkTokens;if(null!=placeholder){walkTokens=this.$getDisplayTokens(placeholder,tokens.length),walkTokens[0]=PLACEHOLDER_START;for(var i=1;walkTokens.length>i;i++)walkTokens[i]=PLACEHOLDER_BODY}else walkTokens=this.$getDisplayTokens(lines[row].substring(lastColumn,column),tokens.length);tokens=tokens.concat(walkTokens)}.bind(this),foldLine.end.row,lines[foldLine.end.row].length+1);0!=tokens.length&&tokens[tokens.length-1]>=SPACE;)tokens.pop();wrapData[foldLine.start.row]=this.$computeWrapSplits(tokens,wrapLimit,tabSize),row=foldLine.end.row+1}else tokens=this.$getDisplayTokens(lang.stringTrimRight(lines[row])),wrapData[row]=this.$computeWrapSplits(tokens,wrapLimit,tabSize),row++};var CHAR=1,CHAR_EXT=2,PLACEHOLDER_START=3,PLACEHOLDER_BODY=4,PUNCTUATION=9,SPACE=10,TAB=11,TAB_SPACE=12;this.$computeWrapSplits=function(tokens,wrapLimit){function addSplit(screenPos){var displayed=tokens.slice(lastSplit,screenPos),len=displayed.length;displayed.join("").replace(/12/g,function(){len-=1}).replace(/2/g,function(){len-=1}),lastDocSplit+=len,splits.push(lastDocSplit),lastSplit=screenPos}if(0==tokens.length)return[];for(var splits=[],displayLength=tokens.length,lastSplit=0,lastDocSplit=0;displayLength-lastSplit>wrapLimit;){var split=lastSplit+wrapLimit;if(tokens[split]>=SPACE){for(;tokens[split]>=SPACE;)split++;addSplit(split)}else if(tokens[split]!=PLACEHOLDER_START&&tokens[split]!=PLACEHOLDER_BODY){for(var minSplit=Math.max(split-10,lastSplit-1);split>minSplit&&PLACEHOLDER_START>tokens[split];)split--;for(;split>minSplit&&tokens[split]==PUNCTUATION;)split--;split>minSplit?addSplit(++split):(split=lastSplit+wrapLimit,addSplit(split))}else{for(split;split!=lastSplit-1&&tokens[split]!=PLACEHOLDER_START;split--);if(split>lastSplit){addSplit(split);continue}for(split=lastSplit+wrapLimit;tokens.length>split&&tokens[split]==PLACEHOLDER_BODY;split++);if(split==tokens.length)break;addSplit(split)}}return splits},this.$getDisplayTokens=function(str,offset){var tabSize,arr=[];offset=offset||0;for(var i=0;str.length>i;i++){var c=str.charCodeAt(i);if(9==c){tabSize=this.getScreenTabSize(arr.length+offset),arr.push(TAB);for(var n=
}}this.regExps[key]=RegExp("("+ruleRegExps.join(")|(")+")|($)",flag)}};(function(){this.$applyToken=function(str){var values=this.splitRegex.exec(str).slice(1),types=this.token.apply(this,values);if("string"==typeof types)return[{type:types,value:str}];for(var tokens=[],i=0,l=types.length;l>i;i++)values[i]&&(tokens[tokens.length]={type:types[i],value:values[i]});return tokens},this.$arrayTokens=function(str){if(!str)return[];for(var values=this.splitRegex.exec(str),tokens=[],types=this.tokenArray,i=0,l=types.length;l>i;i++)values[i+1]&&(tokens[tokens.length]={type:types[i],value:values[i+1]});return tokens},this.removeCapturingGroups=function(src){var r=src.replace(/\[(?:\\.|[^\]])*?\]|\\.|\(\?[:=!]|(\()/g,function(x,y){return y?"(?:":x});return r},this.createSplitterRegexp=function(src,flag){if(-1!=src.indexOf("(?=")){var stack=0,inChClass=!1,lastCapture={};src.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(m,esc,parenOpen,parenClose,square,index){return inChClass?inChClass="]"!=square:square?inChClass=!0:parenClose?(stack==lastCapture.stack&&(lastCapture.end=index+1,lastCapture.stack=-1),stack--):parenOpen&&(stack++,1!=parenOpen.length&&(lastCapture.stack=stack,lastCapture.start=index)),m}),null!=lastCapture.end&&/^\)*$/.test(src.substr(lastCapture.end))&&(src=src.substring(0,lastCapture.start)+src.substr(lastCapture.end))}return RegExp(src,(flag||"").replace("g",""))},this.getLineTokens=function(line,startState){if(startState&&"string"!=typeof startState){var stack=startState.slice(0);startState=stack[0]}else var stack=[];var currentState=startState||"start",state=this.states[currentState],mapping=this.matchMappings[currentState],re=this.regExps[currentState];re.lastIndex=0;for(var match,tokens=[],lastIndex=0,token={type:null,value:""};match=re.exec(line);){var type=mapping.defaultToken,rule=null,value=match[0],index=re.lastIndex;if(index-value.length>lastIndex){var skipped=line.substring(lastIndex,index-value.length);token.type==type?token.value+=skipped:(token.type&&tokens.push(token),token={type:type,value:skipped})}for(var i=0;match.length-2>i;i++)if(void 0!==match[i+1]){rule=state[mapping[i]],type=rule.onMatch?rule.onMatch(value,currentState,stack):rule.token,rule.next&&(currentState="string"==typeof rule.next?rule.next:rule.next(currentState,stack),state=this.states[currentState],state||(window.console&&console.error&&console.error(currentState,"doesn't exist"),currentState="start",state=this.states[currentState]),mapping=this.matchMappings[currentState],lastIndex=index,re=this.regExps[currentState],re.lastIndex=index);break}if(value)if("string"==typeof type)rule&&rule.merge===!1||token.type!==type?(token.type&&tokens.push(token),token={type:type,value:value}):token.value+=value;else if(type){token.type&&tokens.push(token),token={type:null,value:""};for(var i=0;type.length>i;i++)tokens.push(type[i])}if(lastIndex==line.length)break;if(lastIndex=index,tokens.length>MAX_TOKEN_COUNT){token.value+=line.substr(lastIndex),currentState="start";break}}return token.type&&tokens.push(token),{tokens:tokens,state:stack.length?stack:currentState}}}).call(Tokenizer.prototype),exports.Tokenizer=Tokenizer}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],function(acequire,exports){var lang=acequire("../lib/lang"),TextHighlightRules=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(rules,prefix){for(var key in rules){for(var state=rules[key],i=0;state.length>i;i++){var rule=state[i];rule.next&&(rule.next=prefix+rule.next)}this.$rules[prefix+key]=state}},this.getRules=function(){return this.$rules},this.embedRules=function(HighlightRules,prefix,escapeRules,states,append){var embedRules=(new HighlightRules).getRules();if(states)for(var i=0;states.length>i;i++)states[i]=prefix+states[i];else{states=[];for(var key in embedRules)states.push(prefix+key)}if(this.addRules(embedRules,prefix),escapeRules)for(var addRules=Array.prototype[append?"push":"unshift"],i=0;states.length>i;i++)addRules.apply(this.$rules[states
}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"],function(acequire,exports){var oop=acequire("./lib/oop"),EventEmitter=acequire("./lib/event_emitter").EventEmitter,Range=acequire("./range").Range,Anchor=acequire("./anchor").Anchor,Document=function(text){this.$lines=[],0==text.length?this.$lines=[""]:Array.isArray(text)?this.insertLines(0,text):this.insert({row:0,column:0},text)};(function(){oop.implement(this,EventEmitter),this.setValue=function(text){var len=this.getLength();this.remove(new Range(0,0,len,this.getLine(len-1).length)),this.insert({row:0,column:0},text)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(row,column){return new Anchor(this,row,column)},this.$split=0=="aaa".split(/a/).length?function(text){return text.replace(/\r\n|\r/g,"\n").split("\n")}:function(text){return text.split(/\r\n|\r|\n/)},this.$detectNewLine=function(text){var match=text.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=match?match[1]:"\n"},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine}},this.$autoNewLine="\n",this.$newLineMode="auto",this.setNewLineMode=function(newLineMode){this.$newLineMode!==newLineMode&&(this.$newLineMode=newLineMode)},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(text){return"\r\n"==text||"\r"==text||"\n"==text},this.getLine=function(row){return this.$lines[row]||""},this.getLines=function(firstRow,lastRow){return this.$lines.slice(firstRow,lastRow+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(range){if(range.start.row==range.end.row)return this.$lines[range.start.row].substring(range.start.column,range.end.column);var lines=this.getLines(range.start.row+1,range.end.row-1);return lines.unshift((this.$lines[range.start.row]||"").substring(range.start.column)),lines.push((this.$lines[range.end.row]||"").substring(0,range.end.column)),lines.join(this.getNewLineCharacter())},this.$clipPosition=function(position){var length=this.getLength();return position.row>=length?(position.row=Math.max(0,length-1),position.column=this.getLine(length-1).length):0>position.row&&(position.row=0),position},this.insert=function(position,text){if(!text||0===text.length)return position;position=this.$clipPosition(position),1>=this.getLength()&&this.$detectNewLine(text);var lines=this.$split(text),firstLine=lines.splice(0,1)[0],lastLine=0==lines.length?null:lines.splice(lines.length-1,1)[0];return position=this.insertInLine(position,firstLine),null!==lastLine&&(position=this.insertNewLine(position),position=this.insertLines(position.row,lines),position=this.insertInLine(position,lastLine||"")),position},this.insertLines=function(row,lines){if(0==lines.length)return{row:row,column:0};if(lines.length>65535){var end=this.insertLines(row,lines.slice(65535));lines=lines.slice(0,65535)}var args=[row,0];args.push.apply(args,lines),this.$lines.splice.apply(this.$lines,args);var range=new Range(row,0,row+lines.length,0),delta={action:"insertLines",range:range,lines:lines};return this._emit("change",{data:delta}),end||range.end},this.insertNewLine=function(position){position=this.$clipPosition(position);var line=this.$lines[position.row]||"";this.$lines[position.row]=line.substring(0,position.column),this.$lines.splice(position.row+1,0,line.substring(position.column,line.length));var end={row:position.row+1,column:0},delta={action:"insertText",range:Range.fromPoints(position,end),text:this.getNewLineCharacter()};return this._emit("change",{data:delta}),end},this.insertInLine=function(position,text){if(0==text.length)return position;var line=this.$lines[position.row]||"";this.$lines[position.row]=line.substring(0,position.column)+text+line.substring(position.column);var end={row:position.row,column:position.column+text.length},delta={action:"insertText",range:Range.fromPoint
},this.setFoldLine=function(foldLine){this.foldLine=foldLine,this.subFolds.forEach(function(fold){fold.setFoldLine(foldLine)})},this.clone=function(){var range=this.range.clone(),fold=new Fold(range,this.placeholder);return this.subFolds.forEach(function(subFold){fold.subFolds.push(subFold.clone())}),fold.collapseChildren=this.collapseChildren,fold},this.addSubFold=function(fold){if(!this.range.isEqual(fold)){if(!this.range.containsRange(fold))throw"A fold can't intersect already existing fold"+fold.range+this.range;consumeRange(fold,this.start);for(var row=fold.start.row,column=fold.start.column,i=0,cmp=-1;this.subFolds.length>i&&(cmp=this.subFolds[i].range.compare(row,column),1==cmp);i++);var afterStart=this.subFolds[i];if(0==cmp)return afterStart.addSubFold(fold);for(var row=fold.range.end.row,column=fold.range.end.column,j=i,cmp=-1;this.subFolds.length>j&&(cmp=this.subFolds[j].range.compare(row,column),1==cmp);j++);if(this.subFolds[j],0==cmp)throw"A fold can't intersect already existing fold"+fold.range+this.range;return this.subFolds.splice(i,j-i,fold),fold.setFoldLine(this.foldLine),fold}},this.restoreRange=function(range){return restoreRange(range,this.start)}}.call(Fold.prototype)}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(acequire,exports){var Range=acequire("./range").Range,comparePoints=Range.comparePoints,RangeList=function(){this.ranges=[]};(function(){this.comparePoints=comparePoints,this.pointIndex=function(pos,excludeEdges,startIndex){for(var list=this.ranges,i=startIndex||0;list.length>i;i++){var range=list[i],cmpEnd=comparePoints(pos,range.end);if(!(cmpEnd>0)){var cmpStart=comparePoints(pos,range.start);return 0===cmpEnd?excludeEdges&&0!==cmpStart?-i-2:i:cmpStart>0||0===cmpStart&&!excludeEdges?i:-i-1}}return-i-1},this.add=function(range){var excludeEdges=!range.isEmpty(),startIndex=this.pointIndex(range.start,excludeEdges);0>startIndex&&(startIndex=-startIndex-1);var endIndex=this.pointIndex(range.end,excludeEdges,startIndex);return 0>endIndex?endIndex=-endIndex-1:endIndex++,this.ranges.splice(startIndex,endIndex-startIndex,range)},this.addList=function(list){for(var removed=[],i=list.length;i--;)removed.push.call(removed,this.add(list[i]));return removed},this.substractPoint=function(pos){var i=this.pointIndex(pos);return i>=0?this.ranges.splice(i,1):void 0},this.merge=function(){var removed=[],list=this.ranges;list=list.sort(function(a,b){return comparePoints(a.start,b.start)});for(var range,next=list[0],i=1;list.length>i;i++){range=next,next=list[i];var cmp=comparePoints(range.end,next.start);0>cmp||(0!=cmp||range.isEmpty()||next.isEmpty())&&(0>comparePoints(range.end,next.end)&&(range.end.row=next.end.row,range.end.column=next.end.column),list.splice(i,1),removed.push(next),next=range,i--)}return this.ranges=list,removed},this.contains=function(row,column){return this.pointIndex({row:row,column:column})>=0},this.containsPoint=function(pos){return this.pointIndex(pos)>=0},this.rangeAtPoint=function(pos){var i=this.pointIndex(pos);return i>=0?this.ranges[i]:void 0},this.clipRows=function(startRow,endRow){var list=this.ranges;if(list[0].start.row>endRow||startRow>list[list.length-1].start.row)return[];var startIndex=this.pointIndex({row:startRow,column:0});0>startIndex&&(startIndex=-startIndex-1);var endIndex=this.pointIndex({row:endRow,column:0},startIndex);0>endIndex&&(endIndex=-endIndex-1);for(var clipped=[],i=startIndex;endIndex>i;i++)clipped.push(list[i]);return clipped},this.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},this.attach=function(session){this.session&&this.detach(),this.session=session,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},this.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},this.$onChange=function(e){var changeRange=e.data.range;if("i"==e.data.action[0])var start=changeRange.start,end=changeRange.end;else var end=changeRange.start,start=changeRange.end;for(var startRow=start.row,endRow=end.row,lineDif=endRow-startRow,colDi
dom.importCssString(editorCss,"ace_editor");var VirtualRenderer=function(container,theme){var _self=this;this.container=container||dom.createElement("div"),this.$keepTextAreaAtCursor=!useragent.isIE,dom.addCssClass(this.container,"ace_editor"),this.setTheme(theme),this.$gutter=dom.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.scroller=dom.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=dom.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new GutterLayer(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new MarkerLayer(this.content);var textLayer=this.$textLayer=new TextLayer(this.content);this.canvas=textLayer.element,this.$markerFront=new MarkerLayer(this.content),this.$cursorLayer=new CursorLayer(this.content),this.$horizScroll=!1,this.scrollBar=new ScrollBar(this.container),this.scrollBar.addEventListener("scroll",function(e){_self.$inScrollAnimation||_self.session.setScrollTop(e.data)}),this.scrollTop=0,this.scrollLeft=0,event.addListener(this.scroller,"scroll",function(){var scrollLeft=_self.scroller.scrollLeft;_self.scrollLeft=scrollLeft,_self.session.setScrollLeft(scrollLeft)}),this.cursorPos={row:0,column:0},this.$textLayer.addEventListener("changeCharacterSize",function(){_self.updateCharacterSize(),_self.onResize(!0)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:1,characterWidth:1,minHeight:1,maxHeight:1,offset:0,height:1},this.$loop=new RenderLoop(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),config.resetOptions(this),config._emit("renderer",this)};(function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,oop.implement(this,EventEmitter),this.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.characterWidth=this.$textLayer.getCharacterWidth(),this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin()},this.setSession=function(session){this.session=session,this.scroller.className="ace_scroller",this.$cursorLayer.setSession(session),this.$markerBack.setSession(session),this.$markerFront.setSession(session),this.$gutterLayer.setSession(session),this.$textLayer.setSession(session),this.$loop.schedule(this.CHANGE_FULL)},this.updateLines=function(firstRow,lastRow){void 0===lastRow&&(lastRow=1/0),this.$changedLines?(this.$changedLines.firstRow>firstRow&&(this.$changedLines.firstRow=firstRow),lastRow>this.$changedLines.lastRow&&(this.$changedLines.lastRow=lastRow)):this.$changedLines={firstRow:firstRow,lastRow:lastRow},this.$changedLines.firstRow>this.layerConfig.lastRow||this.$changedLines.lastRow<this.layerConfig.firstRow||this.$loop.schedule(this.CHANGE_LINES)},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(force){force?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.onResize=function(force,gutterWidth,width,height){var changes=0,size=this.$size;if(!(this.resizing>2)){if(this.resizing>1?this.resizing++:this.resizing=force?1:0,height||(height=dom.getInnerHeight(this.container)),height&&(force||size.height!=height)&&(size.height=height,changes=this.CHANGE_SIZE,size.scrollerHeight=this.scroller.clientHeight,size.scrollerHeight||(size.scroller
},this.drawFullLineMarker=function(stringBuilder,range,clazz,config){var top=this.$getTop(range.start.row,config),height=config.lineHeight;range.start.row!=range.end.row&&(height+=this.$getTop(range.end.row,config)-top),stringBuilder.push("<div class='",clazz,"' style='","height:",height,"px;","top:",top,"px;","left:0;right:0;'></div>")},this.drawScreenLineMarker=function(stringBuilder,range,clazz,config){var top=this.$getTop(range.start.row,config),height=config.lineHeight;stringBuilder.push("<div class='",clazz,"' style='","height:",height,"px;","top:",top,"px;","left:0;right:0;'></div>")}}).call(Marker.prototype),exports.Marker=Marker}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(acequire,exports){var oop=acequire("../lib/oop"),dom=acequire("../lib/dom"),lang=acequire("../lib/lang"),useragent=acequire("../lib/useragent"),EventEmitter=acequire("../lib/event_emitter").EventEmitter,Text=function(parentEl){this.element=dom.createElement("div"),this.element.className="ace_layer ace_text-layer",parentEl.appendChild(this.element),this.$characterSize={width:0,height:0},this.checkForSizeChanges(),this.$pollSizeChanges()};(function(){oop.implement(this,EventEmitter),this.EOF_CHAR="¶",this.EOL_CHAR="¬",this.TAB_CHAR="→",this.SPACE_CHAR="·",this.$padding=0,this.setPadding=function(padding){this.$padding=padding,this.element.style.padding="0 "+padding+"px"},this.getLineHeight=function(){return this.$characterSize.height||1},this.getCharacterWidth=function(){return this.$characterSize.width||1},this.checkForSizeChanges=function(){var size=this.$measureSizes();if(size&&(this.$characterSize.width!==size.width||this.$characterSize.height!==size.height)){this.$measureNode.style.fontWeight="bold";var boldSize=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=size,this.allowBoldFonts=boldSize&&boldSize.width===size.width&&boldSize.height===size.height,this._emit("changeCharacterSize",{data:size})}},this.$pollSizeChanges=function(){var self=this;this.$pollSizeChangesTimer=setInterval(function(){self.checkForSizeChanges()},500)},this.$fontStyles={fontFamily:1,fontSize:1,fontWeight:1,fontStyle:1,lineHeight:1},this.$measureSizes=useragent.isIE||useragent.isOldGecko?function(){var n=1e3;if(!this.$measureNode){var measureNode=this.$measureNode=dom.createElement("div"),style=measureNode.style;if(style.width=style.height="auto",style.left=style.top=40*-n+"px",style.visibility="hidden",style.position="fixed",style.overflow="visible",style.whiteSpace="nowrap",measureNode.innerHTML=lang.stringRepeat("Xy",n),this.element.ownerDocument.body)this.element.ownerDocument.body.appendChild(measureNode);else{for(var container=this.element.parentNode;!dom.hasCssClass(container,"ace_editor");)container=container.parentNode;container.appendChild(measureNode)}}if(!this.element.offsetWidth)return null;var style=this.$measureNode.style,computedStyle=dom.computedStyle(this.element);for(var prop in this.$fontStyles)style[prop]=computedStyle[prop];var size={height:this.$measureNode.offsetHeight,width:this.$measureNode.offsetWidth/(2*n)};return 0==size.width||0==size.height?null:size}:function(){if(!this.$measureNode){var measureNode=this.$measureNode=dom.createElement("div"),style=measureNode.style;style.width=style.height="auto",style.left=style.top="-100px",style.visibility="hidden",style.position="fixed",style.overflow="visible",style.whiteSpace="nowrap",measureNode.innerHTML="X";for(var container=this.element.parentNode;container&&!dom.hasCssClass(container,"ace_editor");)container=container.parentNode;if(!container)return this.$measureNode=null;container.appendChild(measureNode)}var rect=this.$measureNode.getBoundingClientRect(),size={height:rect.height,width:rect.width};return 0==size.width||0==size.height?null:size},this.setSession=function(session){this.session=session,this.$computeTabString()},this.showInvisibles=!1,this.setShowInvisibles=function(showInvisibles){return this.showInvisibles==showInvisibles?!1:(this
}if(newRange.desiredColumn=screenLead.column,this.selection.inMultiSelectMode){if(skip)var toRemove=range.cursor}else this.selection.addRange(range);this.selection.addRange(newRange),toRemove&&this.selection.substractPoint(toRemove)},this.transposeSelections=function(dir){for(var session=this.session,sel=session.multiSelect,all=sel.ranges,i=all.length;i--;){var range=all[i];if(range.isEmpty()){var tmp=session.getWordRange(range.start.row,range.start.column);range.start.row=tmp.start.row,range.start.column=tmp.start.column,range.end.row=tmp.end.row,range.end.column=tmp.end.column}}sel.mergeOverlappingRanges();for(var words=[],i=all.length;i--;){var range=all[i];words.unshift(session.getTextRange(range))}0>dir?words.unshift(words.pop()):words.push(words.shift());for(var i=all.length;i--;){var range=all[i],tmp=range.clone();session.replace(range,words[i]),range.start.row=tmp.start.row,range.start.column=tmp.start.column}},this.selectMore=function(dir,skip){var session=this.session,sel=session.multiSelect,range=sel.toOrientedRange();if(range.isEmpty()){var range=session.getWordRange(range.start.row,range.start.column);range.cursor=range.end,this.multiSelect.addRange(range)}var needle=session.getTextRange(range),newRange=find(session,needle,dir);newRange&&(newRange.cursor=-1==dir?newRange.start:newRange.end,this.multiSelect.addRange(newRange)),skip&&this.multiSelect.substractPoint(range.cursor)},this.alignCursors=function(){var session=this.session,sel=session.multiSelect,ranges=sel.ranges;if(ranges.length){var row=-1,sameRowRanges=ranges.filter(function(r){return r.cursor.row==row?!0:(row=r.cursor.row,void 0)});sel.$onRemoveRange(sameRowRanges);var maxCol=0,minSpace=1/0,spaceOffsets=ranges.map(function(r){var p=r.cursor,line=session.getLine(p.row),spaceOffset=line.substr(p.column).search(/\S/g);return-1==spaceOffset&&(spaceOffset=0),p.column>maxCol&&(maxCol=p.column),minSpace>spaceOffset&&(minSpace=spaceOffset),spaceOffset});ranges.forEach(function(r,i){var p=r.cursor,l=maxCol-p.column,d=spaceOffsets[i]-minSpace;l>d?session.insert(p,lang.stringRepeat(" ",l-d)):session.remove(new Range(p.row,p.column,p.row,p.column-l+d)),r.start.column=r.end.column=maxCol,r.start.row=r.end.row=p.row,r.cursor=r.end}),sel.fromOrientedRange(ranges[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var range=this.selection.getRange(),fr=range.start.row,lr=range.end.row,lines=this.session.doc.removeLines(fr,lr);lines=this.$reAlignText(lines),this.session.doc.insertLines(fr,lines),range.start.column=0,range.end.column=lines[lines.length-1].length,this.selection.setRange(range)}},this.$reAlignText=function(lines){function spaces(n){return lang.stringRepeat(" ",n)}function alignLeft(m){return m[2]?spaces(startW)+m[2]+spaces(textW-m[2].length+endW)+m[4].replace(/^([=:])\s+/,"$1 "):m[0]}function alignRight(m){return m[2]?spaces(startW+textW-m[2].length)+m[2]+spaces(endW," ")+m[4].replace(/^([=:])\s+/,"$1 "):m[0]}function unAlign(m){return m[2]?spaces(startW)+m[2]+spaces(endW)+m[4].replace(/^([=:])\s+/,"$1 "):m[0]}var startW,textW,endW,isLeftAligned=!0,isRightAligned=!0;return lines.map(function(line){var m=line.match(/(\s*)(.*?)(\s*)([=:].*)/);return m?null==startW?(startW=m[1].length,textW=m[2].length,endW=m[3].length,m):(startW+textW+endW!=m[1].length+m[2].length+m[3].length&&(isRightAligned=!1),startW!=m[1].length&&(isLeftAligned=!1),startW>m[1].length&&(startW=m[1].length),m[2].length>textW&&(textW=m[2].length),endW>m[3].length&&(endW=m[3].length),m):[line]}).map(isLeftAligned?isRightAligned?alignRight:alignLeft:unAlign)}}).call(Editor.prototype),exports.onSessionChange=function(e){var session=e.session;session.multiSelect||(session.$selectionMarkers=[],session.selection.$initRangeList(),session.multiSelect=session.selection),this.multiSelect=session.multiSelect;var oldSession=e.oldSession;oldSession&&(oldSession.multiSelect.removeEventListener("addRange",this.$onAddRange),oldSession.multiSelect.removeEventListener("removeRange",this.$onRemoveRange),oldSession.multiSelect.removeEventListener("multiSelect",this.$onMultiSelect),
for(width=this.cols,y=start;end>=y;y++){if(row=y+this.ydisp,line=this.lines[row],!line)return this.reset();for(out="",x=y===this.y&&this.cursorState&&this.ydisp===this.ybase&&!this.cursorHidden?this.x:-1,attr=this.defAttr,i=0;width>i;i++){switch(data=line[i][0],ch=line[i][1],i===x&&(data=-1),data!==attr&&(attr!==this.defAttr&&(out+="</span>"),data!==this.defAttr&&(-1===data?out+='<span class="reverse-video">':(out+='<span style="',bgColor=511&data,fgColor=511&data>>9,flags=data>>18,1&flags&&(Terminal.brokenBold||(out+="font-weight:bold;"),8>fgColor&&(fgColor+=8)),2&flags&&(out+="text-decoration:underline;"),256!==bgColor&&(out+="background-color:"+Terminal.colors[bgColor]+";"),257!==fgColor&&(out+="color:"+Terminal.colors[fgColor]+";"),out+='">'))),ch){case"&":out+="&";break;case"<":out+="<";break;case">":out+=">";break;default:out+=" ">=ch?" ":ch}attr=data}attr!==this.defAttr&&(out+="</span>"),this.children[y].innerHTML=out}parent&&parent.appendChild(this.element)}}},{}],43:[function(require,module){"use strict";module.exports=function(Terminal){Terminal.prototype.setgLevel=function(g){this.glevel=g,this.charset=this.charsets[g]}}},{}],44:[function(require,module){"use strict";module.exports=function(Terminal){Terminal.prototype.setgCharset=function(g,charset){this.charsets[g]=charset,this.glevel===g&&(this.charset=charset)}}},{}],45:[function(require,module){"use strict";module.exports=function(Terminal){Terminal.prototype.log=function(){if(Terminal.debug&&window.console&&window.console.log){var args=Array.prototype.slice.call(arguments);window.console.log.apply(window.console,args)}},Terminal.prototype.error=function(){if(Terminal.debug&&window.console&&window.console.error){var args=Array.prototype.slice.call(arguments);window.console.error.apply(window.console,args)}}}},{}],47:[function(require,module){"use strict";module.exports=function(Terminal){Terminal.prototype.eraseRight=function(x,y){for(var line=this.lines[this.ybase+y],ch=[this.curAttr," "];this.cols>x;x++)line[x]=ch;this.updateRange(y)},Terminal.prototype.eraseLeft=function(x,y){var line=this.lines[this.ybase+y],ch=[this.curAttr," "];for(x++;x--;)line[x]=ch;this.updateRange(y)},Terminal.prototype.eraseLine=function(y){this.eraseRight(0,y)},Terminal.prototype.eraseInDisplay=function(params){var j;switch(params[0]){case 0:for(this.eraseRight(this.x,this.y),j=this.y+1;this.rows>j;j++)this.eraseLine(j);break;case 1:for(this.eraseLeft(this.x,this.y),j=this.y;j--;)this.eraseLine(j);break;case 2:for(j=this.rows;j--;)this.eraseLine(j);break;case 3:}},Terminal.prototype.eraseInLine=function(params){switch(params[0]){case 0:this.eraseRight(this.x,this.y);break;case 1:this.eraseLeft(this.x,this.y);break;case 2:this.eraseLine(this.y)}}}},{}],46:[function(require,module){"use strict";module.exports=function(Terminal){Terminal.prototype.setupStops=function(i){for(null!=i?this.tabs[i]||(i=this.prevStop(i)):(this.tabs={},i=0);this.cols>i;i+=8)this.tabs[i]=!0},Terminal.prototype.prevStop=function(x){for(null==x&&(x=this.x);!this.tabs[--x]&&x>0;);return x>=this.cols?this.cols-1:0>x?0:x},Terminal.prototype.nextStop=function(x){for(null==x&&(x=this.x);!this.tabs[++x]&&this.cols>x;);return x>=this.cols?this.cols-1:0>x?0:x}}},{}],48:[function(require,module){"use strict";module.exports=function(Terminal){Terminal.prototype.blankLine=function(cur){for(var attr=cur?this.curAttr:this.defAttr,ch=[attr," "],line=[],i=0;this.cols>i;i++)line[i]=ch;return line}}},{}],49:[function(require,module){"use strict";module.exports=function(Terminal){Terminal.prototype.updateRange=function(y){this.refreshStart>y&&(this.refreshStart=y),y>this.refreshEnd&&(this.refreshEnd=y)},Terminal.prototype.maxRange=function(){this.refreshStart=0,this.refreshEnd=this.rows-1}}},{}],50:[function(require,module){"use strict";module.exports=function(Terminal){Terminal.prototype.ch=function(cur){return cur?[this.curAttr," "]:[this.defAttr," "]},Terminal.prototype.is=function(term){var name=this.termName||Terminal.termName;return 0===(name+"").indexOf(term)}}},{}],51:[function(require,module){"use strict";module.
})}function changed(ctx,prevCtx,prevKeys){return prevKeys.filter(function(k){return!deepIs(prevCtx[k],ctx[k])})}function keyValues(keys,ctx,prevCtx){return keys.map(function(k){return{key:k,value:ctx[k],prevValue:prevCtx?prevCtx[k]:void 0}})}function cleaned(ctx,add){var cleanedCtx=removeProblematic(ctx);return Object.keys(add).forEach(function(k){cleanedCtx[k]=add[k]}),cleanedCtx}function evalSnippet(ctx,snippet,isStrict,allTrackedKeyValues){browser&&(ctx=cleaned(ctx,allTrackedKeyValues));var result,prevCtx=clone(ctx),prevKeys=Object.keys(prevCtx),code=snippet.code;try{isStrict&&!useStrictRx.test(code)&&parse('"use strict";'+snippet.code),result=runner.runInCtx(code,ctx)}catch(e){ctx[ErrorIndicator]=""+e}browser&&(ctx=cleaned(ctx,{}));var crntCtx=clone(ctx),keys=Object.keys(crntCtx),addedValues=added(prevKeys,keys);browser&&(addedValues=removeIFrameGenerated(addedValues));var addedKeyValues=keyValues(addedValues,crntCtx),changedValues=changed(crntCtx,prevCtx,prevKeys),changedKeyValues=keyValues(changedValues,crntCtx,prevCtx);snippet.evaluated={result:result,ctx:prevCtx,added:clone(addedKeyValues),changed:clone(changedKeyValues)},browser&&(addedKeyValues.concat(changedKeyValues).forEach(function(x){allTrackedKeyValues[x.key]=x.value}),delete allTrackedKeyValues[ErrorIndicator]),delete ctx[ErrorIndicator]}var browser=process.browser,clone=(require("vm"),require("clone")),deepIs=require("deep-is"),runner=require("./runner-vm"),colors=require("ansicolors"),parse=require("esprima").parse,removeIFrameGenerated=require("./remove-iframe-generated"),removeProblematic=require("./remove-problematic"),createSandbox=require("./create-sandbox"),ErrorIndicator=colors.red("!"),useStrictRx=/^ *['"]use strict['"]/;module.exports=function(snippets,fullSrcPath){var fndecs,sandbox=createSandbox(fullSrcPath),ctx=runner.createCtx(sandbox),allTrackedKeyValues={},nonEmptySnippets=snippets.filter(function(snippet){return snippet.code.length}),isStrict=nonEmptySnippets.some(function(snippet){return useStrictRx.test(snippet.raw)});return browser||(fndecs=nonEmptySnippets.filter(function(snippet,idx){return isFunctionDeclaration(snippet)?(nonEmptySnippets.splice(idx,1),!0):!1}),fndecs.forEach(function(snippet){evalSnippet(ctx,snippet,isStrict,allTrackedKeyValues)})),nonEmptySnippets.forEach(function(snippet){evalSnippet(ctx,snippet,isStrict,allTrackedKeyValues)}),ctx}})(require("__browserify_process"))},{vm:31,"./runner-vm":59,"./remove-iframe-generated":60,"./remove-problematic":61,"./create-sandbox":66,clone:67,ansicolors:68,"deep-is":69,esprima:70,__browserify_process:16}],66:[function(require,module){(function(process,global){"use strict";function cleanProcess(process){var exclude={stdout:!0,stderr:!0,stdin:!0,mainModule:!0};return removeProblematic(process,exclude)}var browser=process.browser,requireLikeName="require-like",requireLike=browser?function(){}:require(requireLikeName),path=require("path"),removeProblematic=require("./remove-problematic");module.exports=function(fullSrcPath){var exports={},sandbox={console:global.console,module:{exports:exports,parent:null},exports:exports,process:cleanProcess(process)},serverside={require:requireLike(fullSrcPath),__filename:fullSrcPath,__dirname:path.dirname(fullSrcPath),Buffer:require("buffer").Buffer,ArrayBuffer:global.ArrayBuffer,Int8Array:global.Int8Array,Uint8Array:global.Uint8Array,Uint8ClampedArray:global.Uint8ClampedArray,Int16Array:global.Int16Array,Uint16Array:global.Uint16Array,Int32Array:global.Int32Array,Uint32Array:global.Uint32Array,Float32Array:global.Float32Array,Float64Array:global.Float64Array,DataView:global.DataView};return browser||Object.keys(serverside).forEach(function(k){sandbox[k]=serverside[k]}),sandbox}})(require("__browserify_process"),window)},{path:65,buffer:71,"./remove-problematic":61,__browserify_process:16}],27:[function(require,module){"use strict";function formatAdd(key,value,diffopts){return format("%s %s: %s",colors.brightGreen("+"),key,diffValues({},value,diffopts))}function formatChange(key,prevValue,value,diffopts){return format("%s %s: %s",colors.brigh
}function parseMultiplicativeExpression(){for(var expr=parseUnaryExpression();match("*")||match("/")||match("%");)expr={type:Syntax.BinaryExpression,operator:lex().value,left:expr,right:parseUnaryExpression()};return expr}function parseAdditiveExpression(){for(var expr=parseMultiplicativeExpression();match("+")||match("-");)expr={type:Syntax.BinaryExpression,operator:lex().value,left:expr,right:parseMultiplicativeExpression()};return expr}function parseShiftExpression(){for(var expr=parseAdditiveExpression();match("<<")||match(">>")||match(">>>");)expr={type:Syntax.BinaryExpression,operator:lex().value,left:expr,right:parseAdditiveExpression()};return expr}function parseRelationalExpression(){var expr,previousAllowIn;for(previousAllowIn=state.allowIn,state.allowIn=!0,expr=parseShiftExpression();match("<")||match(">")||match("<=")||match(">=")||previousAllowIn&&matchKeyword("in")||matchKeyword("instanceof");)expr={type:Syntax.BinaryExpression,operator:lex().value,left:expr,right:parseShiftExpression()};return state.allowIn=previousAllowIn,expr}function parseEqualityExpression(){for(var expr=parseRelationalExpression();match("==")||match("!=")||match("===")||match("!==");)expr={type:Syntax.BinaryExpression,operator:lex().value,left:expr,right:parseRelationalExpression()};return expr}function parseBitwiseANDExpression(){for(var expr=parseEqualityExpression();match("&");)lex(),expr={type:Syntax.BinaryExpression,operator:"&",left:expr,right:parseEqualityExpression()};return expr}function parseBitwiseXORExpression(){for(var expr=parseBitwiseANDExpression();match("^");)lex(),expr={type:Syntax.BinaryExpression,operator:"^",left:expr,right:parseBitwiseANDExpression()};return expr}function parseBitwiseORExpression(){for(var expr=parseBitwiseXORExpression();match("|");)lex(),expr={type:Syntax.BinaryExpression,operator:"|",left:expr,right:parseBitwiseXORExpression()};return expr}function parseLogicalANDExpression(){for(var expr=parseBitwiseORExpression();match("&&");)lex(),expr={type:Syntax.LogicalExpression,operator:"&&",left:expr,right:parseBitwiseORExpression()};return expr}function parseLogicalORExpression(){for(var expr=parseLogicalANDExpression();match("||");)lex(),expr={type:Syntax.LogicalExpression,operator:"||",left:expr,right:parseLogicalANDExpression()};return expr}function parseConditionalExpression(){var expr,previousAllowIn,consequent;return expr=parseLogicalORExpression(),match("?")&&(lex(),previousAllowIn=state.allowIn,state.allowIn=!0,consequent=parseAssignmentExpression(),state.allowIn=previousAllowIn,expect(":"),expr={type:Syntax.ConditionalExpression,test:expr,consequent:consequent,alternate:parseAssignmentExpression()}),expr}function parseAssignmentExpression(){var token,expr;return token=lookahead(),expr=parseConditionalExpression(),matchAssign()&&(isLeftHandSide(expr)||throwError({},Messages.InvalidLHSInAssignment),strict&&expr.type===Syntax.Identifier&&isRestrictedWord(expr.name)&&throwErrorTolerant(token,Messages.StrictLHSAssignment),expr={type:Syntax.AssignmentExpression,operator:lex().value,left:expr,right:parseAssignmentExpression()}),expr}function parseExpression(){var expr=parseAssignmentExpression();if(match(","))for(expr={type:Syntax.SequenceExpression,expressions:[expr]};length>index&&match(",");)lex(),expr.expressions.push(parseAssignmentExpression());return expr}function parseStatementList(){for(var statement,list=[];length>index&&!match("}")&&(statement=parseSourceElement(),void 0!==statement);)list.push(statement);return list}function parseBlock(){var block;return expect("{"),block=parseStatementList(),expect("}"),{type:Syntax.BlockStatement,body:block}}function parseVariableIdentifier(){var token=lex();return token.type!==Token.Identifier&&throwUnexpected(token),{type:Syntax.Identifier,name:token.value}}function parseVariableDeclaration(kind){var id=parseVariableIdentifier(),init=null;return strict&&isRestrictedWord(id.name)&&throwErrorTolerant({},Messages.StrictVarName),"const"===kind?(expect("="),init=parseAssignmentExpression()):match("=")&&(lex(),init=parseAssignmentExpression()),{type:Synt
toString=String,"string"==typeof code||code instanceof String||(code=toString(code)),source=code,index=0,lineNumber=source.length>0?1:0,lineStart=0,length=source.length,buffer=null,state={allowIn:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1},extra={},options!==void 0&&(extra.range="boolean"==typeof options.range&&options.range,extra.loc="boolean"==typeof options.loc&&options.loc,extra.raw="boolean"==typeof options.raw&&options.raw,"boolean"==typeof options.tokens&&options.tokens&&(extra.tokens=[]),"boolean"==typeof options.comment&&options.comment&&(extra.comments=[]),"boolean"==typeof options.tolerant&&options.tolerant&&(extra.errors=[])),length>0&&source[0]===void 0&&(code instanceof String&&(source=code.valueOf()),source[0]===void 0&&(source=stringToArray(code))),patch();try{program=parseProgram(),extra.comments!==void 0&&(filterCommentLocation(),program.comments=extra.comments),extra.tokens!==void 0&&(filterTokenLocation(),program.tokens=extra.tokens),extra.errors!==void 0&&(program.errors=extra.errors),(extra.range||extra.loc)&&(program.body=filterGroup(program.body))}catch(e){throw e}finally{unpatch(),extra={}}return program}var Token,TokenName,Syntax,PropertyKind,Messages,Regex,source,strict,index,lineNumber,lineStart,length,buffer,state,extra;Token={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8},TokenName={},TokenName[Token.BooleanLiteral]="Boolean",TokenName[Token.EOF]="<end>",TokenName[Token.Identifier]="Identifier",TokenName[Token.Keyword]="Keyword",TokenName[Token.NullLiteral]="Null",TokenName[Token.NumericLiteral]="Numeric",TokenName[Token.Punctuator]="Punctuator",TokenName[Token.StringLiteral]="String",Syntax={AssignmentExpression:"AssignmentExpression",ArrayExpression:"ArrayExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",Program:"Program",Property:"Property",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement"},PropertyKind={Data:1,Get:2,Set:4},Messages={UnexpectedToken:"Unexpected token %0",UnexpectedNumber:"Unexpected number",UnexpectedString:"Unexpected string",UnexpectedIdentifier:"Unexpected identifier",UnexpectedReserved:"Unexpected reserved word",UnexpectedEOS:"Unexpected end of input",NewlineAfterThrow:"Illegal newline after throw",InvalidRegExp:"Invalid regular expression",UnterminatedRegExp:"Invalid regular expression: missing /",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NoCatchOrFinally:"Missing catch or finally after try",UnknownLabel:"Undefined label '%0'",Redeclaration:"%0 '%1' has already been declared",IllegalContinue:"Illegal continue statement",IllegalBreak:"Illegal break statement",IllegalReturn:"Illegal return statement",StrictModeWith:"Strict mode code may not include a with statement",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mo
case"utf8":case"utf-8":ret=this.parent.utf8Write(string,this.offset+offset,length);break;case"ascii":ret=this.parent.asciiWrite(string,this.offset+offset,length);break;case"binary":ret=this.parent.binaryWrite(string,this.offset+offset,length);break;case"base64":ret=this.parent.base64Write(string,this.offset+offset,length);break;case"ucs2":case"ucs-2":ret=this.parent.ucs2Write(string,this.offset+offset,length);break;default:throw Error("Unknown encoding")}return Buffer._charsWritten=SlowBuffer._charsWritten,ret},Buffer.prototype.toString=function(encoding,start,end){switch(encoding=((encoding||"utf8")+"").toLowerCase(),start===void 0||0>start?start=0:start>this.length&&(start=this.length),end===void 0||end>this.length?end=this.length:0>end&&(end=0),start+=this.offset,end+=this.offset,encoding){case"hex":return this.parent.hexSlice(start,end);case"utf8":case"utf-8":return this.parent.utf8Slice(start,end);case"ascii":return this.parent.asciiSlice(start,end);case"binary":return this.parent.binarySlice(start,end);case"base64":return this.parent.base64Slice(start,end);case"ucs2":case"ucs-2":return this.parent.ucs2Slice(start,end);default:throw Error("Unknown encoding")}},Buffer.byteLength=SlowBuffer.byteLength,Buffer.prototype.fill=function(value,start,end){if(value||(value=0),start||(start=0),end||(end=this.length),"string"==typeof value&&(value=value.charCodeAt(0)),"number"!=typeof value||isNaN(value))throw Error("value is not a number");if(start>end)throw Error("end < start");if(end===start)return 0;if(0==this.length)return 0;if(0>start||start>=this.length)throw Error("start out of bounds");if(0>end||end>this.length)throw Error("end out of bounds");return this.parent.fill(value,start+this.offset,end+this.offset)},Buffer.prototype.copy=function(target,target_start,start,end){var source=this;if(start||(start=0),end||(end=this.length),target_start||(target_start=0),start>end)throw Error("sourceEnd < sourceStart");if(end===start)return 0;if(0==target.length||0==source.length)return 0;if(0>target_start||target_start>=target.length)throw Error("targetStart out of bounds");if(0>start||start>=source.length)throw Error("sourceStart out of bounds");if(0>end||end>source.length)throw Error("sourceEnd out of bounds");return end>this.length&&(end=this.length),end-start>target.length-target_start&&(end=target.length-target_start+start),this.parent.copy(target.parent,target_start+target.offset,start+this.offset,end+this.offset)},Buffer.prototype.slice=function(start,end){if(void 0===end&&(end=this.length),end>this.length)throw Error("oob");if(start>end)throw Error("oob");return new Buffer(this.parent,end-start,+start+this.offset)},Buffer.prototype.utf8Slice=function(start,end){return this.toString("utf8",start,end)},Buffer.prototype.binarySlice=function(start,end){return this.toString("binary",start,end)},Buffer.prototype.asciiSlice=function(start,end){return this.toString("ascii",start,end)},Buffer.prototype.utf8Write=function(string,offset){return this.write(string,offset,"utf8")},Buffer.prototype.binaryWrite=function(string,offset){return this.write(string,offset,"binary")},Buffer.prototype.asciiWrite=function(string,offset){return this.write(string,offset,"ascii")},Buffer.prototype.readUInt8=function(offset,noAssert){var buffer=this;return noAssert||(assert.ok(void 0!==offset&&null!==offset,"missing offset"),assert.ok(buffer.length>offset,"Trying to read beyond buffer length")),offset>=buffer.length?void 0:buffer.parent[buffer.offset+offset]},Buffer.prototype.readUInt16LE=function(offset,noAssert){return readUInt16(this,offset,!1,noAssert)},Buffer.prototype.readUInt16BE=function(offset,noAssert){return readUInt16(this,offset,!0,noAssert)},Buffer.prototype.readUInt32LE=function(offset,noAssert){return readUInt32(this,offset,!1,noAssert)},Buffer.prototype.readUInt32BE=function(offset,noAssert){return readUInt32(this,offset,!0,noAssert)},Buffer.prototype.readInt8=function(offset,noAssert){var neg,buffer=this;return noAssert||(assert.ok(void 0!==offset&&null!==offset,"missing offset"),assert.ok(buffer.length>offset,"Trying to read beyond
switch(encoding){case"hex":return this.hexSlice(start,end);case"utf8":case"utf-8":return this.utf8Slice(start,end);case"ascii":return this.asciiSlice(start,end);case"binary":return this.binarySlice(start,end);case"base64":return this.base64Slice(start,end);case"ucs2":case"ucs-2":return this.ucs2Slice(start,end);default:throw Error("Unknown encoding")}},SlowBuffer.prototype.hexWrite=function(string,offset,length){offset=+offset||0;var remaining=this.length-offset;length?(length=+length,length>remaining&&(length=remaining)):length=remaining;var strLen=string.length;if(strLen%2)throw Error("Invalid hex string");length>strLen/2&&(length=strLen/2);for(var i=0;length>i;i++){var byte=parseInt(string.substr(2*i,2),16);if(isNaN(byte))throw Error("Invalid hex string");this[offset+i]=byte}return SlowBuffer._charsWritten=2*i,i},SlowBuffer.prototype.write=function(string,offset,length,encoding){if(isFinite(offset))isFinite(length)||(encoding=length,length=void 0);else{var swap=encoding;encoding=offset,offset=length,length=swap}offset=+offset||0;var remaining=this.length-offset;switch(length?(length=+length,length>remaining&&(length=remaining)):length=remaining,encoding=((encoding||"utf8")+"").toLowerCase()){case"hex":return this.hexWrite(string,offset,length);case"utf8":case"utf-8":return this.utf8Write(string,offset,length);case"ascii":return this.asciiWrite(string,offset,length);case"binary":return this.binaryWrite(string,offset,length);case"base64":return this.base64Write(string,offset,length);case"ucs2":case"ucs-2":return this.ucs2Write(string,offset,length);default:throw Error("Unknown encoding")}},SlowBuffer.prototype.slice=function(start,end){if(void 0===end&&(end=this.length),end>this.length)throw Error("oob");if(start>end)throw Error("oob");return new Buffer(this,end-start,+start)},SlowBuffer.prototype.copy=function(target,targetstart,sourcestart,sourceend){for(var temp=[],i=sourcestart;sourceend>i;i++)assert.ok(this[i]!==void 0,"copying undefined buffer bytes!"),temp.push(this[i]);for(var i=targetstart;targetstart+temp.length>i;i++)target[i]=temp[i-targetstart]},exports.SlowBuffer=SlowBuffer,exports.Buffer=Buffer,Buffer.poolSize=8192;var pool;Buffer.isBuffer=function(b){return b instanceof Buffer||b instanceof SlowBuffer},Buffer.concat=function(list,totalLength){if(!Array.isArray(list))throw Error("Usage: Buffer.concat(list, [totalLength])\n list should be an Array.");if(0===list.length)return new Buffer(0);if(1===list.length)return list[0];if("number"!=typeof totalLength){totalLength=0;for(var i=0;list.length>i;i++){var buf=list[i];totalLength+=buf.length}}for(var buffer=new Buffer(totalLength),pos=0,i=0;list.length>i;i++){var buf=list[i];buf.copy(buffer,pos),pos+=buf.length}return buffer},Buffer.prototype.inspect=function(){for(var out=[],len=this.length,i=0;len>i;i++)if(out[i]=toHex(this.parent[i+this.offset]),i==exports.INSPECT_MAX_BYTES){out[i+1]="...";break}return"<Buffer "+out.join(" ")+">"},Buffer.prototype.get=function(i){if(0>i||i>=this.length)throw Error("oob");return this.parent[this.offset+i]},Buffer.prototype.set=function(i,v){if(0>i||i>=this.length)throw Error("oob");return this.parent[this.offset+i]=v},Buffer.prototype.write=function(string,offset,length,encoding){if(isFinite(offset))isFinite(length)||(encoding=length,length=void 0);else{var swap=encoding;encoding=offset,offset=length,length=swap}offset=+offset||0;var remaining=this.length-offset;length?(length=+length,length>remaining&&(length=remaining)):length=remaining,encoding=((encoding||"utf8")+"").toLowerCase();var ret;switch(encoding){case"hex":ret=this.parent.hexWrite(string,this.offset+offset,length);break;case"utf8":case"utf-8":ret=this.parent.utf8Write(string,this.offset+offset,length);break;case"ascii":ret=this.parent.asciiWrite(string,this.offset+offset,length);break;case"binary":ret=this.parent.binaryWrite(string,this.offset+offset,length);break;case"base64":ret=this.parent.base64Write(string,this.offset+offset,length);break;case"ucs2":case"ucs-2":ret=this.parent.ucs2Write(string,this.offset+offset,length);break;default:throw Error("Un
if(0>end||end>this.length)throw Error("end out of bounds");return this.parent.fill(value,start+this.offset,end+this.offset)},Buffer.prototype.copy=function(target,target_start,start,end){var source=this;if(start||(start=0),end||(end=this.length),target_start||(target_start=0),start>end)throw Error("sourceEnd < sourceStart");if(end===start)return 0;if(0==target.length||0==source.length)return 0;if(0>target_start||target_start>=target.length)throw Error("targetStart out of bounds");if(0>start||start>=source.length)throw Error("sourceStart out of bounds");if(0>end||end>source.length)throw Error("sourceEnd out of bounds");return end>this.length&&(end=this.length),end-start>target.length-target_start&&(end=target.length-target_start+start),this.parent.copy(target.parent,target_start+target.offset,start+this.offset,end+this.offset)},Buffer.prototype.slice=function(start,end){if(void 0===end&&(end=this.length),end>this.length)throw Error("oob");if(start>end)throw Error("oob");return new Buffer(this.parent,end-start,+start+this.offset)},Buffer.prototype.utf8Slice=function(start,end){return this.toString("utf8",start,end)},Buffer.prototype.binarySlice=function(start,end){return this.toString("binary",start,end)},Buffer.prototype.asciiSlice=function(start,end){return this.toString("ascii",start,end)},Buffer.prototype.utf8Write=function(string,offset){return this.write(string,offset,"utf8")},Buffer.prototype.binaryWrite=function(string,offset){return this.write(string,offset,"binary")},Buffer.prototype.asciiWrite=function(string,offset){return this.write(string,offset,"ascii")},Buffer.prototype.readUInt8=function(offset,noAssert){var buffer=this;return noAssert||(assert.ok(void 0!==offset&&null!==offset,"missing offset"),assert.ok(buffer.length>offset,"Trying to read beyond buffer length")),offset>=buffer.length?void 0:buffer.parent[buffer.offset+offset]},Buffer.prototype.readUInt16LE=function(offset,noAssert){return readUInt16(this,offset,!1,noAssert)},Buffer.prototype.readUInt16BE=function(offset,noAssert){return readUInt16(this,offset,!0,noAssert)},Buffer.prototype.readUInt32LE=function(offset,noAssert){return readUInt32(this,offset,!1,noAssert)},Buffer.prototype.readUInt32BE=function(offset,noAssert){return readUInt32(this,offset,!0,noAssert)},Buffer.prototype.readInt8=function(offset,noAssert){var neg,buffer=this;return noAssert||(assert.ok(void 0!==offset&&null!==offset,"missing offset"),assert.ok(buffer.length>offset,"Trying to read beyond buffer length")),offset>=buffer.length?void 0:(neg=128&buffer.parent[buffer.offset+offset],neg?-1*(255-buffer.parent[buffer.offset+offset]+1):buffer.parent[buffer.offset+offset])},Buffer.prototype.readInt16LE=function(offset,noAssert){return readInt16(this,offset,!1,noAssert)},Buffer.prototype.readInt16BE=function(offset,noAssert){return readInt16(this,offset,!0,noAssert)},Buffer.prototype.readInt32LE=function(offset,noAssert){return readInt32(this,offset,!1,noAssert)},Buffer.prototype.readInt32BE=function(offset,noAssert){return readInt32(this,offset,!0,noAssert)},Buffer.prototype.readFloatLE=function(offset,noAssert){return readFloat(this,offset,!1,noAssert)},Buffer.prototype.readFloatBE=function(offset,noAssert){return readFloat(this,offset,!0,noAssert)},Buffer.prototype.readDoubleLE=function(offset,noAssert){return readDouble(this,offset,!1,noAssert)},Buffer.prototype.readDoubleBE=function(offset,noAssert){return readDouble(this,offset,!0,noAssert)},Buffer.prototype.writeUInt8=function(value,offset,noAssert){var buffer=this;noAssert||(assert.ok(void 0!==value&&null!==value,"missing value"),assert.ok(void 0!==offset&&null!==offset,"missing offset"),assert.ok(buffer.length>offset,"trying to write beyond buffer length"),verifuint(value,255)),buffer.length>offset&&(buffer.parent[buffer.offset+offset]=value)},Buffer.prototype.writeUInt16LE=function(value,offset,noAssert){writeUInt16(this,value,offset,!1,noAssert)},Buffer.prototype.writeUInt16BE=function(value,offset,noAssert){writeUInt16(this,value,offset,!0,noAssert)},Buffer.prototype.writeUInt32LE=function(value,offset,noAssert){writeUIn
normalize(config),all=mergeTokensAndComments(tokens,comments);for(var tokenIdx=0;all.length>tokenIdx;tokenIdx++){var surround,start,end,token=all[tokenIdx],surroundForType=config[token.type];surroundForType&&(surround=surroundForType&&surroundForType.hasOwnProperty(token.value)&&surroundForType[token.value]&&isFunction(surroundForType[token.value])?surroundForType[token.value]:surroundForType._default,start=token.range[0],end=token.range[1],addSplit(lastSplitEnd,start),info={tokenIndex:tokenIdx,tokens:all,ast:ast,code:code},tokenIdx+=addSplit(start,end,surround,info))}return code.length>lastSplitEnd&&addSplit(lastSplitEnd,code.length),transformedCode=opts.nojoin?void 0:splits.join(""),{ast:ast,tokens:tokens,comments:comments,splits:splits,code:transformedCode}}return exportFn?exportFn(redeyed):redeyed}var esprima,exportFn,toString=Object.prototype.toString;"object"==typeof module&&"object"==typeof module.exports&&"function"==typeof require?(esprima=require("esprima"),exportFn=function(redeyed){module.exports=redeyed},bootstrap(esprima,exportFn)):"function"==typeof define&&define.amd?define(["esprima"],function(esprima){return bootstrap(esprima)}):"object"==typeof window&&(window.redeyed=bootstrap(window.esprima))})()})()},{esprima:70}],86:[function(require,module){(function(Buffer){var encode=module.exports=function(xs){function bytes(s){return"string"==typeof s?s.split("").map(ord):Array.isArray(s)?s.reduce(function(acc,c){return acc.concat(bytes(c))},[]):void 0}return new Buffer([27].concat(bytes(xs)))},ord=encode.ord=function ord(c){return c.charCodeAt(0)}})(require("__browserify_buffer").Buffer)},{__browserify_buffer:77}]},{},[1]);
</script>
<!-- shader-doodle.js -->
<script>
'use strict';(function(z,A){"object"===typeof exports&&"undefined"!==typeof module?A(exports):"function"===typeof define&&define.amd?define(["exports"],A):(z=z||self,A(z.ShaderDoodle={}))})(this,function(z){function A(a){function b(a){console.log(a);e.add(a.targetElement)}function d(b){e.has(b.targetElement)?e.delete(b.targetElement):(b=a.createBufferSource(),b.buffer=a.createBuffer(1,1,a.sampleRate),b.connect(a.destination),b.start(0),"function"===typeof a.resume&&a.resume().then(c),f())}function c(){v.forEach(a=>
{a()})}function f(){p.forEach(a=>{a.removeEventListener("touchstart",d);a.removeEventListener("touchmove",b);a.removeEventListener("touchend",d);a.removeEventListener("mouseup",d)});p.clear();e.clear()}let e=new Set,p=new Set,v=[];return{onStart:function(b){"running"===a.state?(console.log("already"),b()):v.push(b)},register:function(a){a.addEventListener("touchstart",d);a.addEventListener("touchmove",b);a.addEventListener("touchend",d);a.addEventListener("mouseup",d);p.add(a)},dispose:f}}function ca(){function a(a){d[0].value[0]=
a.alpha;d[0].value[1]=a.beta;d[0].value[2]=a.gamma}let b=!1,d=JSON.parse(JSON.stringify(L));return{get ustate(){return d},setup:function(){b||(b=!0,"object"===typeof DeviceOrientationEvent&&"function"===typeof DeviceOrientationEvent.requestPermission?DeviceOrientationEvent.requestPermission().then(b=>{"granted"===b&&window.addEventListener("deviceorientation",a)}).catch(console.error):window.addEventListener("deviceorientation",a))},dispose:function(){window.removeEventListener("deviceorientation",
a)}}}function da(a){let b={},d=a.getExtension.bind(a);return{get:function(a){if(void 0!==b[a])return b[a];let c=d(a)||d("MOZ_".concat(a))||d("WEBKIT_".concat(a));null===c&&console.warn("<shader-doodle /> ".concat(a," extension not supported."));return b[a]=c}}}function C(){function a(a,b){if(a>n||b>h)a=Math.max(a,n),b=Math.max(b,h),a!==n&&(n=a,c.width=Math.floor(1*n)),b!==h&&(h=b,c.height=Math.floor(1*h))}function b(a){let b=l?(a-l)/1E3:0;l=a;k[0].value+=b;k[1].value=b;k[3].value++;a=new Date;k[2].value[0]=
a.getFullYear();k[2].value[1]=a.getMonth()+1;k[2].value[2]=a.getDate();k[2].value[3]=3600*a.getHours()+60*a.getMinutes()+a.getSeconds()+.001*a.getMilliseconds()}function d(f){if(m.size){b(f);var u=[...k,...e.ustate];m.forEach(b=>b.render(c,a,n,h,1,u));q=requestAnimationFrame(d)}else q=void 0}let c=document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),f=c.getContext("webgl")||c.getContext("experimental-webgl"),e=ca(),p=new (window.AudioContext||window.webkitAudioContext),v=new A(p);p.onStart=
v.onStart;f.blendFunc(f.SRC_ALPHA,f.ONE_MINUS_SRC_ALPHA);f.enable(f.BLEND);let n=0,h=0,q,l,m=new Set,k=JSON.parse(JSON.stringify(M)),w=da(f);w.get("OES_texture_float");w.get("OES_texture_float_linear");w.get("OES_texture_half_float");w.get("OES_texture_half_float_linear");f.clearColor(0,0,0,0);return Object.freeze({get gl(){return f},get wa(){return p},addSurface:function(a){v.register(a.dom);a.addClick(e.setup);m.add(a);q||(q=requestAnimationFrame(d))},removeSurface:function(a){m.delete(a)},addUniform:function(a,
b,c){for(let d=0;d<k.length;d++)if(k[d].name===a){k[d].value=b;k[d].type=c;return}k.push({name:a,value:b,type:c,toyname:a})},setUniform:function(a,b){for(let c=0;c<k.length;c++)if(k[c].name===a){k[c].value=b;break}},dispose:function(){m.forEach(a=>a.dispose());m.clear();m=void 0;cancelAnimationFrame(q);e.dispose();v.dispose()}})}function ea(a,b){let d={},c=a.getProgramParameter(b,a.ACTIVE_ATTRIBUTES);for(let f=0;f<c;f++){let {name:c}=a.getActiveAttrib(b,f);d[c]=a.getAttribLocation(b,c)}return d}function N(a){function b(b){a.texParameteri(a.TEXTURE_2D,
a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,b?a.NEAREST:a.LINEAR);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,b?a.NEAREST:a.LINEAR)}let d,c,f=a.createFramebuffer();a.bindFramebuffer(a.FRAMEBUFFER,f);let e=a.createTexture();if(!e)throw Error("createTexture returned null");a.bindTexture(a.TEXTURE_2D,e);b(!0);a.framebufferTexture2D(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,a.TEXTURE_2D,e,0);return{get handle(){return f},
get texture(){return e},updateTexture:b,bind:function(){a.bindFramebuffer(a.FRAMEBUFFER,f);a.viewport(0,0,d,c)},updateResolution:function(b,f){if(b!==d||f!==c)d=b,c=f,a.bindTexture(a.TEXTURE_2D,e),a.texImage2D(a.TEXTURE_2D,0,a.RGBA,b,f,0,a.RGBA,a.FLOAT,null)},dispose:function(){a.deleteFramebuffer(f);a.deleteTexture(e)}}}function O(a,b,d){b=a.createShader(b);a.shaderSource(b,d);a.compileShader(b);if(!a.getShaderParameter(b,a.COMPILE_STATUS)){let c=a.getShaderInfoLog(b);a.deleteShader(b);console.warn(c,
"\nin shader:\n",d)}return b}function H(a,b){if(a.length!==b.length)return!1;for(let d=0,c=a.length;d<c;d++)if(a[d]!==b[d])return!1;return!0}function I(a,b){for(let d=0,c=b.length;d<c;d++)a[d]=b[d]}function fa(a,b,d,c){a[0]!==c&&(d.uniform1f(b,c),a[0]=c)}function ha(a,b,d,c){H(a,c)||(d.uniform2fv(b,c),I(a,c))}function ia(a,b,d,c){H(a,c)||(d.uniform3fv(b,c),I(a,c))}function ja(a,b,d,c){H(a,c)||(d.uniform4fv(b,c),I(a,c))}function ka(a,b,d,c){a[0]!==c&&(d.uniform1i(b,c),a[0]=c)}function la(a){switch(a){case 5126:return fa;
case 35664:return ha;case 35665:return ia;case 35666:return ja;case 35678:case 36198:return ka}}function ma(a,b,d){let c=[],f=la(b.type);return{get location(){return d},get name(){return b.name},setValue:function(...b){f(c,d,a,...b)}}}function na(a,b){let d={},c=a.getProgramParameter(b,a.ACTIVE_UNIFORMS);for(let e=0;e<c;e++){var f=a.getActiveUniform(b,e);let c=a.getUniformLocation(b,f.name);f=ma(a,f,c);d[f.name]=f}return d}function oa(a,b){if(b){let b=a.match(P);a=a.replace("mainImage","main");a=
a.replace(P,"()");a=(b?"#define ".concat(b[1]," gl_FragColor\n#define ").concat(b[2]," gl_FragCoord.xy\n"):"")+a}a=pa(qa,b)+a;return"precision highp float;\n"+a}function ra(a,b,d,c,f=!1){function e(a){let b=r[F(a,f,"name")];b&&b.setValue(F(a,f,"value"))}function p(b){b.forEach(e);t.forEach(a=>a.update(e));k&&r.u_prevbuffer&&(b=r.u_prevbuffer)&&(b.setValue(w),a.activeTexture(a["TEXTURE".concat(w)]),a.bindTexture(a.TEXTURE_2D,k.texture),k.updateTexture());g.forEach(b=>{r[b.name].setValue(b.u);a.activeTexture(a["TEXTURE".concat(b.u)]);
a.bindTexture(a.TEXTURE_2D,b.fbo.texture);b.fbo.updateTexture()})}let v=sa++,n=a.createProgram(),h=a.createBuffer();b=O(a,a.VERTEX_SHADER,b);d=O(a,a.FRAGMENT_SHADER,oa(d,f));a.attachShader(n,b);a.attachShader(n,d);a.linkProgram(n);let q,l,m,k,w,u=ea(a,n),r=na(a,n),g=new Set,t=new Set,x=0;if(!a.getProgramParameter(n,a.LINK_STATUS)){let b=a.getProgramInfoLog(n);console.warn(b)}a.detachShader(n,b);a.detachShader(n,d);a.deleteShader(b);a.deleteShader(d);b=u.position;a.bindBuffer(a.ARRAY_BUFFER,h);a.bufferData(a.ARRAY_BUFFER,
c,a.STATIC_DRAW);a.enableVertexAttribArray(b);a.vertexAttribPointer(b,2,a.FLOAT,!1,0,0);return{get id(){return v},get nodes(){return g},get fbo(){return m},get name(){return q},get u(){return l},render:function(b,c,d){g.size&&g.forEach(a=>a.render(b,c,d));if(m){if(k){let a=m;m=k;k=a;k.bind();k.updateResolution(b,c)}m.updateResolution(b,c);m.bind()}else a.bindFramebuffer(a.FRAMEBUFFER,null),a.viewport(0,0,b,c);a.clear(a.COLOR_BUFFER_BIT);a.useProgram(n);p(d);a.drawArrays(a.TRIANGLES,0,6)},addNode:function(a,
b,c){a.toFbo(b,x++,c);g.add(a)},removeNode:function(a){g.delete(a)},addTexture:function(a){t.add(a)},removeTexture:function(a){t.delete(a)},getTexUnit:function(){return x++},update:p,toFbo:function(b,c,d){q=b;l=c;m=N(a);d&&(k=N(a),w=x++)},dispose:function(){t.forEach(a=>a.dispose());t.clear();a.deleteProgram(n)}}}function Q(a){if(!a)return[0,0];let b=(a.tagName||"").toLowerCase();return"video"===b?[a.videoWidth,a.videoHeight]:"img"===b?[a.naturalWidth,a.naturalHeight]:[a.width,a.height]}function R(a,
b,d={}){function c(){a.getParameter(a.ACTIVE_TEXTURE)!==b&&a.activeTexture(a["TEXTURE".concat(b)])}function f(){h.forEach(b=>{a.texParameteri(p,b[0],b[1])})}function e(b){if("object"===typeof b){Object.assign(n,b);c();a.bindTexture(p,v);var {level:d,internalFormat:e,offsetX:h,offsetY:r,width:g,height:t,border:m,format:B,type:D,flipY:z,buffer:y,pixels:A}=n;f();a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,z);if(A){let [c,d]=Q(A);if(0===c||0===d){console.warn("Texture size is invalid ".concat(c," x ").concat(d,
". Update is skipped;"));return}{({pixels:b}=n);var J=a.getTexParameter(p,a.TEXTURE_WRAP_S);let c=a.getTexParameter(p,a.TEXTURE_WRAP_T),d=a.getTexParameter(p,a.TEXTURE_MIN_FILTER),f=G(b.width)&&G(b.height);(J=J!==a.CLAMP_TO_EDGE||c!==a.CLAMP_TO_EDGE||d!==a.LINEAR&&d!==a.NEAREST)&&!f&&(l||(l=document.createElement("canvas"),l.width=2**Math.floor(Math.log(b.width)/Math.LN2),l.height=2**Math.floor(Math.log(b.height)/Math.LN2),console.warn("Texture is not power of two ".concat(b.width," x ").concat(b.height,
". Resized to ").concat(l.width," x ").concat(l.height,";"))),l.getContext("2d").drawImage(b,0,0,l.width,l.height));q=J&&l||b}}"number"===typeof h&&"number"===typeof r?q?a.texSubImage2D(p,d,h,r,B,D,q):a.texSubImage2D(p,d,h,r,g,t,B,D,y):q?a.texImage2D(p,d,e,B,D,q):a.texImage2D(p,d,e,g,t,m,B,D,y);q&&G(q.width)&&G(q.height)&&(b=a.getTexParameter(p,a.TEXTURE_MIN_FILTER),b!==a.LINEAR&&b!==a.NEAREST&&a.generateMipmap(p))}}let p=a.TEXTURE_2D,v=a.createTexture(),n={},h=[],q,l;e(Object.assign({level:0,internalFormat:a.RGBA,
offsetX:null,offsetY:null,width:1,height:1,border:0,format:a.RGBA,type:a.UNSIGNED_BYTE,flipY:!0,buffer:ta,pixels:null},"object"===typeof d?d:{}));return{setParameters:function(b){c();h.length=0;b.forEach(b=>{h.push(b);a.texParameteri(p,b[0],b[1])})},shallow:function(){c();a.bindTexture(p,v);f()},update:e,dispose:function(){a.deleteTexture(v)}}}function ua(a){return new Promise((b,d)=>{let c=new XMLHttpRequest;c.open("GET",a,!0);c.responseType="arraybuffer";c.onreadystatechange=()=>{c.readyState===
XMLHttpRequest.DONE&&(200===c.status||206===c.status?b(c.response):(console.log(c),d(c.status)))};c.send()})}function va(a,b){return new Promise((d,c)=>{b.decodeAudioData(a,d,c)})}function wa(a,b,d,c,f,e,p,v){async function n(){g=l.createBufferSource();g.buffer=await va(await ua(c),l);g.loop=e;g.start();t=!0}function h(){let a=document.querySelector(c);a&&a instanceof HTMLAudioElement&&(r=a,g=l.createMediaElementSource(a))}function q(a,b){a.connect(m);m.connect(b)}f=a.gl;let l=a.wa,m=l.createAnalyser();
m.fftSize=1024;let k=new Uint8Array(m.frequencyBinCount),w=new Uint8Array(m.frequencyBinCount),u=R(f,b,{internalFormat:f.LUMINANCE,width:w.length,height:2,format:f.LUMINANCE,buffer:null});u.setParameters([[f.TEXTURE_WRAP_S,f.CLAMP_TO_EDGE],[f.TEXTURE_WRAP_T,f.CLAMP_TO_EDGE],[f.TEXTURE_MIN_FILTER,f.NEAREST]]);let r,g,t=!1,x=[{name:d,value:b}];"#"===c[0]?h():c&&n();g&&q(g,l.destination);return{dispose:function(){u.dispose()},update:function(a){x.forEach(a);if(t||r&&2<r.readyState&&!r.paused&&!r.ended&&
r.currentTime)m.getByteFrequencyData(k),m.getByteTimeDomainData(w),u.update({offsetX:0,offsetY:0,height:1,buffer:k}),u.update({offsetX:0,offsetY:1,height:1,buffer:w})}}}function S(a,b){var d=Object.keys(a);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(a);b&&(c=c.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable}));d.push.apply(d,c)}return d}function T(a){let b=document.createElement("div");b.style.width=b.style.height="1px";b.style.overflow="hidden";b.style.position=
"absolute";b.style.opacity="0";b.style.pointerEvents="none";b.style.zIndex="-1000";b.appendChild(a);document.body.appendChild(b)}function xa(a,b,d,c,f,e,p,v,n,h){function q(){t=0;g=new Image;g.crossOrigin="anonymous";g.onload=l;g.onerror=()=>{console.warn("failed loading src: ".concat(c))};g.src=c}function l(){k();r.setParameters([[u.TEXTURE_WRAP_S,e],[u.TEXTURE_WRAP_T,p],[u.TEXTURE_MIN_FILTER,v],[u.TEXTURE_MAG_FILTER,n]]);r.update({pixels:g})}function m(){t=2;let a=navigator.getUserMedia||navigator.webkitGetUserMedia||
navigator.mozGetUserMedia,b=a=>{g=document.createElement("video");g.width=320;g.height=240;g.autoplay=!0;g.srcObject=a;T(g)},c=()=>{navigator.mediaDevices.getUserMedia({video:!0}).then(b).catch(a=>console.log(a.name+": "+a.message))},d=()=>{a({video:!0},b,a=>a)};navigator.mediaDevices&&navigator.mediaDevices.getUserMedia?c():a&&d()}function k(){if(g){let [a,b]=Q(g);x[1].value[0]=a;x[1].value[1]=b}}function w(){return(2===t||1===t)&&g instanceof HTMLVideoElement}let u=a.gl,r=R(u,b),g,t,x=[{name:d,
value:b},{name:d+"_resolution",value:[0,0]}],B=!1;if(f)m();else if(ya.test(c))t=1,g=document.createElement("video"),g.autoplay=!0,g.muted=!0,g.loop=!0,g.playsInline=!0,g.crossOrigin="anonymous",g.src=c,T(g),g.play();else if(za.test(c))q();else{try{g=document.querySelector(c)}catch(D){console.warn("src: ".concat(c,": invalid selector"))}g?g instanceof HTMLImageElement?(t=0,g.complete?l():g.addEventListener("load",l)):g instanceof HTMLVideoElement?t=1:g instanceof HTMLCanvasElement?(t=3,l()):g instanceof
K?(g=g.surface.dom,t=3,l()):console.warn("src: ".concat(c,": element is not a valid texture source")):console.warn("src: ".concat(c,": no element could be selected"))}return{dispose:function(){r.dispose()},update:function(a){x.forEach(a);h||w()&&g.readyState===g.HAVE_ENOUGH_DATA?(w()&&(B||(B=!0,k(),r.setParameters([[u.TEXTURE_WRAP_S,u.CLAMP_TO_EDGE],[u.TEXTURE_WRAP_T,u.CLAMP_TO_EDGE],[u.TEXTURE_MIN_FILTER,u.LINEAR]]))),r.update({pixels:g})):r.shallow()}}}function Aa(a){function b(a){n.forEach(a=>
"function"===typeof a&&a());k=!0;a=U(a);let {top:b,left:c,height:d}=q;h[2].value[0]=h[2].value[2]=a[0]-Math.floor(c);h[2].value[1]=h[2].value[3]=Math.floor(d)-(a[1]-Math.floor(b))}function d(a){if(!m){a=U(a);let {top:b,left:c,height:d}=q;h[1].value[0]=a[0]-Math.floor(c);h[1].value[1]=Math.floor(d)-(a[1]-Math.floor(b));k&&(h[2].value[0]=h[1].value[0],h[2].value[1]=h[1].value[1]);m=!0}}function c(a){k=!1;1===Math.sign(h[2].value[2])&&(h[2].value[2]*=-1);1===Math.sign(h[2].value[3])&&(h[2].value[3]*=
-1)}function f(){let b=e.getBoundingClientRect();l=0<=b.top+b.height&&0<=b.left+b.width&&b.bottom-b.height<=(window.innerHeight||document.documentElement.clientHeight)&&b.right-b.width<=(window.innerWidth||document.documentElement.clientWidth);let c=0<a.height?a.height:b.height,d=0<a.width?a.width:b.width;d!==h[0].value[0]&&(e.width=h[0].value[0]=d);c!==h[0].value[1]&&(e.height=h[0].value[1]=c);q=b}let e=a.canvas instanceof HTMLCanvasElement?a.canvas:document.createElementNS("http://www.w3.org/1999/xhtml",
"canvas"),p=e.getContext("2d"),v=a.program,n=new Set,h=JSON.parse(JSON.stringify(V)),q={},l,m,k;e.addEventListener("mousedown",b);e.addEventListener("mousemove",d);e.addEventListener("mouseup",c);e.addEventListener("mouseout",c);e.addEventListener("touchstart",b);e.addEventListener("touchmove",d);e.addEventListener("touchend",c);f();return Object.freeze({get dom(){return e},render:function(a,b,c,d,e,k){f();m=!1;if(l&&v){var g=h[0].value[0]||0;c=h[0].value[1]||0;b(g,c);v.render(g,c,[...k,...h]);b=
g*e;e*=c;p.clearRect(0,0,b,e);p.drawImage(a,0,d-e,b,e,0,0,b,e)}},addClick:function(a){n.add(a)},dispose:function(){n.clear();e.removeEventListener("mousedown",b);e.removeEventListener("mousemove",d);e.removeEventListener("mouseup",c);e.removeEventListener("mouseout",c);e.removeEventListener("touchstart",b);e.removeEventListener("touchmove",d);e.removeEventListener("touchend",c)}})}var W={render(a,b){return"".concat(this.css(a,b),"\n ").concat(this.html())},map(a){return{canvas:a.querySelector("canvas")}},
html(a){return"<canvas></canvas>"},css(a,b){return"<style>\n :host {\n position: relative;\n display: inline-block;\n width: ".concat(a||250,"px;\n height: ").concat(b||250,"px;\n }\n :host > canvas {\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n border-radius: inherit;\n }\n </style>")}};let M=[{name:"u_time",toyname:"iTime",type:"float",value:0},{name:"u_delta",toyname:"iTimeDelta",
type:"float",value:0},{name:"u_date",toyname:"iDate",type:"vec4",value:[0,0,0,0]},{name:"u_frame",toyname:"iFrame",type:"int",value:0}],V=[{name:"u_resolution",toyname:"iResolution",type:"vec2",value:[0,0]},{name:"u_mouse",toyname:"iCurrentMouse",type:"vec2",value:[0,0]},{name:"u_mousedrag",toyname:"iMouse",type:"vec4",value:[0,0,0,0]}],L=[{name:"u_orientation",toyname:"iOrientation",type:"vec3",value:[0,0,0]}],qa=[...M,...L,...V],P=/\(\s*out\s+vec4\s+(\S+)\s*,\s*in\s+vec2\s+(\S+)\s*\)/,y;C.singleton=
function(){y||(y=C());return y};C.resetSingleton=function(){y&&y.dispose();y=C()};class E extends HTMLElement{get renderer(){return C.singleton()}get name(){return this.getAttribute("name")}set name(a){this.setAttribute("name",a)}}var F=(a,b,d)=>{if(!b)return a[d];b="toy".concat(d);return a.hasOwnProperty(b)?a[b]:a[d]},pa=(a,b)=>Object.values(a).reduce((a,c)=>a+"uniform ".concat(F(c,b,"type")," ").concat(F(c,b,"name"),";\n"),"");let sa=0;var Ba=a=>new Promise((b,d)=>{let c=new XMLHttpRequest;c.open("GET",
a);c.onreadystatechange=()=>{c.readyState===XMLHttpRequest.DONE&&(200===c.status?b(c.responseText):d(c.status))};c.send()}),X=async a=>a.src?Ba(a.src):a.text;let Y=new Float32Array([-1,1,1,1,1,-1,-1,1,1,-1,-1,-1]),Ca=0;class Z extends E{disconnectedCallback(){this.program.dispose();this.program=void 0}get shadertoy(){return this.hasAttribute("shadertoy")}set shadertoy(a){a?this.setAttribute("shadertoy",""):this.removeAttribute("shadertoy")}get prevbuffer(){return this.hasAttribute("prevbuffer")}set prevbuffer(a){a?
this.setAttribute("prevbuffer",""):this.removeAttribute("prevbuffer")}get vertices(){let a=this.getAttribute("vertices");if(!a)return Y;a=JSON.parse(a);return Array.isArray(a)?new Float32Array(a):Y}set vertices(a){a&&Array.isArray(a)&&this.setAttribute("vertices",JSON.stringify(a))}async init(a){a&&!this.name&&(this.name="".concat("u_node").concat(Ca++));let b=[],d,c;for(let a=0;a<this.children.length;a++){let e=this.children[a];if(e instanceof E)b.push(e);else switch(e.getAttribute("type")){case "x-shader/x-fragment":c=
await X(e);break;case "x-shader/x-vertex":d=await X(e)}}this.program=ra(this.renderer.gl,d||"attribute vec2 position;\nvoid main() {\n gl_Position = vec4(position, 0.0, 1.0);\n}",c,this.vertices,this.shadertoy);b.forEach(a=>{a.init(this.program)});a&&a.addNode(this.program,this.name,this.prevbuffer)}}customElements.get("sd-node")||customElements.define("sd-node",Z);let ta=new Uint8Array([0,0,0,255]),G=a=>!(a&a-1)&&!!a,Da=0;class Ea extends E{disconnectedCallback(){this.program.removeTexture(this.texture);
this.texture.dispose()}get src(){return this.getAttribute("src")}set src(a){this.setAttribute("src",a)}get autoplay(){return this.hasAttribute("autoplay")}set autoplay(a){a?this.setAttribute("autoplay",""):this.removeAttribute("autoplay")}get loop(){return this.hasAttribute("loop")}set loop(a){a?this.setAttribute("loop",""):this.removeAttribute("loop")}get crossOrigin(){return this.getAttribute("crossorigin")}set crossOrigin(a){this.setAttribute("crossorigin",a)}get mic(){return this.hasAttribute("mic")}set mic(a){a?
this.setAttribute("mic",""):this.removeAttribute("mic")}init(a){this.name||(this.name="".concat("u_audio").concat(Da++));this.src&&(this.program=a,this.texture=wa(this.renderer,a.getTexUnit(),this.name,this.src,this.mic,this.loop,this.autoplay,this.crossOrigin),a.addTexture(this.texture))}}customElements.get("sd-audio")||customElements.define("sd-audio",Ea);let za=/\w+\.(jpg|jpeg|png|gif|bmp)(?=\?|$)/i,ya=/\w+\.(mp4|3gp|webm|ogv)(?=\?|$)/i,aa={NEAREST:9728,LINEAR:9729},Fa=function(a){for(var b=1;b<
arguments.length;b++){var d=null!=arguments[b]?arguments[b]:{};b%2?S(d,!0).forEach(function(b){var c=d[b];b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(d)):S(d).forEach(function(b){Object.defineProperty(a,b,Object.getOwnPropertyDescriptor(d,b))})}return a}({},aa,{NEAREST_MIPMAP_NEAREST:9984,LINEAR_MIPMAP_NEAREST:9985,NEAREST_MIPMAP_LINEAR:9986,LINEAR_MIPMAP_LINEAR:9987}),
ba={REPEAT:10497,MIRRORED_REPEAT:33648,CLAMP_TO_EDGE:33071},Ga=0;class Ha extends E{static get observedAttributes(){return"mag-filter min-filter name src wrap-s wrap-t".split(" ")}disconnectedCallback(){this.program.removeTexture(this.texture);this.texture.dispose()}get forceUpdate(){return this.hasAttribute("force-update")}set forceUpdate(a){a?this.setAttribute("force-update",""):this.removeAttribute("force-update")}get magFilter(){return aa[this.getAttribute("mag-filter")]||9729}get minFilter(){return Fa[this.getAttribute("min-filter")]||
9987}get src(){return this.getAttribute("src")}set src(a){this.setAttribute("src",a)}get webcam(){return this.hasAttribute("webcam")}set webcam(a){a?this.setAttribute("webcam",""):this.removeAttribute("webcam")}get wrapS(){return ba[this.getAttribute("wrap-s")]||10497}get wrapT(){return ba[this.getAttribute("wrap-t")]||10497}init(a){this.name||(this.name="".concat("u_texture").concat(Ga++));if(this.src||this.webcam)this.program=a,this.texture=xa(this.renderer,a.getTexUnit(),this.name,this.src,this.webcam,
this.wrapS,this.wrapT,this.minFilter,this.magFilter,this.forceUpdate),a.addTexture(this.texture)}}customElements.get("sd-texture")||customElements.define("sd-texture",Ha);class Ia extends E{disconnectedCallback(){}get x(){return parseFloat(this.getAttribute("x"))}set x(a){null!=a?this.setAttribute("x",a):this.removeAttribute("x")}get y(){return parseFloat(this.getAttribute("y"))}set y(a){null!=a?this.setAttribute("y",a):this.removeAttribute("y")}get z(){return parseFloat(this.getAttribute("z"))}set z(a){null!=
a?this.setAttribute("z",a):this.removeAttribute("z")}get w(){return parseFloat(this.getAttribute("w"))}set w(a){null!=a?this.setAttribute("w",a):this.removeAttribute("w")}getValue(){switch(this.type){case "vec2":return[this.x,this.y];case "vec3":return[this.x,this.y,this.z];case "vec4":return[this.x,this.y,this.z,this.w];default:return this.x}}get type(){return this.getAttribute("type")}set type(a){null!=a?this.setAttribute("type",a):this.removeAttribute("type")}static get observedAttributes(){return["x",
"y","z","w"]}attributeChangedCallback(a,b,d){switch(a){case "x":case "y":case "z":case "w":null!=d&&this.renderer.setUniform(this.name,this.getValue())}}init(a){this.name?(this.program=a,this.renderer.addUniform(this.name,this.getValue(),this.type)):console.warn("sd-uniform created without a name.")}}customElements.get("sd-uniform")||customElements.define("sd-uniform",Ia);let Ja=new Set(["touchstart","touchmove","touchend"]);var U=a=>{a=Ja.has(a.type)&&"object"===typeof a.touches[0]?a.touches[0]:
a;return[a.clientX||0,a.clientY||0]};class K extends Z{static get observedAttributes(){return["height","width"]}constructor(){super();this.shadow=this.attachShadow({mode:"open"})}connectedCallback(){this.shadow.innerHTML=W.render(this.width,this.height);this.canvas=W.map(this.shadow).canvas;setTimeout(()=>{try{this.init()}catch(a){console.error(a&&a.message||"Error in shader-doodle.")}})}disconnectedCallback(){super.disconnectedCallback();this.renderer.removeSurface(this.surface);this.surface.dispose();
this.surface=void 0}attributeChangedCallback(a){let b=this.shadow.styleSheets;if(("height"===a||"width"===a)&&0<b.length){let d=this[a];b[0].cssRules[0].style[a]=Number.isInteger(d)?"".concat(d,"px"):"250px"}}get height(){let a=parseInt(this.getAttribute("height"));return Number.isInteger(a)?a:void 0}set height(a){let b=parseInt(a);Number.isInteger(b)&&this.setAttribute("height",a)}get width(){let a=parseInt(this.getAttribute("width"));return Number.isInteger(a)?a:void 0}set width(a){a=parseInt(a);
Number.isInteger(a)&&this.setAttribute("width",a)}async init(){await super.init();this.surface=Aa(this);this.renderer.addSurface(this.surface)}}customElements.get("shader-doodle")||customElements.define("shader-doodle",K);z.ShaderDoodleElement=K;Object.defineProperty(z,"__esModule",{value:!0})})
2023-04-27 18:34:23 +02:00
</script>
<script>
2023-05-04 13:28:22 +02:00
2023-04-27 18:34:23 +02:00
var $hx_exports = typeof exports != "undefined" ? exports : typeof window != "undefined" ? window : typeof self != "undefined" ? self : this;
(function ($global) { "use strict";
$hx_exports["xrfragment"] = $hx_exports["xrfragment"] || {};
var EReg = function(r,opt) {
this.r = new RegExp(r,opt.split("u").join(""));
};
EReg.__name__ = true;
EReg.prototype = {
match: function(s) {
if(this.r.global) {
this.r.lastIndex = 0;
}
this.r.m = this.r.exec(s);
this.r.s = s;
return this.r.m != null;
}
,split: function(s) {
var d = "#__delim__#";
return s.replace(this.r,d).split(d);
}
};
var HxOverrides = function() { };
HxOverrides.__name__ = true;
HxOverrides.cca = function(s,index) {
var x = s.charCodeAt(index);
if(x != x) {
return undefined;
}
return x;
};
HxOverrides.substr = function(s,pos,len) {
if(len == null) {
len = s.length;
} else if(len < 0) {
if(pos == 0) {
len = s.length + len;
} else {
return "";
}
}
return s.substr(pos,len);
};
HxOverrides.now = function() {
return Date.now();
};
Math.__name__ = true;
var Reflect = function() { };
Reflect.__name__ = true;
Reflect.field = function(o,field) {
try {
return o[field];
} catch( _g ) {
return null;
}
};
Reflect.fields = function(o) {
var a = [];
if(o != null) {
var hasOwnProperty = Object.prototype.hasOwnProperty;
for( var f in o ) {
if(f != "__id__" && f != "hx__closures__" && hasOwnProperty.call(o,f)) {
a.push(f);
}
}
}
return a;
};
Reflect.deleteField = function(o,field) {
if(!Object.prototype.hasOwnProperty.call(o,field)) {
return false;
}
delete(o[field]);
return true;
};
var Std = function() { };
Std.__name__ = true;
Std.string = function(s) {
return js_Boot.__string_rec(s,"");
};
Std.parseInt = function(x) {
if(x != null) {
var _g = 0;
var _g1 = x.length;
while(_g < _g1) {
var i = _g++;
var c = x.charCodeAt(i);
if(c <= 8 || c >= 14 && c != 32 && c != 45) {
var nc = x.charCodeAt(i + 1);
var v = parseInt(x,nc == 120 || nc == 88 ? 16 : 10);
if(isNaN(v)) {
return null;
} else {
return v;
}
}
}
}
return null;
};
var StringTools = function() { };
StringTools.__name__ = true;
StringTools.isSpace = function(s,pos) {
var c = HxOverrides.cca(s,pos);
if(!(c > 8 && c < 14)) {
return c == 32;
} else {
return true;
}
};
StringTools.ltrim = function(s) {
var l = s.length;
var r = 0;
while(r < l && StringTools.isSpace(s,r)) ++r;
if(r > 0) {
return HxOverrides.substr(s,r,l - r);
} else {
return s;
}
};
StringTools.rtrim = function(s) {
var l = s.length;
var r = 0;
while(r < l && StringTools.isSpace(s,l - r - 1)) ++r;
if(r > 0) {
return HxOverrides.substr(s,0,l - r);
} else {
return s;
}
};
StringTools.trim = function(s) {
return StringTools.ltrim(StringTools.rtrim(s));
};
StringTools.replace = function(s,sub,by) {
return s.split(sub).join(by);
};
var haxe_iterators_ArrayIterator = function(array) {
this.current = 0;
this.array = array;
};
haxe_iterators_ArrayIterator.__name__ = true;
haxe_iterators_ArrayIterator.prototype = {
hasNext: function() {
return this.current < this.array.length;
}
,next: function() {
return this.array[this.current++];
}
};
var js_Boot = function() { };
js_Boot.__name__ = true;
js_Boot.__string_rec = function(o,s) {
if(o == null) {
return "null";
}
if(s.length >= 5) {
return "<...>";
}
var t = typeof(o);
if(t == "function" && (o.__name__ || o.__ename__)) {
t = "object";
}
switch(t) {
case "function":
return "<function>";
case "object":
if(((o) instanceof Array)) {
var str = "[";
s += "\t";
var _g = 0;
var _g1 = o.length;
while(_g < _g1) {
var i = _g++;
str += (i > 0 ? "," : "") + js_Boot.__string_rec(o[i],s);
}
str += "]";
return str;
}
var tostr;
try {
tostr = o.toString;
} catch( _g ) {
return "???";
}
if(tostr != null && tostr != Object.toString && typeof(tostr) == "function") {
var s2 = o.toString();
if(s2 != "[object Object]") {
return s2;
}
}
var str = "{\n";
s += "\t";
var hasp = o.hasOwnProperty != null;
var k = null;
for( k in o ) {
if(hasp && !o.hasOwnProperty(k)) {
continue;
}
if(k == "prototype" || k == "__class__" || k == "__super__" || k == "__interfaces__" || k == "__properties__") {
continue;
}
if(str.length != 2) {
str += ", \n";
}
str += s + k + " : " + js_Boot.__string_rec(o[k],s);
}
s = s.substring(1);
str += "\n" + s + "}";
return str;
case "string":
return o;
default:
return String(o);
}
};
var xrfragment_Parser = $hx_exports["xrfragment"]["Parser"] = function() { };
xrfragment_Parser.__name__ = true;
xrfragment_Parser.parse = function(key,value,resultMap) {
var Frag_h = Object.create(null);
Frag_h["prio"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_INT;
Frag_h["#"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_PREDEFINED_VIEW;
Frag_h["class"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING;
Frag_h["src"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_URL;
Frag_h["pos"] = xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.ROUNDROBIN | xrfragment_XRF.T_VECTOR3 | xrfragment_XRF.T_STRING_OBJ | xrfragment_XRF.EMBEDDED;
2023-04-27 18:34:23 +02:00
Frag_h["href"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_URL | xrfragment_XRF.T_PREDEFINED_VIEW;
Frag_h["q"] = xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_STRING | xrfragment_XRF.EMBEDDED;
Frag_h["scale"] = xrfragment_XRF.QUERY_OPERATOR | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.ROUNDROBIN | xrfragment_XRF.T_VECTOR3 | xrfragment_XRF.EMBEDDED;
Frag_h["rot"] = xrfragment_XRF.QUERY_OPERATOR | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.ROUNDROBIN | xrfragment_XRF.T_VECTOR3 | xrfragment_XRF.EMBEDDED;
Frag_h["translate"] = xrfragment_XRF.QUERY_OPERATOR | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.ROUNDROBIN | xrfragment_XRF.T_VECTOR3 | xrfragment_XRF.EMBEDDED;
Frag_h["visible"] = xrfragment_XRF.QUERY_OPERATOR | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.ROUNDROBIN | xrfragment_XRF.T_INT | xrfragment_XRF.EMBEDDED;
Frag_h["env"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_STRING | xrfragment_XRF.EMBEDDED;
Frag_h["t"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.ROUNDROBIN | xrfragment_XRF.T_VECTOR2 | xrfragment_XRF.NAVIGATOR | xrfragment_XRF.EMBEDDED;
Frag_h["gravity"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_VECTOR3 | xrfragment_XRF.EMBEDDED;
Frag_h["physics"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_VECTOR3 | xrfragment_XRF.EMBEDDED;
Frag_h["fov"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_INT | xrfragment_XRF.NAVIGATOR | xrfragment_XRF.EMBEDDED;
Frag_h["clip"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_VECTOR2 | xrfragment_XRF.NAVIGATOR | xrfragment_XRF.EMBEDDED;
Frag_h["fog"] = xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_STRING | xrfragment_XRF.NAVIGATOR | xrfragment_XRF.EMBEDDED;
2023-04-27 18:34:23 +02:00
Frag_h["namespace"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING;
2023-04-28 13:19:45 +02:00
Frag_h["SPDX"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING;
2023-04-27 18:34:23 +02:00
Frag_h["unit"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING;
Frag_h["description"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_STRING;
Frag_h["session"] = xrfragment_XRF.ASSET | xrfragment_XRF.T_URL | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.NAVIGATOR | xrfragment_XRF.EMBEDDED | xrfragment_XRF.PROMPT;
2023-04-27 18:34:23 +02:00
if(value.length == 0 && !Object.prototype.hasOwnProperty.call(Frag_h,key)) {
resultMap[key] = new xrfragment_XRF(key,xrfragment_XRF.PV_EXECUTE | xrfragment_XRF.NAVIGATOR);
2023-04-27 18:34:23 +02:00
return true;
}
if(key.split(".").length > 1 && value.split(".").length > 1) {
resultMap[key] = new xrfragment_XRF(key,xrfragment_XRF.ASSET | xrfragment_XRF.PV_OVERRIDE | xrfragment_XRF.T_STRING | xrfragment_XRF.PROP_BIND);
return true;
}
if(Object.prototype.hasOwnProperty.call(Frag_h,key)) {
var v = new xrfragment_XRF(key,Frag_h[key]);
if(!v.validate(value)) {
2023-04-28 13:19:45 +02:00
console.log("src/xrfragment/Parser.hx:74:","[ i ] fragment '" + key + "' has incompatible value (" + value + ")");
2023-04-27 18:34:23 +02:00
return false;
}
resultMap[key] = v;
} else {
2023-04-28 13:19:45 +02:00
console.log("src/xrfragment/Parser.hx:78:","[ i ] fragment '" + key + "' does not exist or has no type typed (yet)");
2023-04-27 18:34:23 +02:00
return false;
}
return true;
};
var xrfragment_Query = $hx_exports["xrfragment"]["Query"] = function(str) {
this.isNumber = new EReg("^[0-9\\.]+$","");
this.isClass = new EReg("^[-]?class$","");
this.isExclude = new EReg("^-","");
this.isProp = new EReg("^.*:[><=!]?","");
this.q = { };
this.str = "";
if(str != null) {
this.parse(str);
}
};
xrfragment_Query.__name__ = true;
xrfragment_Query.prototype = {
toObject: function() {
return this.q;
}
,expandAliases: function(token) {
var classAlias = new EReg("^(-)?\\.","");
if(classAlias.match(token)) {
return StringTools.replace(token,".","class:");
} else {
return token;
}
}
,get: function() {
return this.q;
}
,parse: function(str,recurse) {
if(recurse == null) {
recurse = false;
}
var _gthis = this;
var token = str.split(" ");
var q = { };
var process = function(str,prefix) {
if(prefix == null) {
prefix = "";
}
str = StringTools.trim(str);
var k = str.split(":")[0];
var v = str.split(":")[1];
var filter = { };
if(q[prefix + k]) {
filter = q[prefix + k];
}
filter["rules"] = filter["rules"] != null ? filter["rules"] : [];
if(_gthis.isProp.match(str)) {
var oper = "";
if(str.indexOf("*") != -1) {
oper = "*";
}
if(str.indexOf(">") != -1) {
oper = ">";
}
if(str.indexOf("<") != -1) {
oper = "<";
}
if(str.indexOf(">=") != -1) {
oper = ">=";
}
if(str.indexOf("<=") != -1) {
oper = "<=";
}
if(_gthis.isExclude.match(k)) {
oper = "!=";
k = HxOverrides.substr(k,1,null);
} else {
v = HxOverrides.substr(v,oper.length,null);
}
if(oper.length == 0) {
oper = "=";
}
if(_gthis.isClass.match(k)) {
filter[prefix + k] = oper != "!=";
q[v] = filter;
} else {
var rule = { };
if(_gthis.isNumber.match(v)) {
rule[oper] = parseFloat(v);
} else {
rule[oper] = v;
}
filter["rules"].push(rule);
q[k] = filter;
}
return;
} else {
filter["id"] = _gthis.isExclude.match(str) ? false : true;
var key = _gthis.isExclude.match(str) ? HxOverrides.substr(str,1,null) : str;
q[key] = filter;
}
};
var _g = 0;
var _g1 = token.length;
while(_g < _g1) {
var i = _g++;
process(this.expandAliases(token[i]));
}
return this.q = q;
}
,test: function(obj) {
var qualify = false;
var _g = 0;
var _g1 = Reflect.fields(obj);
while(_g < _g1.length) {
var k = _g1[_g];
++_g;
var v = Std.string(Reflect.field(obj,k));
if(this.testProperty(k,v)) {
qualify = true;
}
}
var _g = 0;
var _g1 = Reflect.fields(obj);
while(_g < _g1.length) {
var k = _g1[_g];
++_g;
var v = Std.string(Reflect.field(obj,k));
if(this.testProperty(k,v,true)) {
qualify = false;
}
}
return qualify;
}
,testProperty: function(property,value,exclude) {
var conds = 0;
var fails = 0;
var qualify = 0;
var testprop = function(expr) {
conds += 1;
fails += expr ? 0 : 1;
return expr;
};
if(this.q[value] != null) {
var v = this.q[value];
if(v[property] != null) {
return v[property];
}
}
var _g = 0;
var _g1 = Reflect.fields(this.q);
while(_g < _g1.length) {
var k = _g1[_g];
++_g;
var filter = Reflect.field(this.q,k);
if(filter.rules == null) {
continue;
}
var rules = filter.rules;
var _g2 = 0;
while(_g2 < rules.length) {
var rule = rules[_g2];
++_g2;
if(exclude) {
if(Reflect.field(rule,"!=") != null && testprop((value == null ? "null" : "" + value) == Std.string(Reflect.field(rule,"!="))) && exclude) {
++qualify;
}
} else {
if(Reflect.field(rule,"*") != null && testprop(parseFloat(value) != null)) {
++qualify;
}
if(Reflect.field(rule,">") != null && testprop(parseFloat(value) > parseFloat(Reflect.field(rule,">")))) {
++qualify;
}
if(Reflect.field(rule,"<") != null && testprop(parseFloat(value) < parseFloat(Reflect.field(rule,"<")))) {
++qualify;
}
if(Reflect.field(rule,">=") != null && testprop(parseFloat(value) >= parseFloat(Reflect.field(rule,">=")))) {
++qualify;
}
if(Reflect.field(rule,"<=") != null && testprop(parseFloat(value) <= parseFloat(Reflect.field(rule,"<=")))) {
++qualify;
}
if(Reflect.field(rule,"=") != null && (testprop(value == Reflect.field(rule,"=")) || testprop(parseFloat(value) == parseFloat(Reflect.field(rule,"="))))) {
++qualify;
}
}
}
}
return qualify > 0;
}
};
var xrfragment_URI = $hx_exports["xrfragment"]["URI"] = function() { };
xrfragment_URI.__name__ = true;
2023-05-04 13:28:22 +02:00
xrfragment_URI.parse = function(url,filter) {
var store = { };
if(url.indexOf("#") == -1) {
return store;
}
var fragment = url.split("#");
2023-04-27 18:34:23 +02:00
var splitArray = fragment[1].split("&");
var _g = 0;
var _g1 = splitArray.length;
while(_g < _g1) {
var i = _g++;
var splitByEqual = splitArray[i].split("=");
var regexPlus = new EReg("\\+","g");
var key = splitByEqual[0];
var value = "";
if(splitByEqual.length > 1) {
var s = regexPlus.split(splitByEqual[1]).join(" ");
value = decodeURIComponent(s.split("+").join(" "));
}
2023-05-04 13:28:22 +02:00
var ok = xrfragment_Parser.parse(key,value,store);
2023-04-27 18:34:23 +02:00
}
2023-05-04 13:28:22 +02:00
if(filter != null && filter != 0) {
2023-04-27 18:34:23 +02:00
var _g = 0;
2023-05-04 13:28:22 +02:00
var _g1 = Reflect.fields(store);
2023-04-27 18:34:23 +02:00
while(_g < _g1.length) {
var key = _g1[_g];
++_g;
2023-05-04 13:28:22 +02:00
var xrf = store[key];
if(!xrf.is(filter)) {
Reflect.deleteField(store,key);
2023-04-27 18:34:23 +02:00
}
}
}
2023-05-04 13:28:22 +02:00
return store;
2023-04-27 18:34:23 +02:00
};
2023-04-28 13:19:45 +02:00
var xrfragment_XRF = $hx_exports["xrfragment"]["XRF"] = function(_fragment,_flags) {
2023-04-27 18:34:23 +02:00
this.fragment = _fragment;
this.flags = _flags;
};
xrfragment_XRF.__name__ = true;
2023-04-28 13:19:45 +02:00
xrfragment_XRF.set = function(flag,flags) {
return flags | flag;
};
xrfragment_XRF.unset = function(flag,flags) {
return flags & ~flag;
};
2023-04-27 18:34:23 +02:00
xrfragment_XRF.prototype = {
is: function(flag) {
return (this.flags & flag) != 0;
}
,validate: function(value) {
this.guessType(this,value);
if(value.split("|").length > 1) {
this.args = [];
var args = value.split("|");
var _g = 0;
var _g1 = args.length;
while(_g < _g1) {
var i = _g++;
var x = new xrfragment_XRF(this.fragment,this.flags);
this.guessType(x,args[i]);
this.args.push(x);
}
}
if(this.fragment == "q") {
this.query = new xrfragment_Query(value).get();
}
var ok = true;
if(!((this.args) instanceof Array)) {
if(this.is(xrfragment_XRF.T_VECTOR3) && !(typeof(this.x) == "number" && typeof(this.y) == "number" && typeof(this.z) == "number")) {
ok = false;
}
if(this.is(xrfragment_XRF.T_VECTOR2) && !(typeof(this.x) == "number" && typeof(this.y) == "number")) {
ok = false;
}
var tmp;
if(this.is(xrfragment_XRF.T_INT)) {
var v = this.int;
tmp = !(typeof(v) == "number" && ((v | 0) === v));
} else {
tmp = false;
}
if(tmp) {
ok = false;
}
}
return ok;
}
,guessType: function(v,str) {
v.string = str;
if(str.split(",").length > 1) {
var xyz = str.split(",");
if(xyz.length > 0) {
v.x = parseFloat(xyz[0]);
}
if(xyz.length > 1) {
v.y = parseFloat(xyz[1]);
}
if(xyz.length > 2) {
v.z = parseFloat(xyz[2]);
}
}
if(xrfragment_XRF.isColor.match(str)) {
v.color = str;
}
if(xrfragment_XRF.isFloat.match(str)) {
v.float = parseFloat(str);
}
if(xrfragment_XRF.isInt.match(str)) {
v.int = Std.parseInt(str);
}
}
};
if(typeof(performance) != "undefined" ? typeof(performance.now) == "function" : false) {
HxOverrides.now = performance.now.bind(performance);
}
String.__name__ = true;
Array.__name__ = true;
js_Boot.__toStr = ({ }).toString;
xrfragment_Parser.error = "";
xrfragment_XRF.ASSET = 1;
xrfragment_XRF.PROP_BIND = 2;
xrfragment_XRF.QUERY_OPERATOR = 4;
xrfragment_XRF.PROMPT = 8;
xrfragment_XRF.ROUNDROBIN = 16;
xrfragment_XRF.NAVIGATOR = 32;
xrfragment_XRF.EMBEDDED = 64;
2023-05-04 13:28:22 +02:00
xrfragment_XRF.PV_OVERRIDE = 128;
xrfragment_XRF.PV_EXECUTE = 256;
xrfragment_XRF.T_COLOR = 8192;
xrfragment_XRF.T_INT = 16384;
xrfragment_XRF.T_FLOAT = 32768;
xrfragment_XRF.T_VECTOR2 = 65536;
xrfragment_XRF.T_VECTOR3 = 131072;
xrfragment_XRF.T_URL = 262144;
xrfragment_XRF.T_PREDEFINED_VIEW = 524288;
xrfragment_XRF.T_STRING = 1048576;
xrfragment_XRF.T_STRING_OBJ = 2097152;
xrfragment_XRF.T_STRING_OBJ_PROP = 4194304;
2023-04-27 18:34:23 +02:00
xrfragment_XRF.isColor = new EReg("^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$","");
xrfragment_XRF.isInt = new EReg("^[0-9]+$","");
xrfragment_XRF.isFloat = new EReg("^[0-9]+\\.[0-9]+$","");
2023-04-28 13:19:45 +02:00
xrfragment_XRF.isVector = new EReg("([,]+|\\w)","");
xrfragment_XRF.isUrl = new EReg("(://)?\\..*","");
xrfragment_XRF.isUrlOrPretypedView = new EReg("(^#|://)?\\..*","");
xrfragment_XRF.isString = new EReg(".*","");
2023-04-27 18:34:23 +02:00
})({});
var xrfragment = $hx_exports["xrfragment"];
2023-04-27 17:35:20 +02:00
</script>
</head>
<body class="tc-body">
<!--~~ Raw markup for the top of the body section ~~-->
<!--~~ Static styles ~~-->
<div id="styleArea">
<style data-tiddler-title="$:/boot/boot.css" data-tiddler-type="text/css" type="text/css">/*
Basic styles used before we boot up the parsing engine
*/
/*
Error message and password prompt
*/
.tc-error-form {
font-family: sans-serif;
color: #fff;
z-index: 20000;
position: fixed;
background-color: rgb(255, 75, 75);
border: 8px solid rgb(255, 0, 0);
border-radius: 8px;
width: 50%;
margin-left: 25%;
margin-top: 4em;
padding: 0 2em 1em 2em;
}
.tc-error-form h1 {
text-align: center;
}
.tc-error-prompt {
text-align: center;
color: #000;
}
.tc-error-message {
overflow: auto;
max-height: 40em;
padding-right: 1em;
margin: 1em 0;
white-space: pre-line;
}
.tc-password-wrapper {
font-family: sans-serif;
z-index: 20000;
position: fixed;
text-align: center;
width: 200px;
top: 4em;
left: 50%;
margin-left: -144px; /* - width/2 - paddingHorz/2 - border */
padding: 16px 16px 16px 16px;
border-radius: 8px;
}
.tc-password-wrapper {
color: #000;
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
background-color: rgb(197, 235, 183);
border: 8px solid rgb(164, 197, 152);
}
.tc-password-wrapper form {
text-align: left;
}
.tc-password-wrapper h1 {
font-size: 16px;
line-height: 20px;
padding-bottom: 16px;
}
.tc-password-wrapper input {
width: 100%;
}
</style>
</div>
<!--~~ Static content for Google and browsers without JavaScript ~~-->
<noscript>
<div id="splashArea">
<p>This <a class="tc-tiddlylink-external" href="https://tiddlywiki.com" rel="noopener noreferrer" target="_blank">TiddlyWiki</a> contains the following tiddlers:</p><p><ul>
2023-05-04 13:28:22 +02:00
<li>↪ Parser.parse(k,v,store)</li>
2023-04-27 20:06:46 +02:00
2023-06-22 13:27:14 +02:00
<li>↪ Query(query)</li>
2023-05-04 13:28:22 +02:00
<li>↪ URI.parse(url,filter)</li>
2023-04-27 20:06:46 +02:00
2023-06-02 16:20:22 +02:00
<li>📜 XR fragments</li>
2023-04-27 17:35:20 +02:00
<li>$:/.tb/macros/script</li>
2023-05-04 19:45:06 +02:00
<li>$:/.tb/modules/startup/hide-sidebar.js</li>
2023-04-27 17:35:20 +02:00
<li>$:/config/AutoSave</li>
2023-05-04 13:28:22 +02:00
<li>$:/config/BitmapEditor/Colour</li>
2023-04-27 17:35:20 +02:00
<li>$:/config/BrowserStorage/Enabled</li>
<li>$:/config/BrowserStorage/SaveFilter</li>
<li>$:/config/codemirror/lineNumbers</li>
<li>$:/config/codemirror/lineWrapping</li>
<li>$:/config/codemirror/styleActiveLine</li>
<li>$:/config/codemirror/theme</li>
2023-05-04 13:28:22 +02:00
<li>$:/config/ColourPicker/Recent</li>
2023-05-23 14:57:45 +02:00
<li>$:/config/DefaultSidebarTab</li>
2023-05-04 19:45:06 +02:00
<li>$:/config/HideSidebarOnStartup</li>
2023-04-27 17:35:20 +02:00
<li>$:/config/HtmlParser/DisableSandbox</li>
<li>$:/config/HtmlParser/SandboxTokens</li>
<li>$:/config/Manager/Filter</li>
<li>$:/config/Manager/System</li>
<li>$:/config/Navigation/UpdateAddressBar</li>
<li>$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/control-panel</li>
<li>$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/full-screen</li>
<li>$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/manager</li>
<li>$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/more-page-actions</li>
<li>$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/new-tiddler</li>
<li>$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/save-wiki</li>
2023-04-27 20:06:46 +02:00
<li>$:/config/PageControlButtons/Visibility/$:/plugins/tiddlywiki/markdown/new-markdown-button</li>
2023-04-27 17:35:20 +02:00
<li>$:/config/PageControlButtons/Visibility/$:/themes/nico/notebook/ui/Buttons/SwitchPalette</li>
<li>$:/config/Plugins/Disabled/$:/plugins/tiddlywiki/browser-storage</li>
<li>$:/config/Plugins/Disabled/$:/plugins/tiddlywiki/codemirror</li>
<li>$:/config/RelinkOnRename</li>
<li>$:/config/TextEditor/EditorHeight/Mode</li>
<li>$:/config/TextEditor/EnableToolbar</li>
<li>$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/clone</li>
<li>$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/export-tiddler</li>
<li>$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/open-window</li>
<li>$:/config/WikiParserRules/Inline/wikilink</li>
<li>$:/core</li>
<li>$:/DefaultTiddlers</li>
<li>$:/isEncrypted</li>
<li>$:/javascript/enable.js</li>
<li>$:/language/DefaultNewTiddlerTitle</li>
<li>$:/palette</li>
<li>$:/plugins/ihm/tidgraph</li>
<li>$:/plugins/nico/notebook-mobile</li>
2023-05-30 15:29:43 +02:00
<li>$:/plugins/sukima/reveal-js</li>
2023-04-27 17:35:20 +02:00
<li>$:/plugins/TheDiveO/TwTube</li>
<li>$:/plugins/tiddlywiki/browser-storage</li>
<li>$:/plugins/tiddlywiki/codemirror</li>
2023-04-27 20:28:00 +02:00
<li>$:/plugins/tiddlywiki/codemirror-mode-css</li>
<li>$:/plugins/tiddlywiki/codemirror-mode-htmlmixed</li>
<li>$:/plugins/tiddlywiki/codemirror-mode-javascript</li>
<li>$:/plugins/tiddlywiki/codemirror-mode-xml</li>
2023-04-27 20:06:46 +02:00
<li>$:/plugins/tiddlywiki/markdown</li>
2023-04-27 17:35:20 +02:00
<li>$:/SiteSubtitle</li>
<li>$:/SiteTitle</li>
<li>$:/state/folded/AFRAME template</li>
<li>$:/state/folded/GLSL shader template</li>
<li>$:/state/import/select-all</li>
<li>$:/state/notebook-sidebar</li>
<li>$:/state/notebook-sidebar-section</li>
<li>$:/state/plugin-info--1887569658-$:/plugins/ihm/tidgraph--50210113</li>
<li>$:/state/plugin-info--391242618-$:/plugins/tiddlywiki/browser-storage</li>
<li>$:/state/plugin-info--391242618-$:/plugins/tiddlywiki/browser-storage--605768392</li>
<li>$:/state/plugin-info-1024395336-$:/plugins/tiddlywiki/codemirror--1574138004</li>
<li>$:/state/plugin-info-833095967-Draft of '$:/core'---1604322978</li>
<li>$:/state/showeditpreview</li>
2023-05-04 19:45:06 +02:00
<li>$:/state/sidebar</li>
2023-04-27 17:35:20 +02:00
<li>$:/state/tab--1963855381</li>
<li>$:/state/tab--2112689675</li>
<li>$:/state/tab--697582678</li>
<li>$:/state/tab--86143343</li>
<li>$:/state/tab--959111941</li>
<li>$:/state/tab-1749438307</li>
<li>$:/state/tab-2065006209</li>
<li>$:/state/tab/moresidebar-1850697562</li>
<li>$:/state/tabs/controlpanel/toolbars-1345989671</li>
2023-05-23 14:57:45 +02:00
<li>$:/state/toc/Examples-AFRAME-698730194</li>
<li>$:/state/toc/Examples-THREE-698730194</li>
2023-06-22 13:27:14 +02:00
<li>$:/state/toc/Reference-js/AFRAME--403145756</li>
2023-06-02 16:20:22 +02:00
<li>$:/state/toc/Reference-js/THREE.js--403145756</li>
2023-06-22 13:27:14 +02:00
<li>$:/state/toc/Reference-The parser--403145756</li>
<li>$:/state/toc/Reference/js/AFRAME-THREE.js--403145756</li>
<li>$:/state/toc/Reference/The parser-THREE.js--403145756</li>
2023-04-27 17:35:20 +02:00
<li>$:/status/RequireReloadDueToPluginChange</li>
<li>$:/StoryList</li>
<li>$:/theme</li>
<li>$:/themes/nico/notebook</li>
<li>$:/themes/nico/notebook/metrics/sidebar-width</li>
<li>$:/themes/nico/notebook/metrics/story-width</li>
<li>$:/themes/nico/notebook/options/stickytitles</li>
<li>$:/themes/tiddlywiki/snowwhite</li>
<li>$:/themes/tiddlywiki/vanilla</li>
<li>$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint</li>
<li>$:/view</li>
<li>$:/webxr-notebook/aframe.min.js</li>
<li>$:/webxr-notebook/boot.css</li>
<li>$:/webxr-notebook/boot.html</li>
<li>$:/webxr-notebook/sandboxify.js</li>
<li>$:/webxr-notebook/scriptie-talkie-embed.js</li>
<li>$:/webxr-notebook/shader-doodle.js</li>
2023-04-28 14:21:22 +02:00
<li>$:/xrfragment/topmenu</li>
2023-04-27 18:34:23 +02:00
<li>$:/xrfragment/xrfragment.js</li>
2023-05-30 15:29:43 +02:00
<li>29th May 2023 future of text presentation notes</li>
<li>4d3.jpg</li>
<li>4dassets.jpg</li>
<li>aboutleon.png</li>
2023-05-23 14:57:45 +02:00
<li>AFRAME</li>
2023-06-22 13:27:14 +02:00
<li>AFRAME demo</li>
2023-04-27 17:35:20 +02:00
<li>AFRAME template</li>
2023-05-08 18:07:27 +02:00
<li>centralized.png</li>
2023-05-30 15:29:43 +02:00
<li>conflict.jpg</li>
2023-04-28 17:16:13 +02:00
<li>Draft 2 of '$:/webxr-notebook/boot.css'</li>
2023-05-04 13:28:22 +02:00
<li>Draft of '↪ URI.parse(url,flags)'</li>
2023-04-28 14:21:22 +02:00
<li>Draft of '$:/webxr-notebook/boot.css'</li>
<li>Draft of 'How it works'</li>
2023-04-27 17:35:20 +02:00
<li>Examples</li>
2023-05-30 15:29:43 +02:00
<li>feedback.png</li>
2023-04-27 17:35:20 +02:00
<li>Fragment Explorer</li>
<li>GLSL template</li>
2023-04-28 17:16:13 +02:00
<li>How it works</li>
2023-05-22 14:10:44 +02:00
<li>href</li>
2023-05-30 15:29:43 +02:00
<li>image.png</li>
2023-05-08 18:07:27 +02:00
<li>interlinked.png</li>
2023-05-22 19:06:00 +02:00
<li>navigation.png</li>
2023-05-30 15:29:43 +02:00
<li>neo.png</li>
2023-05-08 18:07:27 +02:00
<li>nlnet.png</li>
2023-05-30 15:29:43 +02:00
<li>perception_reality6.jpg</li>
2023-05-08 18:07:27 +02:00
<li>Philosophy</li>
2023-05-30 15:29:43 +02:00
<li>popper.png</li>
2023-04-28 13:19:45 +02:00
<li>predefined_view</li>
2023-05-30 15:29:43 +02:00
<li>Presentation: XR Fragments (Future of Text)</li>
<li>q.png</li>
2023-06-07 15:35:48 +02:00
<li>queries</li>
2023-04-27 17:35:20 +02:00
<li>Reference</li>
2023-06-22 11:35:38 +02:00
<li>roundrobin</li>
2023-06-07 15:35:48 +02:00
<li>Selection of interest</li>
2023-05-30 15:29:43 +02:00
<li>Slide_FutureOfText/01</li>
<li>Slide_FutureOfText/02</li>
<li>Slide_FutureOfText/03</li>
<li>Slide_FutureOfText/04</li>
<li>Slide_FutureOfText/05.2</li>
<li>Slide_FutureOfText/06</li>
<li>Slide_FutureOfText/06.01</li>
<li>Slide_FutureOfText/06.3</li>
<li>Slide_FutureOfText/07</li>
<li>Slide_FutureOfText/07.3</li>
<li>Slide_FutureOfText/07.46</li>
<li>Slide_FutureOfText/07.473</li>
<li>Slide_FutureOfText/07.475</li>
<li>Slide_FutureOfText/07.48</li>
<li>Slide_FutureOfText/07.49</li>
<li>Slide_FutureOfText/07.495</li>
<li>Slide_FutureOfText/07.497</li>
<li>Slide_FutureOfText/07.5</li>
<li>Slide_FutureOfText/07.6</li>
<li>Slide_FutureOfText/09</li>
<li>Slide_FutureOfText/16</li>
<li>Slide_FutureOfText/17</li>
<li>Slide_FutureOfText/18</li>
2023-06-22 11:35:38 +02:00
<li>src</li>
2023-06-22 13:27:14 +02:00
<li>The parser</li>
2023-05-23 14:57:45 +02:00
<li>THREE</li>
2023-04-27 17:35:20 +02:00
<li>THREE template</li>
<li>THREE template #online</li>
2023-06-22 13:27:14 +02:00
<li>THREE.js</li>
2023-04-28 13:19:45 +02:00
<li>vector</li>
2023-04-27 17:35:20 +02:00
<li>WebXR</li>
<li>XR Fragments</li>
2023-05-04 13:28:22 +02:00
<li>xrfragment.jpg</li>
2023-04-27 17:35:20 +02:00
</ul>
</p>
<style>
.tc-remove-when-wiki-loaded {display: none;}
</style>
</div>
</noscript>
<!--~~ Ordinary tiddlers ~~-->
<script class="tiddlywiki-tiddler-store" type="application/json">[
2023-06-22 13:27:14 +02:00
{"created":"20230427174739986","text":"> in \u003Ca href=\"./dist/xrfragment.js\" target=\"_blank\">xrfragment.js\u003C/a>, and \u003Ca href=\"./dist/xrfragment.module.js\" target=\"_blank\">xrfragment.module.js\u003C/a>\n\nParse a fragment (key/value) and add it to an object store (if valid).\n\n| args | type | example | comment |\n|-|-|-|-|\n| key | string | `pos` | |\n| value | string | `1.2,3,4` | datatype must comply with [spec](#List%20of%20fragments) |\n| store | object | {} | will not be touched if validation failed, |\n\n> returns true if validated, otherwise false \n\nhere are some interactive examples:\n\n\u003Cdiv>\n \u003Ctextarea spellcheck=\"false\" autofocus class=\"sandboxify\">frags = {}\nok = xrfragment.Parser.parse('pos','1.2,2,3',frags)\nconsole.log( frags.pos )\n\n\u003C/textarea>\n\t\u003Cpre class=\"result\">\u003C/pre>\n\u003C/div>\n\n\u003Cbr>\n\nUnknown or fragments with wrong type will be rejected:\n\n\u003Cdiv>\n \u003Ctextarea spellcheck=\"false\" autofocus class=\"sandboxify\">frags = {}\nok = xrfragment.Parser.parse('pos','true',frags)\nconsole.log( frags.pos )\n\n\u003C/textarea>\n\t\u003Cpre class=\"result\">\u003C/pre>\n\u003C/div>","tags":"[[The parser]]","title":"↪ Parser.parse(k,v,store)","modified":"20230622111815322","type":"text/markdown"},
{"created":"20230622103539209","text":"> in \u003Ca href=\"./dist/xrfragment.js\" target=\"_blank\">xrfragment.js\u003C/a>, and \u003Ca href=\"./dist/xrfragment.module.js\" target=\"_blank\">xrfragment.module.js\u003C/a>\n\nParses a [[query|queries]] and returns it in object form\n\n| args | type | example |\n|-|-|-|\n| query | string | `foo -bar`\u003Cbr>`price:1 price:\u003C10`\u003Cbr>`.someclass`|\n\n> returns each query-argument as annotated key(objects)\n\nThe AFRAME/THREE library does this for you, but here's an interactive example of parsing a query using the [[parser for other languages|https://github.com/coderofsalvation/xrfragment/tree/main/dist]]:\n\n\u003Cdiv>\n \u003Ctextarea spellcheck=\"false\" autofocus class=\"sandboxify\">frags = new xrfragment.Query('cube -ball_inside_cube')\nconsole.log(frags.q)\n\n\u003C/textarea>\n\t\u003Cpre class=\"result\">\u003C/pre>\n\u003C/div>\n","tags":"[[The parser]]","title":"↪ Query(query)","modified":"20230622111828770","type":"text/markdown","list-after":"List of fragments"},
{"created":"20230427150948872","text":"> in \u003Ca href=\"./dist/xrfragment.js\" target=\"_blank\">xrfragment.js\u003C/a>, and \u003Ca href=\"./dist/xrfragment.module.js\" target=\"_blank\">xrfragment.module.js\u003C/a>\n\nValidates and turns a XR fragment string into objectform using [Parser.parse(k,v,store)](#↪%20Parser.parse(k,v,store)).\n\n| args | type | example | comment |\n|-|-|-|-|\n| url | string | `#pos=1.2,3,4`\u003Cbr>`#pos=1.2,3,4&t=1,2`| |\n| filter | integer\u003Cbr>(bitmask) | `0` = no filter\u003Cbr>`XRF.NAVIGATOR`\u003Cbr>`XRF.EMBEDDED`\u003Cbr>`XRF.PV_OVERRIDE` | filter out fragments which are not flagged with this flag.\u003Cbr>\u003Cbr>For example, parsing with `XRF.NAVIGATOR` will ignore any fragments which are not flagged as such (like `scale` in case of top-level URI navigation).\u003Cbr>On the other hand, `XRF.EMBEDDED` makes sense when parsing an embedded URI (`src: other.gltf#scale=2,2,2` e.g.)\u003Cbr> |\n\n> returns an object with validated fragment(values) as key(objects)\n\nhere are some interactive examples:\n\n\u003Cdiv>\n \u003Ctextarea spellcheck=\"false\" autofocus class=\"sandboxify\">frags = xrfragment.URI.parse('#pos=1.0,2.0,3.0')\nconsole.log( frags.pos )\u003C/textarea>\n\t\u003Cpre class=\"result\">\u003C/pre>\n\u003C/div>\n\n\u003Cbr>\n\nYou can combine them with the `&` character:\u003Cbr>\n\n\u003Cdiv>\n \u003Ctextarea spellcheck=\"false\" autofocus class=\"sandboxify\">frags = xrfragment.URI.parse('#t=1,100&pos=1,2,3.1')\nconsole.log( frags.t )\u003C/textarea>\n\t\u003Cpre class=\"result\">\u003C/pre>\n\u003C/div>\n\nUnallowed fragments can be filtered out:\u003Cbr>\n\n\u003Cdiv>\n \u003Ctextarea spellcheck=\"false\" autofocus class=\"sandboxify\">XRF = xrfragment.XRF\nfrags = xrfragment.URI.parse('#scale=1,2,3', XRF.NAVIGATOR )\nconsole.log( frags )\u003C/textarea>\n\t\u003Cpre class=\"result\">\u003C/pre>\n\u003C/div>\n\n> The above is perfect for top-level browser navigation (modifying `scale` is not allowed here)\n\nAnother example for parsing embedded assets\n\n\u003Cdiv>\n \u003Ctextarea spellcheck=\"false\" autofocus class=\"sandboxify\">XRF = xrfragment.XRF\nmymodel = {userData:{src: \"other.gltf#scale=2,2,2\"}} // mock THREE.js\nfrags = xrfragment.URI.parse( mymodel.userData.src, XRF.EMBEDDED )\nconsole.log( frags.scale.x )\u003C/textarea>\n\t\u003Cpre class=\"result\">\u003C/pre>\n\u003C/div>\n\n> The above is perfect for embedded content (`scale` fragment is allowed here)","tags":"[[The parser]]","title":"↪ URI.parse(url,filter)","modified":"20230622111844102","type":"text/markdown","list-after":"List of fragments"},
2023-06-22 11:42:26 +02:00
{"created":"20230427172131986","text":"## Navigator spec (level 0)\n\n> v1.0\u003Cbr>Bare minimum navigation URI-fragments for browsers & apps\n\n| fragment | type | access | scope |\n|----------|------|--------------|-------|\n| **#pos=** |[vector3](#vector ) |🔓 🎲 💥 🔗|href navigation / (tele)port(al) / scene-object operator|\n| **#rot=** |[vector3](#vector ) |🔓 🎲 💥 🔗| scene-object operator|\n| **#t=** |[vector2](#vector ) |🔓 🎲 💥 👩 🔗|specify time/animation-range|\n| **#...** |[predefined view](#predefined_view ) or [selection](#Selection%20of%20interest)|🔒|(sub)asset loading linking|\n\n> To be compliant with the XR Fragments \u003Cb>nagivator\u003C/b> spec, end-users should always have access to a URL-bar as well as a back/forward button.\n\n## Embedded spec (level 1)\n\n> v1.0 recursive querying, loading & interaction\n\n| custom property\u003Cbr>of scene-node | type | access | scope |\n|----------|------|--------------|-------|\n| [href](#href) | string (uri or [predefined view](#predefined_view) or [query](#queries) and/or scene-object operators) |🔒|href navigation / portals / teleporting|\n| [[src]] |string (uri or [predefined view](#predefined_view) or [query](#queries) and/or scene-object operators) |🔒| (recursive) asset loading linking|\n| **class** |string|🔒|query selector|\n\n| fragment | type | access | scope |\n|----------|------|--------------|-------|\n| **#mov=** |[vector3](#vector ) |🔒 🎲 💥 🔗|scene-object operator|\n| **#scale=** |[vector3](#vector ) |🔓 🎲 💥 🔗| scene-object operator|\n| [#q=](#queries) |string|🔓 💥 🔗|query selector / object manipulation|\n\n## Authoring spec (level 100)\n\n> v1.0\u003Cbr>\n> level 100 is optional, and embedded-only (=not supported in the navigator url) since various 4D assets (fbx/gltf e.g.) have their own \necosystem of extensions which might be preferred (or not).\n\n| fragment | type | access | scope |\n|----------|------|--------------|-------|\n| **env** |string|🔓 💥 🔗|query selector / object manipulation|\n| **prio** |int|🔒|asset loading linking|\n| **visible** |int|🔓 🎲 💥 🔗|query selector / object manipulation|\n| **gravity** |[vector3](#vector ) |🔓 💥 🔗|animation|\n| **physics** |[vector3](#vector ) |🔓 💥 🔗|animation|\n| **fov** |int|🔓 💥 👩 🔗|device / viewport settings|\n| **clip** |[vector2](#vector ) |🔓 💥 👩 🔗|device / viewport settings|\n| **fog** |string|🔓 💥 👩 🔗|device / viewport settings|\n| **namespace** |string|🔒|author / metadata|\n| **SPDX** |string|🔒|author / metadata|\n| **unit** |string|🔒|author / metadata|\n| **description** |string|🔒|author / metadata|\n| **session** |[url](#url ) |🔓 💥 👩 🔗 ✋?|multiparty|\n\n🔒 = value(s) can only be defined in 3D asset (immutable)\u003Cbr>\n🔓 = value(s) can be overwritten in certain context (by url)\u003Cbr>\n🎲 = multiple values will be roundrobin'ed (`#pos=0,0,0|1,0,0` e.g.)\u003Cbr>\n💥 = value(s) can be overwritten by [predefined_view](#predefined_view)\u003Cbr>\n👩 = value(s) can be overwritten when user clicks `href` (value) or top-level URL change(see [How it works](#How%20it%20works))\u003Cbr>\n🔗 = value(s) can be overwritten when 3D asset is embedded/linked as `src` value\u003Cbr>\n✋? = value(s) can be overwritten by offering confirmation/undo to user\u003Cbr>\u003Cbr>\n\nfor more info see [How it works](#How%20it%20works)\n","tags":"Reference","title":"📜 XR fragments","modified":"20230622094206348","type":"text/markdown"},
2023-04-27 17:35:20 +02:00
{"text":"(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nenables js via \u003C\u003Cscript>> and disables with \u003C\u003Cscript 0>>\n*/\n\nexports.name = \"script\";\n\nexports.params = [\n\t{name: \"run\"},\n];\n\n/*\nRun the macro\n*/\nexports.run = function(run) {\n var off = run ? run.toLowerCase() : false;\n\tif(off && [\"0\",\"no\",\"off\",\"false\"].indexOf(off) > -1) {\n\t\t$tw.config.htmlUnsafeElements = [\"script\"];\n\t} else {\n\t\t$tw.config.htmlUnsafeElements = [];\n\t}\nreturn \"\";\n};\n})();","type":"application/javascript","title":"$:/.tb/macros/script","tags":"","module-type":"macro","modifier":"Tobias Beer","modified":"20150129192206415","creator":"Tobias Beer","created":"20150129001857442"},
2023-05-04 19:45:06 +02:00
{"text":"/*\\\ntitle: $:/.tb/modules/startup/hide-sidebar.js\ntype: application/javascript\nmodule-type: startup\ncreated: 20151010151732122\ncreator: Tobias Beer\nmodified: 20151010151750739\n\nHides the sidebar on startup when the config tiddler [[$:/config/hide-sidebar-on-startup]] contains \"yes\"\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n// Export name and synchronous status\nexports.name = \"hide-sidebar-on-startup\";\nexports.platforms = [\"browser\"];\nexports.after = [\"startup\"];\nexports.synchronous = true;\n\nexports.startup = function() {\n\tvar conf = $tw.wiki.getTiddler(\"$:/config/HideSidebarOnStartup\"),\n\t\tvalue = (conf ? conf.getFieldString(\"text\") : \"\").toLowerCase(),\n\t\tstate = value == \"yes\" ? \"no\" : \"yes\";\n\t$tw.wiki.setText(\"$:/state/sidebar\", \"text\", undefined, state);\n};\n\n})();","bag":"default","revision":"0","type":"application/javascript","title":"$:/.tb/modules/startup/hide-sidebar.js","module-type":"startup","modified":"20151010151750739","creator":"Tobias Beer","created":"20151010151732122"},
2023-04-27 17:35:20 +02:00
{"created":"20230427092629816","title":"$:/config/AutoSave","text":"no","modified":"20230427104339917"},
2023-05-04 13:28:22 +02:00
{"created":"20230504104444744","title":"$:/config/BitmapEditor/Colour","text":"PaleGreen","modified":"20230504104444744"},
2023-04-27 17:35:20 +02:00
{"title":"$:/config/BrowserStorage/Enabled","text":"yes"},
{"created":"20230427093305938","title":"$:/config/BrowserStorage/SaveFilter","text":"[all[]] -[is[shadow]!is[tiddler]] -[prefix[$:/state/popup/]] -[prefix[$:/temp/]] -[prefix[$:/HistoryList]]","modified":"20230427093305938"},
{"created":"20230424093106917","text":"true","title":"$:/config/codemirror/lineNumbers","type":"bool","modified":"20230424093106917"},
{"created":"20230424093115922","text":"false","title":"$:/config/codemirror/lineWrapping","type":"bool","modified":"20230425143830415"},
{"created":"20230424093124914","text":"true","title":"$:/config/codemirror/styleActiveLine","type":"bool","modified":"20230424093124914"},
{"created":"20230424093136251","title":"$:/config/codemirror/theme","type":"string","text":"tiddlywiki","modified":"20230424093243338"},
2023-05-04 13:28:22 +02:00
{"created":"20230504104444743","title":"$:/config/ColourPicker/Recent","list":"PaleGreen","modified":"20230504104444743"},
2023-05-23 14:57:45 +02:00
{"created":"20230523124940866","title":"$:/config/DefaultSidebarTab","text":"Examples","modified":"20230523124950995"},
2023-05-04 19:45:06 +02:00
{"created":"20151007165524815","text":"yes","bag":"default","revision":"0","type":"text/vnd.tiddlywiki","title":"$:/config/HideSidebarOnStartup","tags":"","modified":"20230504174422977","creator":"Tobias Beer"},
2023-04-27 17:35:20 +02:00
{"created":"20230424093821723","text":"yes","tags":"","title":"$:/config/HtmlParser/DisableSandbox","modified":"20230424142930452"},
{"created":"20230424140117603","text":"allowvr allowfullscreen allow-scripts","tags":"","title":"$:/config/HtmlParser/SandboxTokens","modified":"20230424142737213"},
2023-06-22 11:35:38 +02:00
{"created":"20230423174843715","title":"$:/config/Manager/Filter","text":"hosted","modified":"20230622071725044"},
2023-04-27 17:35:20 +02:00
{"created":"20230423164137536","text":"","title":"$:/config/Manager/System","modified":"20230424140109138"},
2023-04-27 20:06:46 +02:00
{"created":"20230425162854560","title":"$:/config/Navigation/UpdateAddressBar","text":"permalink","modified":"20230427180247389"},
2023-04-27 17:35:20 +02:00
{"created":"20230424152601270","text":"hide","title":"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/control-panel","modified":"20230424152601270"},
{"created":"20230424091250751","text":"show","title":"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/full-screen","modified":"20230424091250751"},
{"created":"20230423175657308","text":"hide","title":"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/manager","modified":"20230424152608585"},
{"created":"20230423175850357","text":"hide","title":"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/more-page-actions","modified":"20230423175928862"},
{"created":"20230424152539963","text":"hide","title":"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/new-tiddler","modified":"20230424152539963"},
{"created":"20230427093524759","text":"show","title":"$:/config/PageControlButtons/Visibility/$:/core/ui/Buttons/save-wiki","modified":"20230427095709120"},
2023-04-27 20:06:46 +02:00
{"created":"20230427180301628","text":"hide","title":"$:/config/PageControlButtons/Visibility/$:/plugins/tiddlywiki/markdown/new-markdown-button","modified":"20230427180301628"},
2023-04-27 17:35:20 +02:00
{"created":"20230423175456754","text":"hide","title":"$:/config/PageControlButtons/Visibility/$:/themes/nico/notebook/ui/Buttons/SwitchPalette","modified":"20230423175456754"},
2023-04-27 19:19:54 +02:00
{"created":"20230427093917511","title":"$:/config/Plugins/Disabled/$:/plugins/tiddlywiki/browser-storage","text":"yes","modified":"20230427171938167"},
2023-04-27 17:35:20 +02:00
{"created":"20230424143038883","title":"$:/config/Plugins/Disabled/$:/plugins/tiddlywiki/codemirror","text":"no","modified":"20230425143703257"},
{"created":"20230423163708078","text":"yes","title":"$:/config/RelinkOnRename","modified":"20230423163708078"},
{"created":"20230424124352350","title":"$:/config/TextEditor/EditorHeight/Mode","text":"fixed","modified":"20230424124352350"},
{"created":"20230423181426748","text":"yes","title":"$:/config/TextEditor/EnableToolbar","modified":"20230423181429179"},
{"created":"20230423175528147","text":"hide","title":"$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/clone","modified":"20230427093444766"},
{"created":"20230425165150260","text":"hide","title":"$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/export-tiddler","modified":"20230427093445320"},
{"created":"20230423175546354","text":"hide","title":"$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/open-window","modified":"20230427093450679"},
{"created":"20230426161158672","text":"disable","title":"$:/config/WikiParserRules/Inline/wikilink","modified":"20230426161158672"},
{"created":"20230424124659851","text":"{\"tiddlers\":{\"$:/Acknowledgements\":{\"title\":\"$:/Acknowledgements\",\"text\":\"TiddlyWiki incorporates code from these fine OpenSource projects:\\n\\n* [[The Stanford Javascript Crypto Library|http://bitwiseshiftleft.github.io/sjcl/]]\\n* [[The Jasmine JavaScript Test Framework|http://pivotal.github.io/jasmine/]]\\n* [[Normalize.css by Nicolas Gallagher|http://necolas.github.io/normalize.css/]]\\n\\nAnd media from these projects:\\n\\n* World flag icons from [[Wikipedia|http://commons.wikimedia.org/wiki/Category:SVG_flags_by_country]]\\n\"},\"$:/core/copyright.txt\":{\"title\":\"$:/core/copyright.txt\",\"type\":\"text/plain\",\"text\":\"TiddlyWiki created by Jeremy Ruston, (jeremy [at] jermolene [dot] com)\\n\\nCopyright (c) 2004-2007, Jeremy Ruston\\nCopyright (c) 2007-2023, UnaMesa Association\\nAll rights reserved.\\n\\nRedistribution and use in source and binary forms, with or without\\nmodification, are permitted provided that the following conditions are met:\\n\\n* Redistributions of source code must retain the above copyright notice, this\\n list of conditions and the following disclaimer.\\n\\n* Redistributions in binary form must reproduce the above copyright notice,\\n this list of conditions and the following disclaimer in the documentation\\n and/or other materials provided with the distribution.\\n\\n* Neither the name of the copyright holder nor the names of its\\n contributors may be used to endorse or promote products derived from\\n this software without specific prior written permission.\\n\\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS'\\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\"},\"$:/core/icon\":{\"title\":\"$:/core/icon\",\"tags\":\"$:/tags/Image\",\"text\":\"\u003Csvg width=\\\"22pt\\\" height=\\\"22pt\\\" viewBox=\\\"0 0 128 128\\\">\u003Cpath d=\\\"M64 0l54.56 32v64L64 128 9.44 96V32L64 0zm21.127 95.408c-3.578-.103-5.15-.094-6.974-3.152l-1.42.042c-1.653-.075-.964-.04-2.067-.097-1.844-.07-1.548-1.86-1.873-2.8-.52-3.202.687-6.43.65-9.632-.014-1.14-1.593-5.17-2.157-6.61-1.768.34-3.546.406-5.34.497-4.134-.01-8.24-.527-12.317-1.183-.8 3.35-3.16 8.036-1.21 11.44 2.37 3.52 4.03 4.495 6.61 4.707 2.572.212 3.16 3.18 2.53 4.242-.55.73-1.52.864-2.346 1.04l-1.65.08c-1.296-.046-2.455-.404-3.61-.955-1.93-1.097-3.925-3.383-5.406-5.024.345.658.55 1.938.24 2.53-.878 1.27-4.665 1.26-6.4.47-1.97-.89-6.73-7.162-7.468-11.86 1.96-3.78 4.812-7.07 6.255-11.186-3.146-2.05-4.83-5.384-4.61-9.16l.08-.44c-3.097.59-1.49.37-4.82.628-10.608-.032-19.935-7.37-14.68-18.774.34-.673.664-1.287 1.243-.994.466.237.4 1.18.166 2.227-3.005 13.627 11.67 13.732 20.69 11.21.89-.25 2.67-1.936 3.905-2.495 2.016-.91 4.205-1.282 6.376-1.55 5.4-.63 11.893 2.276 15.19 2.37 3.3.096 7.99-.805 10.87-.615 2.09.098 4.143.483 6.16 1.03 1.306-6.49 1.4-11.27 4.492-12.38 1.814.293 3.213 2.818 4.25 4.167 2.112-.086 4.12.46 6.115 1.066 3.61-.522 6.642-2.593 9.833-4.203-3.234 2.69-3.673 7.075-3.303 11.127.138 2.103-.444 4.386-1.164 6.54-1.348 3.507-3.95 7.204-6.97 7.014-1.14-.036-1.805-.695-2.653-1.4-.164 1.427-.81 2.7-1.434 3.96-1.44 2.797-5.203 4.03-8.687 7.016-3.484 2.985 1.114 13.65 2.23 15.594 1.114 1.94 4.226 2.652 3.02 4.406-.37.58-.936.785-1.54 1.01l-.82.11zm-40.097-8.85l.553.14c.694-.27 2.09.15 2.83.353-1.363-1.31-3.417-3.24-4.897-4.46-.485-1.47-.278-2.96-.174-4.46l.02-.123c-.582 1.205-1.322 2.376-1.72 3.645-.465 1.71 2.07 3.5
{"created":"20230424092518912","title":"$:/DefaultTiddlers","text":"[[XR Fragments]]","modified":"20230427123802118"},
{"title":"$:/isEncrypted","text":"no"},
{"created":"20230424084159329","text":"\u003C\u003Cscript>>","tags":"$:/tags/PageTemplate","title":"$:/javascript/enable.js","modified":"20230424090240827","type":"text/vnd.tiddlywiki"},
{"created":"20230424092618636","title":"$:/language/DefaultNewTiddlerTitle","text":"New Experiment or Note","modified":"20230424092627873"},
{"created":"20230423174350792","title":"$:/palette","text":"$:/themes/nico/notebook/palettes/palette-beige","modified":"20230427115921847"},
{"text":"{\n \"tiddlers\": {\n \"$:/plugins/ihm/tidgraph/changelog\": {\n \"created\": \"20151024161547099\",\n \"creator\": \"ihm4u\",\n \"modified\": \"20151031061347109\",\n \"modifier\": \"ihm4u\",\n \"tags\": \"\",\n \"title\": \"$:/plugins/ihm/tidgraph/changelog\",\n \"text\": \"For the complete changelog see\\n\\nhttps://ihm4u.github.io/tw5plugs/#Tidgraph%20-%20Changelog\\n\"\n },\n \"$:/plugins/ihm/tidgraph/documentation\": {\n \"title\": \"$:/plugins/ihm/tidgraph/documentation\",\n \"text\": \"!!Example\\nThe following example shows a tiddler which tags 7 children:\\n\\n``\u003C$tidgraph start=\\\"Virtues\\\" />``\\n\\nlooks like this:\\n\\n{{$:/plugins/ihm/tidgraph/tidgraph.png}}\\n\\n!!Usage\\nSimple usage:\\n\\n``\u003C$tidgraph start=\\\"MyRootTiddler\\\" />``\\n\\nThe map will start with MyRootTiddler on the left, and show all its children recursively. The default maximum depth is 10 levels, it can be changed with the `maxdepth` attribute.\\n\\nAll options:\\n\\n|!Attribute |!Description|!Default |\\n|`start` |Initial tiddler that starts the map | none |\\n|`startat` |First level to display. 0 is the root tiddler named in the `start` attribute. 1 is the next level, etc. | 0 |\\n|`maxdepth` |Maximum depth to display.| 10 |\\n|`mode` |//tagging// or //linking// or custom. This is how to identify the children of a node. With //tagging// Tiddlers that tag other tiddlers become their parent. With //linking// tiddlers that link to other tiddlers become their parent. A custom mode can be specified by a `$:/config/tidgraph/modes/MyMode` tiddler where `MyMode` is the name of the mode. The subfilter can be also specified directly; e.g. `mode=\\\"fields[]\\\"`. See [[Custom Mode Demo|https://ihm4u.github.io/tw5plugs/#Custom%20Mode%20Demo]] for an example | //tagging// |\\n|`nodetitle` |Field to use as title for the node. | //title// (or //caption// if present) |\\n|`tooltip` |List of fields to use for node tooltip. The first field with a non empty value is used. | //summary// |\\n|`filter` |Only tiddlers matching filter will be used | none |\\n|`nocollapse` |Disable ability to collapse nodes. The graph allows node collapsing by default. | false |\\n|`nodetemplate` |One or mode node templates to make node look like you want. See the [[Node Templates Demo|https://ihm4u.github.io/tw5plugs/#Node%20Templates%20Demo]] for examples of how to use them. | none |\\n|`layout` |`E` for East (Vertical) or `S` for south (Horizontal) layout. | E |\\n\\n!CSS classes\\nYou can also change colors, and other styles with the following CSS classes.\\n\\n|!Class |!Description |\\n|tgr-node |Style for each node. If you want to change the color of the links inside the node use the `.tgr-node a` selector. |\\n|tgr-edge |Style for the SVG path that connects the nodes. The old name was tgr-link. |\\n|tgr-arrow |Style for the SVG polyline that draws the arrow at the end of the link |\\n\"\n },\n \"$:/plugins/ihm/tidgraph/readme\": {\n \"created\": \"20151024054526558\",\n \"modified\": \"20151024065317719\",\n \"tags\": \"\",\n \"title\": \"$:/plugins/ihm/tidgraph/readme\",\n \"text\": \"!!How\\nSimply put this in your tiddler:\\n\\n``\u003C$tidgraph start=\\\"MyRootTiddler\\\" />``\\n\\nThere are other options covered in the [[documentation|$:/plugins/ihm/tidgraph/documentation]].\\n\\n!!Features\\n* No third-party libraries\\n* Light weight\\n* Rendering of map/graph with HTML5 and SVG (no heavy png or jpg images)\\n* Automatic map/graph creation, no need for dragging/connecting/etc\\n* Figures out tree-graph by means of tags or links, or custom modes \\n* Collapse/expand nodes\\n* User defined Node Templates!!\\n\\n!!Limitations\\n* Layout is horizontal from left to right, if needed a vertical layout will be added later\\n\"\n },\n \"$:/plugins/ihm/tidgraph/stylesheet\": {\n \"tags\": \"$:/tags/Stylesheet\",\n
{"text":"{\n \"tiddlers\": {\n \"$:/plugins/nico/notebook-mobile/js/notebookSidebarNav.js\": {\n \"title\": \"$:/plugins/nico/notebook-mobile/js/notebookSidebarNav.js\",\n \"text\": \"/*\\\\\\ntitle: $:/themes/nico/notebook-mobile/js/notebookSidebarNav.js\\ntype: application/javascript\\nmodule-type: global\\n\\nCloses the notebook sidebar on mobile when navigating\\n\\n\\\\*/\\n(function(){\\n\\n /*jslint node: true, browser: true */\\n /*global $tw: false */\\n \\\"use strict\\\";\\n\\n const isOnMobile = () => {\\n\\t\\tlet bottombar = document.querySelector('.nc-bottombar');\\n\\t\\treturn bottombar && bottombar.getClientRects().length > 0;\\n };\\n\\n const closeSidebar = () => {\\n\\t\\t$tw.wiki.setText(\\\"$:/state/notebook-sidebar\\\", \\\"text\\\", undefined, \\\"no\\\");\\n };\\n\\n const closeSidebarOnMobile = () => {\\n\\t\\tif (isOnMobile()) {\\n console.log(\\\"closing sidebar\\\");\\n\\t\\t\\tcloseSidebar();\\n\\t\\t};\\n };\\n\\n const setup = () => {\\n\\t\\t$tw.hooks.addHook(\\\"th-navigating\\\",function(event) {\\n\\t\\t\\tcloseSidebarOnMobile();\\n\\t\\t\\treturn event;\\n\\t\\t});\\n };\\n\\n setup();\\n\\n exports.closeNotebookSidebar = closeSidebar;\\n})();\\n\",\n \"type\": \"application/javascript\",\n \"module-type\": \"global\",\n \"created\": \"20200430151329085\",\n \"modified\": \"20201210200127495\",\n \"tags\": \"\"\n }\n }\n}","bag":"default","revision":"0","version":"1.0.0","type":"application/json","title":"$:/plugins/nico/notebook-mobile","source":"https://github.com/NicolasPetton/Notebook","plugin-type":"plugin","name":"Mobile support for the Notebook theme","list":"","description":"JavaScript hooks for mobile devices support of the Notebook theme","dependents":"","core-version":">=5.1.22","author":"NicolasPetton"},
2023-05-30 15:29:43 +02:00
{"text":"{\n \"tiddlers\": {\n \"$:/plugins/sukima/reveal-js/reveal.js\": {\n \"text\": \"/*!\\n* reveal.js 4.0.2\\n* https://revealjs.com\\n* MIT licensed\\n*\\n* Copyright (C) 2020 Hakim El Hattab, https://hakim.se\\n*/\\n!function(e,t){\\\"object\\\"==typeof exports&&\\\"undefined\\\"!=typeof module?module.exports=t():\\\"function\\\"==typeof define&&define.amd?define(t):(e=e||self).Reveal=t()}(this,(function(){\\\"use strict\\\";var e=\\\"undefined\\\"!=typeof globalThis?globalThis:\\\"undefined\\\"!=typeof window?window:\\\"undefined\\\"!=typeof global?global:\\\"undefined\\\"!=typeof self?self:{};function t(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw new Error(\\\"Dynamic requires are not currently supported by @rollup/plugin-commonjs\\\")}(null==t&&n.path)}},n.exports),n.exports}var n=function(e){return e&&e.Math==Math&&e},i=n(\\\"object\\\"==typeof globalThis&&globalThis)||n(\\\"object\\\"==typeof window&&window)||n(\\\"object\\\"==typeof self&&self)||n(\\\"object\\\"==typeof e&&e)||Function(\\\"return this\\\")(),r=function(e){try{return!!e()}catch(e){return!0}},a=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),o={}.propertyIsEnumerable,s=Object.getOwnPropertyDescriptor,l={f:s&&!o.call({1:2},1)?function(e){var t=s(this,e);return!!t&&t.enumerable}:o},c=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},u={}.toString,d=function(e){return u.call(e).slice(8,-1)},h=\\\"\\\".split,f=r((function(){return!Object(\\\"z\\\").propertyIsEnumerable(0)}))?function(e){return\\\"String\\\"==d(e)?h.call(e,\\\"\\\"):Object(e)}:Object,v=function(e){if(null==e)throw TypeError(\\\"Can't call method on \\\"+e);return e},g=function(e){return f(v(e))},p=function(e){return\\\"object\\\"==typeof e?null!==e:\\\"function\\\"==typeof e},m=function(e,t){if(!p(e))return e;var n,i;if(t&&\\\"function\\\"==typeof(n=e.toString)&&!p(i=n.call(e)))return i;if(\\\"function\\\"==typeof(n=e.valueOf)&&!p(i=n.call(e)))return i;if(!t&&\\\"function\\\"==typeof(n=e.toString)&&!p(i=n.call(e)))return i;throw TypeError(\\\"Can't convert object to primitive value\\\")},y={}.hasOwnProperty,b=function(e,t){return y.call(e,t)},w=i.document,S=p(w)&&p(w.createElement),E=function(e){return S?w.createElement(e):{}},k=!a&&!r((function(){return 7!=Object.defineProperty(E(\\\"div\\\"),\\\"a\\\",{get:function(){return 7}}).a})),A=Object.getOwnPropertyDescriptor,R={f:a?A:function(e,t){if(e=g(e),t=m(t,!0),k)try{return A(e,t)}catch(e){}if(b(e,t))return c(!l.f.call(e,t),e[t])}},x=function(e){if(!p(e))throw TypeError(String(e)+\\\" is not an object\\\");return e},L=Object.defineProperty,C={f:a?L:function(e,t,n){if(x(e),t=m(t,!0),x(n),k)try{return L(e,t,n)}catch(e){}if(\\\"get\\\"in n||\\\"set\\\"in n)throw TypeError(\\\"Accessors not supported\\\");return\\\"value\\\"in n&&(e[t]=n.value),e}},P=a?function(e,t,n){return C.f(e,t,c(1,n))}:function(e,t,n){return e[t]=n,e},N=function(e,t){try{P(i,e,t)}catch(n){i[e]=t}return t},M=i[\\\"__core-js_shared__\\\"]||N(\\\"__core-js_shared__\\\",{}),I=Function.toString;\\\"function\\\"!=typeof M.inspectSource&&(M.inspectSource=function(e){return I.call(e)});var O,T,D,j=M.inspectSource,H=i.WeakMap,U=\\\"function\\\"==typeof H&&/native code/.test(j(H)),B=t((function(e){(e.exports=function(e,t){return M[e]||(M[e]=void 0!==t?t:{})})(\\\"versions\\\",[]).push({version:\\\"3.6.5\\\",mode:\\\"global\\\",copyright:\\\"© 2020 Denis Pushkarev (zloirock.ru)\\\"})})),F=0,z=Math.random(),q=function(e){return\\\"Symbol(\\\"+String(void 0===e?\\\"\\\":e)+\\\")_\\\"+(++F+z).toString(36)},_=B(\\\"keys\\\"),V=function(e){return _[e]||(_[e]=q(e))},W={},K=i.WeakMap;if(U){var $=new K,X=$.get,Y=$.has,G=$.set;O=function(e,t){return G.call($,e,t),t},T=function(e){return X.call($,e)||{}},D=function(e){return Y.call($,e)}}else{var J=V(\\\"state\\\");W[J]=!0,O=function(e,t){return P(e,J,t),t},T=function(e){return b(e,J)?e[J]:{}},D=function(e){return b(e,J)}}var Q,Z,ee={set:O,get:T,has:D,enforce:function(e){return D(e)?T(e):O(e,{})},get
2023-04-27 17:35:20 +02:00
{"text":"{\"tiddlers\":{\"$:/plugins/TheDiveO/TwTube/libraries/video.js\":{\"text\":\"/* automatically included from npm package `video.js` */\\r\\n/**\\n * @license\\n * Video.js 6.7.3 \u003Chttp://videojs.com/>\\n * Copyright Brightcove, Inc. \u003Chttps://www.brightcove.com/>\\n * Available under Apache License Version 2.0\\n * \u003Chttps://github.com/videojs/video.js/blob/master/LICENSE>\\n *\\n * Includes vtt.js \u003Chttps://github.com/mozilla/vtt.js>\\n * Available under Apache License Version 2.0\\n * \u003Chttps://github.com/mozilla/vtt.js/blob/master/LICENSE>\\n */\\n\\n(function (global, factory) {\\n\\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\\n\\ttypeof define === 'function' && define.amd ? define(factory) :\\n\\t(global.videojs = factory());\\n}(this, (function () {\\n\\nvar version = \\\"6.7.3\\\";\\n\\nvar commonjsGlobal = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\\n\\n\\n\\n\\n\\nfunction createCommonjsModule(fn, module) {\\n\\treturn module = { exports: {} }, fn(module, module.exports), module.exports;\\n}\\n\\nvar win;\\n\\nif (typeof window !== \\\"undefined\\\") {\\n win = window;\\n} else if (typeof commonjsGlobal !== \\\"undefined\\\") {\\n win = commonjsGlobal;\\n} else if (typeof self !== \\\"undefined\\\"){\\n win = self;\\n} else {\\n win = {};\\n}\\n\\nvar window_1 = win;\\n\\nvar empty = {};\\n\\n\\nvar empty$1 = (Object.freeze || Object)({\\n\\t'default': empty\\n});\\n\\nvar minDoc = ( empty$1 && empty ) || empty$1;\\n\\nvar topLevel = typeof commonjsGlobal !== 'undefined' ? commonjsGlobal :\\n typeof window !== 'undefined' ? window : {};\\n\\n\\nvar doccy;\\n\\nif (typeof document !== 'undefined') {\\n doccy = document;\\n} else {\\n doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'];\\n\\n if (!doccy) {\\n doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'] = minDoc;\\n }\\n}\\n\\nvar document_1 = doccy;\\n\\n/**\\n * @file browser.js\\n * @module browser\\n */\\nvar USER_AGENT = window_1.navigator && window_1.navigator.userAgent || '';\\nvar webkitVersionMap = /AppleWebKit\\\\/([\\\\d.]+)/i.exec(USER_AGENT);\\nvar appleWebkitVersion = webkitVersionMap ? parseFloat(webkitVersionMap.pop()) : null;\\n\\n/*\\n * Device is an iPhone\\n *\\n * @type {Boolean}\\n * @constant\\n * @private\\n */\\nvar IS_IPAD = /iPad/i.test(USER_AGENT);\\n\\n// The Facebook app's UIWebView identifies as both an iPhone and iPad, so\\n// to identify iPhones, we need to exclude iPads.\\n// http://artsy.github.io/blog/2012/10/18/the-perils-of-ios-user-agent-sniffing/\\nvar IS_IPHONE = /iPhone/i.test(USER_AGENT) && !IS_IPAD;\\nvar IS_IPOD = /iPod/i.test(USER_AGENT);\\nvar IS_IOS = IS_IPHONE || IS_IPAD || IS_IPOD;\\n\\nvar IOS_VERSION = function () {\\n var match = USER_AGENT.match(/OS (\\\\d+)_/i);\\n\\n if (match && match[1]) {\\n return match[1];\\n }\\n return null;\\n}();\\n\\nvar IS_ANDROID = /Android/i.test(USER_AGENT);\\nvar ANDROID_VERSION = function () {\\n // This matches Android Major.Minor.Patch versions\\n // ANDROID_VERSION is Major.Minor as a Number, if Minor isn't available, then only Major is returned\\n var match = USER_AGENT.match(/Android (\\\\d+)(?:\\\\.(\\\\d+))?(?:\\\\.(\\\\d+))*/i);\\n\\n if (!match) {\\n return null;\\n }\\n\\n var major = match[1] && parseFloat(match[1]);\\n var minor = match[2] && parseFloat(match[2]);\\n\\n if (major && minor) {\\n return parseFloat(match[1] + '.' + match[2]);\\n } else if (major) {\\n return major;\\n }\\n return null;\\n}();\\n\\n// Old Android is defined as Version older than 2.3, and requiring a webkit version of the android browser\\nvar IS_OLD_ANDROID = IS_ANDROID && /webkit/i.test(USER_AGENT) && ANDROID_VERSION \u003C 2.3;\\nvar IS_NATIVE_ANDROID = IS_ANDROID && ANDROID_VERSION \u003C 5 && appleWebkitVersion \u003C 537;\\n\\nvar IS_FIREFOX = /Firefox/i.test(USER_AGENT);\\nvar IS_EDGE = /Edge/i.test(USER_AGENT);\\nvar IS_CHROME = !IS_EDGE && /Chrome/i.test(USER_AGENT);\
{"title":"$:/plugins/tiddlywiki/browser-storage","name":"Browser Storage","description":"Local storage in the browser","list":"readme settings","version":"5.2.7","plugin-type":"plugin","dependents":"","type":"application/json","text":"{\"tiddlers\":{\"$:/config/BrowserStorage/SaveFilter\":{\"title\":\"$:/config/BrowserStorage/SaveFilter\",\"text\":\"[prefix[$:/state/]] -[prefix[$:/state/popup/]]\"},\"$:/plugins/tiddlywiki/browser-storage/icon\":{\"title\":\"$:/plugins/tiddlywiki/browser-storage/icon\",\"tags\":\"$:/tags/Image\",\"text\":\"\u003Csvg class=\\\"tc-image-down-arrow tc-image-button\\\" viewBox=\\\"0 0 128 128\\\" width=\\\"22pt\\\" height=\\\"22pt\\\">\\n \u003Cg stroke=\\\"none\\\" stroke-width=\\\"1\\\" fill-rule=\\\"evenodd\\\">\\n \u003Cellipse id=\\\"Oval\\\" cx=\\\"64\\\" cy=\\\"16\\\" rx=\\\"40\\\" ry=\\\"16\\\">\u003C/ellipse>\\n \u003Cpath d=\\\"M24,96 C24,104.836556 41.90861,112 64,112 C86.09139,112 104,104.836556 104,96 L104,112 C104,120.836556 86.09139,128 64,128 C41.90861,128 24,120.836556 24,112 L24,96 Z\\\" id=\\\"Combined-Shape\\\">\u003C/path>\\n \u003Cpath d=\\\"M24,72 C24,80.836556 41.90861,88 64,88 C86.09139,88 104,80.836556 104,72 L104,88 C104,96.836556 86.09139,104 64,104 C41.90861,104 24,96.836556 24,88 L24,72 Z\\\" id=\\\"Combined-Shape-Copy-16\\\">\u003C/path>\\n \u003Cpath d=\\\"M24,48 C24,56.836556 41.90861,64 64,64 C86.09139,64 104,56.836556 104,48 L104,64 C104,72.836556 86.09139,80 64,80 C41.90861,80 24,72.836556 24,64 L24,48 Z\\\" id=\\\"Combined-Shape-Copy-17\\\">\u003C/path>\\n \u003Cpath d=\\\"M24,24 C24,32.836556 41.90861,40 64,40 C86.09139,40 104,32.836556 104,24 L104,40 C104,48.836556 86.09139,56 64,56 C41.90861,56 24,48.836556 24,40 L24,24 Z\\\" id=\\\"Combined-Shape-Copy-18\\\">\u003C/path>\\n \u003C/g>\\n\u003C/svg>\"},\"$:/plugins/tiddlywiki/browser-storage/rawmarkup.js\":{\"title\":\"$:/plugins/tiddlywiki/browser-storage/rawmarkup.js\",\"text\":\"/*\\\\\\ntitle: $:/plugins/tiddlywiki/browser-storage/rawmarkup.js\\ntype: application/javascript\\nmodule-type: library\\n\\nStartup code injected as raw markup\\n\\n\\\\*/\\n\\n(function() {\\n\\n// Need to initialise these because we run before bootprefix.js and boot.js\\n$tw = window.$tw || Object.create(null);\\n$tw.hooks = $tw.hooks || { names: {}};\\n$tw.boot = $tw.boot || {};\\n$tw.boot.preloadDirty = $tw.boot.preloadDirty || [];\\n// Hook the point in the startup process when the tiddlers have been loaded but plugins not unpacked\\nvar hookName = \\\"th-boot-tiddlers-loaded\\\";\\nif(Object.prototype.hasOwnProperty.call($tw.hooks.names,hookName)) {\\n\\t$tw.hooks.names[hookName].push(hookBootTiddlersLoaded);\\n} else {\\n\\t$tw.hooks.names[hookName] = [hookBootTiddlersLoaded];\\n}\\n\\n// Load tiddlers from browser storage\\nfunction hookBootTiddlersLoaded() {\\n\\tvar url = window.location.pathname,\\n\\t\\tkeysToDelete = [],\\n\\t\\tlog = [];\\n\\t// Check that browser storage is available\\n\\ttry {\\n\\t\\twindow.localStorage;\\n\\t} catch(e) {\\n\\t\\treturn;\\n\\t}\\n\\t// Step through each browsder storage item\\n\\tfor(var index=0; index\u003Cwindow.localStorage.length; index++) {\\n\\t\\tvar key = window.localStorage.key(index),\\n\\t\\t\\tparts = key.split(\\\"#\\\");\\n\\t\\t// If it's ours\\n\\t\\tif(parts[0] === \\\"tw5\\\" && parts[1] === url) {\\n\\t\\t\\t// Read it as JSON\\n\\t\\t\\tvar jsonString = window.localStorage.getItem(key),\\n\\t\\t\\t\\tjsonData;\\n\\t\\t\\tif(jsonString) {\\n\\t\\t\\t\\ttry {\\n\\t\\t\\t\\t\\tjsonData = JSON.parse(jsonString);\\n\\t\\t\\t\\t} catch(e) {}\\n\\t\\t\\t\\tif(jsonData) {\\n\\t\\t\\t\\t\\t// Convert it to a tiddler\\n\\t\\t\\t\\t\\tvar incomingTiddler = new $tw.Tiddler(jsonData);\\n\\t\\t\\t\\t\\tif(incomingTiddler) {\\n\\t\\t\\t\\t\\t\\t// Get any existing tiddler\\n\\t\\t\\t\\t\\t\\tvar title = incomingTiddler.fields.title,\\n\\t\\t\\t\\t\\t\\t\\texistingTiddler = $tw.wiki.getTiddler(title);\\n\\t\\t\\t\\t\\t\\tif(existingTiddler && existingTiddler.isEqual(incomingTiddler)) {\\n\\t\\t\\t\\t\\t\\t\\t// If the incoming ti
{"title":"$:/plugins/tiddlywiki/codemirror","name":"CodeMirror","description":"CodeMirror editor","list":"readme usage keyboard license","version":"5.2.7","plugin-type":"plugin","dependents":"","type":"application/json","text":"{\"tiddlers\":{\"$:/config/EditorTypeMappings/application/javascript\":{\"title\":\"$:/config/EditorTypeMappings/application/javascript\",\"text\":\"codemirror\"},\"$:/config/EditorTypeMappings/application/json\":{\"title\":\"$:/config/EditorTypeMappings/application/json\",\"text\":\"codemirror\"},\"$:/config/EditorTypeMappings/application/x-tiddler-dictionary\":{\"title\":\"$:/config/EditorTypeMappings/application/x-tiddler-dictionary\",\"text\":\"codemirror\"},\"$:/config/EditorTypeMappings/text/css\":{\"title\":\"$:/config/EditorTypeMappings/text/css\",\"text\":\"codemirror\"},\"$:/config/EditorTypeMappings/text/html\":{\"title\":\"$:/config/EditorTypeMappings/text/html\",\"text\":\"codemirror\"},\"$:/config/EditorTypeMappings/text/plain\":{\"title\":\"$:/config/EditorTypeMappings/text/plain\",\"text\":\"codemirror\"},\"$:/config/EditorTypeMappings/text/vnd.tiddlywiki\":{\"title\":\"$:/config/EditorTypeMappings/text/vnd.tiddlywiki\",\"text\":\"codemirror\"},\"$:/config/EditorTypeMappings/text/x-markdown\":{\"title\":\"$:/config/EditorTypeMappings/text/x-markdown\",\"text\":\"codemirror\"},\"$:/config/EditorTypeMappings/text/markdown\":{\"title\":\"$:/config/EditorTypeMappings/text/markdown\",\"text\":\"codemirror\"},\"$:/config/EditorTypeMappings/text/x-tiddlywiki\":{\"title\":\"$:/config/EditorTypeMappings/text/x-tiddlywiki\",\"text\":\"codemirror\"},\"$:/config/codemirror/cursorBlinkRate\":{\"title\":\"$:/config/codemirror/cursorBlinkRate\",\"type\":\"integer\",\"text\":\"530\"},\"$:/config/codemirror/extraKeysTW\":{\"title\":\"$:/config/codemirror/extraKeysTW\",\"extend\":\"extraKeys\",\"type\":\"json\",\"text\":\"{\\n\\t\\\"Ctrl-Esc\\\": \\\"singleSelection\\\",\\n\\t\\\"Esc\\\": \\\"\\\",\\n\\t\\\"Ctrl-S\\\": \\\"\\\",\\n\\t\\\"Ctrl-U\\\": \\\"\\\",\\n\\t\\\"Ctrl-T\\\": \\\"\\\",\\n\\t\\\"Alt-T\\\": \\\"transposeChars\\\",\\n\\t\\\"Alt-U\\\": \\\"undoSelection\\\",\\n\\t\\\"Shift-Alt-U\\\": \\\"redoSelection\\\",\\n\\t\\\"Cmd-U\\\": \\\"\\\",\\n\\t\\\"Tab\\\": \\\"indentAuto()\\\",\\n\\t\\\"Enter\\\": \\\"newLineAndIndent()\\\"\\n}\\n\"},\"$:/config/codemirror/indentUnit\":{\"title\":\"$:/config/codemirror/indentUnit\",\"type\":\"integer\",\"text\":\"2\"},\"$:/config/codemirror/indentWithTabs\":{\"title\":\"$:/config/codemirror/indentWithTabs\",\"type\":\"bool\",\"text\":\"true\"},\"$:/config/codemirror/inputStyle\":{\"title\":\"$:/config/codemirror/inputStyle\",\"type\":\"string\",\"text\":\"textarea\"},\"$:/config/codemirror/keyMap\":{\"title\":\"$:/config/codemirror/keyMap\",\"type\":\"string\",\"text\":\"default\"},\"$:/config/codemirror/lineNumbers\":{\"title\":\"$:/config/codemirror/lineNumbers\",\"type\":\"bool\",\"text\":\"false\"},\"$:/config/codemirror/lineWrapping\":{\"title\":\"$:/config/codemirror/lineWrapping\",\"type\":\"bool\",\"text\":\"true\"},\"$:/config/codemirror/showCursorWhenSelecting\":{\"title\":\"$:/config/codemirror/showCursorWhenSelecting\",\"type\":\"bool\",\"text\":\"true\"},\"$:/config/codemirror/smartIndent\":{\"title\":\"$:/config/codemirror/smartIndent\",\"type\":\"bool\",\"text\":\"true\"},\"$:/config/codemirror/styleActiveLine\":{\"title\":\"$:/config/codemirror/styleActiveLine\",\"type\":\"bool\",\"text\":\"false\"},\"$:/config/codemirror/tabSize\":{\"title\":\"$:/config/codemirror/tabSize\",\"type\":\"integer\",\"text\":\"2\"},\"$:/config/codemirror/theme\":{\"title\":\"$:/config/codemirror/theme\",\"type\":\"string\",\"text\":\"tiddlywiki\"},\"$:/language/codemirror/homeUrl\":{\"title\":\"$:/language/codemirror/homeUrl\",\"text\":\"http://codemirror.net\"},\"$:/language/codemirror/addOnUrl\":{\"title\":\"$:/language/codemirror/addOnUrl\",\"text\":\"http://codemirror.net/doc/manual.html#addons\"},\"$:/language/codemirror/configUrl\":{\"title\":\"$:/language/codemirror/configUrl\",\"text\":\"http://codemirror.net/doc/manual.html#config\"},\"$:/language
2023-04-27 20:28:00 +02:00
{"title":"$:/plugins/tiddlywiki/codemirror-mode-css","name":"CodeMirror Mode CSS","description":"CSS highlighting mode for CodeMirror","parent-plugin":"$:/plugins/tiddlywiki/codemirror","list":"readme","version":"5.2.7","plugin-type":"plugin","dependents":"","type":"application/json","text":"{\"tiddlers\":{\"$:/plugins/tiddlywiki/codemirror/mode/css/css.js\":{\"text\":\"// CodeMirror, copyright (c) by Marijn Haverbeke and others\\n// Distributed under an MIT license: https://codemirror.net/LICENSE\\n!function(e){\\\"object\\\"==typeof exports&&\\\"object\\\"==typeof module?e(require(\\\"../../lib/codemirror\\\")):\\\"function\\\"==typeof define&&define.amd?define([\\\"../../lib/codemirror\\\"],e):e(CodeMirror)}(function(T){\\\"use strict\\\";function e(e){for(var t={},r=0;r\u003Ce.length;++r)t[e[r].toLowerCase()]=!0;return t}T.defineMode(\\\"css\\\",function(e,t){var r=t.inline;t.propertyKeywords||(t=T.resolveMode(\\\"text/css\\\"));var a,i,n=e.indentUnit,l=t.tokenHooks,o=t.documentTypes||{},s=t.mediaTypes||{},d=t.mediaFeatures||{},c=t.mediaValueKeywords||{},p=t.propertyKeywords||{},u=t.nonStandardPropertyKeywords||{},m=t.fontProperties||{},b=t.counterDescriptors||{},g=t.colorKeywords||{},h=t.valueKeywords||{},f=t.allowNested,k=t.lineComment,y=!0===t.supportsAtComponent,w=!1!==e.highlightNonStandardPropertyKeywords;function v(e,t){return a=t,e}function x(i){return function(e,t){for(var r,o=!1;null!=(r=e.next());){if(r==i&&!o){\\\")\\\"==i&&e.backUp(1);break}o=!o&&\\\"\\\\\\\\\\\"==r}return r!=i&&(o||\\\")\\\"==i)||(t.tokenize=null),a=\\\"string\\\"}}function z(e,t){return e.next(),e.match(/\\\\s*[\\\\\\\"\\\\')]/,!1)?t.tokenize=null:t.tokenize=x(\\\")\\\"),a=\\\"(\\\",null}function j(e,t,r){this.type=e,this.indent=t,this.prev=r}function P(e,t,r,o){return e.context=new j(r,t.indentation()+(!1===o?0:n),e.context),r}function K(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function q(e,t,r){return _[r.context.type](e,t,r)}function C(e,t,r,o){for(var i=o||1;0\u003Ci;i--)r.context=r.context.prev;return q(e,t,r)}function B(e){var t=e.current().toLowerCase();i=h.hasOwnProperty(t)?\\\"atom\\\":g.hasOwnProperty(t)?\\\"keyword\\\":\\\"variable\\\"}var _={top:function(e,t,r){if(\\\"{\\\"==e)return P(r,t,\\\"block\\\");if(\\\"}\\\"==e&&r.context.prev)return K(r);if(y&&/@component/i.test(e))return P(r,t,\\\"atComponentBlock\\\");if(/^@(-moz-)?document$/i.test(e))return P(r,t,\\\"documentTypes\\\");if(/^@(media|supports|(-moz-)?document|import)$/i.test(e))return P(r,t,\\\"atBlock\\\");if(/^@(font-face|counter-style)/i.test(e))return r.stateArg=e,\\\"restricted_atBlock_before\\\";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(e))return\\\"keyframes\\\";if(e&&\\\"@\\\"==e.charAt(0))return P(r,t,\\\"at\\\");if(\\\"hash\\\"==e)i=\\\"builtin\\\";else if(\\\"word\\\"==e)i=\\\"tag\\\";else{if(\\\"variable-definition\\\"==e)return\\\"maybeprop\\\";if(\\\"interpolation\\\"==e)return P(r,t,\\\"interpolation\\\");if(\\\":\\\"==e)return\\\"pseudo\\\";if(f&&\\\"(\\\"==e)return P(r,t,\\\"parens\\\")}return r.context.type},block:function(e,t,r){if(\\\"word\\\"!=e)return\\\"meta\\\"==e?\\\"block\\\":f||\\\"hash\\\"!=e&&\\\"qualifier\\\"!=e?_.top(e,t,r):(i=\\\"error\\\",\\\"block\\\");var o=t.current().toLowerCase();return p.hasOwnProperty(o)?(i=\\\"property\\\",\\\"maybeprop\\\"):u.hasOwnProperty(o)?(i=w?\\\"string-2\\\":\\\"property\\\",\\\"maybeprop\\\"):f?(i=t.match(/^\\\\s*:(?:\\\\s|$)/,!1)?\\\"property\\\":\\\"tag\\\",\\\"block\\\"):(i+=\\\" error\\\",\\\"maybeprop\\\")},maybeprop:function(e,t,r){return\\\":\\\"==e?P(r,t,\\\"prop\\\"):q(e,t,r)},prop:function(e,t,r){if(\\\";\\\"==e)return K(r);if(\\\"{\\\"==e&&f)return P(r,t,\\\"propBlock\\\");if(\\\"}\\\"==e||\\\"{\\\"==e)return C(e,t,r);if(\\\"(\\\"==e)return P(r,t,\\\"parens\\\");if(\\\"hash\\\"!=e||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(t.current())){if(\\\"word\\\"==e)B(t);else if(\\\"interpolation\\\"==e)return P(r,t,\\\"interpolation\\\")}else i+=\\\" error\\\";return\\\"prop\\\"},propBlock:function(e,t,r){return\\\"}\\\"==e?K(r):\\\"word\\\"==e?(i=
{"title":"$:/plugins/tiddlywiki/codemirror-mode-htmlmixed","name":"CodeMirror Mode HTML Mixed","description":"HTML mixed highlighting mode for CodeMirror","parent-plugin":"$:/plugins/tiddlywiki/codemirror","dependents":"$:/plugins/tiddlywiki/codemirror-mode-xml $:/plugins/tiddlywiki/codemirror-mode-javascript $:/plugins/tiddlywiki/codemirror-mode-css","list":"readme","version":"5.2.7","plugin-type":"plugin","type":"application/json","text":"{\"tiddlers\":{\"$:/plugins/tiddlywiki/codemirror/mode/htmlmixed/htmlmixed.js\":{\"text\":\"// CodeMirror, copyright (c) by Marijn Haverbeke and others\\n// Distributed under an MIT license: https://codemirror.net/LICENSE\\n!function(t){\\\"object\\\"==typeof exports&&\\\"object\\\"==typeof module?t(require(\\\"../../lib/codemirror\\\"),require(\\\"../xml/xml\\\"),require(\\\"../javascript/javascript\\\"),require(\\\"../css/css\\\")):\\\"function\\\"==typeof define&&define.amd?define([\\\"../../lib/codemirror\\\",\\\"../xml/xml\\\",\\\"../javascript/javascript\\\",\\\"../css/css\\\"],t):t(CodeMirror)}(function(p){\\\"use strict\\\";var l={script:[[\\\"lang\\\",/(javascript|babel)/i,\\\"javascript\\\"],[\\\"type\\\",/^(?:text|application)\\\\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,\\\"javascript\\\"],[\\\"type\\\",/./,\\\"text/plain\\\"],[null,null,\\\"javascript\\\"]],style:[[\\\"lang\\\",/^css$/i,\\\"css\\\"],[\\\"type\\\",/^(text\\\\/)?(x-)?(stylesheet|css)$/i,\\\"css\\\"],[\\\"type\\\",/./,\\\"text/plain\\\"],[null,null,\\\"css\\\"]]};var o={};function f(t,e){var a,n=t.match(o[a=e]||(o[a]=new RegExp(\\\"\\\\\\\\s+\\\"+a+\\\"\\\\\\\\s*=\\\\\\\\s*('|\\\\\\\")?([^'\\\\\\\"]+)('|\\\\\\\")?\\\\\\\\s*\\\")));return n?/^\\\\s*(.*?)\\\\s*$/.exec(n[2])[1]:\\\"\\\"}function h(t,e){return new RegExp((e?\\\"^\\\":\\\"\\\")+\\\"\u003C/s*\\\"+t+\\\"s*>\\\",\\\"i\\\")}function r(t,e){for(var a in t)for(var n=e[a]||(e[a]=[]),l=t[a],o=l.length-1;0\u003C=o;o--)n.unshift(l[o])}p.defineMode(\\\"htmlmixed\\\",function(u,t){var m=p.getMode(u,{name:\\\"xml\\\",htmlMode:!0,multilineTagIndentFactor:t.multilineTagIndentFactor,multilineTagIndentPastTag:t.multilineTagIndentPastTag,allowMissingTagName:t.allowMissingTagName}),d={},e=t&&t.tags,a=t&&t.scriptTypes;if(r(l,d),e&&r(e,d),a)for(var n=a.length-1;0\u003C=n;n--)d.script.unshift([\\\"type\\\",a[n].matches,a[n].mode]);function g(t,e){var a,n,l,o,i,c,r=m.token(t,e.htmlState),s=/\\\\btag\\\\b/.test(r);return s&&!/[\u003C>\\\\s\\\\/]/.test(t.current())&&(a=e.htmlState.tagName&&e.htmlState.tagName.toLowerCase())&&d.hasOwnProperty(a)?e.inTag=a+\\\" \\\":e.inTag&&s&&/>$/.test(t.current())?(n=/^([\\\\S]+) (.*)/.exec(e.inTag),e.inTag=null,l=\\\">\\\"==t.current()&&function(t,e){for(var a=0;a\u003Ct.length;a++){var n=t[a];if(!n[0]||n[1].test(f(e,n[0])))return n[2]}}(d[n[1]],n[2]),o=p.getMode(u,l),i=h(n[1],!0),c=h(n[1],!1),e.token=function(t,e){return t.match(i,!1)?(e.token=g,e.localState=e.localMode=null):(a=t,n=c,l=e.localMode.token(t,e.localState),o=a.current(),-1\u003C(r=o.search(n))?a.backUp(o.length-r):o.match(/\u003C\\\\/?$/)&&(a.backUp(o.length),a.match(n,!1)||a.match(o)),l);var a,n,l,o,r},e.localMode=o,e.localState=p.startState(o,m.indent(e.htmlState,\\\"\\\",\\\"\\\"))):e.inTag&&(e.inTag+=t.current(),t.eol()&&(e.inTag+=\\\" \\\")),r}return{startState:function(){return{token:g,inTag:null,localMode:null,localState:null,htmlState:p.startState(m)}},copyState:function(t){var e;return t.localState&&(e=p.copyState(t.localMode,t.localState)),{token:t.token,inTag:t.inTag,localMode:t.localMode,localState:e,htmlState:p.copyState(m,t.htmlState)}},token:function(t,e){return e.token(t,e)},indent:function(t,e,a){return!t.localMode||/^\\\\s*\u003C\\\\//.test(e)?m.indent(t.htmlState,e,a):t.localMode.indent?t.localMode.indent(t.localState,e,a):p.Pass},innerMode:function(t){return{state:t.localState||t.htmlState,mode:t.localMode||m}}}},\\\"xml\\\",\\\"javascript\\\",\\\"css\\\"),p.defineMIME(\\\"text/html\\\",\\\"htmlmixed\\\")});\\n\",\"type\":\"application/javascript\",\"title\":\"$:/plugins/tiddlywiki/codemirror/mode/htmlmixed/htmlmixed.js\",\"module-type\":\"codemirro
{"title":"$:/plugins/tiddlywiki/codemirror-mode-javascript","name":"CodeMirror Mode JavaScript","description":"JavaScript highlighting mode for CodeMirror","parent-plugin":"$:/plugins/tiddlywiki/codemirror","list":"readme","version":"5.2.7","plugin-type":"plugin","dependents":"","type":"application/json","text":"{\"tiddlers\":{\"$:/plugins/tiddlywiki/codemirror/mode/javascript/javascript.js\":{\"text\":\"// CodeMirror, copyright (c) by Marijn Haverbeke and others\\n// Distributed under an MIT license: https://codemirror.net/LICENSE\\n!function(e){\\\"object\\\"==typeof exports&&\\\"object\\\"==typeof module?e(require(\\\"../../lib/codemirror\\\")):\\\"function\\\"==typeof define&&define.amd?define([\\\"../../lib/codemirror\\\"],e):e(CodeMirror)}(function(tt){\\\"use strict\\\";tt.defineMode(\\\"javascript\\\",function(e,l){var t,r,n,a,i,o,d=e.indentUnit,p=l.statementIndent,c=l.jsonld,s=l.json||c,u=l.typescript,f=l.wordCharacters||/[\\\\w$\\\\xa1-\\\\uffff]/,m=(t=v(\\\"keyword a\\\"),r=v(\\\"keyword b\\\"),n=v(\\\"keyword c\\\"),a=v(\\\"keyword d\\\"),i=v(\\\"operator\\\"),{if:v(\\\"if\\\"),while:t,with:t,else:r,do:r,try:r,finally:r,return:a,break:a,continue:a,new:v(\\\"new\\\"),delete:n,void:n,throw:n,debugger:v(\\\"debugger\\\"),var:v(\\\"var\\\"),const:v(\\\"var\\\"),let:v(\\\"var\\\"),function:v(\\\"function\\\"),catch:v(\\\"catch\\\"),for:v(\\\"for\\\"),switch:v(\\\"switch\\\"),case:v(\\\"case\\\"),default:v(\\\"default\\\"),in:i,typeof:i,instanceof:i,true:o={type:\\\"atom\\\",style:\\\"atom\\\"},false:o,null:o,undefined:o,NaN:o,Infinity:o,this:v(\\\"this\\\"),class:v(\\\"class\\\"),super:v(\\\"atom\\\"),yield:n,export:v(\\\"export\\\"),import:v(\\\"import\\\"),extends:n,await:n});function v(e){return{type:e,style:\\\"keyword\\\"}}var k,y,w=/[+\\\\-*&%=\u003C>!?|~^@]/,b=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)\\\"/;function x(e,t,r){return k=e,y=r,t}function h(e,t){var a,r=e.next();if('\\\"'==r||\\\"'\\\"==r)return t.tokenize=(a=r,function(e,t){var r,n=!1;if(c&&\\\"@\\\"==e.peek()&&e.match(b))return t.tokenize=h,x(\\\"jsonld-keyword\\\",\\\"meta\\\");for(;null!=(r=e.next())&&(r!=a||n);)n=!n&&\\\"\\\\\\\\\\\"==r;return n||(t.tokenize=h),x(\\\"string\\\",\\\"string\\\")}),t.tokenize(e,t);if(\\\".\\\"==r&&e.match(/^\\\\d[\\\\d_]*(?:[eE][+\\\\-]?[\\\\d_]+)?/))return x(\\\"number\\\",\\\"number\\\");if(\\\".\\\"==r&&e.match(\\\"..\\\"))return x(\\\"spread\\\",\\\"meta\\\");if(/[\\\\[\\\\]{}\\\\(\\\\),;\\\\:\\\\.]/.test(r))return x(r);if(\\\"=\\\"==r&&e.eat(\\\">\\\"))return x(\\\"=>\\\",\\\"operator\\\");if(\\\"0\\\"==r&&e.match(/^(?:x[\\\\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return x(\\\"number\\\",\\\"number\\\");if(/\\\\d/.test(r))return e.match(/^[\\\\d_]*(?:n|(?:\\\\.[\\\\d_]*)?(?:[eE][+\\\\-]?[\\\\d_]+)?)?/),x(\\\"number\\\",\\\"number\\\");if(\\\"/\\\"==r)return e.eat(\\\"*\\\")?(t.tokenize=g)(e,t):e.eat(\\\"/\\\")?(e.skipToEnd(),x(\\\"comment\\\",\\\"comment\\\")):et(e,t,1)?(function(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if(\\\"/\\\"==t&&!n)return;\\\"[\\\"==t?n=!0:n&&\\\"]\\\"==t&&(n=!1)}r=!r&&\\\"\\\\\\\\\\\"==t}}(e),e.match(/^\\\\b(([gimyus])(?![gimyus]*\\\\2))+\\\\b/),x(\\\"regexp\\\",\\\"string-2\\\")):(e.eat(\\\"=\\\"),x(\\\"operator\\\",\\\"operator\\\",e.current()));if(\\\"`\\\"==r)return(t.tokenize=j)(e,t);if(\\\"#\\\"==r&&\\\"!\\\"==e.peek())return e.skipToEnd(),x(\\\"meta\\\",\\\"meta\\\");if(\\\"#\\\"==r&&e.eatWhile(f))return x(\\\"variable\\\",\\\"property\\\");if(\\\"\u003C\\\"==r&&e.match(\\\"!--\\\")||\\\"-\\\"==r&&e.match(\\\"->\\\")&&!/\\\\S/.test(e.string.slice(0,e.start)))return e.skipToEnd(),x(\\\"comment\\\",\\\"comment\\\");if(w.test(r))return\\\">\\\"==r&&t.lexical&&\\\">\\\"==t.lexical.type||(e.eat(\\\"=\\\")?\\\"!\\\"!=r&&\\\"=\\\"!=r||e.eat(\\\"=\\\"):/[\u003C>*+\\\\-|&?]/.test(r)&&(e.eat(r),\\\">\\\"==r&&e.eat(r))),\\\"?\\\"==r&&e.eat(\\\".\\\")?x(\\\".\\\"):x(\\\"operator\\\",\\\"operator\\\",e.current());if(f.test(r)){e.eatWhile(f);var n=e.current();if(\\\".\\\"!=t.lastType){if(m.propertyIsEnumerable(n)){var i=m[n];return x(i.type
{"title":"$:/plugins/tiddlywiki/codemirror-mode-xml","name":"CodeMirror Mode XML","description":"XML highlighting mode for CodeMirror","parent-plugin":"$:/plugins/tiddlywiki/codemirror","list":"readme","version":"5.2.7","plugin-type":"plugin","dependents":"","type":"application/json","text":"{\"tiddlers\":{\"$:/plugins/tiddlywiki/codemirror/mode/xml/xml.js\":{\"text\":\"// CodeMirror, copyright (c) by Marijn Haverbeke and others\\n// Distributed under an MIT license: https://codemirror.net/LICENSE\\n!function(t){\\\"object\\\"==typeof exports&&\\\"object\\\"==typeof module?t(require(\\\"../../lib/codemirror\\\")):\\\"function\\\"==typeof define&&define.amd?define([\\\"../../lib/codemirror\\\"],t):t(CodeMirror)}(function(N){\\\"use strict\\\";var y={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},z={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};N.defineMode(\\\"xml\\\",function(t,e){var i,a,l=t.indentUnit,u={},n=e.htmlMode?y:z;for(var r in n)u[r]=n[r];for(var r in e)u[r]=e[r];function c(e,n){function t(t){return(n.tokenize=t)(e,n)}var r=e.next();if(\\\"\u003C\\\"==r)return e.eat(\\\"!\\\")?e.eat(\\\"[\\\")?e.match(\\\"CDATA[\\\")?t(s(\\\"atom\\\",\\\"]]>\\\")):null:e.match(\\\"--\\\")?t(s(\\\"comment\\\",\\\"--\\\\x3e\\\")):e.match(\\\"DOCTYPE\\\",!0,!0)?(e.eatWhile(/[\\\\w\\\\._\\\\-]/),t(function r(o){return function(t,e){for(var n;null!=(n=t.next());){if(\\\"\u003C\\\"==n)return e.tokenize=r(o+1),e.tokenize(t,e);if(\\\">\\\"==n){if(1!=o)return e.tokenize=r(o-1),e.tokenize(t,e);e.tokenize=c;break}}return\\\"meta\\\"}}(1))):null:e.eat(\\\"?\\\")?(e.eatWhile(/[\\\\w\\\\._\\\\-]/),n.tokenize=s(\\\"meta\\\",\\\"?>\\\"),\\\"meta\\\"):(i=e.eat(\\\"/\\\")?\\\"closeTag\\\":\\\"openTag\\\",n.tokenize=d,\\\"tag bracket\\\");if(\\\"&\\\"!=r)return e.eatWhile(/[^&\u003C]/),null;var o=e.eat(\\\"#\\\")?e.eat(\\\"x\\\")?e.eatWhile(/[a-fA-F\\\\d]/)&&e.eat(\\\";\\\"):e.eatWhile(/[\\\\d]/)&&e.eat(\\\";\\\"):e.eatWhile(/[\\\\w\\\\.\\\\-:]/)&&e.eat(\\\";\\\");return o?\\\"atom\\\":\\\"error\\\"}function d(t,e){var n=t.next();if(\\\">\\\"==n||\\\"/\\\"==n&&t.eat(\\\">\\\"))return e.tokenize=c,i=\\\">\\\"==n?\\\"endTag\\\":\\\"selfcloseTag\\\",\\\"tag bracket\\\";if(\\\"=\\\"==n)return i=\\\"equals\\\",null;if(\\\"\u003C\\\"!=n)return/[\\\\'\\\\\\\"]/.test(n)?(e.tokenize=(r=n,a.isInAttribute=!0,a),e.stringStartCol=t.column(),e.tokenize(t,e)):(t.match(/^[^\\\\s\\\\u00a0=\u003C>\\\\\\\"\\\\']*[^\\\\s\\\\u00a0=\u003C>\\\\\\\"\\\\'\\\\/]/),\\\"word\\\");e.tokenize=c,e.state=g,e.tagName=e.tagStart=null;var r,o=e.tokenize(t,e);return o?o+\\\" tag error\\\":\\\"tag error\\\";function a(t,e){for(;!t.eol();)if(t.next()==r){e.tokenize=d;break}return\\\"string\\\"}}function s(n,r){return function(t,e){for(;!t.eol();){if(t.match(r)){e.tokenize=c;break}t.next()}return n}}function f(t,e,n){this.prev=t.context,this.tagName=e||\\\"\\\",this.indent=t.indented,this.startOfLine=n,(u.doNotIndent.hasOwnProperty(e)||t.context&&t.context.noIndent)&&(this.noIndent=!0)}function o(t){t.context&&(t.context=t.context.prev)}function m(t,e){for(var n;;){if(!t.context)return;if(n=t.context.tagName,!u.contextGrabbers.hasOwnProperty(n)||!u.contextGrabbers[n].hasOwnProperty(e))return;o(t)}}function g(t,e,n){return
2023-04-27 20:06:46 +02:00
{"title":"$:/plugins/tiddlywiki/markdown","name":"Markdown","description":"Markdown parser based on markdown-it","list":"readme config syntax license","version":"5.2.7","plugin-type":"plugin","dependents":"","type":"application/json","text":"{\"tiddlers\":{\"$:/plugins/tiddlywiki/markdown/EditorToolbar/bold\":{\"title\":\"$:/plugins/tiddlywiki/markdown/EditorToolbar/bold\",\"list-after\":\"$:/core/ui/EditorToolbar/bold\",\"tags\":\"$:/tags/EditorToolbar\",\"icon\":\"$:/core/images/bold\",\"caption\":\"{{$:/language/Buttons/Bold/Caption}} (Markdown)\",\"description\":\"{{$:/language/Buttons/Bold/Hint}}\",\"condition\":\"[\u003CtargetTiddler>type[text/x-markdown]] [\u003CtargetTiddler>type[text/markdown]]\",\"shortcuts\":\"((bold))\",\"text\":\"\u003C$action-sendmessage\\n\\t$message=\\\"tm-edit-text-operation\\\"\\n\\t$param=\\\"wrap-selection\\\"\\n\\tprefix=\\\"**\\\"\\n\\tsuffix=\\\"**\\\"\\n/>\\n\"},\"$:/plugins/tiddlywiki/markdown/EditorToolbar/heading-1\":{\"title\":\"$:/plugins/tiddlywiki/markdown/EditorToolbar/heading-1\",\"list-after\":\"$:/core/ui/EditorToolbar/heading-1\",\"tags\":\"$:/tags/EditorToolbar\",\"icon\":\"$:/core/images/heading-1\",\"caption\":\"{{$:/language/Buttons/Heading1/Caption}} (Markdown)\",\"description\":\"{{$:/language/Buttons/Heading1/Hint}}\",\"condition\":\"[\u003CtargetTiddler>type[text/x-markdown]] [\u003CtargetTiddler>type[text/markdown]]\",\"shortcuts\":\"((heading-1))\",\"text\":\"\u003C$action-sendmessage\\n\\t$message=\\\"tm-edit-text-operation\\\"\\n\\t$param=\\\"prefix-lines\\\"\\n\\tcharacter=\\\"#\\\"\\n\\tcount=\\\"1\\\"\\n/>\\n\"},\"$:/plugins/tiddlywiki/markdown/EditorToolbar/heading-2\":{\"title\":\"$:/plugins/tiddlywiki/markdown/EditorToolbar/heading-2\",\"list-after\":\"$:/core/ui/EditorToolbar/heading-2\",\"tags\":\"$:/tags/EditorToolbar\",\"icon\":\"$:/core/images/heading-2\",\"caption\":\"{{$:/language/Buttons/Heading2/Caption}} (Markdown)\",\"description\":\"{{$:/language/Buttons/Heading2/Hint}}\",\"condition\":\"[\u003CtargetTiddler>type[text/x-markdown]] [\u003CtargetTiddler>type[text/markdown]]\",\"shortcuts\":\"((heading-2))\",\"text\":\"\u003C$action-sendmessage\\n\\t$message=\\\"tm-edit-text-operation\\\"\\n\\t$param=\\\"prefix-lines\\\"\\n\\tcharacter=\\\"#\\\"\\n\\tcount=\\\"2\\\"\\n/>\\n\"},\"$:/plugins/tiddlywiki/markdown/EditorToolbar/heading-3\":{\"title\":\"$:/plugins/tiddlywiki/markdown/EditorToolbar/heading-3\",\"list-after\":\"$:/core/ui/EditorToolbar/heading-3\",\"tags\":\"$:/tags/EditorToolbar\",\"icon\":\"$:/core/images/heading-3\",\"caption\":\"{{$:/language/Buttons/Heading3/Caption}} (Markdown)\",\"description\":\"{{$:/language/Buttons/Heading3/Hint}}\",\"condition\":\"[\u003CtargetTiddler>type[text/x-markdown]] [\u003CtargetTiddler>type[text/markdown]]\",\"shortcuts\":\"((heading-3))\",\"text\":\"\u003C$action-sendmessage\\n\\t$message=\\\"tm-edit-text-operation\\\"\\n\\t$param=\\\"prefix-lines\\\"\\n\\tcharacter=\\\"#\\\"\\n\\tcount=\\\"3\\\"\\n/>\\n\"},\"$:/plugins/tiddlywiki/markdown/EditorToolbar/heading-4\":{\"title\":\"$:/plugins/tiddlywiki/markdown/EditorToolbar/heading-4\",\"list-after\":\"$:/core/ui/EditorToolbar/heading-4\",\"tags\":\"$:/tags/EditorToolbar\",\"icon\":\"$:/core/images/heading-4\",\"caption\":\"{{$:/language/Buttons/Heading4/Caption}} (Markdown)\",\"description\":\"{{$:/language/Buttons/Heading4/Hint}}\",\"condition\":\"[\u003CtargetTiddler>type[text/x-markdown]] [\u003CtargetTiddler>type[text/markdown]]\",\"shortcuts\":\"((heading-4))\",\"text\":\"\u003C$action-sendmessage\\n\\t$message=\\\"tm-edit-text-operation\\\"\\n\\t$param=\\\"prefix-lines\\\"\\n\\tcharacter=\\\"#\\\"\\n\\tcount=\\\"4\\\"\\n/>\\n\"},\"$:/plugins/tiddlywiki/markdown/EditorToolbar/heading-5\":{\"title\":\"$:/plugins/tiddlywiki/markdown/EditorToolbar/heading-5\",\"list-after\":\"$:/core/ui/EditorToolbar/heading-5\",\"tags\":\"$:/tags/EditorToolbar\",\"icon\":\"$:/core/images/heading-5\",\"caption\":\"{{$:/language/Buttons/Heading5/Caption}} (Markdown)\",\"description\":\"{{$:/language/Buttons/Heading5/Hint}}\",\"condition\":\"[\u003CtargetTiddler>
2023-06-22 11:35:38 +02:00
{"created":"20230423163535033","text":"specification for 4D URLs to surf (un)hosted 3D assets{{$:/xrfragment/topmenu}}","title":"$:/SiteSubtitle","modified":"20230622071906181"},
2023-04-28 14:21:22 +02:00
{"created":"20230423163524355","title":"$:/SiteTitle","text":"XR Fragments","modified":"20230428121135697"},
2023-04-27 17:35:20 +02:00
{"created":"20230425164931250","title":"$:/state/folded/AFRAME template","text":"show","modified":"20230425164935940"},
{"created":"20230425164931250","title":"$:/state/folded/GLSL shader template","text":"show","modified":"20230425164939576"},
{"created":"20230424142403302","text":"checked","title":"$:/state/import/select-all","modified":"20230424142404392"},
2023-05-30 15:29:43 +02:00
{"created":"20230423163640468","title":"$:/state/notebook-sidebar","text":"yes","modified":"20230530131828376"},
2023-06-22 13:27:14 +02:00
{"created":"20230423163641722","title":"$:/state/notebook-sidebar-section","text":"Reference","modified":"20230622105911172"},
2023-04-27 17:35:20 +02:00
{"created":"20230427102758222","title":"$:/state/plugin-info--1887569658-$:/plugins/ihm/tidgraph--50210113","text":"documentation","modified":"20230427102759911"},
{"created":"20230427092525294","title":"$:/state/plugin-info--391242618-$:/plugins/tiddlywiki/browser-storage","text":"yes","modified":"20230427092525375"},
{"created":"20230427093219686","title":"$:/state/plugin-info--391242618-$:/plugins/tiddlywiki/browser-storage--605768392","text":"settings","modified":"20230427094141558"},
{"created":"20230424092949812","title":"$:/state/plugin-info-1024395336-$:/plugins/tiddlywiki/codemirror--1574138004","text":"contents","modified":"20230425143706081"},
{"created":"20230424093627704","title":"$:/state/plugin-info-833095967-Draft of '$:/core'---1604322978","text":"readme","modified":"20230424093629208"},
2023-06-22 13:27:14 +02:00
{"created":"20230423163649566","title":"$:/state/showeditpreview","text":"yes","modified":"20230622110058160"},
{"created":"20230504174435745","title":"$:/state/sidebar","text":"no","modified":"20230622111931842"},
2023-05-23 14:57:45 +02:00
{"created":"20230423163453188","title":"$:/state/tab--1963855381","text":"$:/themes/nico/notebook/themetweaks","modified":"20230523124919651"},
{"created":"20230427092954391","title":"$:/state/tab--2112689675","text":"$:/core/ui/ControlPanel/Basics","modified":"20230523124903522"},
2023-04-27 17:35:20 +02:00
{"created":"20230424093058379","title":"$:/state/tab--697582678","text":"$:/core/ui/ControlPanel/Settings/TiddlyWiki","modified":"20230427093030201"},
{"created":"20230424093019562","title":"$:/state/tab--86143343","text":"$:/core/ui/ControlPanel/Plugins/Installed/Plugins","modified":"20230424143034115"},
2023-05-23 14:57:45 +02:00
{"created":"20230427093005798","title":"$:/state/tab--959111941","text":"$:/core/ui/ControlPanel/TiddlerFields","modified":"20230523124901804"},
{"created":"20230423163443902","title":"$:/state/tab-1749438307","text":"$:/core/ui/ControlPanel/Settings","modified":"20230523124928451"},
2023-04-27 17:35:20 +02:00
{"created":"20230427092533296","title":"$:/state/tab-2065006209","text":"$:/core/ui/ControlPanel/Saving/General","modified":"20230427092920920"},
{"created":"20230427151522031","title":"$:/state/tab/moresidebar-1850697562","text":"$:/core/ui/MoreSideBar/All","modified":"20230427151523774"},
2023-05-23 14:57:45 +02:00
{"created":"20230423164446212","title":"$:/state/tabs/controlpanel/toolbars-1345989671","text":"$:/core/ui/ControlPanel/Toolbars/EditToolbar","modified":"20230523124911626"},
{"created":"20230523125601870","title":"$:/state/toc/Examples-AFRAME-698730194","text":"open","modified":"20230523125608228"},
{"created":"20230523125556071","title":"$:/state/toc/Examples-THREE-698730194","text":"open","modified":"20230523125631521"},
2023-06-22 13:27:14 +02:00
{"created":"20230622104314194","title":"$:/state/toc/Reference-js/AFRAME--403145756","text":"open","modified":"20230622104328631"},
{"created":"20230602141817951","title":"$:/state/toc/Reference-js/THREE.js--403145756","text":"open","modified":"20230622104317372"},
{"created":"20230622111757807","title":"$:/state/toc/Reference-The parser--403145756","text":"open","modified":"20230622112558165"},
{"created":"20230622104329622","title":"$:/state/toc/Reference/js/AFRAME-THREE.js--403145756","text":"open","modified":"20230622104329622"},
{"created":"20230622111759784","title":"$:/state/toc/Reference/The parser-THREE.js--403145756","text":"open","modified":"20230622111759784"},
2023-04-27 17:35:20 +02:00
{"title":"$:/status/RequireReloadDueToPluginChange","text":"no"},
2023-06-22 13:27:14 +02:00
{"title":"$:/StoryList","created":"20230622111945298","text":"","list":"[[XR Fragments]]","modified":"20230622112602828"},
2023-04-27 17:35:20 +02:00
{"created":"20230423163445948","title":"$:/theme","text":"$:/themes/nico/notebook","modified":"20230423163445948"},
{"text":"{\n \"tiddlers\": {\n \"$:/themes/nico/notebook/LICENSE\": {\n \"title\": \"$:/themes/nico/notebook/LICENSE\",\n \"created\": \"20200419141443144\",\n \"modified\": \"20210118213330307\",\n \"tags\": \"\",\n \"type\": \"text/vnd.tiddlywiki\",\n \"text\": \"\\nMIT License Copyright (c) 2020 [[Nicolas Petton|https://nicolas.petton.fr]] nicolas@petton.fr\\n\\nPermission is hereby granted, free of charge, to any person obtaining a copy\\nof this software and associated documentation files (the \\\"Software\\\"), to deal\\nin the Software without restriction, including without limitation the rights\\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\\ncopies of the Software, and to permit persons to whom the Software is furnished\\nto do so, subject to the following conditions:\\n\\nThe above copyright notice and this permission notice (including the next\\nparagraph) shall be included in all copies or substantial portions of the\\nSoftware.\\n\\nTHE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS\\nOR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF\\nOR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\\n\"\n },\n \"$:/themes/nico/notebook/themetweaks\": {\n \"title\": \"$:/themes/nico/notebook/themetweaks\",\n \"created\": \"20201217172915960\",\n \"modified\": \"20210123211851680\",\n \"tags\": \"$:/tags/ControlPanel/Appearance\",\n \"caption\": \"{{$:/language/ThemeTweaks/ThemeTweaks}}\",\n \"text\": \"\\\\define lingo-base() $:/language/ThemeTweaks/\\n\\nYou can tweak certain aspects of the ''Notebook'' theme.\\n\\n! \u003C\u003Clingo Options>>\\n\\n|\u003C$link to=\\\"$:/themes/nico/notebook/options/stickytitles\\\">\u003C\u003Clingo Options/StickyTitles>>\u003C/$link>\u003Cbr>//\u003C\u003Clingo Options/StickyTitles/Hint>>// |\u003C$select tiddler=\\\"$:/themes/nico/notebook/options/stickytitles\\\">\u003Coption value=\\\"no\\\">{{$:/language/No}}\u003C/option>\u003Coption value=\\\"yes\\\">{{$:/language/Yes}}\u003C/option>\u003C/$select> |\\n|\u003C$link to=\\\"$:/themes/tiddlywiki/vanilla/options/codewrapping\\\">\u003C\u003Clingo Options/CodeWrapping>>\u003C/$link> |\u003C$select tiddler=\\\"$:/themes/tiddlywiki/vanilla/options/codewrapping\\\">\u003Coption value=\\\"pre\\\">{{$:/language/No}}\u003C/option>\u003Coption value=\\\"pre-wrap\\\">{{$:/language/Yes}}\u003C/option>\u003C/$select> |\\n|\u003C$link to=\\\"$:/themes/nico/notebook/options/reveal-tiddler-controls-on-hover\\\">Reveal tiddler controls on mouseover\u003C/$link> |\u003C$select tiddler=\\\"$:/themes/nico/notebook/options/reveal-tiddler-controls-on-hover\\\">\u003Coption value=\\\"no\\\">{{$:/language/No}}\u003C/option>\u003Coption value=\\\"yes\\\">{{$:/language/Yes}}\u003C/option>\u003C/$select> |\\n\\n! \u003C\u003Clingo Settings>>\\n\\n|\u003C$link to=\\\"$:/themes/nico/notebook/settings/fontfamily\\\">\u003C\u003Clingo Settings/FontFamily>>\u003C/$link> |\u003C$edit-text tiddler=\\\"$:/themes/nico/notebook/settings/fontfamily\\\" default=\\\"\\\" tag=\\\"input\\\"/> | |\\n|\u003C$link to=\\\"$:/themes/nico/notebook/settings/codefontfamily\\\">\u003C\u003Clingo Settings/CodeFontFamily>>\u003C/$link> |\u003C$edit-text tiddler=\\\"$:/themes/nico/notebook/settings/codefontfamily\\\" default=\\\"\\\" tag=\\\"input\\\"/> | |\\n|\u003C$link to=\\\"$:/themes/nico/notebook/settings/editorfontfamily\\\">\u003C\u003Clingo Settings/EditorFontFamily>>\u003C/$link> |\u003C$edit-text tiddler=\\\"$:/themes/nico/notebook/settings/editorfontfamily\\\" default=\\\"\\\" tag=\\\"input\\\"/> | |\\n\\n! \u003C\u003Clingo Metrics>>\\n\\n|\u003C$link to=\\\"$:/themes/tiddl
{"created":"20200429144554294","title":"$:/themes/nico/notebook/metrics/sidebar-width","modified":"20230423163514560","tags":"","type":"text/vnd.tiddlywiki","text":"300px"},
{"created":"20210123210054185","title":"$:/themes/nico/notebook/metrics/story-width","modified":"20230423163516762","tags":"","type":"text/vnd.tiddlywiki","text":"100%"},
{"created":"20230423163459763","title":"$:/themes/nico/notebook/options/stickytitles","text":"yes","modified":"20230423163459763"},
{"title":"$:/themes/tiddlywiki/snowwhite","name":"Snow White","author":"JeremyRuston","core-version":">=5.0.0","plugin-type":"theme","description":"Emphasises individual tiddlers","dependents":"$:/themes/tiddlywiki/vanilla","plugin-priority":"0","version":"5.2.7","type":"application/json","text":"{\"tiddlers\":{\"$:/themes/tiddlywiki/snowwhite/base\":{\"title\":\"$:/themes/tiddlywiki/snowwhite/base\",\"tags\":\"[[$:/tags/Stylesheet]]\",\"text\":\"\\\\define sidebarbreakpoint-minus-one()\\n\u003C$text text={{{ [{$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint}removesuffix[px]subtract[1]addsuffix[px]] ~[{$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint}] }}}/>\\n\\\\end\\n\\n\\\\rules only filteredtranscludeinline transcludeinline macrodef macrocallinline\\n\\n.tc-sidebar-header {\\n\\ttext-shadow: 0 1px 0 \u003C\u003Ccolour sidebar-foreground-shadow>>;\\n}\\n\\n.tc-tiddler-info {\\n\\t\u003C\u003Cbox-shadow \\\"inset 1px 2px 3px rgba(0,0,0,0.1)\\\">>\\n}\\n\\n@media screen {\\n\\t.tc-tiddler-frame {\\n\\t\\t\u003C\u003Cbox-shadow \\\"1px 1px 5px rgba(0, 0, 0, 0.3)\\\">>\\n\\t}\\n}\\n\\n@media (max-width: \u003C\u003Csidebarbreakpoint-minus-one>>) {\\n\\t.tc-tiddler-frame {\\n\\t\\t\u003C\u003Cbox-shadow none>>\\n\\t}\\n}\\n\\n.tc-page-controls button svg, .tc-tiddler-controls button svg, .tc-topbar button svg {\\n\\t\u003C\u003Ctransition \\\"fill 150ms ease-in-out\\\">>\\n}\\n\\n.tc-tiddler-controls button.tc-selected,\\n.tc-page-controls button.tc-selected {\\n\\t\u003C\u003Cfilter \\\"drop-shadow(0px -1px 2px rgba(0,0,0,0.25))\\\">>\\n}\\n\\n.tc-tiddler-frame input.tc-edit-texteditor,\\n.tc-tiddler-frame select.tc-edit-texteditor {\\n\\t\u003C\u003Cbox-shadow \\\"inset 0 1px 8px rgba(0, 0, 0, 0.15)\\\">>\\n}\\n\\n.tc-edit-tags {\\n\\t\u003C\u003Cbox-shadow \\\"inset 0 1px 8px rgba(0, 0, 0, 0.15)\\\">>\\n}\\n\\n.tc-tiddler-frame .tc-edit-tags input.tc-edit-texteditor {\\n\\t\u003C\u003Cbox-shadow \\\"none\\\">>\\n\\tborder: none;\\n\\toutline: none;\\n}\\n\\ntextarea.tc-edit-texteditor {\\n\\tfont-family: {{$:/themes/tiddlywiki/vanilla/settings/editorfontfamily}};\\n}\\n\\ncanvas.tc-edit-bitmapeditor {\\n\\t\u003C\u003Cbox-shadow \\\"2px 2px 5px rgba(0, 0, 0, 0.5)\\\">>\\n}\\n\\n.tc-drop-down {\\n\\tborder-radius: 4px;\\n\\t\u003C\u003Cbox-shadow \\\"2px 2px 10px rgba(0, 0, 0, 0.5)\\\">>\\n}\\n\\n.tc-block-dropdown {\\n\\tborder-radius: 4px;\\n\\t\u003C\u003Cbox-shadow \\\"2px 2px 10px rgba(0, 0, 0, 0.5)\\\">>\\n}\\n\\n.tc-modal {\\n\\tborder-radius: 6px;\\n\\t\u003C\u003Cbox-shadow \\\"0 3px 7px rgba(0,0,0,0.3)\\\">>\\n}\\n\\n.tc-modal-footer {\\n\\tborder-radius: 0 0 6px 6px;\\n\\t\u003C\u003Cbox-shadow \\\"inset 0 1px 0 #fff\\\">>;\\n}\\n\\n\\n.tc-alert {\\n\\tborder-radius: 6px;\\n\\t\u003C\u003Cbox-shadow \\\"0 3px 7px rgba(0,0,0,0.6)\\\">>\\n}\\n\\n.tc-notification {\\n\\tborder-radius: 6px;\\n\\t\u003C\u003Cbox-shadow \\\"0 3px 7px rgba(0,0,0,0.3)\\\">>\\n\\ttext-shadow: 0 1px 0 rgba(255,255,255, 0.8);\\n}\\n\\n.tc-sidebar-lists .tc-tab-set .tc-tab-divider {\\n\\tborder-top: none;\\n\\theight: 1px;\\n\\t\u003C\u003Cbackground-linear-gradient \\\"left, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.0) 100%\\\">>\\n}\\n\\n.tc-more-sidebar > .tc-tab-set > .tc-tab-buttons > button {\\n\\t\u003C\u003Cbackground-linear-gradient \\\"left, rgba(0,0,0,0.01) 0%, rgba(0,0,0,0.1) 100%\\\">>\\n}\\n\\n.tc-more-sidebar > .tc-tab-set > .tc-tab-buttons > button.tc-tab-selected {\\n\\t\u003C\u003Cbackground-linear-gradient \\\"left, rgba(0,0,0,0.05) 0%, rgba(255,255,255,0.05) 100%\\\">>\\n}\\n\\n.tc-message-box img {\\n\\t\u003C\u003Cbox-shadow \\\"1px 1px 3px rgba(0,0,0,0.5)\\\">>\\n}\\n\\n.tc-plugin-info {\\n\\t\u003C\u003Cbox-shadow \\\"1px 1px 3px rgba(0,0,0,0.5)\\\">>\\n}\\n\"}}}"},
{"title":"$:/themes/tiddlywiki/vanilla","name":"Vanilla","author":"JeremyRuston","core-version":">=5.0.0","plugin-type":"theme","description":"Basic theme","plugin-priority":"0","version":"5.2.7","dependents":"","type":"application/json","text":"{\"tiddlers\":{\"$:/themes/tiddlywiki/vanilla/themetweaks\":{\"title\":\"$:/themes/tiddlywiki/vanilla/themetweaks\",\"tags\":\"$:/tags/ControlPanel/Appearance\",\"caption\":\"{{$:/language/ThemeTweaks/ThemeTweaks}}\",\"text\":\"\\\\define lingo-base() $:/language/ThemeTweaks/\\n\\n\\\\define replacement-text()\\n[img[$(imageTitle)$]]\\n\\\\end\\n\\n\\\\define backgroundimage-dropdown()\\n\u003Cdiv class=\\\"tc-drop-down-wrapper\\\">\\n\u003C$set name=\\\"state\\\" value=\u003C\u003Cqualify \\\"$:/state/popup/themetweaks/backgroundimage\\\">>>\\n\u003C$button popup=\u003C\u003Cstate>> class=\\\"tc-btn-invisible tc-btn-dropdown\\\">{{$:/core/images/down-arrow}}\u003C/$button>\\n\u003C$reveal state=\u003C\u003Cstate>> type=\\\"popup\\\" position=\\\"belowleft\\\" text=\\\"\\\" default=\\\"\\\" class=\\\"tc-popup-keep\\\">\\n\u003Cdiv class=\\\"tc-drop-down\\\" style=\\\"text-align:center;\\\">\\n\u003C$macrocall $name=\\\"image-picker\\\" actions=\\\"\\\"\\\"\\n\\n\u003C$action-setfield\\n\\t$tiddler=\\\"$:/themes/tiddlywiki/vanilla/settings/backgroundimage\\\"\\n\\t$value=\u003C\u003CimageTitle>>\\n/>\\n\\n\u003C$action-deletetiddler $tiddler=\u003C\u003Cstate>>/>\\n\\n\\\"\\\"\\\"/>\\n\u003C/div>\\n\u003C/$reveal>\\n\u003C/$set>\\n\u003C/div>\\n\\\\end\\n\\n\\\\define backgroundimageattachment-dropdown()\\n\u003C$select tiddler=\\\"$:/themes/tiddlywiki/vanilla/settings/backgroundimageattachment\\\" default=\\\"scroll\\\">\\n\u003Coption value=\\\"scroll\\\">\u003C\u003Clingo Settings/BackgroundImageAttachment/Scroll>>\u003C/option>\\n\u003Coption value=\\\"fixed\\\">\u003C\u003Clingo Settings/BackgroundImageAttachment/Fixed>>\u003C/option>\\n\u003C/$select>\\n\\\\end\\n\\n\\\\define backgroundimagesize-dropdown()\\n\u003C$select tiddler=\\\"$:/themes/tiddlywiki/vanilla/settings/backgroundimagesize\\\" default=\\\"scroll\\\">\\n\u003Coption value=\\\"auto\\\">\u003C\u003Clingo Settings/BackgroundImageSize/Auto>>\u003C/option>\\n\u003Coption value=\\\"cover\\\">\u003C\u003Clingo Settings/BackgroundImageSize/Cover>>\u003C/option>\\n\u003Coption value=\\\"contain\\\">\u003C\u003Clingo Settings/BackgroundImageSize/Contain>>\u003C/option>\\n\u003C/$select>\\n\\\\end\\n\\n\u003C\u003Clingo ThemeTweaks/Hint>>\\n\\n! \u003C\u003Clingo Options>>\\n\\n|\u003C$link to=\\\"$:/themes/tiddlywiki/vanilla/options/sidebarlayout\\\">\u003C\u003Clingo Options/SidebarLayout>>\u003C/$link> |\u003C$select tiddler=\\\"$:/themes/tiddlywiki/vanilla/options/sidebarlayout\\\">\u003Coption value=\\\"fixed-fluid\\\">\u003C\u003Clingo Options/SidebarLayout/Fixed-Fluid>>\u003C/option>\u003Coption value=\\\"fluid-fixed\\\">\u003C\u003Clingo Options/SidebarLayout/Fluid-Fixed>>\u003C/option>\u003C/$select> |\\n|\u003C$link to=\\\"$:/themes/tiddlywiki/vanilla/options/stickytitles\\\">\u003C\u003Clingo Options/StickyTitles>>\u003C/$link>\u003Cbr>//\u003C\u003Clingo Options/StickyTitles/Hint>>// |\u003C$select tiddler=\\\"$:/themes/tiddlywiki/vanilla/options/stickytitles\\\">\u003Coption value=\\\"no\\\">{{$:/language/No}}\u003C/option>\u003Coption value=\\\"yes\\\">{{$:/language/Yes}}\u003C/option>\u003C/$select> |\\n|\u003C$link to=\\\"$:/themes/tiddlywiki/vanilla/options/codewrapping\\\">\u003C\u003Clingo Options/CodeWrapping>>\u003C/$link> |\u003C$select tiddler=\\\"$:/themes/tiddlywiki/vanilla/options/codewrapping\\\">\u003Coption value=\\\"pre\\\">{{$:/language/No}}\u003C/option>\u003Coption value=\\\"pre-wrap\\\">{{$:/language/Yes}}\u003C/option>\u003C/$select> |\\n\\n! \u003C\u003Clingo Settings>>\\n\\n|\u003C$link to=\\\"$:/themes/tiddlywiki/vanilla/settings/fontfamily\\\">\u003C\u003Clingo Settings/FontFamily>>\u003C/$link> |\u003C$edit-text tiddler=\\\"$:/themes/tiddlywiki/vanilla/settings/fontfamily\\\" default=\\\"\\\" tag=\\\"input\\\"/> | |\\n|\u003C$link to=\\\"$:/themes/tiddlywiki/vanilla/settings/co
{"created":"20230423163505037","title":"$:/themes/tiddlywiki/vanilla/metrics/sidebarbreakpoint","text":"600px","modified":"20230423164234376"},
{"created":"20230423164459179","title":"$:/view","text":"zoomin","modified":"20230427151401818"},
{"created":"20230426064525527","text":"\n\u003C!-- aframe v1.4.0 -->\n\u003Cscript>\n/*! For license information please see aframe.min.js.LICENSE.txt */\n!function(e,t){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define([],t):\"object\"==typeof exports?exports.AFRAME=t():e.AFRAME=t()}(self,(()=>(()=>{var e={651:()=>{!function(){\"use strict\";var e=function(e,t){var n=function(e){for(var t=0,n=e.length;t\u003Cn;t++)i(e[t])},i=function(e){var t=e.target,n=e.attributeName,i=e.oldValue;t.attributeChangedCallback(n,i,t.getAttribute(n))};return function(r,s){var o=r.constructor.observedAttributes;return o&&e(s).then((function(){new t(n).observe(r,{attributes:!0,attributeOldValue:!0,attributeFilter:o});for(var e=0,s=o.length;e\u003Cs;e++)r.hasAttribute(o[e])&&i({target:r,attributeName:o[e],oldValue:null})})),r}};function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n\u003Ct;n++)i[n]=e[n];return i}function n(e,n){var i=\"undefined\"!=typeof Symbol&&e[Symbol.iterator]||e[\"@@iterator\"];if(!i){if(Array.isArray(e)||(i=function(e,n){if(e){if(\"string\"==typeof e)return t(e,n);var i=Object.prototype.toString.call(e).slice(8,-1);return\"Object\"===i&&e.constructor&&(i=e.constructor.name),\"Map\"===i||\"Set\"===i?Array.from(e):\"Arguments\"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?t(e,n):void 0}}(e))||n&&e&&\"number\"==typeof e.length){i&&(e=i);var r=0,s=function(){};return{s,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:s}}throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}var o,a=!0,l=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return a=e.done,e},e:function(e){l=!0,o=e},f:function(){try{a||null==i.return||i.return()}finally{if(l)throw o}}}}var i=!0,r=!1,s=\"querySelectorAll\",o=\"querySelectorAll\",a=self,l=a.document,c=a.Element,h=a.MutationObserver,u=a.Set,d=a.WeakMap,p=function(e){return o in e},A=[].filter,f=function(e){var t=new d,a=function(n,i){var r;if(i)for(var s,o=function(e){return e.matches||e.webkitMatchesSelector||e.msMatchesSelector}(n),a=0,l=m.length;a\u003Cl;a++)o.call(n,s=m[a])&&(t.has(n)||t.set(n,new u),(r=t.get(n)).has(s)||(r.add(s),e.handle(n,i,s)));else t.has(n)&&(r=t.get(n),t.delete(n),r.forEach((function(t){e.handle(n,i,t)})))},f=function(e){for(var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=0,i=e.length;n\u003Ci;n++)a(e[n],t)},m=e.query,g=e.root||l,v=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:MutationObserver,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[\"*\"],l=function t(r,o,a,l,c,h){var u,d=n(r);try{for(d.s();!(u=d.n()).done;){var p=u.value;(h||s in p)&&(c?a.has(p)||(a.add(p),l.delete(p),e(p,c)):l.has(p)||(l.add(p),a.delete(p),e(p,c)),h||t(p[s](o),o,a,l,c,i))}}catch(e){d.e(e)}finally{d.f()}},c=new o((function(e){if(a.length){var t,s=a.join(\",\"),o=new Set,c=new Set,h=n(e);try{for(h.s();!(t=h.n()).done;){var u=t.value,d=u.addedNodes,p=u.removedNodes;l(p,s,o,c,r,r),l(d,s,o,c,i,r)}}catch(e){h.e(e)}finally{h.f()}}})),h=c.observe;return(c.observe=function(e){return h.call(c,e,{subtree:i,childList:i})})(t),c}(a,g,h,m),y=c.prototype.attachShadow;return y&&(c.prototype.attachShadow=function(e){var t=y.call(this,e);return v.observe(t),t}),m.length&&f(g[o](m)),{drop:function(e){for(var n=0,i=e.length;n\u003Ci;n++)t.delete(e[n])},flush:function(){for(var e=v.takeRecords(),t=0,n=e.length;t\u003Cn;t++)f(A.call(e[t].removedNodes,p),!1),f(A.call(e[t].addedNodes,p),!0)},observer:v,parse:f}},m=self,g=m.document,v=m.Map,y=m.MutationObserver,E=m.Object,b=m.Set,x=m.WeakMap,w=m.Element,C=m.HTMLElement,M=m.Node,_=m.Error,I=m.TypeError,B=m.Reflect,S=E.defineProperty,T=E.keys,L=E.getOwnPropertyNames,D=E.setPrototypeOf,R=!self.customElements,P=function(e){for(var t=T(e),n=[],i=t.length,r=0;r\u003Ci;r++)n[r]=e[t[r]],delete
2023-06-07 15:35:48 +02:00
{"created":"20230423163601005","text":"code{\n\tfont-size:12px;\n}\n\n.video-js{\n\tbackground:#FFF;\n}\n\n.nc-sidebar h1.tc-site-title {\n margin: 0;\n text-indent: 113px;\n font-size: 15px !important;\n vertical-align: bottom;\n display: block;\n margin-top: 11px;\n}\n\nh1.tc-site-title::before {\n display: block;\n position: absolute;\n content: \"\";\n width: 99px;\n height: 100px;\n background: url(./example/assets/logo.png) no-repeat;\n background-size: contain;\n transform: translate(0px,-11px);\n}\n\n.nc-sidebar .section.open .label {\n background: linear-gradient(45deg,#7f4bca, #08F, #7f4bca)\n}\n\nbody.tc-body,\n.nc-bar.nc-topbar{\n background: #FFF;\n}\n\n.tc-site-title {\n color: #0a81FF;\n}\n\n.tc-story-river{\n width:100% !important;\n} \n\na,\na:visited,\na:focus-visible{\n color:#0a81FF\n}\na:hover{\n opacity:0.8;\n}\n\n\n.nc-sidebar{\n box-shadow: 0px 0px 0px 15px 0px 0px #0006;\n}\n\n.tc-tiddler-preview-preview iframe{\n width:100%;\n height:50vh;\n max-height:380px;\n}\n\n.tc-tiddler-preview-preview {\n border:none;\n overflow-y:auto;\n}\n\n@media only screen and (max-width: 500px) {\n .tc-tiddler-body > embed, \n .tc-tiddler-body > iframe {\n max-height:300px;\n }\n}\n\n\n.tc-tiddler-body, iframe{\n border-radius:7px;\n}\n\n.tc-tiddler-frame{\n\tborder:none;\n\tbox-shadow:none !important;\n}\n\n.nc-bar input[type=\"search\"]{\n background:#EEE;\n}\n.nc-bar {\n height:47px;\n}\n\n.CodeMirror {\n font-size:13px;\n}\n\nshader-doodle,\n.scene{\n width:100%;\n height:50vh; \n max-height:365px;\n}\n\n.scene canvas {\n border-radius:6px;\n}\n\n.scene pre {\n margin-top:0;\n}\n\npre.result::before {\n display: block;\n position: absolute;\n width: 51px;\n height: 20px;\n background: #FFF;\n content: \"output\";\n transform: translate(-13px,-25px);\n color: #FFFF;\n background: #555;\n text-indent: 5px;\n border-radius: 4px 4px 0px 0px;\n font-weight: bold;\n font-size: 11px;\n}\n\npre.result {\n background: #555;\n color: #ccc;\n margin: 0;\n border: 0;\n padding: 5px;\n border-radius: 0px 0px 6px 6px;\n vertical-align: top;\n padding-left: 13px;\n\t\tborder-top: 1px solid #ff02b5\n}\ntextarea.sandboxify.noresult {\n border-radius: 6px 6px 6px 6px;\n}\ntextarea.sandboxify {\n padding: 13px 13px 26px 13px;\n font-family: \"Fira Mono\",\"Liberation Mono\",Menlo,Courier,monospace;\n color: #ddddff;\n background: #333;\n border-radius: 6px 6px 0px 0px;\n vertical-align: top;\n min-height: 50px;\n white-space: nowrap;\n}\ntextarea.sandboxify, pre.result {\n width: 100%;\n max-width: 485px;\n min-width: 350px;\n display: inline-block;\n font-size: 13px;\n display: inline-block;\n box-sizing: border-box;\n\t\theight:14vh;\n\t\toverflow-y:auto\n}\n\n.border{\n border: 1px solid #ccc;\n box-shadow: 0px 0px 10px #0004;\n}\n\n/* hide admin buttons */\nbody#p .nc-sidebar .tc-reveal:nth-child(6),\nbody#p .nc-sidebar .tc-reveal:nth-child(8),\nbody#p .nc-sidebar .tc-reveal:nth-child(10),\nbody#p .nc-sidebar .tc-reveal:nth-child(12),\nbody#p .nc-sidebar .tc-reveal:nth-child(14){\n\tdisplay:none\n}\n\n.st, .dn, .se, .rr { color:#FFF; display:inline-block; padding:0px 3px; border-radius:5px; font-size:12px;margin:0px 5px 0px 0px} \n.st { background:#FA0;}\n.dn { background:#F0A;}\n.se { background:#0FA;}\n.rr { background:#0AF;}\n.st > .dn,\n.st > .rr { margin-left:5px;display:inline;}\n\n .jumbo { \n\t font-size:120px; \n\t\tfont-weight: bold;\n\t\tline-height:170px;\n\t\tdisplay:inline-block;\n\t}\n .big { \n\t font-size:40px;\n\t font-weight:bold;\n\t}\n .hi1 { color:#F0F;}\n\t.hi2 { color:#999;}\n\t.hi3 { color:#0dd;}","tags":"$:/tags/Stylesheet","title":"$:/webxr-notebook/boot.css","modified":"20230607112924645","type":"text/css"},
2023-05-04 19:45:06 +02:00
{"created":"20230425145424360","text":"\u003Cscript>\nwindow.onerror=null\nif( typeof $tw != 'undefined' ) $tw.config.htmlUnsafeElements = [];\n\u003C/script>\n\n\u003C!-- browser console -->\n\u003Cscript>\n(function(){\n\t$ = (s) => document.querySelector(s)\n\twindow.errcolor = '#000c'\n \n let isLocalHost = () => document.location.hostname == 'localhost'\n if( !isLocalHost() ) setTimeout( () => window.document.body.id = \"p\",50) \n\n\twindow.log = (str,line,bgcolor) => {\n\t\tline = line || 0\n\t\t$scene = $('.scene')\n\t\t$console = $('.console')\n\t\tif( !$scene ) return;\n\t\t$scene.style.position = 'relative'\n\t\tif( !$console ){\n\t\t\tlet el = $console = document.createElement(\"pre\")\n\t\t\tel.className = \"console\"\n\t\t\tel.style.position = 'absolute';\n\t\t\tel.style.top = el.style.left = el.style.bottom = el.style.right = '0'\n\t\t\tel.style.zIndex = 1000;\n\t\t\tel.style.fontSize = '12px'\n\t\t\tel.style.padding = '10px'\n\t\t\tel.style.color = '#0CF'\n\t\t\tel.style.pointerEvents = 'none'\n\t\t\t$scene.appendChild($console)\n\t\t}\n\t\t$console.style.background = bgcolor ? bgcolor : 'transparent'\n\t\tlet lines = String($console.innerHTML).split(\"\\n\")\n\t\t\tlines[line] = str\n\t\t$console.innerHTML = lines.join(\"\\n\")\n\t}\n\n\tvar error = (event, source, lineno, colno, error) => {\n\t\tlog(lineno+\":\"+colno+\" \"+error, errcolor)\n\t}\n\twindow.onerror = log\n\tconsole.error = (s) => log(\"error: \"+s.toString(),errcolor)\n\n})()\n\u003C/script>\n\n\u003C!-- PWA service worker -->\n\u003Cscript>\n(function(){\n let isLocalHost = () => document.location.hostname == 'localhost'\n\n\t\t\tconst registerServiceWorker = async () => {\n if( isLocalHost() ) return\n\t\t\t\tif ('serviceWorker' in navigator) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst registration = await navigator.serviceWorker.register(\n\t\t\t\t\t\t\t\"./sw.js\",\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tscope: './',\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t\t\tif (registration.installing) {\n\t\t\t\t\t\t\tconsole.log('Service worker installing');\n\t\t\t\t\t\t} else if (registration.waiting) {\n\t\t\t\t\t\t\tconsole.log('Service worker installed');\n\t\t\t\t\t\t} else if (registration.active) {\n\t\t\t\t\t\t\tconsole.log('Service worker active');\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tconsole.error(\"Registration failed with \"+error);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\n if (document.readyState === 'complete') registerServiceWorker();\n else document.addEventListener(\"DOMContentLoaded\", registerServiceWorker);\n\n if ( !isLocalHost() && \"serviceWorker\" in navigator) { \n window.addEventListener(\"load\", async () => {\n try {\n const registration = await navigator.serviceWorker.register(\"./sw.js\");\n } catch (e) { console.error(e) }\n });\n window.addEventListener(\"beforeinstallprompt\", function (e) {\n e.userChoice.then(function (choiceResult) {\n if (choiceResult.outcome == \"dismissed\") {\n console.log(\"User cancelled home screen install\");\n } else console.log(\"User added to home screen\");\n });\n });\n }\n\t\t\t\n})()\n\u003C/script>\n","tags":"$:/tags/RawMarkup","title":"$:/webxr-notebook/boot.html","modified":"20230428151719616"},
2023-04-27 17:35:20 +02:00
{"created":"20230427081708927","text":"\u003C!-- sandboxify textareas with class 'sandboxify' -->\n\u003Cscript>\n\nfunction sandboxify() { \n let run = (t) => {\n let $res = t.parentElement.children[1]\n function log(res){\n $res.innerHTML = typeof res == 'string' ? res : JSON.stringify(res,null,2)\n }\n let _log = console.log\n console.log = log\n try{\n eval(t.value); \n }catch(e){ log(e) }finally{ console.log = _log }\n } \n const textareas = document.querySelectorAll(\"textarea.sandboxify\");\n textareas.forEach(t => {\n t.addEventListener(\"input\", function (event) {\n try {\n run(t)\n } catch (error) {\n console.error(error);\n }\n });\n run(t)\n }); \n}\n\n// call sandboxify once on page load\nsandboxify();\n\n// set up a MutationObserver to call sandboxify on any new textareas added to the DOM\nconst observer = new MutationObserver(mutations => {\n mutations.forEach(mutation => {\n if (mutation.addedNodes && mutation.addedNodes.length > 0) {\n const addedNodes = mutation.addedNodes;\n addedNodes.forEach(addedNode => {\n if (addedNode.tagName === \"TEXTAREA\" && addedNode.classList.contains(\"sandboxify\")) {\n sandboxify();\n }\n });\n }\n });\n});\n\nobserver.observe(document, { childList: true, subtree: true });\n\u003C/script>","tags":"$:/tags/RawMarkup","title":"$:/webxr-notebook/sandboxify.js","modified":"20230427090041916"},
{"created":"20230427072514129","text":"\u003C!-- scriptie-talkie-embed.js -->\n\u003Cscript>\n\n(function(e,t,n){function i(n,s){if(!t[n]){if(!e[n]){var o=\"function\"==typeof require&&require;if(!s&&o)return o(n,!0);if(r)return r(n,!0);throw Error(\"Cannot find module '\"+n+\"'\")}var u=t[n]={exports:{}};e[n][0](function(t){var r=e[n][1][t];return i(r?r:t)},u,u.exports)}return t[n].exports}for(var r=\"function\"==typeof require&&require,s=0;n.length>s;s++)i(n[s]);return i})({1:[function(require){\"use strict\";var scriptieTalkieEmbed=require(\"../../\");scriptieTalkieEmbed()},{\"../../\":2}],3:[function(require,module,exports){\"use strict\";module.exports=function(textarea){var opts={},data=textarea.getAttribute(\"data-scriptie-talkie\");if(!data)return opts;try{opts=eval(\"(\"+data+\")\")}catch(e){console.error(e)}finally{return opts}}},{}],4:[function(require,module){\"use strict\";function trimEmpty(lines){for(;lines.length&&!lines[0].trim().length;)lines.shift();for(;lines.length&&!lines[lines.length-1].trim().length;)lines.length--}function leftAlign(lines){var indent=-1;if(lines.filter(function(line){return line.trim().length}).forEach(function(line){for(var lineIndent=0,col=0;\" \"===line.charAt(col++);)lineIndent++;indent=-1===indent?lineIndent:Math.min(indent,lineIndent)}),!indent)return lines;for(var i=0;lines.length>i;i++)lines[i]=lines[i].slice(indent)}module.exports=function(textarea,addRows){addRows=addRows||0;var lines=textarea.textContent.split(\"\\n\");return trimEmpty(lines),leftAlign(lines),textarea.rows=Math.max(lines.length+addRows,1),textarea.textContent=lines.join(\"\\n\"),lines}},{}],5:[function(require,module){\"use strict\";function replaceElement(replaceEl,withEl){replaceEl.parentNode.replaceChild(withEl,replaceEl)}var format=require(\"util\").format;module.exports=function(textarea,opts){opts=opts||{};var minHeight=opts.minHeight||150,maxHeight=opts.maxHeight||600,minWidth=opts.minWidth||600,textareaWidth=textarea.clientWidth,width=Math.max(minWidth,textareaWidth),height=textarea.clientHeight+50;height=Math.max(minHeight,height),height=Math.min(maxHeight,height);var container=document.createElement(\"div\");return container.setAttribute(\"class\",\"scriptie-talkie-container\"),container.setAttribute(\"style\",format(\"width: %spx; height: %spx\",width,height)),replaceElement(textarea,container),container}},{util:6}],7:[function(require,module){\"use strict\";module.exports=function(container){var link=document.createElement(\"a\");return link.setAttribute(\"class\",\"scriptie-talkie-link\"),window.link=link,container.appendChild(link),link.textContent=\"full view\",link}},{}],8:[function(require,module){\"use script\";module.exports=function(){var head=document.getElementsByTagName(\"head\")[0],style=document.createElement(\"style\");style.type=\"text/css\",style.styleSheet?style.styleSheet.cssText=css:style.appendChild(document.createTextNode(css)),head.appendChild(style)};var css=[\"textarea.scriptie-talkie {\",\" visibility: hidden;\",\" display : block;\",\"}\",\".scriptie-talkie-container {\",\" position: relative; \",\" margin: 10px 0px;\",\"}\",\".scriptie-talkie-editor,\",\".scriptie-talkie-terminal {\",\" position: absolute;\",\" top: 0;\",\" bottom: 0;\",\" height: 100%;\",\" width: 50%;\",\"}\",\".scriptie-talkie-editor {\",\" left: 0;\",\" right: 50%;\",\"}\",\".scriptie-talkie-link {\",\" position : absolute;\",\" bottom : 1px;\",\" right : 4px;\",\" font-size : 14px;\",\" color : yellowgreen;\",\" z-index : 1;\",\"}\",\"textarea.scriptie-talkie, \",\".scriptie-talkie-terminal,\",\".scriptie-talkie-editor {\",\" /* text area needs same font to determine editor size correctly */\",\" font-size : 14px;\",\" font-family : Terminus,Consolas,Profont,Monaco,Inconsolata,Inconsolata-g,\",' Unifont,Lime,\"ClearlyU PUA\",Clean,\"DejaVu Sans Mono\",\"Lucida Console\",',' \"Bitstream Vera Sans Mono\",Freemono,\"Liberation Mono\",Dina,Anka,Droid Sans Mono,',' Anonymous Pro,Proggy fonts,Envy Code R,Gamow,Courier,\"Courier New\",
{"created":"20230426064319911","text":"\n\u003C!-- shader-doodle.js -->\n\u003Cscript>\n'use strict';(function(z,A){\"object\"===typeof exports&&\"undefined\"!==typeof module?A(exports):\"function\"===typeof define&&define.amd?define([\"exports\"],A):(z=z||self,A(z.ShaderDoodle={}))})(this,function(z){function A(a){function b(a){console.log(a);e.add(a.targetElement)}function d(b){e.has(b.targetElement)?e.delete(b.targetElement):(b=a.createBufferSource(),b.buffer=a.createBuffer(1,1,a.sampleRate),b.connect(a.destination),b.start(0),\"function\"===typeof a.resume&&a.resume().then(c),f())}function c(){v.forEach(a=>\n{a()})}function f(){p.forEach(a=>{a.removeEventListener(\"touchstart\",d);a.removeEventListener(\"touchmove\",b);a.removeEventListener(\"touchend\",d);a.removeEventListener(\"mouseup\",d)});p.clear();e.clear()}let e=new Set,p=new Set,v=[];return{onStart:function(b){\"running\"===a.state?(console.log(\"already\"),b()):v.push(b)},register:function(a){a.addEventListener(\"touchstart\",d);a.addEventListener(\"touchmove\",b);a.addEventListener(\"touchend\",d);a.addEventListener(\"mouseup\",d);p.add(a)},dispose:f}}function ca(){function a(a){d[0].value[0]=\na.alpha;d[0].value[1]=a.beta;d[0].value[2]=a.gamma}let b=!1,d=JSON.parse(JSON.stringify(L));return{get ustate(){return d},setup:function(){b||(b=!0,\"object\"===typeof DeviceOrientationEvent&&\"function\"===typeof DeviceOrientationEvent.requestPermission?DeviceOrientationEvent.requestPermission().then(b=>{\"granted\"===b&&window.addEventListener(\"deviceorientation\",a)}).catch(console.error):window.addEventListener(\"deviceorientation\",a))},dispose:function(){window.removeEventListener(\"deviceorientation\",\na)}}}function da(a){let b={},d=a.getExtension.bind(a);return{get:function(a){if(void 0!==b[a])return b[a];let c=d(a)||d(\"MOZ_\".concat(a))||d(\"WEBKIT_\".concat(a));null===c&&console.warn(\"\u003Cshader-doodle /> \".concat(a,\" extension not supported.\"));return b[a]=c}}}function C(){function a(a,b){if(a>n||b>h)a=Math.max(a,n),b=Math.max(b,h),a!==n&&(n=a,c.width=Math.floor(1*n)),b!==h&&(h=b,c.height=Math.floor(1*h))}function b(a){let b=l?(a-l)/1E3:0;l=a;k[0].value+=b;k[1].value=b;k[3].value++;a=new Date;k[2].value[0]=\na.getFullYear();k[2].value[1]=a.getMonth()+1;k[2].value[2]=a.getDate();k[2].value[3]=3600*a.getHours()+60*a.getMinutes()+a.getSeconds()+.001*a.getMilliseconds()}function d(f){if(m.size){b(f);var u=[...k,...e.ustate];m.forEach(b=>b.render(c,a,n,h,1,u));q=requestAnimationFrame(d)}else q=void 0}let c=document.createElementNS(\"http://www.w3.org/1999/xhtml\",\"canvas\"),f=c.getContext(\"webgl\")||c.getContext(\"experimental-webgl\"),e=ca(),p=new (window.AudioContext||window.webkitAudioContext),v=new A(p);p.onStart=\nv.onStart;f.blendFunc(f.SRC_ALPHA,f.ONE_MINUS_SRC_ALPHA);f.enable(f.BLEND);let n=0,h=0,q,l,m=new Set,k=JSON.parse(JSON.stringify(M)),w=da(f);w.get(\"OES_texture_float\");w.get(\"OES_texture_float_linear\");w.get(\"OES_texture_half_float\");w.get(\"OES_texture_half_float_linear\");f.clearColor(0,0,0,0);return Object.freeze({get gl(){return f},get wa(){return p},addSurface:function(a){v.register(a.dom);a.addClick(e.setup);m.add(a);q||(q=requestAnimationFrame(d))},removeSurface:function(a){m.delete(a)},addUniform:function(a,\nb,c){for(let d=0;d\u003Ck.length;d++)if(k[d].name===a){k[d].value=b;k[d].type=c;return}k.push({name:a,value:b,type:c,toyname:a})},setUniform:function(a,b){for(let c=0;c\u003Ck.length;c++)if(k[c].name===a){k[c].value=b;break}},dispose:function(){m.forEach(a=>a.dispose());m.clear();m=void 0;cancelAnimationFrame(q);e.dispose();v.dispose()}})}function ea(a,b){let d={},c=a.getProgramParameter(b,a.ACTIVE_ATTRIBUTES);for(let f=0;f\u003Cc;f++){let {name:c}=a.getActiveAttrib(b,f);d[c]=a.getAttribLocation(b,c)}return d}function N(a){function b(b){a.texParameteri(a.TEXTURE_2D,\na.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,b?a.NEAREST:a.LINEAR);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,b?a.NEAREST:a.LINEAR)}let d,c,f=a
2023-06-07 18:13:04 +02:00
{"created":"20230428121310382","text":"\u003Cbr>\n\u003Cbr>\n\u003Cdiv class=\"section\">\n \u003Ca href=\"#XR Fragments\" class=\"tc-btn-invisible label\" style=\"font-weight:bold;padding:0; text-decoration:none\">Home\u003C/a>\n\u003C/div>\n\u003Cbr>\n\u003Cdiv class=\"section\">\n \u003Ca href=\"#How it works\" class=\"tc-btn-invisible label\" style=\"font-weight:bold;padding:0; text-decoration:none\">How it works\u003C/a>\n\u003C/div>\n\u003Cbr>\n\u003Cdiv class=\"section\">\n \u003Ca href=\"#Philosophy\" class=\"tc-btn-invisible label\" style=\"font-weight:bold;padding:0; text-decoration:none\">Philosophy\u003C/a>\n\u003C/div>\n\u003Cbr>\n\u003Cdiv style=\"opacity:0.4;position:absolute;top:637px\">\n[img width=150 [nlnet.png]]\n\u003C/div>\n","tags":"","title":"$:/xrfragment/topmenu","modified":"20230607161231408"},
{"created":"20230427155228509","text":"\n\u003Cscript>\n\nvar $hx_exports = typeof exports != \"undefined\" ? exports : typeof window != \"undefined\" ? window : typeof self != \"undefined\" ? self : this;\n(function ($global) { \"use strict\";\n$hx_exports[\"xrfragment\"] = $hx_exports[\"xrfragment\"] || {};\nvar EReg = function(r,opt) {\n\tthis.r = new RegExp(r,opt.split(\"u\").join(\"\"));\n};\nEReg.__name__ = true;\nEReg.prototype = {\n\tmatch: function(s) {\n\t\tif(this.r.global) {\n\t\t\tthis.r.lastIndex = 0;\n\t\t}\n\t\tthis.r.m = this.r.exec(s);\n\t\tthis.r.s = s;\n\t\treturn this.r.m != null;\n\t}\n\t,split: function(s) {\n\t\tvar d = \"#__delim__#\";\n\t\treturn s.replace(this.r,d).split(d);\n\t}\n};\nvar HxOverrides = function() { };\nHxOverrides.__name__ = true;\nHxOverrides.cca = function(s,index) {\n\tvar x = s.charCodeAt(index);\n\tif(x != x) {\n\t\treturn undefined;\n\t}\n\treturn x;\n};\nHxOverrides.substr = function(s,pos,len) {\n\tif(len == null) {\n\t\tlen = s.length;\n\t} else if(len \u003C 0) {\n\t\tif(pos == 0) {\n\t\t\tlen = s.length + len;\n\t\t} else {\n\t\t\treturn \"\";\n\t\t}\n\t}\n\treturn s.substr(pos,len);\n};\nHxOverrides.now = function() {\n\treturn Date.now();\n};\nMath.__name__ = true;\nvar Reflect = function() { };\nReflect.__name__ = true;\nReflect.field = function(o,field) {\n\ttry {\n\t\treturn o[field];\n\t} catch( _g ) {\n\t\treturn null;\n\t}\n};\nReflect.fields = function(o) {\n\tvar a = [];\n\tif(o != null) {\n\t\tvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\t\tfor( var f in o ) {\n\t\tif(f != \"__id__\" && f != \"hx__closures__\" && hasOwnProperty.call(o,f)) {\n\t\t\ta.push(f);\n\t\t}\n\t\t}\n\t}\n\treturn a;\n};\nReflect.deleteField = function(o,field) {\n\tif(!Object.prototype.hasOwnProperty.call(o,field)) {\n\t\treturn false;\n\t}\n\tdelete(o[field]);\n\treturn true;\n};\nvar Std = function() { };\nStd.__name__ = true;\nStd.string = function(s) {\n\treturn js_Boot.__string_rec(s,\"\");\n};\nStd.parseInt = function(x) {\n\tif(x != null) {\n\t\tvar _g = 0;\n\t\tvar _g1 = x.length;\n\t\twhile(_g \u003C _g1) {\n\t\t\tvar i = _g++;\n\t\t\tvar c = x.charCodeAt(i);\n\t\t\tif(c \u003C= 8 || c >= 14 && c != 32 && c != 45) {\n\t\t\t\tvar nc = x.charCodeAt(i + 1);\n\t\t\t\tvar v = parseInt(x,nc == 120 || nc == 88 ? 16 : 10);\n\t\t\t\tif(isNaN(v)) {\n\t\t\t\t\treturn null;\n\t\t\t\t} else {\n\t\t\t\t\treturn v;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn null;\n};\nvar StringTools = function() { };\nStringTools.__name__ = true;\nStringTools.isSpace = function(s,pos) {\n\tvar c = HxOverrides.cca(s,pos);\n\tif(!(c > 8 && c \u003C 14)) {\n\t\treturn c == 32;\n\t} else {\n\t\treturn true;\n\t}\n};\nStringTools.ltrim = function(s) {\n\tvar l = s.length;\n\tvar r = 0;\n\twhile(r \u003C l && StringTools.isSpace(s,r)) ++r;\n\tif(r > 0) {\n\t\treturn HxOverrides.substr(s,r,l - r);\n\t} else {\n\t\treturn s;\n\t}\n};\nStringTools.rtrim = function(s) {\n\tvar l = s.length;\n\tvar r = 0;\n\twhile(r \u003C l && StringTools.isSpace(s,l - r - 1)) ++r;\n\tif(r > 0) {\n\t\treturn HxOverrides.substr(s,0,l - r);\n\t} else {\n\t\treturn s;\n\t}\n};\nStringTools.trim = function(s) {\n\treturn StringTools.ltrim(StringTools.rtrim(s));\n};\nStringTools.replace = function(s,sub,by) {\n\treturn s.split(sub).join(by);\n};\nvar haxe_iterators_ArrayIterator = function(array) {\n\tthis.current = 0;\n\tthis.array = array;\n};\nhaxe_iterators_ArrayIterator.__name__ = true;\nhaxe_iterators_ArrayIterator.prototype = {\n\thasNext: function() {\n\t\treturn this.current \u003C this.array.length;\n\t}\n\t,next: function() {\n\t\treturn this.array[this.current++];\n\t}\n};\nvar js_Boot = function() { };\njs_Boot.__name__ = true;\njs_Boot.__string_rec = function(o,s) {\n\tif(o == null) {\n\t\treturn \"null\";\n\t}\n\tif(s.length >= 5) {\n\t\treturn \"\u003C...>\";\n\t}\n\tvar t = typeof(o);\n\tif(t == \"function\" && (o.__name__ || o.__ename__)) {\n\t\tt = \"object\";\n\t}\n\tswitch(t) {\n\tcase \"function\":\n\t\treturn \"\u003Cfunction>\";\n\tcase \"object\":\n\t\tif(((o) instanceof Array)) {\n\t\t\tvar str = \"
2023-05-30 15:29:43 +02:00
{"created":"20230530121012871","text":"16:04:16 From Leon van Kammen : https://xrf.isvery.ninja/example/aframe/sandbox\n16:04:51 From Frode Hegland : https://futuretextlab.info\n16:04:54 From Leon van Kammen : https://xrf.isvery.ninja\n16:05:21 From Frode Hegland : https://futuretextlab.info/category/vr-resource/\n16:15:08 From Peter Wasilko : What is MR in the center of the diagram?\n16:15:28 From Brandel Zachernuk : “Mixed Reality”\n16:15:54 From Peter Wasilko : How is it distinguished from AR?\n16:17:09 From Brandel Zachernuk : Its a term that people use to encompass the lot. Many people claimed that Google Glass-style AR with no world registration as AR, which drove people to coining an additional term\n16:17:30 From Frode Hegland : Ah… thanks Brandel\n16:19:05 From Patrick Lichty : MR, XR, AR, VR, it seems these are used rather fungible, itd be good to have a small discussion about the Venn diagram here after the talk.\n16:19:24 From Frode Hegland : Yes exactly http://community.cim3.net/wiki/PurpleNumbers.html\n16:19:39 From Frode Hegland : Dougs paragraph level addressing made live on the web through this\n16:19:52 From Karl Hebenstreit, Jr. : Reacted to “MR, XR, AR, VR, it s…” with 👍\n16:22:14 From Peter Wasilko : I particularly loved Dougs deep linking distinction between a location in a document whose content might change vs. content in a document whose location might change. We need anchors to both.\n16:22:43 From Frode Hegland : Reacted to “I particularly loved…” with 👍\n16:24:17 From Frode Hegland : Hi Dene\n16:24:36 From Patrick Lichty : Reacted to “I particularly loved…” with 👏\n16:25:08 From Dene Grigar To Frode Hegland(privately) : Good moring\n16:25:12 From Dene Grigar To Frode Hegland(privately) : morning\n16:25:27 From Frode Hegland To Dene Grigar(privately) : 🙂\n16:30:25 From Frode Hegland : Hi Matthias\n16:31:40 From Patrick Lichty : This is amazing, actually.\n16:31:51 From Peter Wasilko : It looked like the image on the surface of the portal object was changing with ones relative position to it.\n16:33:09 From Dene Grigar : Is there an example of how this has been used for art?\n16:33:25 From Patrick Lichty : Yes.\n16:36:22 From Karl Hebenstreit, Jr. : Future of Interface Workshop (February 15-16), https://futureofinterface.org/info-center/accessibility/ and theres an XR Accessibility community, https://xraccess.org/\n16:40:15 From Peter Wasilko : https://en.wikipedia.org/wiki/TouchDesigner\n16:40:47 From Peter Wasilko : https://derivative.ca\n16:45:25 From Fabien : addressability of the known universe with infinite resolution\n16:47:49 From Frode Hegland : Fabien, infinite resolution depends on stated context, so cool\n16:47:50 From Frode Hegland : Can this generate a link to a specific location and view by the user performing an action in that location and sharing it? Like a GPS coordinate maybe.\n16:50:22 From Brandel Zachernuk : This is the W3C TPAC: https://www.w3.org/2023/09/TPAC/, and the IW WG (webXR etc) is here: https://www.w3.org/immersive-web/\n16:50:28 From Fabien : Reacted to “This is the W3C TP…” with 👍\n16:51:33 From Matthias mprove : The TPAC link says ”Sorry, Insufficient Access Privileges”\n16:51:34 From Karl Hebenstreit, Jr. : I see XR accessibility as one of the most complex challenges. How can we make it accessible so people with disabilities are not excluded from virtual worlds?\n16:52:22 From Matthias mprove : Oh, the comma was playing a trick on me: https://www.w3.org/2023/09/TPAC/\n16:53:45 From Peter Wasilko : De Bruijn Indices! https://en.wikipedia.org/wiki/De_Bruijn_index\n17:01:36 From Dene Grigar : Yes, I do\n17:02:14 From Dene Grigar : VR poses a challenge for conservation\n17:02:39 From Frode Hegland : 1 second sorry\n17:02:49 From Fabien : indeed, participated to Not Time To Wait specifically for that https://mediaarea.net/NoTimeToWait6\n17:03:13 From Fabien : (for conservation, in art or not)\n17:03:28 From Daveed Benjamin : Love it Peter! Bit.ly for XR fragments\n17:03:55 From Matthias mpro
{"title":"4d3.jpg","text":"/9j/4AAQSkZJRgABAQEBLAEsAAD//gATQ3JlYXRlZCB3aXRoIEdJTVD/4gKwSUNDX1BST0ZJTEUAAQEAAAKgbGNtcwQwAABtbnRyUkdCIFhZWiAH5wAFABoADAAcABZhY3NwQVBQTAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA9tYAAQAAAADTLWxjbXMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA1kZXNjAAABIAA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vpQ156K8ZZNTbi0WOjVF11vPv4MAn3QkhS5GctgSeLoFDfh13mlw5dkPGnTvrgr0h26WqDcARPpPu0VXIiAgcC8hdneHd2godLghhi2pJVzpIYTZDF+VCtKaGrgpFCA0GiA6Gp21tVBWVcE3MRHRkZGQ+frytg
2023-06-22 13:27:14 +02:00
{"created":"20230602135111711","text":"1. Download \u003Ca href=\"./dist/xrfragment.aframe.js\" target=\"_blank\">xrfragment.aframe.js\u003C/a>.\u003Cbr>\n2. then include below to empower your [AFRAME app](https:/aframe.io) with XR Fragments:\n\u003Cbr>\u003Cbr>\n\u003Cdiv>\n \u003Ctextarea spellcheck=\"false\" autofocus class=\"sandboxify noresult\" style=\"min-height:325px;width:100%;max-width:800px;\">&lt;script src=\"./dist/xrfragment.aframe.js\"&gt;&lt;/script&gt;\n&nbsp;\n...\n&nbsp;\n&#60;&#97;&#45;&#115;&#99;&#101;&#110;&#101;&#62;&#10;&#32;&#32;&#32;&#32;&#60;&#97;&#45;&#101;&#110;&#116;&#105;&#116;&#121;&#32;&#105;&#100;&#61;&#34;&#112;&#108;&#97;&#121;&#101;&#114;&#34;&#32;&#119;&#97;&#115;&#100;&#45;&#99;&#111;&#110;&#116;&#114;&#111;&#108;&#115;&#32;&#108;&#111;&#111;&#107;&#45;&#99;&#111;&#110;&#116;&#114;&#111;&#108;&#115;&#62;&#10;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#60;&#97;&#45;&#101;&#110;&#116;&#105;&#116;&#121;&#32;&#105;&#100;&#61;&#34;&#108;&#101;&#102;&#116;&#45;&#104;&#97;&#110;&#100;&#34;&#32;&#32;&#108;&#97;&#115;&#101;&#114;&#45;&#99;&#111;&#110;&#116;&#114;&#111;&#108;&#115;&#61;&#34;&#104;&#97;&#110;&#100;&#58;&#32;&#108;&#101;&#102;&#116;&#34;&#32;&#114;&#97;&#121;&#99;&#97;&#115;&#116;&#101;&#114;&#61;&#34;&#111;&#98;&#106;&#101;&#99;&#116;&#115;&#58;&#46;&#114;&#97;&#121;&#59;&#102;&#97;&#114;&#58;&#53;&#53;&#48;&#48;&#34;&#32;&#32;&#111;&#99;&#117;&#108;&#117;&#115;&#45;&#116;&#111;&#117;&#99;&#104;&#45;&#99;&#111;&#110;&#116;&#114;&#111;&#108;&#115;&#61;&#34;&#104;&#97;&#110;&#100;&#58;&#32;&#108;&#101;&#102;&#116;&#34;&#62;&#10;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#60;&#97;&#45;&#101;&#110;&#116;&#105;&#116;&#121;&#32;&#114;&#111;&#116;&#97;&#116;&#105;&#111;&#110;&#61;&#34;&#45;&#57;&#48;&#32;&#48;&#32;&#48;&#34;&#32;&#112;&#111;&#115;&#105;&#116;&#105;&#111;&#110;&#61;&#34;&#48;&#32;&#48;&#46;&#49;&#32;&#48;&#34;&#62;&#10;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#60;&#97;&#45;&#101;&#110;&#116;&#105;&#116;&#121;&#32;&#105;&#100;&#61;&#34;&#98;&#97;&#99;&#107;&#34;&#32;&#120;&#114;&#102;&#45;&#98;&#117;&#116;&#116;&#111;&#110;&#61;&#34;&#108;&#97;&#98;&#101;&#108;&#58;&#32;&#60;&#59;&#32;&#119;&#105;&#100;&#116;&#104;&#58;&#48;&#46;&#48;&#53;&#59;&#32;&#97;&#99;&#116;&#105;&#111;&#110;&#58;&#32;&#104;&#105;&#115;&#116;&#111;&#114;&#121;&#46;&#98;&#97;&#99;&#107;&#40;&#41;&#34;&#32;&#32;&#32;&#32;&#112;&#111;&#115;&#105;&#116;&#105;&#111;&#110;&#61;&#34;&#45;&#48;&#46;&#48;&#50;&#53;&#32;&#48;&#32;&#48;&#34;&#32;&#99;&#108;&#97;&#115;&#115;&#61;&#34;&#114;&#97;&#121;&#34;&#62;&#60;&#47;&#97;&#45;&#101;&#110;&#116;&#105;&#116;&#121;&#62;&#10;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#60;&#97;&#45;&#101;&#110;&#116;&#105;&#116;&#121;&#32;&#105;&#100;&#61;&#34;&#110;&#101;&#120;&#116;&#34;&#32;&#120;&#114;&#102;&#45;&#98;&#117;&#116;&#116;&#111;&#110;&#61;&#34;&#108;&#97;&#98;&#101;&#108;&#58;&#32;&#62;&#59;&#32;&#119;&#105;&#100;&#116;&#104;&#58;&#48;&#46;&#48;&#53;&#59;&#32;&#97;&#99;&#116;&#105;&#111;&#110;&#58;&#32;&#104;&#105;&#115;&#116;&#111;&#114;&#121;&#46;&#102;&#111;&#114;&#119;&#97;&#114;&#100;&#40;&#41;&#34;&#32;&#112;&#111;&#115;&#105;&#116;&#105;&#111;&#110;&#61;&#34;&#32;&#48;&#46;&#48;&#50;&#53;&#32;&#48;&#32;&#48;&#34;&#32;&#99;&#108;&#97;&#115;&#115;&#61;&#34;&#114;&#97;&#121;&#34;&#62;&#60;&#47;&#97;&#45;&#101;&#110;&#116;&#105;&#116;&#121;&#62;&#10;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#60;&#47;&#97;&#45;&#101;&#110;&#116;&#105;&#116;&#121;&#62;&#10;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#60;&#47;&#97;&#45;&#101;&#110;&#116;&#105;&#116;&#121;&#62;&#10;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#32;&#60;&#97;&#45;&#101;&#110;&#116;&#105;&#116;&#121;&#32;&#105;&#100;&#61;&#34;&#114;&#105;&#103;&#104;&#116;&#45;&#104;&#97;&#110;&#100;&#34;&#32;&#108;&#97;&#115;&#101;&#114;&#45;&#99;&#111;&#110;&#116;&#114;&#111;&#108;&#115;&#61;&#34;&#104;&#97;&#110;&#100;&#58;&#32;&#114;&#105;&#103;&#104;&#116;&#34;&#32;&#114;&#97;&#121;&#99;&#97;&#115;&#116;&#101;&#114;&#61;&#34;&#111;&#98;&#106;&#101;&#99;&#116;&#115;
{"created":"20230523125151227","text":"\u003Ciframe class=\"border\" src=\"./example/aframe/sandbox\" frameborder=\"0\" style=\"width:100%; height:70%; min-height:500px;\"/>\n\n","tags":"Examples","title":"AFRAME demo","modified":"20230622111747555"},
2023-05-23 14:57:45 +02:00
{"created":"20230424093140723","text":"\u003C\u003Cscript>> \u003C!-- enables script-tag -->\n\n\u003Cdiv class=\"scene\">\n\t\u003Ca-scene embedded>\n\t\t\u003Ca-box position=\"-1 0.5 -3\" rotation=\"0 45 0\" color=\"#4CC3D9\">\u003C/a-box>\n\t\t\u003Ca-sphere position=\"0 1.25 -5\" radius=\"1.25\" color=\"#EF2D5E\">\u003C/a-sphere>\n\t\t\u003Ca-cylinder position=\"1 0.75 -3\" radius=\"0.5\" height=\"1.5\" color=\"#FFC65D\">\u003C/a-cylinder>\n\t\t\u003Ca-plane position=\"0 0 -4\" rotation=\"-90 0 0\" width=\"4\" height=\"4\" color=\"#7BC8A4\">\u003C/a-plane>\n\t\t\u003Ca-sky color=\"#444\">\u003C/a-sky>\n\t\u003C/a-scene>\n\u003C/div>\n\n\u003Cscript>\n(function(){\n\t\n\tlog(\"hello world\")\n let $scene = $('a-scene')\n\t\n $scene.addEventListener('loaded', () => {\n\t\t$scene.renderer.render = ( (render) => ( scene, cam ) => {\n \t\trender(scene,cam)\t\n\t\t\tif( !$scene.renderer ) return log(\"no renderer\")\n\t\t\tlet info = $scene.renderer.info.render\n\t\t\tlog(\"frame : \" + info.frame,2)\n\t\t\tlog(\"triangle: \" + info.triangles,4)\n\t\t\tlog(\"calls : \" + info.calls,3)\t\t\n\t\t})($scene.renderer.render.bind($scene.renderer) )\n })\t\n\t\n})()\n\u003C/script>","tags":"","title":"AFRAME template","modified":"20230523125627072","type":"text/vnd.tiddlywiki"},
2023-05-08 18:07:27 +02:00
{"title":"centralized.png","text":"iVBORw0KGgoAAAANSUhEUgAAA2oAAAD/CAIAAAAPCrIxAAAgAElEQVR4Aezdd1Qj6Z0vfP7YPcfHd+wJHl97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UcKSjRnXHLm+OnPEjtzGd2eJnsRwBBJRkOmPMj3A5U0R6GcScUe3nLnFHrZcak4E9TPET284QzFhwZ7mVAAAAAKgAAAAA8VPajzM64wnMnLHrh5Me4HLGhOaPSTzU6Y5c9KOZPSzxI9tPFz2gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAoAAAQTyE9POAN0cod6awwG6OPOgNQdAXHaniZ6GcmTjAZTpjijaHNnohyhtTiz0Y8oPQjenGHenAnqZ89HpZyJ6WecmzOlOsAAAAAKgAAAAA8ePWTzs6489OyPPj1c8cO7OdO7POj2E8fO2Kk8509HPFD2s8XPaAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACgAAANIZjYHPE8lkg543xBIJ0JDKk00huzniQZS4kmc5w2RszTmuOgIprgbAwG1IBtTSkc2B
2023-04-28 17:16:13 +02:00
{"modified":"20230428145910492","title":"Draft 2 of '$:/webxr-notebook/boot.css'"},
2023-05-04 13:28:22 +02:00
{"modified":"20230504093652627","title":"Draft of '↪ URI.parse(url,flags)'"},
2023-04-28 14:21:22 +02:00
{"modified":"20230428112728789","title":"Draft of '$:/webxr-notebook/boot.css'"},
{"modified":"20230505112348871","title":"Draft of 'How it works'"},
2023-04-27 17:35:20 +02:00
{"created":"20230427151153103","text":"\u003C\u003Ctoc-selective-expandable 'Examples' sort[title]>>","tags":"$:/tags/SideBar","title":"Examples","modified":"20230427152839062","list-after":"Reference"},
2023-05-30 15:29:43 +02:00
{"title":"feedback.png","text":"iVBORw0KGgoAAAANSUhEUgAAAS8AAACvCAYAAACsGVi0AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAgAElEQVR4nO3de1hU1d4H8C9eIBK8pSjeReHtoOGlY2B5KSo6PqaOmq+IlxSOvhrqCx3T9HVKhVBTjz6nIB89XioFrYMGZmGaGuARKiEveBuQE+CgqcAk12Hg9/5Bs5nNzMAMzIWtv8/zzKN77bXX+jGz+bEva9Z2ICICY4xJTBt7B8AYY83ByYsxJ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pUCgUKC8vR58+ffDnP/9ZeKaEMbm5ucjMzMR//vMf1NTUoG/fvhgxYgS8vLzg4ODQovjMZZHkFRkZCbVajdGjRyM0NBQbNmxAeno6wsPD8fPPP+OAzrf8lUolIiMj4eTkBLlcjujoaDzxxBMICQnBwYMHkZSUhNdee02o/9133xm9xrZv3z506dIFs2bNQmVlJS5dugQAKCwsRFZWFoC6HdleEhISoNFo7Na/PbRr1w7nzp3Dh7pjpixApVJh06ZN2LRpk946Nzc3xMXFwd/fH0Dd6VanTp0wffp0/Pbbb1ixYoXoF+vIkSMIDAxEdHS0kLgAIDg4GAAwfPhwzJ8/X9ifdL3zzjtYs2YNOnfu3Oz4Gvbn4+ODoKAg4eE1kydP1qvzxhtviJJXS/rz8vLCvHnzcOvWLb1to6OjsXjxYoPTXsfExOCdd97R2wYANm7ciPDwcDg5OTU7PrOZM3/OhQsXCADt2bNHVI4/5tO6cOGCqHz79u0EQPSE7PP
2023-05-23 14:57:45 +02:00
{"created":"20230427124155325","text":"\u003Ciframe class=\"border\" src=\"./example/explorer.html#t=1,100\" frameborder=\"0\" style=\"width:100%; height:70%; min-height:1000px;\"/>\n\n","tags":"Examples","title":"Fragment Explorer","modified":"20230523125140384"},
2023-04-27 17:35:20 +02:00
{"created":"20230425160210102","text":"\u003Cshader-doodle>\n \u003Csd-node name=\"motionblur\" prevbuffer>\n \u003Csd-node name=\"rotate\">\n \u003Csd-node name=\"basic_gl\">\n \u003Cscript type=\"x-shader/x-fragment\">\n void main() {\n vec2 st = gl_FragCoord.xy / u_resolution.xy;\n vec3 color = vec3(st.x, st.y, abs(sin(u_time)));\n\n gl_FragColor = vec4(color, 1.);\n }\n \u003C/script>\n \u003C/sd-node>\n \u003Cscript type=\"x-shader/x-fragment\">\n uniform sampler2D basic_gl;\n\n const float PI = 3.1415926;\n\n void main() {\n vec2 st = gl_FragCoord.xy / u_resolution.xy;\n\n float angle = 2. * PI * (.5 + .5 * cos(u_time));\n float scale = .7 + .4 * cos(u_time);\n\n mat2 rotation = mat2(cos(angle), -sin(angle), sin(angle), cos(angle));\n vec2 p = (st - vec2(.5)) * rotation / scale + vec2(.5);\n\n gl_FragColor = p.x \u003C 0. || p.x > 1. || p.y \u003C 0. || p.y > 1.\n ? vec4(0., 0., 0., 1.)\n : texture2D(basic_gl, p);\n }\n \u003C/script>\n \u003C/sd-node>\n \u003Cscript type=\"x-shader/x-fragment\">\n uniform sampler2D rotate, u_prevbuffer;\n\n void main () {\n vec2 st = gl_FragCoord.xy / u_resolution.xy;\n gl_FragColor = vec4(mix(\n texture2D(rotate, st),\n texture2D(u_prevbuffer, st),\n .8\n ).rgb, 1.);\n }\n \u003C/script>\n \u003C/sd-node>\n \u003Cscript type=\"x-shader/x-fragment\">\n uniform sampler2D motionblur;\n\n void main() {\n vec2 st = gl_FragCoord.xy / u_resolution.xy;\n gl_FragColor = texture2D(motionblur, st);\n }\n \u003C/script>\n\u003C/shader-doodle>","tags":"GLSL","title":"GLSL template","modified":"20230425170513931","type":"text/vnd.tiddlywiki"},
2023-06-22 11:35:38 +02:00
{"created":"20230428150217784","text":"[img[xrfragment.jpg]]\n\n\u003Cbr>\nXR Fragments standardizes and controls ''custom properties'' 🔒 inside 3D assets & scene-graphs using URI's.\u003Cbr>\nThis enables interactive ''design-driven NOCODE XR experiences''.\u003Cbr>\u003Cbr>\n\n!!Level 0: Navigator XR fragments\n\nThese live in the \u003Cb>URL-bar\u003C/b> of your browser or app. They refer to the current destination (scene-camera settings). They are mutable by the end-user, therefore indicated with 🔓\n\u003Cbr>\u003Cbr>\u003Cbr>\n\u003Cdiv class=\"border\" style=\"border-radius:5px; padding:35px 30px 20px 20px; display:inline\">\n\t\u003Cspan class=\"big\">:&#47;&#47;\u003C/span>\n\t\u003Cspan class=\"big hi2\">url\u003C/span>\n\t\u003Cspan class=\"big hi1\">#cube\u003C/span>\n\t\u003Cspan class=\"big hi3\">&\u003C/span>\n\t\u003Cspan class=\"big hi1\">pos\u003C/span>\n\t\u003Cspan class=\"big hi3\">=\u003C/span>\n\t\u003Cspan class=\"big hi1\">0,0,0\u003C/span>\n\t\u003Cspan class=\"big hi3\">&\u003C/span>\n\t\u003Cspan class=\"big hi1\">rot\u003C/span>\n\t\u003Cspan class=\"big hi3\">=\u003C/span>\n\t\u003Cspan class=\"big hi1\">0,90,0\u003C/span>\n\u003C/div>\n\n\u003Cbr>\nThe URL-processing-flow is as follows:\n\n\u003Cdiv style=\"margin-left:30px\">\n\u003Cb>1.\u003C/b> \u003Cb>IF\u003C/b> a non-assignment (`#cube`) matches a custom property-key (of an object) in the 3D file/scene (`cube`: `#......`) \u003Cb>THEN\u003C/b> execute that [[predefined_view]]\n\u003Cbr>\u003Cbr>\n\u003Cb>2.\u003C/b> \u003Cb>IF\u003C/b> scene operators (`pos`m `rot`) and/or animation operator (`t`) are present in the URL \u003Cb>THEN\u003C/b> set the scene-camera and/or animation-range accordingly.\n\u003Cbr>\u003Cbr>\n\u003Cb>3.\u003C/b> \u003Cb>IF\u003C/b> no camera-position has been set in \u003Cb>step 1 or 2\u003C/b> update the top-level URL with `#pos=0,0,0` ([[reference||https://github.com/coderofsalvation/xrfragment/blob/main/src/3rd/js/three/navigator.js#L31]])\n\u003Cbr>\u003Cbr>\n\u003Cb>4.\u003C/b> \u003Cb>IF\u003C/b> a non-assignment (`#cube`) matches the name (of an object) in the 3D file/scene \u003Cb>THEN\u003C/b> highlight it (bounding box e.g.) and \u003Cb>look at\u003C/b> it (overriding `rot`).\n\u003C/div>\n\u003Cbr>\n\n> \u003Cb>NOTE\u003C/b>: the [[AFRAME/THREE libraries|https://github.com/coderofsalvation/xrfragment/tree/main/dist]] do this for you out of the box.\n\n!!Level 1: \u003Cb>Embedded XR Fragments\u003C/b>\n\nBasically this is metadata living \u003Cb>inside the 3D asset/scene\u003C/b> (usually called \u003Cb>custom properties\u003C/b>). They are indicated with 🔒 and can easily be inserted by:\n\n* 3D editors: [[Blender|https://blender.org]], [[3DS Max|https://en.wikipedia.org/wiki/Autodesk_3ds_Max]], Maya etc\n* Programmatically: frameworks like [[THREE.js|threejs.org]], [[Godot||https://godotengine.org]], Unity, Unreal etc.\n\n> \u003Cb>NOTE\u003C/b>: the [[AFRAME/THREE libraries|https://github.com/coderofsalvation/xrfragment/tree/main/dist]] do this for you out of the box.\n\n!!!! Example scene\n\n```\n \n 🌎\n ├ #a: #pos=1,0,1&t=100,200&q=sphere .foo\n ├ #b: #pos=0,0,0&t=200,300&q=-sphere -.foo\n │\n ├── ◻ button\n │ └ href: #a|b\n │\n ├── ◻ sphere\n └── ◻ cube\n └ class: foo\n \t\n```\n\nWhen the user triggers `#hide` or `#show` (*) it will:\n* show/hide any object with name `sphere` or class `foo` (in other words: the `cube` mesh)\n* update the camera-position\n* update the current animation-range\n\n> * = by navigating the browser to `#hide` or `#show` or clicking the sphere's `href` e.g. \n\n\u003Cbr>\nCheck the [[List of official XR fragments|List of fragments]] for a complete overview.\n\u003Cbr>\u003Cbr>\nDuring the XR experience, [[🔓 XR fragment values|List of fragments]] can be modified (by other XR Fragments)\n\n* ''embedded'' 🔒 `href` ''values'' can modify other [[🔓 values|List of fragments]] (`href: #scale=2,2,2` e.g.)\n* ''embedded'' 🔒 `src` ''values'' can modify [[🔗 external embedded values|
2023-06-22 12:07:26 +02:00
{"created":"20230522115709081","text":"\n\nnavigation, portals & mutations\n\n| fragment | type | scope | example value |\n|`href`| string (uri or predefined view) | 🔒 |`#pos=1,1,0`\u003Cbr>`#pos=1,1,0&rot=90,0,0`\u003Cbr>`#pos=pyramid`\u003Cbr>`#pos=lastvisit|pyramid`\u003Cbr>`://somefile.gltf#pos=1,1,0`\u003Cbr> |\n\n[[» example implementation|https://github.com/coderofsalvation/xrfragment/blob/main/src/3rd/js/three/xrf/href.js]]\u003Cbr>\n[[» example 3D asset|https://github.com/coderofsalvation/xrfragment/blob/main/example/assets/href.gltf#L192]]\u003Cbr>\n[[» discussion|https://github.com/coderofsalvation/xrfragment/issues/1]]\u003Cbr>\n\n[img[xrfragment.jpg]]\n\n\n!!!spec 1.0\n\n1. an ''external''- or ''file URI'' fully replaces the current scene and assumes `pos=0,0,0&rot=0,0,0` by default (unless specified)\n\n2. navigation should not happen when queries (`q=`) are present in local url: queries will apply (`pos=`, `rot=` e.g.) to the targeted object(s) instead.\n\n3. navigation should not happen ''immediately'' when user is more than 2 meter away from the portal/object containing the href (to prevent accidental navigation e.g.)\n\n4. URL navigation should always be reflected in the client (in case of javascript: see [[here|https://github.com/coderofsalvation/xrfragment/blob/dev/src/3rd/js/three/navigator.js]] for an example navigator).\n\n5. In XR mode, the navigator back/forward-buttons should be always visible (using a wearable e.g., see [[here|https://github.com/coderofsalvation/xrfragment/blob/dev/example/aframe/sandbox/index.html#L26-L29]] for an example wearable)\n\n[img[navigation.png]]\n\n6. in case of navigating to a new [[pos]]ition, ''first'' navigate to the ''current position'' so that the ''back-button'' of the ''browser-history'' always refers to the previous position (see [[here|https://github.com/coderofsalvation/xrfragment/blob/main/src/3rd/js/three/xrf/href.js#L97]])\n\n> above solutions were abducted from [[this|https://i.imgur.com/E3En0gJ.png]] and [[this|https://i.imgur.com/lpnTz3A.png]] survey result\n\n!!!Demo\n\n\u003C$videojs controls=\"controls\" aspectratio=\"16:9\" preload=\"auto\" poster=\"\" fluid=\"fluid\" class=\"vjs-big-play-centered\">\n \u003Csource src=\"https://coderofsalvation.github.io/xrfragment.media/href.mp4\" type=\"video/mp4\"/>\n\u003C/$videojs>\n\n> capture of \u003Ca href=\"./example/aframe/sandbox\" target=\"_blank\">aframe/sandbox\u003C/a>\n\n","tags":"","title":"href","modified":"20230622100701202","type":"text/vnd.tiddlywiki"},
2023-05-30 15:29:43 +02:00
{"title":"image.png","text":"iVBORw0KGgoAAAANSUhEUgAAAmwAAAGdCAIAAAAg0bhTAAAgAElEQVR4Aey9CbRlV1knvvc+w733jTVPqSSVoZJKQshkQkIEQdOGlhZthcXQ2K02CDbasFRU2j+KIrCkV7cMrf/V/2aQiDHQYTABZQi0TZAwhEwmIUNlqCRVqU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vfw9nrwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANRwSEZg5vVcPd9y2HVx7Pu4s/q5cro5+314HHGcfXuw+Xp1vF2avi7unXsyNuqRTEPI5mG7ffgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADE0b4bW7Jp4+Q3EhHyecg9t38AAAAAAAx9W2OQ0zG4Wa+5xL7FXt/KxIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGBy9UEqlq4szOyVvcyMcAAAAAAAAAOjVth1dsWgipaXWCvSmcgwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOrx7gNTtmLo3z211TYdfIAAAI+x
2023-06-22 11:35:38 +02:00
{"created":"20230508143700790","text":"!!Missing: nocode interlinked 3D assets\n\nWe have plenty of wellcrafted, amazing 3D assets on the web.\u003Cbr>\nWhat's missing? Easy interlinkable connections between them ❤\u003Cbr>\n\u003Cbr>\nWhat else is missing? dynamic ''no-code'' XR experiences.\u003Cbr>\nLess boilerplate code = productive XR design ❤\u003Cbr>\n\n> perhaps even more important: why do Code-heavy XR applications tend to break over time due to browser/OS/dependency updates?\n\n!!Solution: XR Fragments\n\nLets invite some old battle-proof friends (`src`, `href`, `class`, `queries`, URL's and protocols), and connect our 3D assets \u003Cb>directly\u003C/b>:\n\n[img[interlinked.png]]\n\nMany meaningful experiences can be achieved using solely interlinked (cached) 3d-assets. The definition of meaningful here is: the highest person-to-person create-and-share value.\u003Cbr>\nThis is possible by piggybacking the W3C media fragment-format, as well as the href, src and class concept from HTML.\u003Cbr>\nXR Fragments are fileformat-agnostic, so we can link/embed ''FBX'' to/inside ''glTF'' and so on ❤\n\n!!Earlier attempts\n\nMost attempts fall into the client-server paradigm.\u003Cbr>\nThey fall into typical 'Metaverse' / Mozilla hubs spinoffs: lots of code, lots of experts building centralized server-complexity\n\n[img[centralized.png]]\n\nThe end-game of these (to be fair: interesting & amazing solutions) are: users & resources trapped in walled gardens.\u003Cbr>\nThe bug of centralized solutions is that they (just like the financial economy) must grow (their profits/audience) to survive\u003Cbr>\n\u003Cbr>\n\n!!It has been solved before\n\nHow? By enriching the things mere mortals already produce.\u003Cbr>\nHTML was enriching text which ''we've already'' been writing.\u003Cbr>\nXR Fragments are enriching 3D assets which ''we've already'' been making.\u003Cbr>\nInstead of coming up with new enormous codebases, a ''simple standard'' can reduce so much code and complexity ❤\u003Cbr>\n\n[img[xrfragment.jpg]]\n\n!!Focuspoints\n\n * ''there's a lack of compelling WebXR content''\n ** focus on where contentcreators are (not devs)\n ** piggyback on export-features of existing 3D editors (blender e.g.)\n\t\t\t** be fileformat ''agnostic'' (FBX, glTF etc ''we love you all'')\n\t\t\t** don't lock designers into a specific editor\n\t\t\t** XR Fragments should free devs from coding nontrivial things\n * ''3D content should be surfable locally too''\n\t ** Just like HTML-files can be saved/viewed on a smartphone\n * ''\"people dont want to run servers\" (partially true)''\n ** focus on browser, lowbarrier & simplicity\n ** don't introduce new servers, softwarestacks or frameworks\n * ''centralized stakeholders maximize securityrisks AND design by committee''\n ** 3D assets should be allowed to be read-only (100% HTTP GET)\n ** XR Fragments are 100% optional (to ease adoption/backwardscompatibility)\n ** XR Fragments are only concerned with public navigateable content\n * ''3D asset-formats & frameworks come and go''\n * Pragmatic solutions: ''Induction, Deduction, Abduction'' method using survey\n\n!!Out of scope (client or asset responsibility)\n\n* avatars\n* realism/performance (responsibility of asset & client)\n* realtime gaming event-propagation\n* webrtc\n* gltf (OMI) extensions and [[glXF draft-format|https://github.com/KhronosGroup/glXF]] contain interesting ideas, but are hardcoupled to glTF and require creation of specialized editors/exporters.\n* scripting / wasm e.g. (responsibility of client & designer to offer progressive enhanced XR experiences). XR fragments at a max supports interactivity thru [[roundrobin]] & [[predefined views|predefined_view]] (spec level 0), and queries (spec level 1) anything beyond would overcomplexify the (adoption of) the spec.\n\n> see the `session` XR fragment, which indicates the client where extended (sessionbased) information can be found. People who insist on scripting could hint clients where scripting-layers could be found in the se
2023-05-30 15:29:43 +02:00
{"title":"popper.png","text":"iVBORw0KGgoAAAANSUhEUgAAAcIAAAEtCAYAAACbCmASAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAgAElEQVR4nNS9eaxkR3U/fm7ve79tFs+MxzPeMGCbACYsjghhEkJIhJwgIMsfBCUiEQpJRJASEikK+Qcpi0QUlkQIQQRBIRGERaCwxGAcb2PAjLEx9hh7Zjye9a29vd7v74+XT83nnj51731vxnzzO1Kru++t5dSpU2epOlUV7N27N5xOpzKdTkVEJJvNut9hGIqISBAE7n8Yhu7/dDqVyWQiFkwmk0g5QRC4fEEQSC6Xk/F4LJlMRqbTqWSzWZcW+Tg96gZkMhkJgsB9M47Iz+3i99ZvnQbAv7kefq/T6Pf8ziqPn3EetE+DbgPjYfWZr26NB2gFyGQyMh6PXRq8n0wmM3yA9NPpVPL5vIxGI8nn8zO4j8djVxZwQt/jeTabdW0HHyEdeI5pA/zH47EUCgUZjUYzNGVAvcxfaFc2m3U8xXVzniAIpFgsymQycfyfzWYln89H6Doejx2u4/HYpD/zQC6XkyAIJJ/Pu77MZDKOrjxGx+Ox5HI51xdIp3mB6TgejyN9OJ1O3Tvkz2azrjwGpgX6jscgfwDoK6QHvXg8M+5MX/6Aj5jeKAe/c7mcwy8JdL9zW9D/Fi3TlsdjktOAtqA70vC4s2RdGrD4Sb/T9NFyU9fJvMx945M1us0+sGS5fq/x02Uz74iI5HI5N+6LxaKIiFc3sewA/+d0xSzkuDL8B1OLzBKWCeYjCPJCwGIQIm9cmVrJMO4a5+0At1N3sNUWfmYpVUuhatCGgcVUvvZaDGExD55ZytQqWw8KVgLT6dQJc5THgjGbzTrGG41GEQHLAhfpJ5OJFAqFiGCDAGIhj3p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U2uDwcCVZ62Ts4eysbERWdtjw5LTY1qUhQUUouXpwND8tV/7tYhnBIWIfJqv2GgG7+3atUve9ra3ya//+q/L3r17zZkK3TbQELgdOnRI/viP/1je9a53icilKS8ERWxnvGvjRssfrcjY6LRkHYMlC3z9Z6XTBpQl36x0IhIZoxwMZdVrgeaZpA+3l/PHyXrwDWSXpil/stmsFItFJwPYUbH0B3hbyztL+Vv943gOf3gqzGdBsDK0KmGEtODyNYTLYaJxHi6HBwErR9+ASNOxulPj8mqIG4xxg5QFChQHAgPYA9c0AMOjfDZifMItDhdtfGDwc3nMZMvLy3Lq1Clve9FvCISYTqeytLQki4uLM168lb9YLEamT6+//nqTLxn/jY2NiCJJArQZMJ1OZTgcepWQxpEhif/SAkdl6jEHnLUwinsP6Pf7kehsvQwBYCV25MgRVwf4QQsOpgeva8IoeOUrXym/9Vu/JXNzcxHBpw03HueWfFlcXJQ//MM/lBe+8IUzMgF4o6w44P7mtKgT+FUqFVlYWJC5ubnYCGQfPSy68H9Oz0pPKzmrfO77bDYrg8HAGTpQMtZSlsZ5J/JPl+GDOEMAOkbLd8Y5DLfW6ofDYWRdXIPGSdMuySDRcjHDwstSTrojdGdqJFjAc/ReEtE5vYUHDzYeTFaD45TT5QITUntFGicfcHu0IEC0oG+uG3XncrkI4zMj+ZSh/q2ZhwfucDiUwWDgpie4T1utlpuCZOsakM1mpVKpuOdXXXWVLC4uRtorYk8ZwiMEPldfffXMNLFuS6vVkn6/H2lXEsD4w2DL5/ORKTEux6eAAXHGIf+PAxbOluDDfz2ItSC18AQvxSlt0CObzcrVV18tr3zlKyPrneg3brf2DlH24cOH5Y477pCrrrrKKWBW3FDGeoqfg4PY07n66qvld3/3dyNlsGGO8RIH8Ja0AcHLLNPpVAaDg
2023-06-22 11:35:38 +02:00
{"created":"20230427205533684","text":"Just like with SVG fragments, predefined views are settings embedded in the asset, which can be triggered:\n\n* upon load by default (the `#` custom property, embedded in the asset)\n* on-demand (by clicking a `href`-property with value `#my_view` e.g.)\n\nBasically, a custom property-key in a 3D file/scene needs to match this, in order to have its value executed as XR Fragments URI.\u003Cbr>\n\n\u003Cbr>\n\u003Cdiv style=\"max-width:600px\">\n\u003C$videojs controls=\"controls\" aspectratio=\"16:9\" preload=\"auto\" poster=\"\" fluid=\"fluid\" class=\"vjs-big-play-centered\">\n \u003Csource src=\"https://coderofsalvation.github.io/xrfragment.media/predefinedviews.mp4\" type=\"video/mp4\"/>\n\u003C/$videojs>\n\u003C/div>\n\u003Cbr>\n\n## Example scene\n\n```\n \n 🌎\n ├ #: #q=-sphere\n ├ #hide: #q=-.foo\n ├ #show: #q=.foo\n │\n ├── ◻ sphere\n │ └ href: #show|hide\n │\n └── ◻ cube\n └ class: foo\n \t\n```\n\nUpon load `#` will hide a mesh with name `sphere` by default, but when triggering `#hide` or `#show` (*) it will show/hide any object with class `foo` (in other words: the `cube` mesh) in [roundrobin fashion using `|`](#roundrobin).\n\n> \\* = by navigating the browser to `#hide` or clicking the sphere's `href` e.g. \n\n\n[» example implementation](https://github.com/coderofsalvation/xrfragment/blob/main/src/3rd/js/three/xrf/predefinedView.js#L41)\u003Cbr>\n\n# DIY Parsing\n\nThe AFRAME/THREE library does this for you, but here's how you would parse an top-level browser URI (`document.location.href` in javascript e.g.) using the [parser for other languages](https://github.com/coderofsalvation/xrfragment/tree/main/dist):\n\n\u003Cdiv>\n \u003Ctextarea spellcheck=\"false\" autofocus class=\"sandboxify\">frags = xrfragment.URI.parse('#my_view&t=1,2')\nconsole.log({\n frags,\n is_predefined_view: frags.my_view.is( xrfragment.XRF.PV_EXECUTE)\n})\n\n\u003C/textarea>\n\t\u003Cpre class=\"result\">\u003C/pre>\n\u003C/div>\n","tags":"","title":"predefined_view","modified":"20230622093423497","type":"text/markdown"},
2023-06-07 15:35:48 +02:00
{"created":"20230526120835676","text":"\u003Clink rel=\"preconnect\" href=\"https://fonts.googleapis.com\">\n\u003Clink rel=\"preconnect\" href=\"https://fonts.gstatic.com\" crossorigin>\n\u003Clink href=\"https://fonts.googleapis.com/css2?family=Montserrat:wght@700&display=swap\" rel=\"stylesheet\">\n\n\u003Cstyle type=\"text/css\">\n.reveal{ height:75vh !important; }\n .slides *,\n\t.tc-tiddler-preview-preview {\n\t color:#888;\n\t\tfont-size:35px;\n\t\tfont-family: 'Montserrat', sans-serif;\n\t}\n\n\u003C/style>\n\u003C$presentation autoSlide=\"90000\" transition=\"slide\" loop controls progress center>\n\u003C$list filter=\"[tag[Slide_FutureOfText]sort[title]]\">\n\u003C$slide tiddlerTitle={{!!title}} backgroundColor={{!!color}} autoAnimate={{!!animate}} autoAnimateUnmatched=\"fade\" autoslide={{!!delay}}>\n\u003C$transclude mode=\"block\" />\n\u003C/$slide>\n\u003C/$list>\n\u003C/$presentation>\nXR Fragments 2023 github.com/coderofsalvation/xrfragment\n\u003Cdiv style=\"text-align:right\">Powered by TiddlyWiki, Reveal.js & NLnet\u003C/div>\n","tags":"","title":"Presentation: XR Fragments (Future of Text)","modified":"20230607112854371"},
2023-05-30 15:29:43 +02:00
{"title":"q.png","text":"iVBORw0KGgoAAAANSUhEUgAAAo4AAAH0CAIAAAA8PTuNAAAgAElEQVR4AYy9Xa8kSZrn5W7uHnFOZlX1TPduAxJCK/YCrdAiJL4CQnxtEBfADQM3g2B3hFjYZQYN9HRlZZ4T7m6Ofr+/mZ3ImpclujoyToS7udnz/maPzf/sn/+ntdbzqLXWeV5KKUu5l1Lmea61Xtc1z/M014lXLaVMO9/M88oF13xd11WPWs/pOs/z/Xx/HMd+7cc0TduybYxW1rUs5Xbxfi/bWud6XrXOdZqvuh/Xda5lK6VsZS3rS1leeGf4eZ551lH349yPx35N+3XWsz6ux3HW/Tr2Wuu2tEuZ51Smabp8P6fL1ZRznqa5zqVMS5nnZWLO81aWLHCe51JWVtHWMvlcfr3m5ZrOi7VfLn+qc/Up/JW5zRfLFnTzMk/LPC/XMtfry5cvf/zjH6fjBGrHeRzHWhYecvLyoSV/rcvN4YB/rcCZmS7LceVZTk0szPMFX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7gVjTAfExHVObBzwh/AQUKlDroY2pUO4STY3nD0xSnsSwi5pShymzpDd5EkQgWImpMHuWUKLkmnSY5qOyAGGlYtZQiFXVVFTA0tQVJi1WiILIMHg9jVgMj8cnKwtcEZARdti3nYawKZ2/RprPTxhgIkTPegsq+Gg6rwMx05Ip+kiAPoAdFJIPKrP2wABwYKGjOFjzcX4Vbz6XZdjcmMBYhgWSS+FdQ6DdLHAybMTIr9yajDO+zCMIROHk1W3Dvs81Y10h7OfvB2llVRg1oSIJpmCnog5wIY5aKvp3Ouux76jqUq7jqMe57AifhFXxh9eyrkiSMq14CFi5M+
2023-06-22 13:27:14 +02:00
{"created":"20230607092850147","text":"Include, exclude, hide/shows objects.\n\n| fragment | type | scope | example value |\n|`q`| string (space-separated) | 🔓 💥 🔗 |`#q=cube`\u003Cbr>`#q=cube -ball_inside_cube`\u003Cbr>`#q=* -sky`\u003Cbr>`#q=-.language .english`\u003Cbr>`#q=cube&rot=0,90,0`\u003Cbr>`#q=price:>2 price:\u003C5` |\n\nA simple but powerful syntax allows \u003Cb>css\u003C/b>-like class/id-selectors with a searchengine prompt-style feeling.\u003Cbr>\n\n> \u003Cb>For example\u003C/b>: `#q=.foo` is a shorthand for `#q=class:foo`, which will select objects with custom property `class`:`foo`.\u003Cbr>Just a simple `#q=cube` will simply select an object named `cube`.\u003Cbr>\n\n\u003Cbr>\n\u003Cdiv style=\"max-width:600px\">\n\u003C$videojs controls=\"controls\" aspectratio=\"16:9\" preload=\"auto\" poster=\"\" fluid=\"fluid\" class=\"vjs-big-play-centered\">\n \u003Csource src=\"https://coderofsalvation.github.io/xrfragment.media/queries.mp4\" type=\"video/mp4\"/>\n\u003C/$videojs>\n\u003C/div>\n\u003Cbr>\n\n!!!! including/excluding\n\n|''operator'' | ''info'' |\n|`*` | select all objects (only allowed in `src` custom property) in the \u003Cb>current\u003C/b> scene (\u003Cb>after\u003C/b> the default [[predefined_view|predefined_view]] `#` was executed)|\n|`-` | removes/hides object(s) |\n|`:` | indicates an object-embedded custom property key/value |\n|`.` | alias for `class:` (`.foo` equals `class:foo` |\n|`>` `\u003C`| compare float or int number|\n|`/` | reference to root-scene.\u003Cbr>Useful in case of (preventing) showing/hiding objects in nested scenes (instanced by [[src]])\u003Cbr>`#q=-/cube` hides object `cube` only in the root-scene (not nested `cube` objects)\u003Cbr> `#q=-cube` hides both object `cube` in the root-scene \u003Cb>AND\u003C/b> nested `skybox` objects |\n\n[[» example implementation|https://github.com/coderofsalvation/xrfragment/blob/main/src/3rd/js/three/xrf/q.js]]\u003Cbr>\n[[» example 3D asset|https://github.com/coderofsalvation/xrfragment/blob/main/example/assets/query.gltf#L192]]\u003Cbr>\n[[» discussion|https://github.com/coderofsalvation/xrfragment/issues/3]]\u003Cbr>\n\n!!!spec 1.0\n\n1. queries are only executed when \u003Cb>embedded\u003C/b> in the asset/scene (thru [[src]] or [[predefined_view]]). This is to prevent sharing of scene-tampered URL's.\n\n2. queries are context-sensitive, which means that the result of the query applies to:\n\n* \u003Cb>showing/hiding\u003C/b>: in the current scene when used in `href` fragment\n* \u003Cb>importing/excluding\u003C/b>: in an empty scene when used in `src` fragment (hence `src` supports `q=*` to import all objects)\n\n3. when queries are followed by scene-object operators (like `pos`, `rot`) then these apply to the queried objects:\n\n* `#q=cube&rot=0,90,0` rotates mesh with id `cube` 90 degrees around the y axis\n\n4. A query is unique, so roundrobin `|` is \u003Cb>not\u003C/b> be supported for queries (use [[predefined_view]]s instead)\n\n\n!!! DIY Parsing\n\nThe AFRAME/THREE library does this for you, but here's how you would [[parse a query using the parser for other languages|↪ Query(query)]].","tags":"","title":"queries","modified":"20230622104242439","type":"text/vnd.tiddlywiki"},
2023-04-27 17:35:20 +02:00
{"created":"20230427150512404","text":"\u003C\u003Ctoc-selective-expandable 'Reference' sort[title]>>","tags":"$:/tags/SideBar","title":"Reference","modified":"20230427151056587","list-before":"$:/core/ui/SideBar/Open"},
2023-06-22 11:35:38 +02:00
{"created":"20230622092234442","text":"\u003Cb>RoundRobin\u003C/b> cycles thru a list of options (separated by `|`).\nIt is a very basic way to cycle thru [[predefined views or object-selections|predefined_view]]\n\n\u003Cbr>\n\u003Cdiv style=\"max-width:600px\">\n\u003C$videojs controls=\"controls\" aspectratio=\"16:9\" preload=\"auto\" poster=\"\" fluid=\"fluid\" class=\"vjs-big-play-centered\">\n \u003Csource src=\"https://coderofsalvation.github.io/xrfragment.media/roundrobin.mp4\" type=\"video/mp4\"/>\n\u003C/$videojs>\n\u003C/div>\n\u003Cbr>\n\nFor example, when the user interacts with an embedded [[href]]:`#foo|bar` it will update the top-URL to:\n\n\u003Cbr>\u003Cbr>\n\u003Cdiv class=\"border\" style=\"border-radius:5px; padding:35px 30px 20px 20px; display:inline\">\n\u003Cspan class=\"big\">:&#47;&#47;\u003C/span>\n\u003Cspan class=\"big hi2\">url\u003C/span>\n\u003Cspan class=\"big hi1\">#foo\u003C/span>\n\u003C/div>\n\u003Cbr>\u003Cbr>\n\nBut after clicking it the second time:\n\n\u003Cbr>\u003Cbr>\n\u003Cdiv class=\"border\" style=\"border-radius:5px; padding:35px 30px 20px 20px; display:inline\">\n\u003Cspan class=\"big\">:&#47;&#47;\u003C/span>\n\u003Cspan class=\"big hi2\">url\u003C/span>\n\u003Cspan class=\"big hi1\">#bar\u003C/span>\n\u003C/div>\n\u003Cbr>\u003Cbr>\n\nAnd after clicking it the third time:\n\n\u003Cbr>\u003Cbr>\n\u003Cdiv class=\"border\" style=\"border-radius:5px; padding:35px 30px 20px 20px; display:inline\">\n\u003Cspan class=\"big\">:&#47;&#47;\u003C/span>\n\u003Cspan class=\"big hi2\">url\u003C/span>\n\u003Cspan class=\"big hi1\">#foo\u003C/span>\n\u003C/div>\n\u003Cbr>\u003Cbr>\n\n> And so on..\n\nYou can add as many `|` options as you want, you're simply restricted to the maximum-length limitations of URLs.\n","tags":"","title":"roundrobin","modified":"20230622093304383"},
{"created":"20230607121914968","text":"A \u003Cb>Selection of Interest\u003C/b> (SoI) adheres to spirit of the original URI fragment, and it's rationale is further explained by Fabien Benetou's [[in this video|https://youtu.be/bfxqm1q_GXw?t=6407]].\u003Cbr>\nLet's have a look at this url:\n\n\u003Cbr>\u003Cbr>\n\u003Cdiv class=\"border\" style=\"border-radius:5px; padding:35px 30px 20px 20px; display:inline\">\n\u003Cspan class=\"big\">:&#47;&#47;\u003C/span>\n\u003Cspan class=\"big hi2\">url\u003C/span>\n\u003Cspan class=\"big hi1\">#cube\u003C/span>\n\u003Cspan class=\"big hi3\">&\u003C/span>\n\u003Cspan class=\"big hi1\">pos\u003C/span>\n\u003Cspan class=\"big hi3\">=\u003C/span>\n\u003Cspan class=\"big hi1\">0,0,0\u003C/span>\n\u003C/div>\n\n\u003Cbr>\nThis allows link-sharing and referencing on a macrolevel (`pos` positions the camera) and microlevel (`#cube`):\n\n\u003Cb>IF\u003C/b> the scene or file contains an object with name `cube` then the camera should \u003Cb>look at that object\u003C/b> and highlight it (draw a wire-frame bounding box e.g.).\n\nAnother example:\n\n\u003Cbr>\u003Cbr>\n\u003Cdiv class=\"border\" style=\"border-radius:5px; padding:35px 30px 20px 20px; display:inline\">\n\u003Cspan class=\"big\">:&#47;&#47;\u003C/span>\n\u003Cspan class=\"big hi2\">url\u003C/span>\n\u003Cspan class=\"big hi1\">#.cubes\u003C/span>\n\u003Cspan class=\"big hi3\">&\u003C/span>\n\u003Cspan class=\"big hi1\">pos\u003C/span>\n\u003Cspan class=\"big hi3\">=\u003C/span>\n\u003Cspan class=\"big hi1\">0,0,0\u003C/span>\n\u003C/div>\n\n\u003Cbr>\n\n\u003Cb>IF\u003C/b> the scene or file contains objects with custom property `class`: `cubes` then the camera should \u003Cb>look at that at least one object\u003C/b> and highlight them (draw a wire-frame bounding boxes e.g.).\n\n> NOTE: it is up to the end-user/client to not create links which contain a `pos` which makes it impossible to see the Selection of interest.\n\n\u003Cbr>\n\u003Cdiv style=\"max-width:600px\">\n\u003C$videojs controls=\"controls\" aspectratio=\"16:9\" preload=\"auto\" poster=\"\" fluid=\"fluid\" class=\"vjs-big-play-centered\">\n \u003Csource src=\"https://coderofsalvation.github.io/xrfragment.media/selections.mp4\" type=\"video/mp4\"/>\n\u003C/$videojs>\n\u003C/div>","tags":"","title":"Selection of interest","modified":"20230622092212964"},
2023-05-30 15:29:43 +02:00
{"created":"20230526121200260","text":"\n\u003Cimg style=\"width:380px\" src=\"/example/assets/logo.png\"/>\n\n!!!XR Fragments \n\u003Cbr>\nA textual surfboard XR experiences 💙\u003Cbr>\u003Cbr>\nA specification to discover, link, navigate & query 4D urls.\u003Cbr>\n","tags":"Slide_FutureOfText","title":"Slide_FutureOfText/01","modified":"20230530132002889"},
{"created":"20230526153545896","text":"!DISCLAIMER\n\nTasty speculations, oversimplifications ahead.","tags":"Slide_FutureOfText","title":"Slide_FutureOfText/02","modified":"20230529092656559"},
{"created":"20230526124859519","text":"!About me\n\nWorking for the internet (+vice versa).\u003Cbr>\nObserving internet & text (with a smile) thru the lens of Karl Popper & Neil Postman.\n\n[img[aboutleon.png]]","tags":"Slide_FutureOfText","title":"Slide_FutureOfText/03","modified":"20230527141610247"},
{"created":"20230527141915173","text":"\u003Cdiv style=\"width:600px\">\n\u003Ccenter>\n\u003C$videojs loop controls=\"controls\" aspectratio=\"16:9\" preload=\"auto\" poster=\"\" fluid=\"fluid\" class=\"vjs-big-play-centered\">\n \u003Csource src=\"https://i.imgur.com/0lIIUm3.mp4\" type=\"video/mp4\"/>\n\u003C/$videojs>\n\u003C/center>\n\u003C/div>\n\n","tags":"Slide_FutureOfText","title":"Slide_FutureOfText/04","modified":"20230528154052348"},
{"created":"20230528111449664","text":"\u003C$image source=\"perception_reality6.jpg\"/>","tags":"Slide_FutureOfText","title":"Slide_FutureOfText/05.2","modified":"20230528143006084"},
{"created":"20230527152525909","text":"!!Fragment\n\n\u003Cmedium>\na piece of information that is smaller than the whole\n\u003C/medium>\n\n\u003C\u003C\u003C\nXR Fragment adds: ''teleporting friends to specific (nested) experiences (at a certain time)''\n\u003C\u003C\u003C\n","tags":"Slide_FutureOfText","title":"Slide_FutureOfText/06","modified":"20230528161741263"},
{"created":"20230526182426315","text":"!!!Bold statement\n\nText keeps inviting itself to every party\n\u003C$image source=\"q.png\" width=\"500\"/>","tags":"Slide_FutureOfText","title":"Slide_FutureOfText/06.01","modified":"20230529094432565"},
{"created":"20230528125412620","text":"\u003Cdiv style=\"text-align:left\">\n \u003Cdiv class=\"jumbo\">2D\u003C/div>\n \u003Cspan>Fragment\u003C/span>\n\t\u003Cbr>\n\t\u003Cspan class=\"big hi1\">:&#47;&#47;\u003C/span>\n\t\u003Cspan class=\"big hi2\">experience.html\u003C/span>\n\t\u003Cspan class=\"big hi1\">#something\u003C/span>\n\u003Cbr>\u003Cbr>\u003Cbr>\n\t\u003Cspan class=\"hi3\">a friend\u003C/span> teleports me to \u003Cspan class=\"hi1\">something\u003C/span> somewhere at sometime\n\n\u003C/div>\n","tags":"Slide_FutureOfText","title":"Slide_FutureOfText/06.3","modified":"20230530130744096"},
{"created":"20230527153040161","text":"!!!Many projections of 4D XR\n\n[img[conflict.jpg]]","tags":"Slide_FutureOfText","title":"Slide_FutureOfText/07","modified":"20230529095429758"},
{"created":"20230528134453655","text":"[img[4dassets.jpg]]","tags":"Slide_FutureOfText","title":"Slide_FutureOfText/07.3","modified":"20230528134517524"},
{"created":"20230528125440503","text":"\u003Cdiv style=\"text-align:left\">\n \u003Cdiv class=\"jumbo\">4D\u003C/div>\n \u003Cspan>URL\u003C/span>\n\t\u003Cbr>\n\t\u003Cspan class=\"big hi1\">:&#47;&#47;\u003C/span>\u003Cspan class=\"big hi2\">experience\u003C/span>\u003Cspan class=\"big hi1\">#pos=0,0,1&rot=0,90,0\u003C/span>&\u003Cspan class=\"big hi3\">t=100,500\u003C/span>\n\u003Cbr>\u003Cbr>\u003Cbr>\n\u003Cspan class=\"hi3\">a friend\u003C/span> teleports me to \u003Cspan class=\"hi1\">something\u003C/span> \u003Cspan class=\"hi2\">somewhere\u003C/span> at \u003Cspan class=\"hi3\">sometime\u003C/span>\n\n\u003C/div>\n","tags":"Slide_FutureOfText","title":"Slide_FutureOfText/07.46","modified":"20230530131933205"},
{"created":"20230527172507136","text":"!!!Metadata\n\nText keeps inviting itself to every party\n\u003C$image source=\"q.png\" width=\"500\"/>","tags":"Slide_FutureOfText","title":"Slide_FutureOfText/07.473","modified":"20230528164508207"},
{"created":"20230528145106048","text":"[img[4d3.jpg]]","tags":"Slide_FutureOfText","title":"Slide_FutureOfText/07.475","modified":"20230528153516234"},
{"created":"20230528145409844","text":"!!!src & href inviting themselves to the party (again)\n\n[img[xrfragment.jpg]]","tags":"Slide_FutureOfText","title":"Slide_FutureOfText/07.48","modified":"20230529095313152"},
{"created":"20230528145843840","text":"\u003C$videojs autoplay controls=\"controls\" aspectratio=\"16:9\" preload=\"auto\" poster=\"\" fluid=\"fluid\" class=\"vjs-big-play-centered\">\n \u003Csource src=\"https://coderofsalvation.github.io/xrfragment.media/bumper.mp4\" type=\"video/mp4\"/>\n\u003C/$videojs>\n","tags":"Slide_FutureOfText","title":"Slide_FutureOfText/07.49","modified":"20230528150337669"},
{"created":"20230528164050941","text":"\u003Ciframe class=\"border\" src=\"./example/aframe/sandbox?href.gltf#pos=0,0,0\" frameborder=\"0\" style=\"width:100%; height:80%; width:100% !important; min-height:650px;\"/>","tags":"Slide_FutureOfText","title":"Slide_FutureOfText/07.495","modified":"20230528181508602"},
{"created":"20230528173224320","text":"\u003Cdiv style=\"width:750px\">\n\u003C$videojs controls=\"controls\" aspectratio=\"16:9\" preload=\"auto\" poster=\"\" fluid=\"fluid\" class=\"vjs-big-play-centered\">\n \u003Csource src=\"https://coderofsalvation.github.io/xrfragment.media/href.mp4\" type=\"video/mp4\"/>\n\u003C/$videojs>\n\u003C/div>","tags":"Slide_FutureOfText","title":"Slide_FutureOfText/07.497","modified":"20230528180702095"},
{"created":"20230528134334366","text":"!!!URL is the teleport\n\n[img[interlinked.png]]\n\noffline-friendly","tags":"Slide_FutureOfText","title":"Slide_FutureOfText/07.5","modified":"20230528154146751"},
{"created":"20230528132924642","text":"!!!Early attempts\n\n[img[centralized.png]]\n\ncentralized, complex, survival-issues","tags":"Slide_FutureOfText","title":"Slide_FutureOfText/07.6","modified":"20230528154132668"},
{"created":"20230527161553676","text":"\"URLs? been there done that.\"\n\n\u003Cbr>\n\u003C$image source=\"popper.png\" width=\"500\"/>","tags":"Slide_FutureOfText","title":"Slide_FutureOfText/09","modified":"20230528135511606"},
{"created":"20230527171212961","text":"!!Bold redefinition of URLs\nMultidimensional Cognitive Transformers (MCT)\n\n\u003C$image source=\"feedback.png\" width=\"300\"/>\n\u003Cbr>\n\u003Cmedium>\n\"//an interesting feedbackloop of experiences becoming metadata of text and/or vice-versa//\"\n\u003C/medium>\n\u003Cbr>\n","tags":"Slide_FutureOfText","title":"Slide_FutureOfText/16","modified":"20230528181858689"},
{"created":"20230527180848742","text":"\n\u003C$image source=\"neo.png\" width=\"700\"/>\n","tags":"Slide_FutureOfText","title":"Slide_FutureOfText/17","modified":"20230528153959478"},
{"created":"20230528154003553","text":"!Thank You\n\nhttps://coderofsalvation.github.io/xrfragment\n\nleonvankammen@gmail.com","tags":"Slide_FutureOfText","title":"Slide_FutureOfText/18","modified":"20230529112652163"},
2023-06-22 11:35:38 +02:00
{"created":"20230620103309687","text":"instance objects based on objects in the current scene/asset.\n\n| fragment | type | scope | example value |\n|`src`| string (uri or [[predefined view|predefined_view]] or [[query|queries]]) | 🔓 💥 🔗 |`#q=cube`\u003Cbr>`#q=cube -ball_inside_cube`\u003Cbr>`#q=* -/sky -rain`\u003Cbr>`#q=-.language .english`\u003Cbr>`#q=price:>2 price:\u003C5` |\n\n[[» example implementation|https://github.com/coderofsalvation/xrfragment/blob/main/src/3rd/js/three/xrf/src.js]]\u003Cbr>\n[[» example 3D asset|https://github.com/coderofsalvation/xrfragment/blob/main/example/assets/query.gltf#L192]]\u003Cbr>\n[[» discussion|https://github.com/coderofsalvation/xrfragment/issues/4]]\u003Cbr>\n\n!!!spec 1.0\n\n1. an extra (empty) scene is instanced by the query (and attaches it to the current fragment object) [[example code|https://github.com/coderofsalvation/xrfragment/blob/main/src/3rd/js/three/xrf/q.js#L6]]\n\n2. all included objects in the query will be copied to the instanced scene [[example code|https://github.com/coderofsalvation/xrfragment/blob/main/src/3rd/js/three/xrf/q.js#L17]] preserving their names (to support recursive selectors)\n","tags":"","title":"src","modified":"20230620133620152","type":"text/vnd.tiddlywiki"},
2023-06-22 13:27:14 +02:00
{"created":"20230622104423767","text":"The parser is the heart ❤ of XR Fragments, and used by XR Fragment browsers.\u003Cbr>\nIt's available as:\n\n| language | link |\n|-|-|\n| python | \u003Ca href=\"./dist/xrfragment.py\" target=\"_blank\">xrfragment.py\u003C/a> |\n| lua | \u003Ca href=\"./dist/xrfragment.lua\" target=\"_blank\">xrfragment.lua\u003C/a> |\n| javascript | \u003Ca href=\"./dist/xrfragment.js\" target=\"_blank\">xrfragment.js\u003C/a> |\n| javascript | \u003Ca href=\"./dist/xrfragment.module.js\" target=\"_blank\">xrfragment.module.js\u003C/a> |\n| any language | \u003Ca href=\"https://github.com/coderofsalvation/xrfragment/blob/main/build.hxml\" target=\"_blank\">using HaXe\u003C/a> |\n| spec | you can literally write a parser yourself, the spec is kept very easy intentionally |\n\nFor example, the [AFRAME](#AFRAME) / [THREE.js](#THREE.js) client-libraries use it like this:\n\u003Cbr>\n\n\u003Cdiv>\n \u003Ctextarea style=\"min-height:130px\" spellcheck=\"false\" autofocus class=\"sandboxify\">let out = {}\nxrfragment.Parser.parse(\"pos\",\"0,0,1\", out)\nout.uri = xrfragment.URI.parse(\"#pos=0,0,1&nonspec=1\")\nout.query = new xrfragment.Query(\"foo -bar\")\nconsole.log(out)\n\u003C/textarea>\n\t\u003Cpre class=\"result\" style=\"min-height:300px\">\u003C/pre>\n\u003C/div>\n\n> If you want to build your own client/browser, see the documentation for these functions in the sidemenu\n\n| function | info |\n|-|-|\n| `xrfragment.Query( query )` | see [Query](#↪%20Query(query)) |\n| `xrfragment.URI.parse( str, flag )` | see [URI.parse](#↪%20URI.parse(url%2Cfilter)) |\n| `xrfragment.Parser.parse(k,v,store)` | see [Parser.parse](#↪%20Parser.parse(k%2Cv%2Cstore)) |\n","tags":"Reference","title":"The parser","modified":"20230622112536665","type":"text/markdown"},
2023-05-23 14:57:45 +02:00
{"created":"20230523125247478","text":"\u003Ciframe class=\"border\" src=\"./example/threejs/sandbox\" frameborder=\"0\" style=\"width:100%; height:70%; min-height:500px;\"/>\n\n","tags":"Examples","title":"THREE","modified":"20230523125511253"},
{"created":"20230426160615931","text":"\u003Cdiv class=\"scene\">\u003C/div>\n\n\u003C\u003Cscript>>\n\u003Cscript>\n $scene = document.querySelector(\".scene\")\n\tscene = new THREE.Scene();\n camera = new THREE.PerspectiveCamera( 75, $scene.offsetWidth / $scene.offsetHeight, 0.1, 1000 );\n\n\trenderer = new THREE.WebGLRenderer();\n renderer.setSize( $scene.offsetWidth, $scene.offsetHeight );\n $scene.appendChild( renderer.domElement );\n\t\n\tvar geometry = new THREE.BoxGeometry( 1, 1, 1 );\n\tvar material = new THREE.MeshBasicMaterial( { color: 0x0a84ff } );\n\tvar cube = new THREE.Mesh( geometry, material );\n\tscene.add( cube );\n\tscene.background = new THREE.Color( 0x18181c );\n\n\tcamera.position.z = 2;\n\n\tfunction animate() {\n\t\trequestAnimationFrame( animate );\n\n\t\tcube.rotation.x += 0.004;\n\t\tcube.rotation.y += 0.004;\n\n\t\trenderer.render( scene, camera );\n\t}\n\n\tanimate();\t\n\tlog(\"hello world\")\n\u003C/script>","title":"THREE template","modified":"20230523125639178","tags":""},
{"created":"20230425154949623","text":"\u003Cscript async src=\"https://unpkg.com/es-module-shims@1.6.3/dist/es-module-shims.js\">\u003C/script>\n\n\u003Cscript type=\"importmap\">\n{\n\t\"imports\": {\n\t\t\"three\": \"https://unpkg.com/three@0.151.3/build/three.module.js\",\n\t\t\t\"three/addons/\": \"https://unpkg.com/three@0.151.3/examples/jsm/\"\n\t}\n}\n\u003C/script>\n\n\u003Cscript type=\"module\">\nimport * as THREE from 'three';\n\nimport { BoxLineGeometry } from 'three/addons/geometries/BoxLineGeometry.js';\nimport { VRButton } from 'three/addons/webxr/VRButton.js';\nimport { XRControllerModelFactory } from 'three/addons/webxr/XRControllerModelFactory.js';\n\nlet camera, scene, raycaster, renderer;\nlet controller1, controller2;\nlet controllerGrip1, controllerGrip2;\n\nlet room, marker, floor, baseReferenceSpace;\n\nlet INTERSECTION;\nconst tempMatrix = new THREE.Matrix4();\n\ninit();\nanimate();\n\nfunction init() {\n\n\tscene = new THREE.Scene();\n\tscene.background = new THREE.Color( 0x505050 );\n\n\tcamera = new THREE.PerspectiveCamera( 50, window.innerWidth / window.innerHeight, 0.1, 10 );\n\tcamera.position.set( 0, 1, 3 );\n\n\troom = new THREE.LineSegments(\n\t\t\tnew BoxLineGeometry( 6, 6, 6, 10, 10, 10 ).translate( 0, 3, 0 ),\n\t\t\tnew THREE.LineBasicMaterial( { color: 0x808080 } )\n\t\t\t);\n\tscene.add( room );\n\n\tscene.add( new THREE.HemisphereLight( 0x606060, 0x404040 ) );\n\n\tconst light = new THREE.DirectionalLight( 0xffffff );\n\tlight.position.set( 1, 1, 1 ).normalize();\n\tscene.add( light );\n\n\tmarker = new THREE.Mesh(\n\t\t\tnew THREE.CircleGeometry( 0.25, 32 ).rotateX( - Math.PI / 2 ),\n\t\t\tnew THREE.MeshBasicMaterial( { color: 0x808080 } )\n\t\t\t);\n\tscene.add( marker );\n\n\tfloor = new THREE.Mesh(\n\t\t\tnew THREE.PlaneGeometry( 4.8, 4.8, 2, 2 ).rotateX( - Math.PI / 2 ),\n\t\t\tnew THREE.MeshBasicMaterial( { color: 0x808080, transparent: true, opacity: 0.25 } )\n\t\t\t);\n\tscene.add( floor );\n\n\traycaster = new THREE.Raycaster();\n\n\trenderer = new THREE.WebGLRenderer( { antialias: true } );\n\trenderer.setPixelRatio( window.devicePixelRatio );\n\trenderer.setSize( window.innerWidth, window.innerHeight );\n\trenderer.outputEncoding = THREE.sRGBEncoding;\n\n\trenderer.xr.addEventListener( 'sessionstart', () => baseReferenceSpace = renderer.xr.getReferenceSpace() );\n\trenderer.xr.enabled = true;\n\n\tdocument.body.appendChild( renderer.domElement );\n\tdocument.body.appendChild( VRButton.createButton( renderer ) );\n\n\t// controllers\n\n\tfunction onSelectStart() {\n\n\t\tthis.userData.isSelecting = true;\n\n\t}\n\n\tfunction onSelectEnd() {\n\n\t\tthis.userData.isSelecting = false;\n\n\t\tif ( INTERSECTION ) {\n\n\t\t\tconst offsetPosition = { x: - INTERSECTION.x, y: - INTERSECTION.y, z: - INTERSECTION.z, w: 1 };\n\t\t\tconst offsetRotation = new THREE.Quaternion();\n\t\t\tconst transform = new XRRigidTransform( offsetPosition, offsetRotation );\n\t\t\tconst teleportSpaceOffset = baseReferenceSpace.getOffsetReferenceSpace( transform );\n\n\t\t\trenderer.xr.setReferenceSpace( teleportSpaceOffset );\n\n\t\t}\n\n\t}\n\n\tcontroller1 = renderer.xr.getController( 0 );\n\tcontroller1.addEventListener( 'selectstart', onSelectStart );\n\tcontroller1.addEventListener( 'selectend', onSelectEnd );\n\tcontroller1.addEventListener( 'connected', function ( event ) {\n\n\t\t\tthis.add( buildController( event.data ) );\n\n\t\t\t} );\n\tcontroller1.addEventListener( 'disconnected', function () {\n\n\t\t\tthis.remove( this.children[ 0 ] );\n\n\t\t\t} );\n\tscene.add( controller1 );\n\n\tcontroller2 = renderer.xr.getController( 1 );\n\tcontroller2.addEventListener( 'selectstart', onSelectStart );\n\tcontroller2.addEventListener( 'selectend', onSelectEnd );\n\tcontroller2.addEventListener( 'connected', function ( event ) {\n\n\t\t\tthis.add( buildController( event.data ) );\n\n\t\t\t} );\n\tcontroller2.addEventListener( 'disconnected', function () {\n\n\t\t\tthis.remove( this.children[ 0 ] );\n\n\t\t\t} );\n\tscene.add( controller2 );\n\n\t// The XRControllerModelFactory will automatically
2023-06-22 13:27:14 +02:00
{"created":"20230508095631417","text":"Here you can download \u003Ca href=\"./dist/xrfragment.three.js\" target=\"_blank\">xrfragment.three.js\u003C/a> or \u003Ca href=\"./dist/xrfragment.three.module.js\" target=\"_blank\">xrfragment.three.module.js\u003C/a>, and here's how to empower your [THREE.js app](https://threejs.org) with XR Fragments:\n\u003Cbr>\n\n\u003Cdiv>\n \u003Ctextarea spellcheck=\"false\" autofocus class=\"sandboxify noresult\" style=\"min-height:205px;width:100%;max-width:800px;\">import xrfragment from './dist/xrfragment.three.js';\n&nbsp;\n/* enable XR fragments */\nlet XRF = xrf.init({ \n\tTHREE,\n\tcamera,\n\tscene,\n\trenderer,\n\tdebug: true,\n\tloaders: [ GLTFLoader, FBXLoader ], // specify 3D assets to scan for embedded XR fragments \n})\n\u003C/textarea>\n\u003C/div> \n\n> [`xrf.init()`](https://github.com/coderofsalvation/xrfragment/blob/main/src/3rd/js/three/index.js#L4) injects itself into THREE.js. It'll automatically detect any XR Fragments in 3D assets (loaded afterwards). \u003Cbr>On top of that, it'll reflect changes in the URL-bar.\n\n\u003Cbr>\nThe snippet above can be found \u003Ca href=\"https://github.com/coderofsalvation/xrfragment/blob/main/example/threejs/sandbox/index.html#L92-L112\" target=\"_blank\">in this source-example\u003C/a> or see it in action here:\n\u003Cbr>\u003Cbr>\n\n\u003Ciframe class=\"border\" src=\"./example/threejs/sandbox\" frameborder=\"0\" style=\"width:100%; height:70vh\"/>\n\n\u003Cbr>\nThe example above loads a gltf-scene which contains \u003Cb>embedded XR fragments\u003C/b> which:\n\n* specifies the unit of the model (`1m` aka 1.0 is 1 meter) for roomscale XR/AR/VR purposes\n* initializes an **env**ironmentmap for lighting (by referencing an embedded **envmap** image)\n* replaces certain objects with \u003Cb>tiny clones of itself\u003C/b> by instancing `src` selfreferences (`src: #q=cube` and `src: #q=* -sky -cube`)\n\nFor all XR fragments see [the list](#📜%20XR%20fragments)\n\n\u003Ch2>Events / Customizing \u003C/h2>\n\nThere are various ways to customize the behaviour of xrfragments.\n&nbsp;\nThere's the `addEventListener` which allows promise-ification of events:\n\n\u003Cdiv>\n \u003Ctextarea spellcheck=\"false\" autofocus class=\"sandboxify noresult\" style=\"min-height:240px;width:100%;max-width:800px;\">\nXRF.addEventListener('href',(e) => {\n if( e.click ){\n const promise = e.promise() // optional promisify event\n promise.resolve() // teleport\n promise.reject('nope') // do not teleport\n }\n})\n&nbsp;\nXRF.addEventListener('foobar', console.log ) \nXRF.emit('foobar',{x:1}) // emit custom event\n .then( () => alert('hello') ) // optional\n\u003C/textarea>\n\u003C/div>\n\u003Cbr>\n\n| event | info |\n|-------|------|\n| **init** | emitted when xrf.init() is being called |\n| **href** | emitted when user interacts with [href](#href) ('hover' or click) |\n| **eval** | emitted when *any* XR fragment is being (re)processed |\n| **predefinedView** | emitted when [predefined view](#predefined_view) is triggered |\n| **selection** | emitted when [Selection of Interest](Selection%20Of%20Interest) is triggered |\n| **updateHash** | emitted when top-level URI (XR Fragments) hash changes |\n\n\u003Cbr>\nYou can also override/patch the init-code per XR fragment:\n\u003Cbr>\u003Cbr>\n\u003Cdiv>\n \u003Ctextarea spellcheck=\"false\" autofocus class=\"sandboxify noresult\" style=\"min-height:120px;width:100%;max-width:800px;\">\n// modify the original init-code for href fragments\nXRF.href = (xrf,v,opts) =&gt; {\n let { mesh, model, camera, scene, renderer, THREE} = opts\n xrf(v,opts) // runs original init-code\n}\n&nbsp;\n\u003C/textarea>\n\u003C/div>\n\u003Cbr>\nAnd in the same fashion, you can introduce init-code which reacts to custom properties embedded in 3D assets (which are not part of the XR Fragment spec).\n\u003Cbr>\nThis is handy for attaching framework-specific logic to your assets:\n\u003Cbr>\u003Cbr>\n\u003Cdiv>\n \u003Ctextarea spellcheck=\"false\" autofocus class=\"sandboxify
2023-04-28 13:19:45 +02:00
{"created":"20230427204906096","text":"comma-separated coordinates e.g. which after parsing can be accessed using `.x`, `.y`, `.z` etc.\n\n| type | example |\n|-|-|\n| vector2 | `1.2,3` or `0.4,0.6` | \n| vector3 | `1.2,3,4` or `0.4,0.6,5` | \n\nhere are some interactive examples:\n\n\u003Cdiv>\n \u003Ctextarea spellcheck=\"false\" autofocus class=\"sandboxify\">frags = {}\nok = xrfragment.Parser.parse('pos','1.2,2,3',frags)\nconsole.log( frags.pos.z )\n\n\u003C/textarea>\n\t\u003Cpre class=\"result\">\u003C/pre>\n\u003C/div>\n","tags":"","title":"vector","modified":"20230427205327718","type":"text/markdown"},
2023-04-27 17:35:20 +02:00
{"created":"20230427103350051","text":"","tags":"","title":"WebXR","modified":"20230427103400217"},
2023-06-22 11:35:38 +02:00
{"created":"20230424092557827","text":"A specification for 4D URLs & metadata for XR designers, browsers & AI / [[IA|https://www.gartner.com/en/information-technology/glossary/augmented-intelligence]] generators.\u003Cbr>\nDiscover, link, navigate & query 4D assets & experiences.\u003Cbr>\nStart surfing 4D today 💙\n\u003Cbr>\u003Cbr>\n\n\u003Cdiv style=\"max-width:600px\">\n\u003C$videojs autoplay controls=\"controls\" aspectratio=\"16:9\" preload=\"auto\" poster=\"\" fluid=\"fluid\" class=\"vjs-big-play-centered\">\n \u003Csource src=\"https://coderofsalvation.github.io/xrfragment.media/bumper.mp4\" type=\"video/mp4\"/>\n\u003C/$videojs>\n\u003C/div>\n\n\u003Cbr>\nCheck [[How it works|How it works]] or see it in action here:\u003Cbr>\u003Cbr>\n\u003Ciframe class=\"border\" src=\"./example/aframe/sandbox?example.gltf#pos=0,0,0\" frameborder=\"0\" style=\"width:100%; height:70%; min-height:500px;\"/>\n\u003Cbr>\u003Cbr>\n\u003Ciframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/bfxqm1q_GXw?start=1445\" title=\"YouTube video player\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" allowfullscreen>\u003C/iframe>\n","tags":"","title":"XR Fragments","modified":"20230622071428865"},
2023-05-04 13:28:22 +02:00
{"title":"xrfragment.jpg","text":"/9j/4AAQSkZJRgABAQEBLAEsAAD//gATQ3JlYXRlZCB3aXRoIEdJTVD/4gKwS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dj/AKr5zN+c9aZbG/XZ3a9D7/mC9jdvpz1G7DLw8jDz9C1luAAAAAAA+lvG7vWuDpEAAAAAGJnMbPBFRMQWd+352+y+zwerez1zcLkxvzDe8Oj3j4r5e7jrLQUkVAJJSsmJWVqJkqiSZSkAKSioKlmKcsRFW7IKpb+GUygAAAAD5W6NXjW3Abfn373m6eY7OPC2YLAABKbDLgtzPCnaAAAAAAAPqnn2+zasxAAAAALOWOHsxpYlkggtbd3zh919Rh9e24mVhjscMcnDHZ8Wj274nwK5hFWykWSSklQJgsrJMVRXFQOJ4PqOX5vcystHpnp/EeT+V9/3PofKarV3aPR63pvp/EeWeT952/f8t0fT41NlGWMFcyva8pAAAAAPkw8/NEZHPv73yvV8z9rxeizxulRBQak1JKbbLybbZrMfTAAAAAAAH1oe1ggAAAAoswtuFDGAAUlvbt+bfv8A6HH6t2Tjrztcz9MuRl82n2/4bw7slNUFKSXCYkEAkllUSXMbVHA8H1l669nt4sA2t073f5fH6PY6bb52tbcXHo6Lf5fH8vtb3Pl87877Hsez5vpu356ioLmOV/ClAAAAHyaeKAG259+p6NG2KCkxy8YhbBm3ixJ10sgAAAAAAB9ZntYIAAABCYOzG3ljCFEIIKNuz5n/AET2LHXnfmFTHM14ZenHN5dPvfwHHXjKKpJJW5JKwhSCpS1lUVSyeceZ9p6T6XxeHZdL8ayzYzK1Z
2023-04-27 17:35:20 +02:00
]</script><div id="storeArea" style="display:none;"></div>
<!--~~ Library modules ~~-->
<div id="libraryModules" style="display:none;">
<script data-tiddler-library="yes" data-tiddler-title="$:/library/sjcl.js" data-tiddler-type="application/javascript" type="text/javascript">"use strict";var sjcl={cipher:{},hash:{},keyexchange:{},mode:{},misc:{},codec:{},exception:{corrupt:function(a){this.toString=function(){return"CORRUPT: "+this.message};this.message=a},invalid:function(a){this.toString=function(){return"INVALID: "+this.message};this.message=a},bug:function(a){this.toString=function(){return"BUG: "+this.message};this.message=a},notReady:function(a){this.toString=function(){return"NOT READY: "+this.message};this.message=a}}};
sjcl.cipher.aes=function(a){this.s[0][0][0]||this.O();var b,c,d,e,f=this.s[0][4],g=this.s[1];b=a.length;var h=1;if(4!==b&&6!==b&&8!==b)throw new sjcl.exception.invalid("invalid aes key size");this.b=[d=a.slice(0),e=[]];for(a=b;a<4*b+28;a++){c=d[a-1];if(0===a%b||8===b&&4===a%b)c=f[c>>>24]<<24^f[c>>16&255]<<16^f[c>>8&255]<<8^f[c&255],0===a%b&&(c=c<<8^c>>>24^h<<24,h=h<<1^283*(h>>7));d[a]=d[a-b]^c}for(b=0;a;b++,a--)c=d[b&3?a:a-4],e[b]=4>=a||4>b?c:g[0][f[c>>>24]]^g[1][f[c>>16&255]]^g[2][f[c>>8&255]]^g[3][f[c&
255]]};
sjcl.cipher.aes.prototype={encrypt:function(a){return t(this,a,0)},decrypt:function(a){return t(this,a,1)},s:[[[],[],[],[],[]],[[],[],[],[],[]]],O:function(){var a=this.s[0],b=this.s[1],c=a[4],d=b[4],e,f,g,h=[],k=[],l,n,m,p;for(e=0;0x100>e;e++)k[(h[e]=e<<1^283*(e>>7))^e]=e;for(f=g=0;!c[f];f^=l||1,g=k[g]||1)for(m=g^g<<1^g<<2^g<<3^g<<4,m=m>>8^m&255^99,c[f]=m,d[m]=f,n=h[e=h[l=h[f]]],p=0x1010101*n^0x10001*e^0x101*l^0x1010100*f,n=0x101*h[m]^0x1010100*m,e=0;4>e;e++)a[e][f]=n=n<<24^n>>>8,b[e][m]=p=p<<24^p>>>8;for(e=
0;5>e;e++)a[e]=a[e].slice(0),b[e]=b[e].slice(0)}};
function t(a,b,c){if(4!==b.length)throw new sjcl.exception.invalid("invalid aes block size");var d=a.b[c],e=b[0]^d[0],f=b[c?3:1]^d[1],g=b[2]^d[2];b=b[c?1:3]^d[3];var h,k,l,n=d.length/4-2,m,p=4,r=[0,0,0,0];h=a.s[c];a=h[0];var q=h[1],v=h[2],w=h[3],x=h[4];for(m=0;m<n;m++)h=a[e>>>24]^q[f>>16&255]^v[g>>8&255]^w[b&255]^d[p],k=a[f>>>24]^q[g>>16&255]^v[b>>8&255]^w[e&255]^d[p+1],l=a[g>>>24]^q[b>>16&255]^v[e>>8&255]^w[f&255]^d[p+2],b=a[b>>>24]^q[e>>16&255]^v[f>>8&255]^w[g&255]^d[p+3],p+=4,e=h,f=k,g=l;for(m=
0;4>m;m++)r[c?3&-m:m]=x[e>>>24]<<24^x[f>>16&255]<<16^x[g>>8&255]<<8^x[b&255]^d[p++],h=e,e=f,f=g,g=b,b=h;return r}
sjcl.bitArray={bitSlice:function(a,b,c){a=sjcl.bitArray.$(a.slice(b/32),32-(b&31)).slice(1);return void 0===c?a:sjcl.bitArray.clamp(a,c-b)},extract:function(a,b,c){var d=Math.floor(-b-c&31);return((b+c-1^b)&-32?a[b/32|0]<<32-d^a[b/32+1|0]>>>d:a[b/32|0]>>>d)&(1<<c)-1},concat:function(a,b){if(0===a.length||0===b.length)return a.concat(b);var c=a[a.length-1],d=sjcl.bitArray.getPartial(c);return 32===d?a.concat(b):sjcl.bitArray.$(b,d,c|0,a.slice(0,a.length-1))},bitLength:function(a){var b=a.length;return 0===
b?0:32*(b-1)+sjcl.bitArray.getPartial(a[b-1])},clamp:function(a,b){if(32*a.length<b)return a;a=a.slice(0,Math.ceil(b/32));var c=a.length;b=b&31;0<c&&b&&(a[c-1]=sjcl.bitArray.partial(b,a[c-1]&2147483648>>b-1,1));return a},partial:function(a,b,c){return 32===a?b:(c?b|0:b<<32-a)+0x10000000000*a},getPartial:function(a){return Math.round(a/0x10000000000)||32},equal:function(a,b){if(sjcl.bitArray.bitLength(a)!==sjcl.bitArray.bitLength(b))return!1;var c=0,d;for(d=0;d<a.length;d++)c|=a[d]^b[d];return 0===
c},$:function(a,b,c,d){var e;e=0;for(void 0===d&&(d=[]);32<=b;b-=32)d.push(c),c=0;if(0===b)return d.concat(a);for(e=0;e<a.length;e++)d.push(c|a[e]>>>b),c=a[e]<<32-b;e=a.length?a[a.length-1]:0;a=sjcl.bitArray.getPartial(e);d.push(sjcl.bitArray.partial(b+a&31,32<b+a?c:d.pop(),1));return d},i:function(a,b){return[a[0]^b[0],a[1]^b[1],a[2]^b[2],a[3]^b[3]]},byteswapM:function(a){var b,c;for(b=0;b<a.length;++b)c=a[b],a[b]=c>>>24|c>>>8&0xff00|(c&0xff00)<<8|c<<24;return a}};
sjcl.codec.utf8String={fromBits:function(a){var b="",c=sjcl.bitArray.bitLength(a),d,e;for(d=0;d<c/8;d++)0===(d&3)&&(e=a[d/4]),b+=String.fromCharCode(e>>>8>>>8>>>8),e<<=8;return decodeURIComponent(escape(b))},toBits:function(a){a=unescape(encodeURIComponent(a));var b=[],c,d=0;for(c=0;c<a.length;c++)d=d<<8|a.charCodeAt(c),3===(c&3)&&(b.push(d),d=0);c&3&&b.push(sjcl.bitArray.partial(8*(c&3),d));return b}};
sjcl.codec.hex={fromBits:function(a){var b="",c;for(c=0;c<a.length;c++)b+=((a[c]|0)+0xf00000000000).toString(16).substr(4);return b.substr(0,sjcl.bitArray.bitLength(a)/4)},toBits:function(a){var b,c=[],d;a=a.replace(/\s|0x/g,"");d=a.length;a=a+"00000000";for(b=0;b<a.length;b+=8)c.push(parseInt(a.substr(b,8),16)^0);return sjcl.bitArray.clamp(c,4*d)}};
sjcl.codec.base32={B:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",X:"0123456789ABCDEFGHIJKLMNOPQRSTUV",BITS:32,BASE:5,REMAINING:27,fromBits:function(a,b,c){var d=sjcl.codec.base32.BASE,e=sjcl.codec.base32.REMAINING,f="",g=0,h=sjcl.codec.base32.B,k=0,l=sjcl.bitArray.bitLength(a);c&&(h=sjcl.codec.base32.X);for(c=0;f.length*d<l;)f+=h.charAt((k^a[c]>>>g)>>>e),g<d?(k=a[c]<<d-g,g+=e,c++):(k<<=d,g-=d);for(;f.length&7&&!b;)f+="=";return f},toBits:function(a,b){a=a.replace(/\s|=/g,"").toUpperCase();var c=sjcl.codec.base32.BITS,
d=sjcl.codec.base32.BASE,e=sjcl.codec.base32.REMAINING,f=[],g,h=0,k=sjcl.codec.base32.B,l=0,n,m="base32";b&&(k=sjcl.codec.base32.X,m="base32hex");for(g=0;g<a.length;g++){n=k.indexOf(a.charAt(g));if(0>n){if(!b)try{return sjcl.codec.base32hex.toBits(a)}catch(p){}throw new sjcl.exception.invalid("this isn't "+m+"!");}h>e?(h-=e,f.push(l^n>>>h),l=n<<c-h):(h+=d,l^=n<<c-h)}h&56&&f.push(sjcl.bitArray.partial(h&56,l,1));return f}};
sjcl.codec.base32hex={fromBits:function(a,b){return sjcl.codec.base32.fromBits(a,b,1)},toBits:function(a){return sjcl.codec.base32.toBits(a,1)}};
sjcl.codec.base64={B:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",fromBits:function(a,b,c){var d="",e=0,f=sjcl.codec.base64.B,g=0,h=sjcl.bitArray.bitLength(a);c&&(f=f.substr(0,62)+"-_");for(c=0;6*d.length<h;)d+=f.charAt((g^a[c]>>>e)>>>26),6>e?(g=a[c]<<6-e,e+=26,c++):(g<<=6,e-=6);for(;d.length&3&&!b;)d+="=";return d},toBits:function(a,b){a=a.replace(/\s|=/g,"");var c=[],d,e=0,f=sjcl.codec.base64.B,g=0,h;b&&(f=f.substr(0,62)+"-_");for(d=0;d<a.length;d++){h=f.indexOf(a.charAt(d));
if(0>h)throw new sjcl.exception.invalid("this isn't base64!");26<e?(e-=26,c.push(g^h>>>e),g=h<<32-e):(e+=6,g^=h<<32-e)}e&56&&c.push(sjcl.bitArray.partial(e&56,g,1));return c}};sjcl.codec.base64url={fromBits:function(a){return sjcl.codec.base64.fromBits(a,1,1)},toBits:function(a){return sjcl.codec.base64.toBits(a,1)}};sjcl.hash.sha256=function(a){this.b[0]||this.O();a?(this.F=a.F.slice(0),this.A=a.A.slice(0),this.l=a.l):this.reset()};sjcl.hash.sha256.hash=function(a){return(new sjcl.hash.sha256).update(a).finalize()};
sjcl.hash.sha256.prototype={blockSize:512,reset:function(){this.F=this.Y.slice(0);this.A=[];this.l=0;return this},update:function(a){"string"===typeof a&&(a=sjcl.codec.utf8String.toBits(a));var b,c=this.A=sjcl.bitArray.concat(this.A,a);b=this.l;a=this.l=b+sjcl.bitArray.bitLength(a);if(0x1fffffffffffff<a)throw new sjcl.exception.invalid("Cannot hash more than 2^53 - 1 bits");if("undefined"!==typeof Uint32Array){var d=new Uint32Array(c),e=0;for(b=512+b-(512+b&0x1ff);b<=a;b+=512)u(this,d.subarray(16*e,
16*(e+1))),e+=1;c.splice(0,16*e)}else for(b=512+b-(512+b&0x1ff);b<=a;b+=512)u(this,c.splice(0,16));return this},finalize:function(){var a,b=this.A,c=this.F,b=sjcl.bitArray.concat(b,[sjcl.bitArray.partial(1,1)]);for(a=b.length+2;a&15;a++)b.push(0);b.push(Math.floor(this.l/0x100000000));for(b.push(this.l|0);b.length;)u(this,b.splice(0,16));this.reset();return c},Y:[],b:[],O:function(){function a(a){return 0x100000000*(a-Math.floor(a))|0}for(var b=0,c=2,d,e;64>b;c++){e=!0;for(d=2;d*d<=c;d++)if(0===c%d){e=
!1;break}e&&(8>b&&(this.Y[b]=a(Math.pow(c,.5))),this.b[b]=a(Math.pow(c,1/3)),b++)}}};
function u(a,b){var c,d,e,f=a.F,g=a.b,h=f[0],k=f[1],l=f[2],n=f[3],m=f[4],p=f[5],r=f[6],q=f[7];for(c=0;64>c;c++)16>c?d=b[c]:(d=b[c+1&15],e=b[c+14&15],d=b[c&15]=(d>>>7^d>>>18^d>>>3^d<<25^d<<14)+(e>>>17^e>>>19^e>>>10^e<<15^e<<13)+b[c&15]+b[c+9&15]|0),d=d+q+(m>>>6^m>>>11^m>>>25^m<<26^m<<21^m<<7)+(r^m&(p^r))+g[c],q=r,r=p,p=m,m=n+d|0,n=l,l=k,k=h,h=d+(k&l^n&(k^l))+(k>>>2^k>>>13^k>>>22^k<<30^k<<19^k<<10)|0;f[0]=f[0]+h|0;f[1]=f[1]+k|0;f[2]=f[2]+l|0;f[3]=f[3]+n|0;f[4]=f[4]+m|0;f[5]=f[5]+p|0;f[6]=f[6]+r|0;f[7]=
f[7]+q|0}
sjcl.mode.ccm={name:"ccm",G:[],listenProgress:function(a){sjcl.mode.ccm.G.push(a)},unListenProgress:function(a){a=sjcl.mode.ccm.G.indexOf(a);-1<a&&sjcl.mode.ccm.G.splice(a,1)},fa:function(a){var b=sjcl.mode.ccm.G.slice(),c;for(c=0;c<b.length;c+=1)b[c](a)},encrypt:function(a,b,c,d,e){var f,g=b.slice(0),h=sjcl.bitArray,k=h.bitLength(c)/8,l=h.bitLength(g)/8;e=e||64;d=d||[];if(7>k)throw new sjcl.exception.invalid("ccm: iv must be at least 7 bytes");for(f=2;4>f&&l>>>8*f;f++);f<15-k&&(f=15-k);c=h.clamp(c,
8*(15-f));b=sjcl.mode.ccm.V(a,b,c,d,e,f);g=sjcl.mode.ccm.C(a,g,c,b,e,f);return h.concat(g.data,g.tag)},decrypt:function(a,b,c,d,e){e=e||64;d=d||[];var f=sjcl.bitArray,g=f.bitLength(c)/8,h=f.bitLength(b),k=f.clamp(b,h-e),l=f.bitSlice(b,h-e),h=(h-e)/8;if(7>g)throw new sjcl.exception.invalid("ccm: iv must be at least 7 bytes");for(b=2;4>b&&h>>>8*b;b++);b<15-g&&(b=15-g);c=f.clamp(c,8*(15-b));k=sjcl.mode.ccm.C(a,k,c,l,e,b);a=sjcl.mode.ccm.V(a,k.data,c,d,e,b);if(!f.equal(k.tag,a))throw new sjcl.exception.corrupt("ccm: tag doesn't match");
return k.data},na:function(a,b,c,d,e,f){var g=[],h=sjcl.bitArray,k=h.i;d=[h.partial(8,(b.length?64:0)|d-2<<2|f-1)];d=h.concat(d,c);d[3]|=e;d=a.encrypt(d);if(b.length)for(c=h.bitLength(b)/8,65279>=c?g=[h.partial(16,c)]:0xffffffff>=c&&(g=h.concat([h.partial(16,65534)],[c])),g=h.concat(g,b),b=0;b<g.length;b+=4)d=a.encrypt(k(d,g.slice(b,b+4).concat([0,0,0])));return d},V:function(a,b,c,d,e,f){var g=sjcl.bitArray,h=g.i;e/=8;if(e%2||4>e||16<e)throw new sjcl.exception.invalid("ccm: invalid tag length");
if(0xffffffff<d.length||0xffffffff<b.length)throw new sjcl.exception.bug("ccm: can't deal with 4GiB or more data");c=sjcl.mode.ccm.na(a,d,c,e,g.bitLength(b)/8,f);for(d=0;d<b.length;d+=4)c=a.encrypt(h(c,b.slice(d,d+4).concat([0,0,0])));return g.clamp(c,8*e)},C:function(a,b,c,d,e,f){var g,h=sjcl.bitArray;g=h.i;var k=b.length,l=h.bitLength(b),n=k/50,m=n;c=h.concat([h.partial(8,f-1)],c).concat([0,0,0]).slice(0,4);d=h.bitSlice(g(d,a.encrypt(c)),0,e);if(!k)return{tag:d,data:[]};for(g=0;g<k;g+=4)g>n&&(sjcl.mode.ccm.fa(g/
k),n+=m),c[3]++,e=a.encrypt(c),b[g]^=e[0],b[g+1]^=e[1],b[g+2]^=e[2],b[g+3]^=e[3];return{tag:d,data:h.clamp(b,l)}}};
sjcl.mode.ocb2={name:"ocb2",encrypt:function(a,b,c,d,e,f){if(128!==sjcl.bitArray.bitLength(c))throw new sjcl.exception.invalid("ocb iv must be 128 bits");var g,h=sjcl.mode.ocb2.S,k=sjcl.bitArray,l=k.i,n=[0,0,0,0];c=h(a.encrypt(c));var m,p=[];d=d||[];e=e||64;for(g=0;g+4<b.length;g+=4)m=b.slice(g,g+4),n=l(n,m),p=p.concat(l(c,a.encrypt(l(c,m)))),c=h(c);m=b.slice(g);b=k.bitLength(m);g=a.encrypt(l(c,[0,0,0,b]));m=k.clamp(l(m.concat([0,0,0]),g),b);n=l(n,l(m.concat([0,0,0]),g));n=a.encrypt(l(n,l(c,h(c))));
d.length&&(n=l(n,f?d:sjcl.mode.ocb2.pmac(a,d)));return p.concat(k.concat(m,k.clamp(n,e)))},decrypt:function(a,b,c,d,e,f){if(128!==sjcl.bitArray.bitLength(c))throw new sjcl.exception.invalid("ocb iv must be 128 bits");e=e||64;var g=sjcl.mode.ocb2.S,h=sjcl.bitArray,k=h.i,l=[0,0,0,0],n=g(a.encrypt(c)),m,p,r=sjcl.bitArray.bitLength(b)-e,q=[];d=d||[];for(c=0;c+4<r/32;c+=4)m=k(n,a.decrypt(k(n,b.slice(c,c+4)))),l=k(l,m),q=q.concat(m),n=g(n);p=r-32*c;m=a.encrypt(k(n,[0,0,0,p]));m=k(m,h.clamp(b.slice(c),p).concat([0,
0,0]));l=k(l,m);l=a.encrypt(k(l,k(n,g(n))));d.length&&(l=k(l,f?d:sjcl.mode.ocb2.pmac(a,d)));if(!h.equal(h.clamp(l,e),h.bitSlice(b,r)))throw new sjcl.exception.corrupt("ocb: tag doesn't match");return q.concat(h.clamp(m,p))},pmac:function(a,b){var c,d=sjcl.mode.ocb2.S,e=sjcl.bitArray,f=e.i,g=[0,0,0,0],h=a.encrypt([0,0,0,0]),h=f(h,d(d(h)));for(c=0;c+4<b.length;c+=4)h=d(h),g=f(g,a.encrypt(f(h,b.slice(c,c+4))));c=b.slice(c);128>e.bitLength(c)&&(h=f(h,d(h)),c=e.concat(c,[-2147483648,0,0,0]));g=f(g,c);
return a.encrypt(f(d(f(h,d(h))),g))},S:function(a){return[a[0]<<1^a[1]>>>31,a[1]<<1^a[2]>>>31,a[2]<<1^a[3]>>>31,a[3]<<1^135*(a[0]>>>31)]}};
sjcl.mode.gcm={name:"gcm",encrypt:function(a,b,c,d,e){var f=b.slice(0);b=sjcl.bitArray;d=d||[];a=sjcl.mode.gcm.C(!0,a,f,d,c,e||128);return b.concat(a.data,a.tag)},decrypt:function(a,b,c,d,e){var f=b.slice(0),g=sjcl.bitArray,h=g.bitLength(f);e=e||128;d=d||[];e<=h?(b=g.bitSlice(f,h-e),f=g.bitSlice(f,0,h-e)):(b=f,f=[]);a=sjcl.mode.gcm.C(!1,a,f,d,c,e);if(!g.equal(a.tag,b))throw new sjcl.exception.corrupt("gcm: tag doesn't match");return a.data},ka:function(a,b){var c,d,e,f,g,h=sjcl.bitArray.i;e=[0,0,
0,0];f=b.slice(0);for(c=0;128>c;c++){(d=0!==(a[Math.floor(c/32)]&1<<31-c%32))&&(e=h(e,f));g=0!==(f[3]&1);for(d=3;0<d;d--)f[d]=f[d]>>>1|(f[d-1]&1)<<31;f[0]>>>=1;g&&(f[0]^=-0x1f000000)}return e},j:function(a,b,c){var d,e=c.length;b=b.slice(0);for(d=0;d<e;d+=4)b[0]^=0xffffffff&c[d],b[1]^=0xffffffff&c[d+1],b[2]^=0xffffffff&c[d+2],b[3]^=0xffffffff&c[d+3],b=sjcl.mode.gcm.ka(b,a);return b},C:function(a,b,c,d,e,f){var g,h,k,l,n,m,p,r,q=sjcl.bitArray;m=c.length;p=q.bitLength(c);r=q.bitLength(d);h=q.bitLength(e);
g=b.encrypt([0,0,0,0]);96===h?(e=e.slice(0),e=q.concat(e,[1])):(e=sjcl.mode.gcm.j(g,[0,0,0,0],e),e=sjcl.mode.gcm.j(g,e,[0,0,Math.floor(h/0x100000000),h&0xffffffff]));h=sjcl.mode.gcm.j(g,[0,0,0,0],d);n=e.slice(0);d=h.slice(0);a||(d=sjcl.mode.gcm.j(g,h,c));for(l=0;l<m;l+=4)n[3]++,k=b.encrypt(n),c[l]^=k[0],c[l+1]^=k[1],c[l+2]^=k[2],c[l+3]^=k[3];c=q.clamp(c,p);a&&(d=sjcl.mode.gcm.j(g,h,c));a=[Math.floor(r/0x100000000),r&0xffffffff,Math.floor(p/0x100000000),p&0xffffffff];d=sjcl.mode.gcm.j(g,d,a);k=b.encrypt(e);
d[0]^=k[0];d[1]^=k[1];d[2]^=k[2];d[3]^=k[3];return{tag:q.bitSlice(d,0,f),data:c}}};sjcl.misc.hmac=function(a,b){this.W=b=b||sjcl.hash.sha256;var c=[[],[]],d,e=b.prototype.blockSize/32;this.w=[new b,new b];a.length>e&&(a=b.hash(a));for(d=0;d<e;d++)c[0][d]=a[d]^909522486,c[1][d]=a[d]^1549556828;this.w[0].update(c[0]);this.w[1].update(c[1]);this.R=new b(this.w[0])};
sjcl.misc.hmac.prototype.encrypt=sjcl.misc.hmac.prototype.mac=function(a){if(this.aa)throw new sjcl.exception.invalid("encrypt on already updated hmac called!");this.update(a);return this.digest(a)};sjcl.misc.hmac.prototype.reset=function(){this.R=new this.W(this.w[0]);this.aa=!1};sjcl.misc.hmac.prototype.update=function(a){this.aa=!0;this.R.update(a)};sjcl.misc.hmac.prototype.digest=function(){var a=this.R.finalize(),a=(new this.W(this.w[1])).update(a).finalize();this.reset();return a};
sjcl.misc.pbkdf2=function(a,b,c,d,e){c=c||1E4;if(0>d||0>c)throw new sjcl.exception.invalid("invalid params to pbkdf2");"string"===typeof a&&(a=sjcl.codec.utf8String.toBits(a));"string"===typeof b&&(b=sjcl.codec.utf8String.toBits(b));e=e||sjcl.misc.hmac;a=new e(a);var f,g,h,k,l=[],n=sjcl.bitArray;for(k=1;32*l.length<(d||1);k++){e=f=a.encrypt(n.concat(b,[k]));for(g=1;g<c;g++)for(f=a.encrypt(f),h=0;h<f.length;h++)e[h]^=f[h];l=l.concat(e)}d&&(l=n.clamp(l,d));return l};
sjcl.prng=function(a){this.c=[new sjcl.hash.sha256];this.m=[0];this.P=0;this.H={};this.N=0;this.U={};this.Z=this.f=this.o=this.ha=0;this.b=[0,0,0,0,0,0,0,0];this.h=[0,0,0,0];this.L=void 0;this.M=a;this.D=!1;this.K={progress:{},seeded:{}};this.u=this.ga=0;this.I=1;this.J=2;this.ca=0x10000;this.T=[0,48,64,96,128,192,0x100,384,512,768,1024];this.da=3E4;this.ba=80};
sjcl.prng.prototype={randomWords:function(a,b){var c=[],d;d=this.isReady(b);var e;if(d===this.u)throw new sjcl.exception.notReady("generator isn't seeded");if(d&this.J){d=!(d&this.I);e=[];var f=0,g;this.Z=e[0]=(new Date).valueOf()+this.da;for(g=0;16>g;g++)e.push(0x100000000*Math.random()|0);for(g=0;g<this.c.length&&(e=e.concat(this.c[g].finalize()),f+=this.m[g],this.m[g]=0,d||!(this.P&1<<g));g++);this.P>=1<<this.c.length&&(this.c.push(new sjcl.hash.sha256),this.m.push(0));this.f-=f;f>this.o&&(this.o=
f);this.P++;this.b=sjcl.hash.sha256.hash(this.b.concat(e));this.L=new sjcl.cipher.aes(this.b);for(d=0;4>d&&(this.h[d]=this.h[d]+1|0,!this.h[d]);d++);}for(d=0;d<a;d+=4)0===(d+1)%this.ca&&y(this),e=z(this),c.push(e[0],e[1],e[2],e[3]);y(this);return c.slice(0,a)},setDefaultParanoia:function(a,b){if(0===a&&"Setting paranoia=0 will ruin your security; use it only for testing"!==b)throw new sjcl.exception.invalid("Setting paranoia=0 will ruin your security; use it only for testing");this.M=a},addEntropy:function(a,
b,c){c=c||"user";var d,e,f=(new Date).valueOf(),g=this.H[c],h=this.isReady(),k=0;d=this.U[c];void 0===d&&(d=this.U[c]=this.ha++);void 0===g&&(g=this.H[c]=0);this.H[c]=(this.H[c]+1)%this.c.length;switch(typeof a){case "number":void 0===b&&(b=1);this.c[g].update([d,this.N++,1,b,f,1,a|0]);break;case "object":c=Object.prototype.toString.call(a);if("[object Uint32Array]"===c){e=[];for(c=0;c<a.length;c++)e.push(a[c]);a=e}else for("[object Array]"!==c&&(k=1),c=0;c<a.length&&!k;c++)"number"!==typeof a[c]&&
(k=1);if(!k){if(void 0===b)for(c=b=0;c<a.length;c++)for(e=a[c];0<e;)b++,e=e>>>1;this.c[g].update([d,this.N++,2,b,f,a.length].concat(a))}break;case "string":void 0===b&&(b=a.length);this.c[g].update([d,this.N++,3,b,f,a.length]);this.c[g].update(a);break;default:k=1}if(k)throw new sjcl.exception.bug("random: addEntropy only supports number, array of numbers or string");this.m[g]+=b;this.f+=b;h===this.u&&(this.isReady()!==this.u&&A("seeded",Math.max(this.o,this.f)),A("progress",this.getProgress()))},
isReady:function(a){a=this.T[void 0!==a?a:this.M];return this.o&&this.o>=a?this.m[0]>this.ba&&(new Date).valueOf()>this.Z?this.J|this.I:this.I:this.f>=a?this.J|this.u:this.u},getProgress:function(a){a=this.T[a?a:this.M];return this.o>=a?1:this.f>a?1:this.f/a},startCollectors:function(){if(!this.D){this.a={loadTimeCollector:B(this,this.ma),mouseCollector:B(this,this.oa),keyboardCollector:B(this,this.la),accelerometerCollector:B(this,this.ea),touchCollector:B(this,this.qa)};if(window.addEventListener)window.addEventListener("load",
this.a.loadTimeCollector,!1),window.addEventListener("mousemove",this.a.mouseCollector,!1),window.addEventListener("keypress",this.a.keyboardCollector,!1),window.addEventListener("devicemotion",this.a.accelerometerCollector,!1),window.addEventListener("touchmove",this.a.touchCollector,!1);else if(document.attachEvent)document.attachEvent("onload",this.a.loadTimeCollector),document.attachEvent("onmousemove",this.a.mouseCollector),document.attachEvent("keypress",this.a.keyboardCollector);else throw new sjcl.exception.bug("can't attach event");
this.D=!0}},stopCollectors:function(){this.D&&(window.removeEventListener?(window.removeEventListener("load",this.a.loadTimeCollector,!1),window.removeEventListener("mousemove",this.a.mouseCollector,!1),window.removeEventListener("keypress",this.a.keyboardCollector,!1),window.removeEventListener("devicemotion",this.a.accelerometerCollector,!1),window.removeEventListener("touchmove",this.a.touchCollector,!1)):document.detachEvent&&(document.detachEvent("onload",this.a.loadTimeCollector),document.detachEvent("onmousemove",
this.a.mouseCollector),document.detachEvent("keypress",this.a.keyboardCollector)),this.D=!1)},addEventListener:function(a,b){this.K[a][this.ga++]=b},removeEventListener:function(a,b){var c,d,e=this.K[a],f=[];for(d in e)e.hasOwnProperty(d)&&e[d]===b&&f.push(d);for(c=0;c<f.length;c++)d=f[c],delete e[d]},la:function(){C(this,1)},oa:function(a){var b,c;try{b=a.x||a.clientX||a.offsetX||0,c=a.y||a.clientY||a.offsetY||0}catch(d){c=b=0}0!=b&&0!=c&&this.addEntropy([b,c],2,"mouse");C(this,0)},qa:function(a){a=
a.touches[0]||a.changedTouches[0];this.addEntropy([a.pageX||a.clientX,a.pageY||a.clientY],1,"touch");C(this,0)},ma:function(){C(this,2)},ea:function(a){a=a.accelerationIncludingGravity.x||a.accelerationIncludingGravity.y||a.accelerationIncludingGravity.z;if(window.orientation){var b=window.orientation;"number"===typeof b&&this.addEntropy(b,1,"accelerometer")}a&&this.addEntropy(a,2,"accelerometer");C(this,0)}};
function A(a,b){var c,d=sjcl.random.K[a],e=[];for(c in d)d.hasOwnProperty(c)&&e.push(d[c]);for(c=0;c<e.length;c++)e[c](b)}function C(a,b){"undefined"!==typeof window&&window.performance&&"function"===typeof window.performance.now?a.addEntropy(window.performance.now(),b,"loadtime"):a.addEntropy((new Date).valueOf(),b,"loadtime")}function y(a){a.b=z(a).concat(z(a));a.L=new sjcl.cipher.aes(a.b)}function z(a){for(var b=0;4>b&&(a.h[b]=a.h[b]+1|0,!a.h[b]);b++);return a.L.encrypt(a.h)}
function B(a,b){return function(){b.apply(a,arguments)}}sjcl.random=new sjcl.prng(6);
a:try{var D,E,F,G;if(G="undefined"!==typeof module&&module.exports){var H;try{H=require("crypto")}catch(a){H=null}G=E=H}if(G&&E.randomBytes)D=E.randomBytes(128),D=new Uint32Array((new Uint8Array(D)).buffer),sjcl.random.addEntropy(D,1024,"crypto['randomBytes']");else if("undefined"!==typeof window&&"undefined"!==typeof Uint32Array){F=new Uint32Array(32);if(window.crypto&&window.crypto.getRandomValues)window.crypto.getRandomValues(F);else if(window.msCrypto&&window.msCrypto.getRandomValues)window.msCrypto.getRandomValues(F);
else break a;sjcl.random.addEntropy(F,1024,"crypto['getRandomValues']")}}catch(a){"undefined"!==typeof window&&window.console&&(console.log("There was an error collecting entropy from the browser:"),console.log(a))}
sjcl.json={defaults:{v:1,iter:1E4,ks:128,ts:64,mode:"ccm",adata:"",cipher:"aes"},ja:function(a,b,c,d){c=c||{};d=d||{};var e=sjcl.json,f=e.g({iv:sjcl.random.randomWords(4,0)},e.defaults),g;e.g(f,c);c=f.adata;"string"===typeof f.salt&&(f.salt=sjcl.codec.base64.toBits(f.salt));"string"===typeof f.iv&&(f.iv=sjcl.codec.base64.toBits(f.iv));if(!sjcl.mode[f.mode]||!sjcl.cipher[f.cipher]||"string"===typeof a&&100>=f.iter||64!==f.ts&&96!==f.ts&&128!==f.ts||128!==f.ks&&192!==f.ks&&0x100!==f.ks||2>f.iv.length||
4<f.iv.length)throw new sjcl.exception.invalid("json encrypt: invalid parameters");"string"===typeof a?(g=sjcl.misc.cachedPbkdf2(a,f),a=g.key.slice(0,f.ks/32),f.salt=g.salt):sjcl.ecc&&a instanceof sjcl.ecc.elGamal.publicKey&&(g=a.kem(),f.kemtag=g.tag,a=g.key.slice(0,f.ks/32));"string"===typeof b&&(b=sjcl.codec.utf8String.toBits(b));"string"===typeof c&&(f.adata=c=sjcl.codec.utf8String.toBits(c));g=new sjcl.cipher[f.cipher](a);e.g(d,f);d.key=a;f.ct="ccm"===f.mode&&sjcl.arrayBuffer&&sjcl.arrayBuffer.ccm&&
b instanceof ArrayBuffer?sjcl.arrayBuffer.ccm.encrypt(g,b,f.iv,c,f.ts):sjcl.mode[f.mode].encrypt(g,b,f.iv,c,f.ts);return f},encrypt:function(a,b,c,d){var e=sjcl.json,f=e.ja.apply(e,arguments);return e.encode(f)},ia:function(a,b,c,d){c=c||{};d=d||{};var e=sjcl.json;b=e.g(e.g(e.g({},e.defaults),b),c,!0);var f,g;f=b.adata;"string"===typeof b.salt&&(b.salt=sjcl.codec.base64.toBits(b.salt));"string"===typeof b.iv&&(b.iv=sjcl.codec.base64.toBits(b.iv));if(!sjcl.mode[b.mode]||!sjcl.cipher[b.cipher]||"string"===
typeof a&&100>=b.iter||64!==b.ts&&96!==b.ts&&128!==b.ts||128!==b.ks&&192!==b.ks&&0x100!==b.ks||!b.iv||2>b.iv.length||4<b.iv.length)throw new sjcl.exception.invalid("json decrypt: invalid parameters");"string"===typeof a?(g=sjcl.misc.cachedPbkdf2(a,b),a=g.key.slice(0,b.ks/32),b.salt=g.salt):sjcl.ecc&&a instanceof sjcl.ecc.elGamal.secretKey&&(a=a.unkem(sjcl.codec.base64.toBits(b.kemtag)).slice(0,b.ks/32));"string"===typeof f&&(f=sjcl.codec.utf8String.toBits(f));g=new sjcl.cipher[b.cipher](a);f="ccm"===
b.mode&&sjcl.arrayBuffer&&sjcl.arrayBuffer.ccm&&b.ct instanceof ArrayBuffer?sjcl.arrayBuffer.ccm.decrypt(g,b.ct,b.iv,b.tag,f,b.ts):sjcl.mode[b.mode].decrypt(g,b.ct,b.iv,f,b.ts);e.g(d,b);d.key=a;return 1===c.raw?f:sjcl.codec.utf8String.fromBits(f)},decrypt:function(a,b,c,d){var e=sjcl.json;return e.ia(a,e.decode(b),c,d)},encode:function(a){var b,c="{",d="";for(b in a)if(a.hasOwnProperty(b)){if(!b.match(/^[a-z0-9]+$/i))throw new sjcl.exception.invalid("json encode: invalid property name");c+=d+'"'+
b+'":';d=",";switch(typeof a[b]){case "number":case "boolean":c+=a[b];break;case "string":c+='"'+escape(a[b])+'"';break;case "object":c+='"'+sjcl.codec.base64.fromBits(a[b],0)+'"';break;default:throw new sjcl.exception.bug("json encode: unsupported type");}}return c+"}"},decode:function(a){a=a.replace(/\s/g,"");if(!a.match(/^\{.*\}$/))throw new sjcl.exception.invalid("json decode: this isn't json!");a=a.replace(/^\{|\}$/g,"").split(/,/);var b={},c,d;for(c=0;c<a.length;c++){if(!(d=a[c].match(/^\s*(?:(["']?)([a-z][a-z0-9]*)\1)\s*:\s*(?:(-?\d+)|"([a-z0-9+\/%*_.@=\-]*)"|(true|false))$/i)))throw new sjcl.exception.invalid("json decode: this isn't json!");
null!=d[3]?b[d[2]]=parseInt(d[3],10):null!=d[4]?b[d[2]]=d[2].match(/^(ct|adata|salt|iv)$/)?sjcl.codec.base64.toBits(d[4]):unescape(d[4]):null!=d[5]&&(b[d[2]]="true"===d[5])}return b},g:function(a,b,c){void 0===a&&(a={});if(void 0===b)return a;for(var d in b)if(b.hasOwnProperty(d)){if(c&&void 0!==a[d]&&a[d]!==b[d])throw new sjcl.exception.invalid("required parameter overridden");a[d]=b[d]}return a},sa:function(a,b){var c={},d;for(d in a)a.hasOwnProperty(d)&&a[d]!==b[d]&&(c[d]=a[d]);return c},ra:function(a,
b){var c={},d;for(d=0;d<b.length;d++)void 0!==a[b[d]]&&(c[b[d]]=a[b[d]]);return c}};sjcl.encrypt=sjcl.json.encrypt;sjcl.decrypt=sjcl.json.decrypt;sjcl.misc.pa={};sjcl.misc.cachedPbkdf2=function(a,b){var c=sjcl.misc.pa,d;b=b||{};d=b.iter||1E3;c=c[a]=c[a]||{};d=c[d]=c[d]||{firstSalt:b.salt&&b.salt.length?b.salt.slice(0):sjcl.random.randomWords(2,0)};c=void 0===b.salt?d.firstSalt:b.salt;d[c]=d[c]||sjcl.misc.pbkdf2(a,c,b.iter);return{key:d[c].slice(0),salt:c.slice(0)}};
"undefined"!==typeof module&&module.exports&&(module.exports=sjcl);"function"===typeof define&&define([],function(){return sjcl});
</script>
</div>
<!--~~ Boot kernel prologue ~~-->
<div id="bootKernelPrefix" style="display:none;">
<script data-tiddler-title="$:/boot/bootprefix.js" data-tiddler-type="application/javascript" type="text/javascript">/*\
title: $:/boot/bootprefix.js
type: application/javascript
This file sets up the globals that need to be available when JavaScript modules are executed in the browser. The overall sequence is:
# BootPrefix.js
# <module definitions>
# Boot.js
See Boot.js for further details of the boot process.
\*/
var _bootprefix = (function($tw) {
"use strict";
$tw = $tw || Object.create(null);
$tw.boot = $tw.boot || Object.create(null);
// Detect platforms
if(!("browser" in $tw)) {
$tw.browser = typeof(window) !== "undefined" ? {} : null;
}
if(!("node" in $tw)) {
$tw.node = typeof(process) === "object" ? {} : null;
}
if(!("nodeWebKit" in $tw)) {
$tw.nodeWebKit = $tw.node && global.window && global.window.nwDispatcher ? {} : null;
}
// Set default boot tasks
$tw.boot.tasks = {
trapErrors: !!($tw.browser && !$tw.node),
readBrowserTiddlers: !!($tw.browser && !$tw.node)
};
/*
Information about each module is kept in an object with these members:
moduleType: type of module
definition: object, function or string defining the module; see below
exports: exports of the module, filled in after execution
The `definition` can be of several types:
* An object can be used to directly specify the exports of the module
* A function with the arguments `module,require,exports` that returns `exports`
* A string function body with the same arguments
Each moduleInfo object is stored in two hashmaps: $tw.modules.titles and $tw.modules.types. The first is indexed by title and the second is indexed by type and then title
*/
$tw.modules = {
titles: {}, // hashmap by module name of moduleInfo
types: {} // hashmap by module type and then name of moduleInfo
};
/*
Define a JavaScript tiddler module for later execution
moduleName: name of module being defined
moduleType: type of module
definition: module definition; see discussion above
*/
$tw.modules.define = function(moduleName,moduleType,definition) {
// Create the moduleInfo
var moduleInfo = {
moduleType: moduleType,
definition: definition,
exports: undefined
};
// If the definition is already an object we can use it as the exports
if(typeof moduleInfo.definition === "object") {
moduleInfo.exports = definition;
}
// Store the module in the titles hashmap
if(Object.prototype.hasOwnProperty.call($tw.modules.titles,moduleName)) {
console.log("Warning: Redefined module - " + moduleName);
}
$tw.modules.titles[moduleName] = moduleInfo;
// Store the module in the types hashmap
if(!Object.prototype.hasOwnProperty.call($tw.modules.types,moduleType)) {
$tw.modules.types[moduleType] = {};
}
if(Object.prototype.hasOwnProperty.call($tw.modules.types[moduleType],moduleName)) {
console.log("Warning: Redefined module - " + moduleName);
}
$tw.modules.types[moduleType][moduleName] = moduleInfo;
};
/*
External JavaScript can populate this array before calling boot.js in order to preload tiddlers
*/
$tw.preloadTiddlers = $tw.preloadTiddlers || [];
/*
Convenience function for pushing a tiddler onto the preloading array
*/
$tw.preloadTiddler = function(fields) {
$tw.preloadTiddlers.push(fields);
};
/*
Convenience function for pushing an array of tiddlers onto the preloading array
*/
$tw.preloadTiddlerArray = function(fieldsArray) {
$tw.preloadTiddlers.push.apply($tw.preloadTiddlers,fieldsArray);
};
return $tw;
});
if(typeof(exports) === "undefined") {
// Set up $tw global for the browser
window.$tw = _bootprefix(window.$tw);
} else {
// Export functionality as a module
exports.bootprefix = _bootprefix;
}
//# sourceURL=$:/boot/bootprefix.js
</script>
</div>
<!--~~ Boot kernel ~~-->
<div id="bootKernel" style="display:none;">
<script data-tiddler-created="20230425145216673" data-tiddler-modified="20230425145412612" data-tiddler-title="$:/boot/boot.js" data-tiddler-type="application/javascript" type="text/javascript">/*\
title: $:/boot/boot.js
type: application/javascript
The main boot kernel for TiddlyWiki. This single file creates a barebones TW environment that is just sufficient to bootstrap the modules containing the main logic of the application.
On the server this file is executed directly to boot TiddlyWiki. In the browser, this file is packed into a single HTML file.
\*/
var _boot = (function($tw) {
/*jslint node: true, browser: true */
/*global modules: false, $tw: false */
"use strict";
// Include bootprefix if we're not given module data
if(!$tw) {
$tw = require("./bootprefix.js").bootprefix();
}
$tw.utils = $tw.utils || Object.create(null);
/////////////////////////// Standard node.js libraries
var fs, path, vm;
if($tw.node) {
fs = require("fs");
path = require("path");
vm = require("vm");
}
/////////////////////////// Utility functions
$tw.boot.log = function(str) {
$tw.boot.logMessages = $tw.boot.logMessages || [];
$tw.boot.logMessages.push(str);
}
/*
Check if an object has a property
*/
$tw.utils.hop = function(object,property) {
return object ? Object.prototype.hasOwnProperty.call(object,property) : false;
};
/*
Determine if a value is an array
*/
$tw.utils.isArray = function(value) {
return Object.prototype.toString.call(value) == "[object Array]";
};
/*
Check if an array is equal by value and by reference.
*/
$tw.utils.isArrayEqual = function(array1,array2) {
if(array1 === array2) {
return true;
}
array1 = array1 || [];
array2 = array2 || [];
if(array1.length !== array2.length) {
return false;
}
return array1.every(function(value,index) {
return value === array2[index];
});
};
/*
Add an entry to a sorted array if it doesn't already exist, while maintaining the sort order
*/
$tw.utils.insertSortedArray = function(array,value) {
var low = 0, high = array.length - 1, mid, cmp;
while(low <= high) {
mid = (low + high) >> 1;
cmp = value.localeCompare(array[mid]);
if(cmp > 0) {
low = mid + 1;
} else if(cmp < 0) {
high = mid - 1;
} else {
return array;
}
}
array.splice(low,0,value);
return array;
};
/*
Push entries onto an array, removing them first if they already exist in the array
array: array to modify (assumed to be free of duplicates)
value: a single value to push or an array of values to push
*/
$tw.utils.pushTop = function(array,value) {
var t,p;
if($tw.utils.isArray(value)) {
// Remove any array entries that are duplicated in the new values
if(value.length !== 0) {
if(array.length !== 0) {
if(value.length < array.length) {
for(t=0; t<value.length; t++) {
p = array.indexOf(value[t]);
if(p !== -1) {
array.splice(p,1);
}
}
} else {
for(t=array.length-1; t>=0; t--) {
p = value.indexOf(array[t]);
if(p !== -1) {
array.splice(t,1);
}
}
}
}
// Push the values on top of the main array
array.push.apply(array,value);
}
} else {
p = array.indexOf(value);
if(p !== -1) {
array.splice(p,1);
}
array.push(value);
}
return array;
};
/*
Determine if a value is a date
*/
$tw.utils.isDate = function(value) {
return Object.prototype.toString.call(value) === "[object Date]";
};
/*
Iterate through all the own properties of an object or array. Callback is invoked with (element,title,object)
*/
$tw.utils.each = function(object,callback) {
var next,f,length;
if(object) {
if(Object.prototype.toString.call(object) == "[object Array]") {
for (f=0, length=object.length; f<length; f++) {
next = callback(object[f],f,object);
if(next === false) {
break;
}
}
} else {
var keys = Object.keys(object);
for (f=0, length=keys.length; f<length; f++) {
var key = keys[f];
next = callback(object[key],key,object);
if(next === false) {
break;
}
}
}
}
};
/*
Helper for making DOM elements
tag: tag name
options: see below
Options include:
namespace: defaults to http://www.w3.org/1999/xhtml
attributes: hashmap of attribute values
style: hashmap of styles
text: text to add as a child node
children: array of further child nodes
innerHTML: optional HTML for element
class: class name(s)
document: defaults to current document
eventListeners: array of event listeners (this option won't work until $tw.utils.addEventListeners() has been loaded)
*/
$tw.utils.domMaker = function(tag,options) {
var doc = options.document || document;
var element = doc.createElementNS(options.namespace || "http://www.w3.org/1999/xhtml",tag);
if(options["class"]) {
element.className = options["class"];
}
if(options.text) {
element.appendChild(doc.createTextNode(options.text));
}
$tw.utils.each(options.children,function(child) {
element.appendChild(child);
});
if(options.innerHTML) {
element.innerHTML = options.innerHTML;
}
$tw.utils.each(options.attributes,function(attribute,name) {
element.setAttribute(name,attribute);
});
$tw.utils.each(options.style,function(value,name) {
element.style[name] = value;
});
if(options.eventListeners) {
$tw.utils.addEventListeners(element,options.eventListeners);
}
return element;
};
/*
Display an error and exit
*/
$tw.utils.error = function(err) {
// Prepare the error message
var errHeading = ( $tw.language == undefined ? "Internal JavaScript Error" : $tw.language.getString("InternalJavaScriptError/Title") ),
promptMsg = ( $tw.language == undefined ? "Well, this is embarrassing. It is recommended that you restart TiddlyWiki by refreshing your browser" : $tw.language.getString("InternalJavaScriptError/Hint") );
// Log the error to the console
console.error($tw.node ? "\x1b[1;31m" + err + "\x1b[0m" : err);
if($tw.browser && !$tw.node) {
// Display an error message to the user
var dm = $tw.utils.domMaker,
heading = dm("h1",{text: errHeading}),
prompt = dm("div",{text: promptMsg, "class": "tc-error-prompt"}),
message = dm("div",{text: err, "class":"tc-error-message"}),
button = dm("div",{children: [dm("button",{text: ( $tw.language == undefined ? "close" : $tw.language.getString("Buttons/Close/Caption") )})], "class": "tc-error-prompt"}),
form = dm("form",{children: [heading,prompt,message,button], "class": "tc-error-form"});
document.body.insertBefore(form,document.body.firstChild);
form.addEventListener("submit",function(event) {
document.body.removeChild(form);
event.preventDefault();
return false;
},true);
return null;
} else if(!$tw.browser) {
// Exit if we're under node.js
process.exit(1);
}
};
/*
Use our custom error handler if we're in the browser
*/
/*
if($tw.boot.tasks.trapErrors) {
window.onerror = function(errorMsg,url,lineNumber) {
$tw.utils.error(errorMsg);
return false;
};
}
*/
/*
Extend an object with the properties from a list of source objects
*/
$tw.utils.extend = function(object /*, sourceObjectList */) {
$tw.utils.each(Array.prototype.slice.call(arguments,1),function(source) {
if(source) {
for (var p in source) {
object[p] = source[p];
}
}
});
return object;
};
/*
Fill in any null or undefined properties of an object with the properties from a list of source objects. Each property that is an object is called recursively
*/
$tw.utils.deepDefaults = function(object /*, sourceObjectList */) {
$tw.utils.each(Array.prototype.slice.call(arguments,1),function(source) {
if(source) {
for (var p in source) {
if(object[p] === null || object[p] === undefined) {
object[p] = source[p];
}
if(typeof object[p] === "object" && typeof source[p] === "object") {
$tw.utils.deepDefaults(object[p],source[p]);
}
}
}
});
return object;
};
/*
Convert a URIComponent encoded string to a string safely
*/
$tw.utils.decodeURIComponentSafe = function(s) {
var v = s;
try {
v = decodeURIComponent(s);
} catch(e) {}
return v;
};
/*
Convert a URI encoded string to a string safely
*/
$tw.utils.decodeURISafe = function(s) {
var v = s;
try {
v = decodeURI(s);
} catch(e) {}
return v;
};
/*
Convert "&amp;" to &, "&nbsp;" to nbsp, "&lt;" to <, "&gt;" to > and "&quot;" to "
*/
$tw.utils.htmlDecode = function(s) {
return s.toString().replace(/&lt;/mg,"<").replace(/&nbsp;/mg,"\xA0").replace(/&gt;/mg,">").replace(/&quot;/mg,"\"").replace(/&amp;/mg,"&");
};
/*
Get the browser location.hash. We don't use location.hash because of the way that Firefox auto-urldecodes it (see http://stackoverflow.com/questions/1703552/encoding-of-window-location-hash)
*/
$tw.utils.getLocationHash = function() {
var href = window.location.href;
var idx = href.indexOf('#');
if(idx === -1) {
return "#";
} else if(href.substr(idx + 1,1) === "#" || href.substr(idx + 1,3) === "%23") {
// Special case: ignore location hash if it itself starts with a #
return "#";
} else {
return href.substring(idx);
}
};
/*
Pad a string to a given length with "0"s. Length defaults to 2
*/
$tw.utils.pad = function(value,length) {
length = length || 2;
var s = value.toString();
if(s.length < length) {
s = "000000000000000000000000000".substr(0,length - s.length) + s;
}
return s;
};
// Convert a date into UTC YYYYMMDDHHMMSSmmm format
$tw.utils.stringifyDate = function(value) {
return value.getUTCFullYear() +
$tw.utils.pad(value.getUTCMonth() + 1) +
$tw.utils.pad(value.getUTCDate()) +
$tw.utils.pad(value.getUTCHours()) +
$tw.utils.pad(value.getUTCMinutes()) +
$tw.utils.pad(value.getUTCSeconds()) +
$tw.utils.pad(value.getUTCMilliseconds(),3);
};
// Parse a date from a UTC YYYYMMDDHHMMSSmmm format string
$tw.utils.parseDate = function(value) {
if(typeof value === "string") {
var negative = 1;
if(value.charAt(0) === "-") {
negative = -1;
value = value.substr(1);
}
var year = parseInt(value.substr(0,4),10) * negative,
d = new Date(Date.UTC(year,
parseInt(value.substr(4,2),10)-1,
parseInt(value.substr(6,2),10),
parseInt(value.substr(8,2)||"00",10),
parseInt(value.substr(10,2)||"00",10),
parseInt(value.substr(12,2)||"00",10),
parseInt(value.substr(14,3)||"000",10)));
d.setUTCFullYear(year); // See https://stackoverflow.com/a/5870822
return d;
} else if($tw.utils.isDate(value)) {
return value;
} else {
return null;
}
};
// Stringify an array of tiddler titles into a list string
$tw.utils.stringifyList = function(value) {
if($tw.utils.isArray(value)) {
var result = new Array(value.length);
for(var t=0, l=value.length; t<l; t++) {
var entry = value[t] || "";
if(entry.match(/[^\S\xA0]/mg)) {
result[t] = "[[" + entry + "]]";
} else {
result[t] = entry;
}
}
return result.join(" ");
} else {
return value || "";
}
};
// Parse a string array from a bracketted list. For example "OneTiddler [[Another Tiddler]] LastOne"
$tw.utils.parseStringArray = function(value, allowDuplicate) {
if(typeof value === "string") {
var memberRegExp = /(?:^|[^\S\xA0])(?:\[\[(.*?)\]\])(?=[^\S\xA0]|$)|([\S\xA0]+)/mg,
results = [], names = {},
match;
do {
match = memberRegExp.exec(value);
if(match) {
var item = match[1] || match[2];
if(item !== undefined && (!$tw.utils.hop(names,item) || allowDuplicate)) {
results.push(item);
names[item] = true;
}
}
} while(match);
return results;
} else if($tw.utils.isArray(value)) {
return value;
} else {
return null;
}
};
// Parse a block of name:value fields. The `fields` object is used as the basis for the return value
$tw.utils.parseFields = function(text,fields) {
fields = fields || Object.create(null);
text.split(/\r?\n/mg).forEach(function(line) {
if(line.charAt(0) !== "#") {
var p = line.indexOf(":");
if(p !== -1) {
var field = line.substr(0, p).trim(),
value = line.substr(p+1).trim();
if(field) {
fields[field] = value;
}
}
}
});
return fields;
};
// Safely parse a string as JSON
$tw.utils.parseJSONSafe = function(text,defaultJSON) {
try {
return JSON.parse(text);
} catch(e) {
if(typeof defaultJSON === "function") {
return defaultJSON(e);
} else {
return defaultJSON || {};
}
}
};
/*
Resolves a source filepath delimited with `/` relative to a specified absolute root filepath.
In relative paths, the special folder name `..` refers to immediate parent directory, and the
name `.` refers to the current directory
*/
$tw.utils.resolvePath = function(sourcepath,rootpath) {
// If the source path starts with ./ or ../ then it is relative to the root
if(sourcepath.substr(0,2) === "./" || sourcepath.substr(0,3) === "../" ) {
var src = sourcepath.split("/"),
root = rootpath.split("/");
// Remove the filename part of the root
root.splice(root.length-1,1);
// Process the source path bit by bit onto the end of the root path
while(src.length > 0) {
var c = src.shift();
if(c === "..") { // Slice off the last root entry for a double dot
if(root.length > 0) {
root.splice(root.length-1,1);
}
} else if(c !== ".") { // Ignore dots
root.push(c); // Copy other elements across
}
}
return root.join("/");
} else {
// If it isn't relative, just return the path
if(rootpath) {
var root = rootpath.split("/");
// Remove the filename part of the root
root.splice(root.length - 1, 1);
return root.join("/") + "/" + sourcepath;
} else {
return sourcepath;
}
}
};
/*
Parse a semantic version string into its constituent parts -- see https://semver.org
*/
$tw.utils.parseVersion = function(version) {
var match = /^v?((\d+)\.(\d+)\.(\d+))(?:-([\dA-Za-z\-]+(?:\.[\dA-Za-z\-]+)*))?(?:\+([\dA-Za-z\-]+(?:\.[\dA-Za-z\-]+)*))?$/.exec(version);
if(match) {
return {
version: match[1],
major: parseInt(match[2],10),
minor: parseInt(match[3],10),
patch: parseInt(match[4],10),
prerelease: match[5],
build: match[6]
};
} else {
return null;
}
};
/*
Returns +1 if the version string A is greater than the version string B, 0 if they are the same, and +1 if B is greater than A.
Missing or malformed version strings are parsed as 0.0.0
*/
$tw.utils.compareVersions = function(versionStringA,versionStringB) {
var defaultVersion = {
major: 0,
minor: 0,
patch: 0
},
versionA = $tw.utils.parseVersion(versionStringA) || defaultVersion,
versionB = $tw.utils.parseVersion(versionStringB) || defaultVersion,
diff = [
versionA.major - versionB.major,
versionA.minor - versionB.minor,
versionA.patch - versionB.patch
];
if((diff[0] > 0) || (diff[0] === 0 && diff[1] > 0) || (diff[0] === 0 & diff[1] === 0 & diff[2] > 0)) {
return +1;
} else if((diff[0] < 0) || (diff[0] === 0 && diff[1] < 0) || (diff[0] === 0 & diff[1] === 0 & diff[2] < 0)) {
return -1;
} else {
return 0;
}
};
/*
Returns true if the version string A is greater than the version string B. Returns true if the versions are the same
*/
$tw.utils.checkVersions = function(versionStringA,versionStringB) {
return $tw.utils.compareVersions(versionStringA,versionStringB) !== -1;
};
/*
Register file type information
options: {flags: flags,deserializerType: deserializerType}
flags:"image" for image types
deserializerType: defaults to type if not specified
*/
$tw.utils.registerFileType = function(type,encoding,extension,options) {
options = options || {};
if($tw.utils.isArray(extension)) {
$tw.utils.each(extension,function(extension) {
$tw.config.fileExtensionInfo[extension] = {type: type};
});
extension = extension[0];
} else {
$tw.config.fileExtensionInfo[extension] = {type: type};
}
$tw.config.contentTypeInfo[type] = {encoding: encoding, extension: extension, flags: options.flags || [], deserializerType: options.deserializerType || type};
};
/*
Given an extension, always access the $tw.config.fileExtensionInfo
using a lowercase extension only.
*/
$tw.utils.getFileExtensionInfo = function(ext) {
return ext ? $tw.config.fileExtensionInfo[ext.toLowerCase()] : null;
}
/*
Given an extension, get the correct encoding for that file.
defaults to utf8
*/
$tw.utils.getTypeEncoding = function(ext) {
var extensionInfo = $tw.utils.getFileExtensionInfo(ext),
type = extensionInfo ? extensionInfo.type : null,
typeInfo = type ? $tw.config.contentTypeInfo[type] : null;
return typeInfo ? typeInfo.encoding : "utf8";
};
/*
Run code globally with specified context variables in scope
*/
$tw.utils.evalGlobal = function(code,context,filename) {
var contextCopy = $tw.utils.extend(Object.create(null),context);
// Get the context variables as a pair of arrays of names and values
var contextNames = [], contextValues = [];
$tw.utils.each(contextCopy,function(value,name) {
contextNames.push(name);
contextValues.push(value);
});
// Add the code prologue and epilogue
code = "(function(" + contextNames.join(",") + ") {(function(){\n" + code + "\n;})();\nreturn exports;\n})\n";
// Compile the code into a function
var fn;
if($tw.browser) {
fn = window["eval"](code + "\n\n//# sourceURL=" + filename);
} else {
fn = vm.runInThisContext(code,filename);
}
// Call the function and return the exports
return fn.apply(null,contextValues);
};
/*
Run code in a sandbox with only the specified context variables in scope
*/
$tw.utils.evalSandboxed = $tw.browser ? $tw.utils.evalGlobal : function(code,context,filename) {
var sandbox = $tw.utils.extend(Object.create(null),context);
vm.runInNewContext(code,sandbox,filename);
return sandbox.exports;
};
/*
Creates a PasswordPrompt object
*/
$tw.utils.PasswordPrompt = function() {
// Store of pending password prompts
this.passwordPrompts = [];
// Create the wrapper
this.promptWrapper = $tw.utils.domMaker("div",{"class":"tc-password-wrapper"});
document.body.appendChild(this.promptWrapper);
// Hide the empty wrapper
this.setWrapperDisplay();
};
/*
Hides or shows the wrapper depending on whether there are any outstanding prompts
*/
$tw.utils.PasswordPrompt.prototype.setWrapperDisplay = function() {
if(this.passwordPrompts.length) {
this.promptWrapper.style.display = "block";
} else {
this.promptWrapper.style.display = "none";
}
};
/*
Adds a new password prompt. Options are:
submitText: text to use for submit button (defaults to "Login")
serviceName: text of the human readable service name
noUserName: set true to disable username prompt
canCancel: set true to enable a cancel button (callback called with null)
repeatPassword: set true to prompt for the password twice
callback: function to be called on submission with parameter of object {username:,password:}. Callback must return `true` to remove the password prompt
*/
$tw.utils.PasswordPrompt.prototype.createPrompt = function(options) {
// Create and add the prompt to the DOM
var self = this,
submitText = options.submitText || "Login",
dm = $tw.utils.domMaker,
children = [dm("h1",{text: options.serviceName})];
if(!options.noUserName) {
children.push(dm("input",{
attributes: {type: "text", name: "username", placeholder: $tw.language.getString("Encryption/Username")}
}));
}
children.push(dm("input",{
attributes: {
type: "password",
name: "password",
placeholder: ( $tw.language == undefined ? "Password" : $tw.language.getString("Encryption/Password") )
}
}));
if(options.repeatPassword) {
children.push(dm("input",{
attributes: {
type: "password",
name: "password2",
placeholder: $tw.language.getString("Encryption/RepeatPassword")
}
}));
}
if(options.canCancel) {
children.push(dm("button",{
text: $tw.language.getString("Encryption/Cancel"),
attributes: {
type: "button"
},
eventListeners: [{
name: "click",
handlerFunction: function(event) {
self.removePrompt(promptInfo);
options.callback(null);
}
}]
}));
}
children.push(dm("button",{
attributes: {type: "submit"},
text: submitText
}));
var form = dm("form",{
attributes: {autocomplete: "off"},
children: children
});
this.promptWrapper.appendChild(form);
window.setTimeout(function() {
form.elements[0].focus();
},10);
// Add a submit event handler
var self = this;
form.addEventListener("submit",function(event) {
// Collect the form data
var data = {},t;
$tw.utils.each(form.elements,function(element) {
if(element.name && element.value) {
data[element.name] = element.value;
}
});
// Check that the passwords match
if(options.repeatPassword && data.password !== data.password2) {
alert($tw.language.getString("Encryption/PasswordNoMatch"));
} else {
// Call the callback
if(options.callback(data)) {
// Remove the prompt if the callback returned true
self.removePrompt(promptInfo);
} else {
// Clear the password if the callback returned false
$tw.utils.each(form.elements,function(element) {
if(element.name === "password" || element.name === "password2") {
element.value = "";
}
});
}
}
event.preventDefault();
return false;
},true);
// Add the prompt to the list
var promptInfo = {
serviceName: options.serviceName,
callback: options.callback,
form: form,
owner: this
};
this.passwordPrompts.push(promptInfo);
// Make sure the wrapper is displayed
this.setWrapperDisplay();
return promptInfo;
};
$tw.utils.PasswordPrompt.prototype.removePrompt = function(promptInfo) {
var i = this.passwordPrompts.indexOf(promptInfo);
if(i !== -1) {
this.passwordPrompts.splice(i,1);
promptInfo.form.parentNode.removeChild(promptInfo.form);
this.setWrapperDisplay();
}
}
/*
Crypto helper object for encrypted content. It maintains the password text in a closure, and provides methods to change
the password, and to encrypt/decrypt a block of text
*/
$tw.utils.Crypto = function() {
var sjcl = $tw.node ? (global.sjcl || require("./sjcl.js")) : window.sjcl,
currentPassword = null,
callSjcl = function(method,inputText,password) {
password = password || currentPassword;
var outputText;
try {
if(password) {
outputText = sjcl[method](password,inputText);
}
} catch(ex) {
console.log("Crypto error:" + ex);
outputText = null;
}
return outputText;
};
this.setPassword = function(newPassword) {
currentPassword = newPassword;
this.updateCryptoStateTiddler();
};
this.updateCryptoStateTiddler = function() {
if($tw.wiki) {
var state = currentPassword ? "yes" : "no",
tiddler = $tw.wiki.getTiddler("$:/isEncrypted");
if(!tiddler || tiddler.fields.text !== state) {
$tw.wiki.addTiddler(new $tw.Tiddler({title: "$:/isEncrypted", text: state}));
}
}
};
this.hasPassword = function() {
return !!currentPassword;
}
this.encrypt = function(text,password) {
return callSjcl("encrypt",text,password);
};
this.decrypt = function(text,password) {
return callSjcl("decrypt",text,password);
};
};
/////////////////////////// Module mechanism
/*
Execute the module named 'moduleName'. The name can optionally be relative to the module named 'moduleRoot'
*/
$tw.modules.execute = function(moduleName,moduleRoot) {
var name = moduleName;
if(moduleName.charAt(0) === ".") {
name = $tw.utils.resolvePath(moduleName,moduleRoot)
}
if(!$tw.modules.titles[name]) {
if($tw.modules.titles[name + ".js"]) {
name = name + ".js";
} else if($tw.modules.titles[name + "/index.js"]) {
name = name + "/index.js";
} else if($tw.modules.titles[moduleName]) {
name = moduleName;
} else if($tw.modules.titles[moduleName + ".js"]) {
name = moduleName + ".js";
} else if($tw.modules.titles[moduleName + "/index.js"]) {
name = moduleName + "/index.js";
}
}
var moduleInfo = $tw.modules.titles[name],
tiddler = $tw.wiki.getTiddler(name),
_exports = {},
sandbox = {
module: {exports: _exports},
//moduleInfo: moduleInfo,
exports: _exports,
console: console,
setInterval: setInterval,
clearInterval: clearInterval,
setTimeout: setTimeout,
clearTimeout: clearTimeout,
Buffer: $tw.browser ? undefined : Buffer,
$tw: $tw,
require: function(title) {
return $tw.modules.execute(title, name);
}
};
Object.defineProperty(sandbox.module, "id", {
value: name,
writable: false,
enumerable: true,
configurable: false
});
if(!$tw.browser) {
$tw.utils.extend(sandbox,{
process: process
});
} else {
/*
CommonJS optional require.main property:
In a browser we offer a fake main module which points back to the boot function
(Theoretically, this may allow TW to eventually load itself as a module in the browser)
*/
Object.defineProperty(sandbox.require, "main", {
value: (typeof(require) !== "undefined") ? require.main : {TiddlyWiki: _boot},
writable: false,
enumerable: true,
configurable: false
});
}
if(!moduleInfo) {
// We could not find the module on this path
// Try to defer to browserify etc, or node
var deferredModule;
if($tw.browser) {
if(window.require) {
try {
return window.require(moduleName);
} catch(e) {}
}
throw "Cannot find module named '" + moduleName + "' required by module '" + moduleRoot + "', resolved to " + name;
} else {
// If we don't have a module with that name, let node.js try to find it
return require(moduleName);
}
}
// Execute the module if we haven't already done so
if(!moduleInfo.exports) {
try {
// Check the type of the definition
if(typeof moduleInfo.definition === "function") { // Function
moduleInfo.exports = _exports;
moduleInfo.definition(moduleInfo,moduleInfo.exports,sandbox.require);
} else if(typeof moduleInfo.definition === "string") { // String
moduleInfo.exports = _exports;
$tw.utils.evalSandboxed(moduleInfo.definition,sandbox,tiddler.fields.title);
if(sandbox.module.exports) {
moduleInfo.exports = sandbox.module.exports; //more codemirror workaround
}
} else { // Object
moduleInfo.exports = moduleInfo.definition;
}
} catch(e) {
if (e instanceof SyntaxError) {
var line = e.lineNumber || e.line; // Firefox || Safari
if (typeof(line) != "undefined" && line !== null) {
$tw.utils.error("Syntax error in boot module " + name + ":" + line + ":\n" + e.stack);
} else if(!$tw.browser) {
// this is the only way to get node.js to display the line at which the syntax error appeared,
// and $tw.utils.error would exit anyway
// cf. https://bugs.chromium.org/p/v8/issues/detail?id=2589
throw e;
} else {
// Opera: line number is included in e.message
// Chrome/IE: there's currently no way to get the line number
$tw.utils.error("Syntax error in boot module " + name + ": " + e.message + "\n" + e.stack);
}
} else {
// line number should be included in e.stack for runtime errors
$tw.utils.error("Error executing boot module " + name + ": " + JSON.stringify(e) + "\n\n" + e.stack);
}
}
}
// Return the exports of the module
return moduleInfo.exports;
};
/*
Apply a callback to each module of a particular type
moduleType: type of modules to enumerate
callback: function called as callback(title,moduleExports) for each module
*/
$tw.modules.forEachModuleOfType = function(moduleType,callback) {
var modules = $tw.modules.types[moduleType];
$tw.utils.each(modules,function(element,title) {
callback(title,$tw.modules.execute(title));
});
};
/*
Get all the modules of a particular type in a hashmap by their `name` field
*/
$tw.modules.getModulesByTypeAsHashmap = function(moduleType,nameField) {
nameField = nameField || "name";
var results = Object.create(null);
$tw.modules.forEachModuleOfType(moduleType,function(title,module) {
results[module[nameField]] = module;
});
return results;
};
/*
Apply the exports of the modules of a particular type to a target object
*/
$tw.modules.applyMethods = function(moduleType,targetObject) {
if(!targetObject) {
targetObject = Object.create(null);
}
$tw.modules.forEachModuleOfType(moduleType,function(title,module) {
$tw.utils.each(module,function(element,title,object) {
targetObject[title] = module[title];
});
});
return targetObject;
};
/*
Return a class created from a modules. The module should export the properties to be added to those of the optional base class
*/
$tw.modules.createClassFromModule = function(moduleExports,baseClass) {
var newClass = function() {};
if(baseClass) {
newClass.prototype = new baseClass();
newClass.prototype.constructor = baseClass;
}
$tw.utils.extend(newClass.prototype,moduleExports);
return newClass;
};
/*
Return an array of classes created from the modules of a specified type. Each module should export the properties to be added to those of the optional base class
*/
$tw.modules.createClassesFromModules = function(moduleType,subType,baseClass) {
var classes = Object.create(null);
$tw.modules.forEachModuleOfType(moduleType,function(title,moduleExports) {
if(!subType || moduleExports.types[subType]) {
classes[moduleExports.name] = $tw.modules.createClassFromModule(moduleExports,baseClass);
}
});
return classes;
};
/////////////////////////// Barebones tiddler object
/*
Construct a tiddler object from a hashmap of tiddler fields. If multiple hasmaps are provided they are merged,
taking precedence to the right
*/
$tw.Tiddler = function(/* [fields,] fields */) {
this.fields = Object.create(null);
this.cache = Object.create(null);
for(var c=0; c<arguments.length; c++) {
var arg = arguments[c],
src = (arg instanceof $tw.Tiddler) ? arg.fields : arg;
for(var t in src) {
if(src[t] === undefined || src[t] === null) {
if(t in this.fields) {
delete this.fields[t]; // If we get a field that's undefined, delete any previous field value
}
} else {
// Parse the field with the associated field module (if any)
var fieldModule = $tw.Tiddler.fieldModules[t],
value;
if(fieldModule && fieldModule.parse) {
value = fieldModule.parse.call(this,src[t]);
} else {
value = src[t];
}
// Freeze the field to keep it immutable
if(value != null && typeof value === "object") {
Object.freeze(value);
}
this.fields[t] = value;
}
}
}
// Freeze the tiddler against modification
Object.freeze(this.fields);
Object.freeze(this);
};
$tw.Tiddler.prototype.hasField = function(field) {
return $tw.utils.hop(this.fields,field);
};
/*
Compare two tiddlers for equality
tiddler: the tiddler to compare
excludeFields: array of field names to exclude from the comparison
*/
$tw.Tiddler.prototype.isEqual = function(tiddler,excludeFields) {
if(!(tiddler instanceof $tw.Tiddler)) {
return false;
}
excludeFields = excludeFields || [];
var self = this,
differences = []; // Fields that have differences
// Add to the differences array
function addDifference(fieldName) {
// Check for this field being excluded
if(excludeFields.indexOf(fieldName) === -1) {
// Save the field as a difference
$tw.utils.pushTop(differences,fieldName);
}
}
// Returns true if the two values of this field are equal
function isFieldValueEqual(fieldName) {
var valueA = self.fields[fieldName],
valueB = tiddler.fields[fieldName];
// Check for identical string values
if(typeof(valueA) === "string" && typeof(valueB) === "string" && valueA === valueB) {
return true;
}
// Check for identical array values
if($tw.utils.isArray(valueA) && $tw.utils.isArray(valueB) && $tw.utils.isArrayEqual(valueA,valueB)) {
return true;
}
// Check for identical date values
if($tw.utils.isDate(valueA) && $tw.utils.isDate(valueB) && valueA.getTime() === valueB.getTime()) {
return true;
}
// Otherwise the fields must be different
return false;
}
// Compare our fields
for(var fieldName in this.fields) {
if(!isFieldValueEqual(fieldName)) {
addDifference(fieldName);
}
}
// There's a difference for every field in the other tiddler that we don't have
for(fieldName in tiddler.fields) {
if(!(fieldName in this.fields)) {
addDifference(fieldName);
}
}
// Return whether there were any differences
return differences.length === 0;
};
/*
Register and install the built in tiddler field modules
*/
$tw.modules.define("$:/boot/tiddlerfields/modified","tiddlerfield",{
name: "modified",
parse: $tw.utils.parseDate,
stringify: $tw.utils.stringifyDate
});
$tw.modules.define("$:/boot/tiddlerfields/created","tiddlerfield",{
name: "created",
parse: $tw.utils.parseDate,
stringify: $tw.utils.stringifyDate
});
$tw.modules.define("$:/boot/tiddlerfields/color","tiddlerfield",{
name: "color",
editTag: "input",
editType: "color"
});
$tw.modules.define("$:/boot/tiddlerfields/tags","tiddlerfield",{
name: "tags",
parse: $tw.utils.parseStringArray,
stringify: $tw.utils.stringifyList
});
$tw.modules.define("$:/boot/tiddlerfields/list","tiddlerfield",{
name: "list",
parse: $tw.utils.parseStringArray,
stringify: $tw.utils.stringifyList
});
/////////////////////////// Barebones wiki store
/*
Wiki constructor. State is stored in private members that only a small number of privileged accessor methods have direct access. Methods added via the prototype have to use these accessors and cannot access the state data directly.
options include:
enableIndexers - Array of indexer names to enable, or null to use all available indexers
*/
$tw.Wiki = function(options) {
options = options || {};
var self = this,
tiddlers = Object.create(null), // Hashmap of tiddlers
tiddlerTitles = null, // Array of tiddler titles
getTiddlerTitles = function() {
if(!tiddlerTitles) {
tiddlerTitles = Object.keys(tiddlers).sort(function(a,b) {return a.localeCompare(b);});
}
return tiddlerTitles;
},
pluginTiddlers = [], // Array of tiddlers containing registered plugins, ordered by priority
pluginInfo = Object.create(null), // Hashmap of parsed plugin content
shadowTiddlers = Object.create(null), // Hashmap by title of {source:, tiddler:}
shadowTiddlerTitles = null,
getShadowTiddlerTitles = function() {
if(!shadowTiddlerTitles) {
shadowTiddlerTitles = Object.keys(shadowTiddlers);
}
return shadowTiddlerTitles;
},
enableIndexers = options.enableIndexers || null,
indexers = [],
indexersByName = Object.create(null);
this.addIndexer = function(indexer,name) {
// Bail if this indexer is not enabled
if(enableIndexers && enableIndexers.indexOf(name) === -1) {
return;
}
indexers.push(indexer);
indexersByName[name] = indexer;
indexer.init();
};
this.getIndexer = function(name) {
return indexersByName[name] || null;
};
// Add a tiddler to the store
this.addTiddler = function(tiddler) {
if(!(tiddler instanceof $tw.Tiddler)) {
tiddler = new $tw.Tiddler(tiddler);
}
// Save the tiddler
if(tiddler) {
var title = tiddler.fields.title;
if(title) {
// Uncomment the following line for detailed logs of all tiddler writes
// console.log("Adding",title,tiddler)
// Record the old tiddler state
var updateDescriptor = {
old: {
tiddler: this.getTiddler(title),
shadow: this.isShadowTiddler(title),
exists: this.tiddlerExists(title)
}
}
// Save the new tiddler
tiddlers[title] = tiddler;
// Check we've got the title
tiddlerTitles = $tw.utils.insertSortedArray(tiddlerTitles || [],title);
// Record the new tiddler state
updateDescriptor["new"] = {
tiddler: tiddler,
shadow: this.isShadowTiddler(title),
exists: this.tiddlerExists(title)
}
// Update indexes
this.clearCache(title);
this.clearGlobalCache();
$tw.utils.each(indexers,function(indexer) {
indexer.update(updateDescriptor);
});
// Queue a change event
this.enqueueTiddlerEvent(title);
}
}
};
// Delete a tiddler
this.deleteTiddler = function(title) {
// Uncomment the following line for detailed logs of all tiddler deletions
// console.log("Deleting",title)
if($tw.utils.hop(tiddlers,title)) {
// Record the old tiddler state
var updateDescriptor = {
old: {
tiddler: this.getTiddler(title),
shadow: this.isShadowTiddler(title),
exists: this.tiddlerExists(title)
}
}
// Delete the tiddler
delete tiddlers[title];
// Delete it from the list of titles
if(tiddlerTitles) {
var index = tiddlerTitles.indexOf(title);
if(index !== -1) {
tiddlerTitles.splice(index,1);
}
}
// Record the new tiddler state
updateDescriptor["new"] = {
tiddler: this.getTiddler(title),
shadow: this.isShadowTiddler(title),
exists: this.tiddlerExists(title)
}
// Update indexes
this.clearCache(title);
this.clearGlobalCache();
$tw.utils.each(indexers,function(indexer) {
indexer.update(updateDescriptor);
});
// Queue a change event
this.enqueueTiddlerEvent(title,true);
}
};
// Get a tiddler from the store
this.getTiddler = function(title) {
if(title) {
var t = tiddlers[title];
if(t !== undefined) {
return t;
} else {
var s = shadowTiddlers[title];
if(s !== undefined) {
return s.tiddler;
}
}
}
return undefined;
};
// Get an array of all tiddler titles
this.allTitles = function() {
return getTiddlerTitles().slice(0);
};
// Iterate through all tiddler titles
this.each = function(callback) {
var titles = getTiddlerTitles(),
index,titlesLength,title;
for(index = 0, titlesLength = titles.length; index < titlesLength; index++) {
title = titles[index];
callback(tiddlers[title],title);
}
};
// Get an array of all shadow tiddler titles
this.allShadowTitles = function() {
return getShadowTiddlerTitles().slice(0);
};
// Iterate through all shadow tiddler titles
this.eachShadow = function(callback) {
var titles = getShadowTiddlerTitles(),
index,titlesLength,title;
for(index = 0, titlesLength = titles.length; index < titlesLength; index++) {
title = titles[index];
if(tiddlers[title]) {
callback(tiddlers[title],title);
} else {
var shadowInfo = shadowTiddlers[title];
callback(shadowInfo.tiddler,title);
}
}
};
// Iterate through all tiddlers and then the shadows
this.eachTiddlerPlusShadows = function(callback) {
var index,titlesLength,title,
titles = getTiddlerTitles();
for(index = 0, titlesLength = titles.length; index < titlesLength; index++) {
title = titles[index];
callback(tiddlers[title],title);
}
titles = getShadowTiddlerTitles();
for(index = 0, titlesLength = titles.length; index < titlesLength; index++) {
title = titles[index];
if(!tiddlers[title]) {
var shadowInfo = shadowTiddlers[title];
callback(shadowInfo.tiddler,title);
}
}
};
// Iterate through all the shadows and then the tiddlers
this.eachShadowPlusTiddlers = function(callback) {
var index,titlesLength,title,
titles = getShadowTiddlerTitles();
for(index = 0, titlesLength = titles.length; index < titlesLength; index++) {
title = titles[index];
if(tiddlers[title]) {
callback(tiddlers[title],title);
} else {
var shadowInfo = shadowTiddlers[title];
callback(shadowInfo.tiddler,title);
}
}
titles = getTiddlerTitles();
for(index = 0, titlesLength = titles.length; index < titlesLength; index++) {
title = titles[index];
if(!shadowTiddlers[title]) {
callback(tiddlers[title],title);
}
}
};
// Test for the existence of a tiddler (excludes shadow tiddlers)
this.tiddlerExists = function(title) {
return !!$tw.utils.hop(tiddlers,title);
};
// Determines if a tiddler is a shadow tiddler, regardless of whether it has been overridden by a real tiddler
this.isShadowTiddler = function(title) {
return $tw.utils.hop(shadowTiddlers,title);
};
this.getShadowSource = function(title) {
if($tw.utils.hop(shadowTiddlers,title)) {
return shadowTiddlers[title].source;
}
return null;
};
// Get an array of all the currently recognised plugin types
this.getPluginTypes = function() {
var types = [];
$tw.utils.each(pluginTiddlers,function(pluginTiddler) {
var pluginType = pluginTiddler.fields["plugin-type"];
if(pluginType && types.indexOf(pluginType) === -1) {
types.push(pluginType);
}
});
return types;
};
// Read plugin info for all plugins, or just an array of titles. Returns the number of plugins updated or deleted
this.readPluginInfo = function(titles) {
var results = {
modifiedPlugins: [],
deletedPlugins: []
};
$tw.utils.each(titles || getTiddlerTitles(),function(title) {
var tiddler = tiddlers[title];
if(tiddler) {
if(tiddler.fields.type === "application/json" && tiddler.hasField("plugin-type") && tiddler.fields.text) {
pluginInfo[tiddler.fields.title] = $tw.utils.parseJSONSafe(tiddler.fields.text);
results.modifiedPlugins.push(tiddler.fields.title);
}
} else {
if(pluginInfo[title]) {
delete pluginInfo[title];
results.deletedPlugins.push(title);
}
}
});
return results;
};
// Get plugin info for a plugin
this.getPluginInfo = function(title) {
return pluginInfo[title];
};
// Register the plugin tiddlers of a particular type, or null/undefined for any type, optionally restricting registration to an array of tiddler titles. Return the array of titles affected
this.registerPluginTiddlers = function(pluginType,titles) {
var self = this,
registeredTitles = [],
checkTiddler = function(tiddler,title) {
if(tiddler && tiddler.fields.type === "application/json" && tiddler.fields["plugin-type"] && (!pluginType || tiddler.fields["plugin-type"] === pluginType)) {
var disablingTiddler = self.getTiddler("$:/config/Plugins/Disabled/" + title);
if(title === "$:/core" || !disablingTiddler || (disablingTiddler.fields.text || "").trim() !== "yes") {
self.unregisterPluginTiddlers(null,[title]); // Unregister the plugin if it's already registered
pluginTiddlers.push(tiddler);
registeredTitles.push(tiddler.fields.title);
}
}
};
if(titles) {
$tw.utils.each(titles,function(title) {
checkTiddler(self.getTiddler(title),title);
});
} else {
this.each(function(tiddler,title) {
checkTiddler(tiddler,title);
});
}
return registeredTitles;
};
// Unregister the plugin tiddlers of a particular type, or null/undefined for any type, optionally restricting unregistering to an array of tiddler titles. Returns an array of the titles affected
this.unregisterPluginTiddlers = function(pluginType,titles) {
var self = this,
unregisteredTitles = [];
// Remove any previous registered plugins of this type
for(var t=pluginTiddlers.length-1; t>=0; t--) {
var tiddler = pluginTiddlers[t];
if(tiddler.fields["plugin-type"] && (!pluginType || tiddler.fields["plugin-type"] === pluginType) && (!titles || titles.indexOf(tiddler.fields.title) !== -1)) {
unregisteredTitles.push(tiddler.fields.title);
pluginTiddlers.splice(t,1);
}
}
return unregisteredTitles;
};
// Unpack the currently registered plugins, creating shadow tiddlers for their constituent tiddlers
this.unpackPluginTiddlers = function() {
var self = this;
// Sort the plugin titles by the `plugin-priority` field
pluginTiddlers.sort(function(a,b) {
if("plugin-priority" in a.fields && "plugin-priority" in b.fields) {
return a.fields["plugin-priority"] - b.fields["plugin-priority"];
} else if("plugin-priority" in a.fields) {
return -1;
} else if("plugin-priority" in b.fields) {
return +1;
} else if(a.fields.title < b.fields.title) {
return -1;
} else if(a.fields.title === b.fields.title) {
return 0;
} else {
return +1;
}
});
// Now go through the plugins in ascending order and assign the shadows
shadowTiddlers = Object.create(null);
$tw.utils.each(pluginTiddlers,function(tiddler) {
// Extract the constituent tiddlers
if($tw.utils.hop(pluginInfo,tiddler.fields.title)) {
$tw.utils.each(pluginInfo[tiddler.fields.title].tiddlers,function(constituentTiddler,constituentTitle) {
// Save the tiddler object
if(constituentTitle) {
shadowTiddlers[constituentTitle] = {
source: tiddler.fields.title,
tiddler: new $tw.Tiddler(constituentTiddler,{title: constituentTitle})
};
}
});
}
});
shadowTiddlerTitles = null;
this.clearCache(null);
this.clearGlobalCache();
$tw.utils.each(indexers,function(indexer) {
indexer.rebuild();
});
};
if(this.addIndexersToWiki) {
this.addIndexersToWiki();
}
};
// Dummy methods that will be filled in after boot
$tw.Wiki.prototype.clearCache =
$tw.Wiki.prototype.clearGlobalCache =
$tw.Wiki.prototype.enqueueTiddlerEvent = function() {};
// Add an array of tiddlers
$tw.Wiki.prototype.addTiddlers = function(tiddlers) {
for(var t=0; t<tiddlers.length; t++) {
this.addTiddler(tiddlers[t]);
}
};
/*
Define all modules stored in ordinary tiddlers
*/
$tw.Wiki.prototype.defineTiddlerModules = function() {
this.each(function(tiddler,title) {
if(tiddler.hasField("module-type")) {
switch (tiddler.fields.type) {
case "application/javascript":
// We only define modules that haven't already been defined, because in the browser modules in system tiddlers are defined in inline script
if(!$tw.utils.hop($tw.modules.titles,tiddler.fields.title)) {
$tw.modules.define(tiddler.fields.title,tiddler.fields["module-type"],tiddler.fields.text);
}
break;
case "application/json":
$tw.modules.define(tiddler.fields.title,tiddler.fields["module-type"],$tw.utils.parseJSONSafe(tiddler.fields.text));
break;
case "application/x-tiddler-dictionary":
$tw.modules.define(tiddler.fields.title,tiddler.fields["module-type"],$tw.utils.parseFields(tiddler.fields.text));
break;
}
}
});
};
/*
Register all the module tiddlers that have a module type
*/
$tw.Wiki.prototype.defineShadowModules = function() {
var self = this;
this.eachShadow(function(tiddler,title) {
// Don't define the module if it is overidden by an ordinary tiddler
if(!self.tiddlerExists(title) && tiddler.hasField("module-type")) {
// Define the module
$tw.modules.define(tiddler.fields.title,tiddler.fields["module-type"],tiddler.fields.text);
}
});
};
/*
Enable safe mode by deleting any tiddlers that override a shadow tiddler
*/
$tw.Wiki.prototype.processSafeMode = function() {
var self = this,
overrides = [];
// Find the overriding tiddlers
this.each(function(tiddler,title) {
if(self.isShadowTiddler(title)) {
console.log(title);
overrides.push(title);
}
});
// Assemble a report tiddler
var titleReportTiddler = "TiddlyWiki Safe Mode",
report = [];
report.push("TiddlyWiki has been started in [[safe mode|https://tiddlywiki.com/static/SafeMode.html]]. All plugins are temporarily disabled. Most customisations have been disabled by renaming the following tiddlers:")
// Delete the overrides
overrides.forEach(function(title) {
var tiddler = self.getTiddler(title),
newTitle = "SAFE: " + title;
self.deleteTiddler(title);
self.addTiddler(new $tw.Tiddler(tiddler, {title: newTitle}));
report.push("* [[" + title + "|" + newTitle + "]]");
});
report.push()
this.addTiddler(new $tw.Tiddler({title: titleReportTiddler, text: report.join("\n\n")}));
// Set $:/DefaultTiddlers to point to our report
this.addTiddler(new $tw.Tiddler({title: "$:/DefaultTiddlers", text: "[[" + titleReportTiddler + "]]"}));
};
/*
Extracts tiddlers from a typed block of text, specifying default field values
*/
$tw.Wiki.prototype.deserializeTiddlers = function(type,text,srcFields,options) {
srcFields = srcFields || Object.create(null);
options = options || {};
var deserializer = $tw.Wiki.tiddlerDeserializerModules[options.deserializer],
fields = Object.create(null);
if(!deserializer) {
deserializer = $tw.Wiki.tiddlerDeserializerModules[type];
}
if(!deserializer && $tw.utils.getFileExtensionInfo(type)) {
// If we didn't find the serializer, try converting it from an extension to a content type
type = $tw.utils.getFileExtensionInfo(type).type;
deserializer = $tw.Wiki.tiddlerDeserializerModules[type];
}
if(!deserializer && $tw.config.contentTypeInfo[type]) {
// see if this type has a different deserializer registered with it
type = $tw.config.contentTypeInfo[type].deserializerType;
deserializer = $tw.Wiki.tiddlerDeserializerModules[type];
}
if(!deserializer) {
// If we still don't have a deserializer, treat it as plain text
deserializer = $tw.Wiki.tiddlerDeserializerModules["text/plain"];
}
for(var f in srcFields) {
fields[f] = srcFields[f];
}
if(deserializer) {
return deserializer.call(this,text,fields,type);
} else {
// Return a raw tiddler for unknown types
fields.text = text;
return [fields];
}
};
/*
Register the built in tiddler deserializer modules
*/
var deserializeHeaderComment = function(text,fields) {
var headerCommentRegExp = new RegExp($tw.config.jsModuleHeaderRegExpString,"mg"),
match = headerCommentRegExp.exec(text);
fields.text = text;
if(match) {
fields = $tw.utils.parseFields(match[1].split(/\r?\n\r?\n/mg)[0],fields);
}
return [fields];
};
$tw.modules.define("$:/boot/tiddlerdeserializer/js","tiddlerdeserializer",{
"application/javascript": deserializeHeaderComment
});
$tw.modules.define("$:/boot/tiddlerdeserializer/css","tiddlerdeserializer",{
"text/css": deserializeHeaderComment
});
$tw.modules.define("$:/boot/tiddlerdeserializer/tid","tiddlerdeserializer",{
"application/x-tiddler": function(text,fields) {
var split = text.split(/\r?\n\r?\n/mg);
if(split.length >= 1) {
fields = $tw.utils.parseFields(split[0],fields);
}
if(split.length >= 2) {
fields.text = split.slice(1).join("\n\n");
}
return [fields];
}
});
$tw.modules.define("$:/boot/tiddlerdeserializer/tids","tiddlerdeserializer",{
"application/x-tiddlers": function(text,fields) {
var titles = [],
tiddlers = [],
match = /\r?\n\r?\n/mg.exec(text);
if(match) {
fields = $tw.utils.parseFields(text.substr(0,match.index),fields);
var lines = text.substr(match.index + match[0].length).split(/\r?\n/mg);
for(var t=0; t<lines.length; t++) {
var line = lines[t];
if(line.charAt(0) !== "#") {
var colonPos= line.indexOf(":");
if(colonPos !== -1) {
var tiddler = $tw.utils.extend(Object.create(null),fields);
tiddler.title = (tiddler.title || "") + line.substr(0,colonPos).trim();
if(titles.indexOf(tiddler.title) !== -1) {
console.log("Warning: .multids file contains multiple definitions for " + tiddler.title);
}
titles.push(tiddler.title);
tiddler.text = line.substr(colonPos + 2).trim();
tiddlers.push(tiddler);
}
}
}
}
return tiddlers;
}
});
$tw.modules.define("$:/boot/tiddlerdeserializer/txt","tiddlerdeserializer",{
"text/plain": function(text,fields,type) {
fields.text = text;
fields.type = type || "text/plain";
return [fields];
}
});
$tw.modules.define("$:/boot/tiddlerdeserializer/html","tiddlerdeserializer",{
"text/html": function(text,fields) {
fields.text = text;
fields.type = "text/html";
return [fields];
}
});
$tw.modules.define("$:/boot/tiddlerdeserializer/json","tiddlerdeserializer",{
"application/json": function(text,fields) {
var isTiddlerValid = function(data) {
// Not valid if it's not an object with a title property
if(typeof(data) !== "object" || !$tw.utils.hop(data,"title")) {
return false;
}
for(var f in data) {
if($tw.utils.hop(data,f)) {
// Check field name doesn't contain control characters
if(typeof(data[f]) !== "string" || /[\x00-\x1F]/.test(f)) {
return false;
}
}
}
return true;
},
isTiddlerArrayValid = function(data) {
for(var t=0; t<data.length; t++) {
if(!isTiddlerValid(data[t])) {
return false;
}
}
return true;
},
data = $tw.utils.parseJSONSafe(text);
if($tw.utils.isArray(data) && isTiddlerArrayValid(data)) {
return data;
} else if(isTiddlerValid(data)) {
return [data];
} else {
// Plain JSON file
fields.text = text;
fields.type = "application/json";
return [fields];
}
}
});
/////////////////////////// Browser definitions
if($tw.browser && !$tw.node) {
/*
Decrypt any tiddlers stored within the element with the ID "encryptedArea". The function is asynchronous to allow the user to be prompted for a password
callback: function to be called the decryption is complete
*/
$tw.boot.decryptEncryptedTiddlers = function(callback) {
var encryptedArea = document.getElementById("encryptedStoreArea");
if(encryptedArea) {
var encryptedText = encryptedArea.innerHTML,
prompt = "Enter a password to decrypt this TiddlyWiki";
// Prompt for the password
if($tw.utils.hop($tw.boot,"encryptionPrompts")) {
prompt = $tw.boot.encryptionPrompts.decrypt;
}
$tw.passwordPrompt.createPrompt({
serviceName: prompt,
noUserName: true,
submitText: "Decrypt",
callback: function(data) {
// Attempt to decrypt the tiddlers
$tw.crypto.setPassword(data.password);
var decryptedText = $tw.crypto.decrypt(encryptedText);
if(decryptedText) {
var json = $tw.utils.parseJSONSafe(decryptedText);
for(var title in json) {
$tw.preloadTiddler(json[title]);
}
// Call the callback
callback();
// Exit and remove the password prompt
return true;
} else {
// We didn't decrypt everything, so continue to prompt for password
return false;
}
}
});
} else {
// Just invoke the callback straight away if there weren't any encrypted tiddlers
callback();
}
};
/*
Register a deserializer that can extract tiddlers from the DOM
*/
$tw.modules.define("$:/boot/tiddlerdeserializer/dom","tiddlerdeserializer",{
"(DOM)": function(node) {
var extractTextTiddlers = function(node) {
var e = node.firstChild;
while(e && e.nodeName.toLowerCase() !== "pre") {
e = e.nextSibling;
}
var title = node.getAttribute ? node.getAttribute("title") : null;
if(e && title) {
var attrs = node.attributes,
tiddler = {
text: $tw.utils.htmlDecode(e.innerHTML)
};
for(var i=attrs.length-1; i >= 0; i--) {
tiddler[attrs[i].name] = attrs[i].value;
}
return [tiddler];
} else {
return null;
}
},
extractModuleTiddlers = function(node) {
if(node.hasAttribute && node.hasAttribute("data-tiddler-title")) {
var text = node.innerHTML,
s = text.indexOf("{"),
e = text.lastIndexOf("}");
if(node.hasAttribute("data-module") && s !== -1 && e !== -1) {
text = text.substring(s+1,e);
}
var fields = {text: text},
attributes = node.attributes;
for(var a=0; a<attributes.length; a++) {
if(attributes[a].nodeName.substr(0,13) === "data-tiddler-") {
fields[attributes[a].nodeName.substr(13)] = attributes[a].value;
}
}
return [fields];
} else {
return null;
}
},
t,result = [];
if(node) {
var type = (node.getAttribute && node.getAttribute("type")) || null;
if(type) {
// A new-style container with an explicit deserialization type
result = $tw.wiki.deserializeTiddlers(type,node.textContent);
} else {
// An old-style container of classic DIV-based tiddlers
for(t = 0; t < node.childNodes.length; t++) {
var childNode = node.childNodes[t],
tiddlers = extractTextTiddlers(childNode);
tiddlers = tiddlers || extractModuleTiddlers(childNode);
if(tiddlers) {
result.push.apply(result,tiddlers);
}
}
}
}
return result;
}
});
$tw.loadTiddlersBrowser = function() {
// In the browser, we load tiddlers from certain elements
var containerSelectors = [
// IDs for old-style v5.1.x tiddler stores
"#libraryModules",
"#modules",
"#bootKernelPrefix",
"#bootKernel",
"#styleArea",
"#storeArea",
"#systemArea",
// Classes for new-style v5.2.x JSON tiddler stores
"script.tiddlywiki-tiddler-store"
];
for(var t=0; t<containerSelectors.length; t++) {
var nodes = document.querySelectorAll(containerSelectors[t]);
for(var n=0; n<nodes.length; n++) {
$tw.wiki.addTiddlers($tw.wiki.deserializeTiddlers("(DOM)",nodes[n]));
}
}
};
} else {
/////////////////////////// Server definitions
/*
Get any encrypted tiddlers
*/
$tw.boot.decryptEncryptedTiddlers = function(callback) {
// Storing encrypted tiddlers on the server isn't supported yet
callback();
};
} // End of if($tw.browser && !$tw.node)
/////////////////////////// Node definitions
if($tw.node) {
/*
Load the tiddlers contained in a particular file (and optionally extract fields from the accompanying .meta file) returned as {filepath:,type:,tiddlers:[],hasMetaFile:}
*/
$tw.loadTiddlersFromFile = function(filepath,fields) {
var ext = path.extname(filepath),
extensionInfo = $tw.utils.getFileExtensionInfo(ext),
type = extensionInfo ? extensionInfo.type : null,
typeInfo = type ? $tw.config.contentTypeInfo[type] : null,
data = fs.readFileSync(filepath,typeInfo ? typeInfo.encoding : "utf8"),
tiddlers = $tw.wiki.deserializeTiddlers(ext,data,fields),
metadata = $tw.loadMetadataForFile(filepath);
if(metadata) {
if(type === "application/json") {
tiddlers = [{text: data, type: "application/json"}];
}
tiddlers = [$tw.utils.extend({},tiddlers[0],metadata)];
}
return {filepath: filepath, type: type, tiddlers: tiddlers, hasMetaFile: !!metadata};
};
/*
Load the metadata fields in the .meta file corresponding to a particular file
*/
$tw.loadMetadataForFile = function(filepath) {
var metafilename = filepath + ".meta";
if(fs.existsSync(metafilename)) {
return $tw.utils.parseFields(fs.readFileSync(metafilename,"utf8") || "");
} else {
return null;
}
};
/*
A default set of files for TiddlyWiki to ignore during load.
This matches what NPM ignores, and adds "*.meta" to ignore tiddler
metadata files.
*/
$tw.boot.excludeRegExp = /^\.DS_Store$|^.*\.meta$|^\..*\.swp$|^\._.*$|^\.git$|^\.github$|^\.vscode$|^\.hg$|^\.lock-wscript$|^\.svn$|^\.wafpickle-.*$|^CVS$|^npm-debug\.log$/;
/*
Load all the tiddlers recursively from a directory, including honouring `tiddlywiki.files` files for drawing in external files. Returns an array of {filepath:,type:,tiddlers: [{..fields...}],hasMetaFile:}. Note that no file information is returned for externally loaded tiddlers, just the `tiddlers` property.
*/
$tw.loadTiddlersFromPath = function(filepath,excludeRegExp) {
excludeRegExp = excludeRegExp || $tw.boot.excludeRegExp;
var tiddlers = [];
if(fs.existsSync(filepath)) {
var stat = fs.statSync(filepath);
if(stat.isDirectory()) {
var files = fs.readdirSync(filepath);
// Look for a tiddlywiki.files file
if(files.indexOf("tiddlywiki.files") !== -1) {
Array.prototype.push.apply(tiddlers,$tw.loadTiddlersFromSpecification(filepath,excludeRegExp));
} else {
// If not, read all the files in the directory
$tw.utils.each(files,function(file) {
if(!excludeRegExp.test(file) && file !== "plugin.info") {
tiddlers.push.apply(tiddlers,$tw.loadTiddlersFromPath(filepath + path.sep + file,excludeRegExp));
}
});
}
} else if(stat.isFile()) {
tiddlers.push($tw.loadTiddlersFromFile(filepath,{title: filepath}));
}
}
return tiddlers;
};
/*
Load all the tiddlers defined by a `tiddlywiki.files` specification file
filepath: pathname of the directory containing the specification file
*/
$tw.loadTiddlersFromSpecification = function(filepath,excludeRegExp) {
var tiddlers = [];
// Read the specification
var filesInfo = $tw.utils.parseJSONSafe(fs.readFileSync(filepath + path.sep + "tiddlywiki.files","utf8"));
// Helper to process a file
var processFile = function(filename,isTiddlerFile,fields,isEditableFile) {
var extInfo = $tw.config.fileExtensionInfo[path.extname(filename)],
type = (extInfo || {}).type || fields.type || "text/plain",
typeInfo = $tw.config.contentTypeInfo[type] || {},
pathname = path.resolve(filepath,filename),
text = fs.readFileSync(pathname,typeInfo.encoding || "utf8"),
metadata = $tw.loadMetadataForFile(pathname) || {},
fileTiddlers;
if(isTiddlerFile) {
fileTiddlers = $tw.wiki.deserializeTiddlers(path.extname(pathname),text,metadata) || [];
} else {
fileTiddlers = [$tw.utils.extend({text: text},metadata)];
}
var combinedFields = $tw.utils.extend({},fields,metadata);
$tw.utils.each(fileTiddlers,function(tiddler) {
$tw.utils.each(combinedFields,function(fieldInfo,name) {
if(typeof fieldInfo === "string" || $tw.utils.isArray(fieldInfo)) {
tiddler[name] = fieldInfo;
} else {
var value = tiddler[name];
switch(fieldInfo.source) {
case "filename":
value = path.basename(filename);
break;
case "filename-uri-decoded":
value = $tw.utils.decodeURIComponentSafe(path.basename(filename));
break;
case "basename":
value = path.basename(filename,path.extname(filename));
break;
case "basename-uri-decoded":
value = $tw.utils.decodeURIComponentSafe(path.basename(filename,path.extname(filename)));
break;
case "extname":
value = path.extname(filename);
break;
case "created":
value = new Date(fs.statSync(pathname).birthtime);
break;
case "modified":
value = new Date(fs.statSync(pathname).mtime);
break;
}
if(fieldInfo.prefix) {
value = fieldInfo.prefix + value;
}
if(fieldInfo.suffix) {
value = value + fieldInfo.suffix;
}
tiddler[name] = value;
}
});
});
if(isEditableFile) {
tiddlers.push({filepath: pathname, hasMetaFile: !!metadata && !isTiddlerFile, isEditableFile: true, tiddlers: fileTiddlers});
} else {
tiddlers.push({tiddlers: fileTiddlers});
}
};
// Helper to recursively search subdirectories
var getAllFiles = function(dirPath, recurse, arrayOfFiles) {
recurse = recurse || false;
arrayOfFiles = arrayOfFiles || [];
var files = fs.readdirSync(dirPath);
files.forEach(function(file) {
if (recurse && fs.statSync(dirPath + path.sep + file).isDirectory()) {
arrayOfFiles = getAllFiles(dirPath + path.sep + file, recurse, arrayOfFiles);
} else if(fs.statSync(dirPath + path.sep + file).isFile()){
arrayOfFiles.push(path.join(dirPath, path.sep, file));
}
});
return arrayOfFiles;
}
// Process the listed tiddlers
$tw.utils.each(filesInfo.tiddlers,function(tidInfo) {
if(tidInfo.prefix && tidInfo.suffix) {
tidInfo.fields.text = {prefix: tidInfo.prefix,suffix: tidInfo.suffix};
} else if(tidInfo.prefix) {
tidInfo.fields.text = {prefix: tidInfo.prefix};
} else if(tidInfo.suffix) {
tidInfo.fields.text = {suffix: tidInfo.suffix};
}
processFile(tidInfo.file,tidInfo.isTiddlerFile,tidInfo.fields);
});
// Process any listed directories
$tw.utils.each(filesInfo.directories,function(dirSpec) {
// Read literal directories directly
if(typeof dirSpec === "string") {
var pathname = path.resolve(filepath,dirSpec);
if(fs.existsSync(pathname) && fs.statSync(pathname).isDirectory()) {
tiddlers.push.apply(tiddlers,$tw.loadTiddlersFromPath(pathname,excludeRegExp));
}
} else {
// Process directory specifier
var dirPath = path.resolve(filepath,dirSpec.path);
if(fs.existsSync(dirPath) && fs.statSync(dirPath).isDirectory()) {
var files = getAllFiles(dirPath, dirSpec.searchSubdirectories),
fileRegExp = new RegExp(dirSpec.filesRegExp || "^.*$"),
metaRegExp = /^.*\.meta$/;
for(var t=0; t<files.length; t++) {
var thisPath = path.relative(filepath, files[t]),
filename = path.basename(thisPath);
if(filename !== "tiddlywiki.files" && !metaRegExp.test(filename) && fileRegExp.test(filename)) {
processFile(thisPath,dirSpec.isTiddlerFile,dirSpec.fields,dirSpec.isEditableFile);
}
}
} else {
console.log("Warning: a directory in a tiddlywiki.files file does not exist.");
console.log("dirPath: " + dirPath);
console.log("tiddlywiki.files location: " + filepath);
}
}
});
return tiddlers;
};
/*
Load the tiddlers from a plugin folder, and package them up into a proper JSON plugin tiddler
*/
$tw.loadPluginFolder = function(filepath,excludeRegExp) {
excludeRegExp = excludeRegExp || $tw.boot.excludeRegExp;
var infoPath = filepath + path.sep + "plugin.info";
if(fs.existsSync(filepath) && fs.statSync(filepath).isDirectory()) {
// Read the plugin information
if(!fs.existsSync(infoPath) || !fs.statSync(infoPath).isFile()) {
console.log("Warning: missing plugin.info file in " + filepath);
return null;
}
var pluginInfo = $tw.utils.parseJSONSafe(fs.readFileSync(infoPath,"utf8"));
// Read the plugin files
var pluginFiles = $tw.loadTiddlersFromPath(filepath,excludeRegExp);
// Save the plugin tiddlers into the plugin info
pluginInfo.tiddlers = pluginInfo.tiddlers || Object.create(null);
for(var f=0; f<pluginFiles.length; f++) {
var tiddlers = pluginFiles[f].tiddlers;
for(var t=0; t<tiddlers.length; t++) {
var tiddler= tiddlers[t];
if(tiddler.title) {
pluginInfo.tiddlers[tiddler.title] = tiddler;
}
}
}
// Give the plugin the same version number as the core if it doesn't have one
if(!("version" in pluginInfo)) {
pluginInfo.version = $tw.packageInfo.version;
}
// Use "plugin" as the plugin-type if we don't have one
if(!("plugin-type" in pluginInfo)) {
pluginInfo["plugin-type"] = "plugin";
}
pluginInfo.dependents = pluginInfo.dependents || [];
pluginInfo.type = "application/json";
// Set plugin text
pluginInfo.text = JSON.stringify({tiddlers: pluginInfo.tiddlers});
delete pluginInfo.tiddlers;
// Deserialise array fields (currently required for the dependents field)
for(var field in pluginInfo) {
if($tw.utils.isArray(pluginInfo[field])) {
pluginInfo[field] = $tw.utils.stringifyList(pluginInfo[field]);
}
}
return pluginInfo;
} else {
return null;
}
};
/*
name: Name of the plugin to find
paths: array of file paths to search for it
Returns the path of the plugin folder
*/
$tw.findLibraryItem = function(name,paths) {
var pathIndex = 0;
do {
var pluginPath = path.resolve(paths[pathIndex],"./" + name)
if(fs.existsSync(pluginPath) && fs.statSync(pluginPath).isDirectory()) {
return pluginPath;
}
} while(++pathIndex < paths.length);
return null;
};
/*
name: Name of the plugin to load
paths: array of file paths to search for it
*/
$tw.loadPlugin = function(name,paths) {
var pluginPath = $tw.findLibraryItem(name,paths);
if(pluginPath) {
var pluginFields = $tw.loadPluginFolder(pluginPath);
if(pluginFields) {
$tw.wiki.addTiddler(pluginFields);
return;
}
}
console.log("Warning: Cannot find plugin '" + name + "'");
};
/*
libraryPath: Path of library folder for these plugins (relative to core path)
envVar: Environment variable name for these plugins
Returns an array of search paths
*/
$tw.getLibraryItemSearchPaths = function(libraryPath,envVar) {
var pluginPaths = [path.resolve($tw.boot.corePath,libraryPath)],
env = process.env[envVar];
if(env) {
env.split(path.delimiter).map(function(item) {
if(item) {
pluginPaths.push(item);
}
});
}
return pluginPaths;
};
/*
plugins: Array of names of plugins (eg, "tiddlywiki/filesystemadaptor")
libraryPath: Path of library folder for these plugins (relative to core path)
envVar: Environment variable name for these plugins
*/
$tw.loadPlugins = function(plugins,libraryPath,envVar) {
if(plugins) {
var pluginPaths = $tw.getLibraryItemSearchPaths(libraryPath,envVar);
for(var t=0; t<plugins.length; t++) {
$tw.loadPlugin(plugins[t],pluginPaths);
}
}
};
/*
path: path of wiki directory
options:
parentPaths: array of parent paths that we mustn't recurse into
readOnly: true if the tiddler file paths should not be retained
*/
$tw.loadWikiTiddlers = function(wikiPath,options) {
options = options || {};
var parentPaths = options.parentPaths || [],
wikiInfoPath = path.resolve(wikiPath,$tw.config.wikiInfo),
wikiInfo,
pluginFields;
// Bail if we don't have a wiki info file
if(fs.existsSync(wikiInfoPath)) {
wikiInfo = $tw.utils.parseJSONSafe(fs.readFileSync(wikiInfoPath,"utf8"));
} else {
return null;
}
// Save the path to the tiddlers folder for the filesystemadaptor
var config = wikiInfo.config || {};
if($tw.boot.wikiPath == wikiPath) {
$tw.boot.wikiTiddlersPath = path.resolve($tw.boot.wikiPath,config["default-tiddler-location"] || $tw.config.wikiTiddlersSubDir);
}
// Load any parent wikis
if(wikiInfo.includeWikis) {
parentPaths = parentPaths.slice(0);
parentPaths.push(wikiPath);
$tw.utils.each(wikiInfo.includeWikis,function(info) {
if(typeof info === "string") {
info = {path: info};
}
var resolvedIncludedWikiPath = path.resolve(wikiPath,info.path);
if(parentPaths.indexOf(resolvedIncludedWikiPath) === -1) {
var subWikiInfo = $tw.loadWikiTiddlers(resolvedIncludedWikiPath,{
parentPaths: parentPaths,
readOnly: info["read-only"]
});
// Merge the build targets
wikiInfo.build = $tw.utils.extend([],subWikiInfo.build,wikiInfo.build);
} else {
$tw.utils.error("Cannot recursively include wiki " + resolvedIncludedWikiPath);
}
});
}
// Load any plugins, themes and languages listed in the wiki info file
$tw.loadPlugins(wikiInfo.plugins,$tw.config.pluginsPath,$tw.config.pluginsEnvVar);
$tw.loadPlugins(wikiInfo.themes,$tw.config.themesPath,$tw.config.themesEnvVar);
$tw.loadPlugins(wikiInfo.languages,$tw.config.languagesPath,$tw.config.languagesEnvVar);
// Load the wiki files, registering them as writable
var resolvedWikiPath = path.resolve(wikiPath,$tw.config.wikiTiddlersSubDir);
$tw.utils.each($tw.loadTiddlersFromPath(resolvedWikiPath),function(tiddlerFile) {
if(!options.readOnly && tiddlerFile.filepath) {
$tw.utils.each(tiddlerFile.tiddlers,function(tiddler) {
$tw.boot.files[tiddler.title] = {
filepath: tiddlerFile.filepath,
type: tiddlerFile.type,
hasMetaFile: tiddlerFile.hasMetaFile,
isEditableFile: config["retain-original-tiddler-path"] || tiddlerFile.isEditableFile || tiddlerFile.filepath.indexOf($tw.boot.wikiTiddlersPath) !== 0
};
});
}
$tw.wiki.addTiddlers(tiddlerFile.tiddlers);
});
if ($tw.boot.wikiPath == wikiPath) {
// Save the original tiddler file locations if requested
var output = {}, relativePath, fileInfo;
for(var title in $tw.boot.files) {
fileInfo = $tw.boot.files[title];
if(fileInfo.isEditableFile) {
relativePath = path.relative($tw.boot.wikiTiddlersPath,fileInfo.filepath);
fileInfo.originalpath = relativePath;
output[title] =
path.sep === "/" ?
relativePath :
relativePath.split(path.sep).join("/");
}
}
if(Object.keys(output).length > 0){
$tw.wiki.addTiddler({title: "$:/config/OriginalTiddlerPaths", type: "application/json", text: JSON.stringify(output)});
}
}
// Load any plugins within the wiki folder
var wikiPluginsPath = path.resolve(wikiPath,$tw.config.wikiPluginsSubDir);
if(fs.existsSync(wikiPluginsPath)) {
var pluginFolders = fs.readdirSync(wikiPluginsPath);
for(var t=0; t<pluginFolders.length; t++) {
pluginFields = $tw.loadPluginFolder(path.resolve(wikiPluginsPath,"./" + pluginFolders[t]));
if(pluginFields) {
$tw.wiki.addTiddler(pluginFields);
}
}
}
// Load any themes within the wiki folder
var wikiThemesPath = path.resolve(wikiPath,$tw.config.wikiThemesSubDir);
if(fs.existsSync(wikiThemesPath)) {
var themeFolders = fs.readdirSync(wikiThemesPath);
for(var t=0; t<themeFolders.length; t++) {
pluginFields = $tw.loadPluginFolder(path.resolve(wikiThemesPath,"./" + themeFolders[t]));
if(pluginFields) {
$tw.wiki.addTiddler(pluginFields);
}
}
}
// Load any languages within the wiki folder
var wikiLanguagesPath = path.resolve(wikiPath,$tw.config.wikiLanguagesSubDir);
if(fs.existsSync(wikiLanguagesPath)) {
var languageFolders = fs.readdirSync(wikiLanguagesPath);
for(var t=0; t<languageFolders.length; t++) {
pluginFields = $tw.loadPluginFolder(path.resolve(wikiLanguagesPath,"./" + languageFolders[t]));
if(pluginFields) {
$tw.wiki.addTiddler(pluginFields);
}
}
}
return wikiInfo;
};
$tw.loadTiddlersNode = function() {
// Load the boot tiddlers
$tw.utils.each($tw.loadTiddlersFromPath($tw.boot.bootPath),function(tiddlerFile) {
$tw.wiki.addTiddlers(tiddlerFile.tiddlers);
});
// Load the core tiddlers
$tw.wiki.addTiddler($tw.loadPluginFolder($tw.boot.corePath));
// Load any extra plugins
$tw.utils.each($tw.boot.extraPlugins,function(name) {
if(name.charAt(0) === "+") { // Relative path to plugin
var pluginFields = $tw.loadPluginFolder(name.substring(1));
if(pluginFields) {
$tw.wiki.addTiddler(pluginFields);
}
} else {
var parts = name.split("/"),
type = parts[0];
if(parts.length === 3 && ["plugins","themes","languages"].indexOf(type) !== -1) {
$tw.loadPlugins([parts[1] + "/" + parts[2]],$tw.config[type + "Path"],$tw.config[type + "EnvVar"]);
}
}
});
// Load the tiddlers from the wiki directory
if($tw.boot.wikiPath) {
$tw.boot.wikiInfo = $tw.loadWikiTiddlers($tw.boot.wikiPath);
}
};
// End of if($tw.node)
}
/////////////////////////// Main startup function called once tiddlers have been decrypted
/*
Startup TiddlyWiki
*/
$tw.boot.initStartup = function(options) {
// Get the URL hash and check for safe mode
$tw.locationHash = "#";
if($tw.browser && !$tw.node) {
if(location.hash === "#:safe") {
$tw.safeMode = true;
} else {
$tw.locationHash = $tw.utils.getLocationHash();
}
}
// Initialise some more $tw properties
$tw.utils.deepDefaults($tw,{
modules: { // Information about each module
titles: Object.create(null), // hashmap by module title of {fn:, exports:, moduleType:}
types: {} // hashmap by module type of hashmap of exports
},
config: { // Configuration overridables
pluginsPath: "../plugins/",
themesPath: "../themes/",
languagesPath: "../languages/",
editionsPath: "../editions/",
wikiInfo: "./tiddlywiki.info",
wikiPluginsSubDir: "./plugins",
wikiThemesSubDir: "./themes",
wikiLanguagesSubDir: "./languages",
wikiTiddlersSubDir: "./tiddlers",
wikiOutputSubDir: "./output",
jsModuleHeaderRegExpString: "^\\/\\*\\\\(?:\\r?\\n)((?:^[^\\r\\n]*(?:\\r?\\n))+?)(^\\\\\\*\\/$(?:\\r?\\n)?)",
fileExtensionInfo: Object.create(null), // Map file extension to {type:}
contentTypeInfo: Object.create(null), // Map type to {encoding:,extension:}
pluginsEnvVar: "TIDDLYWIKI_PLUGIN_PATH",
themesEnvVar: "TIDDLYWIKI_THEME_PATH",
languagesEnvVar: "TIDDLYWIKI_LANGUAGE_PATH",
editionsEnvVar: "TIDDLYWIKI_EDITION_PATH"
},
log: {}, // Log flags
unloadTasks: []
});
if(!$tw.boot.tasks.readBrowserTiddlers) {
// For writable tiddler files, a hashmap of title to {filepath:,type:,hasMetaFile:}
$tw.boot.files = Object.create(null);
// System paths and filenames
$tw.boot.bootPath = options.bootPath || path.dirname(module.filename);
$tw.boot.corePath = path.resolve($tw.boot.bootPath,"../core");
// If there's no arguments then default to `--help`
if($tw.boot.argv.length === 0) {
$tw.boot.argv = ["--help"];
}
// Parse any extra plugin references
$tw.boot.extraPlugins = $tw.boot.extraPlugins || [];
while($tw.boot.argv[0] && $tw.boot.argv[0].indexOf("+") === 0) {
$tw.boot.extraPlugins.push($tw.boot.argv[0].substring(1));
$tw.boot.argv.splice(0,1);
}
// If the first command line argument doesn't start with `--` then we
// interpret it as the path to the wiki folder, which will otherwise default
// to the current folder
if($tw.boot.argv[0] && $tw.boot.argv[0].indexOf("--") !== 0) {
$tw.boot.wikiPath = $tw.boot.argv[0];
$tw.boot.argv = $tw.boot.argv.slice(1);
} else {
$tw.boot.wikiPath = process.cwd();
}
// Read package info
$tw.packageInfo = $tw.packageInfo || require("../package.json");
// Check node version number
if(!$tw.utils.checkVersions(process.version.substr(1),$tw.packageInfo.engines.node.substr(2))) {
$tw.utils.error("TiddlyWiki5 requires node.js version " + $tw.packageInfo.engines.node);
}
}
// Add file extension information
$tw.utils.registerFileType("text/vnd.tiddlywiki","utf8",".tid");
$tw.utils.registerFileType("application/x-tiddler","utf8",".tid");
$tw.utils.registerFileType("application/x-tiddlers","utf8",".multids");
$tw.utils.registerFileType("application/x-tiddler-html-div","utf8",".tiddler");
$tw.utils.registerFileType("text/vnd.tiddlywiki2-recipe","utf8",".recipe");
$tw.utils.registerFileType("text/plain","utf8",".txt");
$tw.utils.registerFileType("text/css","utf8",".css");
$tw.utils.registerFileType("text/html","utf8",[".html",".htm"]);
$tw.utils.registerFileType("application/hta","utf16le",".hta",{deserializerType:"text/html"});
$tw.utils.registerFileType("application/javascript","utf8",".js");
$tw.utils.registerFileType("application/json","utf8",".json");
$tw.utils.registerFileType("application/pdf","base64",".pdf",{flags:["image"]});
$tw.utils.registerFileType("application/zip","base64",".zip");
$tw.utils.registerFileType("application/x-zip-compressed","base64",".zip");
$tw.utils.registerFileType("image/jpeg","base64",[".jpg",".jpeg"],{flags:["image"]});
$tw.utils.registerFileType("image/jpg","base64",[".jpg",".jpeg"],{flags:["image"]});
$tw.utils.registerFileType("image/png","base64",".png",{flags:["image"]});
$tw.utils.registerFileType("image/gif","base64",".gif",{flags:["image"]});
$tw.utils.registerFileType("image/webp","base64",".webp",{flags:["image"]});
$tw.utils.registerFileType("image/heic","base64",".heic",{flags:["image"]});
$tw.utils.registerFileType("image/heif","base64",".heif",{flags:["image"]});
$tw.utils.registerFileType("image/svg+xml","utf8",".svg",{flags:["image"]});
$tw.utils.registerFileType("image/vnd.microsoft.icon","base64",".ico",{flags:["image"]});
$tw.utils.registerFileType("image/x-icon","base64",".ico",{flags:["image"]});
$tw.utils.registerFileType("application/font-woff","base64",".woff");
$tw.utils.registerFileType("application/x-font-ttf","base64",".woff");
$tw.utils.registerFileType("application/font-woff2","base64",".woff2");
$tw.utils.registerFileType("audio/ogg","base64",".ogg");
$tw.utils.registerFileType("audio/mp4","base64",[".mp4",".m4a"]);
$tw.utils.registerFileType("video/ogg","base64",[".ogm",".ogv",".ogg"]);
$tw.utils.registerFileType("video/webm","base64",".webm");
$tw.utils.registerFileType("video/mp4","base64",".mp4");
$tw.utils.registerFileType("audio/mp3","base64",".mp3");
$tw.utils.registerFileType("audio/mpeg","base64");
$tw.utils.registerFileType("text/markdown","utf8",[".md",".markdown"],{deserializerType:"text/x-markdown"});
$tw.utils.registerFileType("text/x-markdown","utf8",[".md",".markdown"]);
$tw.utils.registerFileType("application/enex+xml","utf8",".enex");
$tw.utils.registerFileType("application/vnd.openxmlformats-officedocument.wordprocessingml.document","base64",".docx");
$tw.utils.registerFileType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","base64",".xlsx");
$tw.utils.registerFileType("application/vnd.openxmlformats-officedocument.presentationml.presentation","base64",".pptx");
$tw.utils.registerFileType("text/x-bibtex","utf8",".bib",{deserializerType:"application/x-bibtex"});
$tw.utils.registerFileType("application/x-bibtex","utf8",".bib");
$tw.utils.registerFileType("application/epub+zip","base64",".epub");
$tw.utils.registerFileType("application/octet-stream","base64",".octet-stream");
// Create the wiki store for the app
$tw.wiki = new $tw.Wiki($tw.safeMode && {enableIndexers: []});
// Install built in tiddler fields modules
$tw.Tiddler.fieldModules = $tw.modules.getModulesByTypeAsHashmap("tiddlerfield");
// Install the tiddler deserializer modules
$tw.Wiki.tiddlerDeserializerModules = Object.create(null);
$tw.modules.applyMethods("tiddlerdeserializer",$tw.Wiki.tiddlerDeserializerModules);
// Call unload handlers in the browser
if($tw.browser) {
window.onbeforeunload = function(event) {
event = event || {};
var result;
$tw.utils.each($tw.unloadTasks,function(task) {
var r = task(event);
if(r) {
result = r;
}
});
return result;
}
}
};
$tw.boot.loadStartup = function(options){
// Load tiddlers
if($tw.boot.tasks.readBrowserTiddlers) {
$tw.loadTiddlersBrowser();
} else {
$tw.loadTiddlersNode();
}
// Load any preloaded tiddlers
if($tw.preloadTiddlers) {
$tw.wiki.addTiddlers($tw.preloadTiddlers);
}
// Give hooks a chance to modify the store
$tw.hooks.invokeHook("th-boot-tiddlers-loaded");
}
$tw.boot.execStartup = function(options){
// Unpack plugin tiddlers
$tw.wiki.readPluginInfo();
$tw.wiki.registerPluginTiddlers("plugin",$tw.safeMode ? ["$:/core"] : undefined);
$tw.wiki.unpackPluginTiddlers();
// Process "safe mode"
if($tw.safeMode) {
$tw.wiki.processSafeMode();
}
// Register typed modules from the tiddlers we've just loaded
$tw.wiki.defineTiddlerModules();
// And any modules within plugins
$tw.wiki.defineShadowModules();
// Make sure the crypto state tiddler is up to date
if($tw.crypto) {
$tw.crypto.updateCryptoStateTiddler();
}
// Gather up any startup modules
$tw.boot.remainingStartupModules = []; // Array of startup modules
$tw.modules.forEachModuleOfType("startup",function(title,module) {
if(module.startup) {
$tw.boot.remainingStartupModules.push(module);
}
});
// Keep track of the startup tasks that have been executed
$tw.boot.executedStartupModules = Object.create(null);
$tw.boot.disabledStartupModules = $tw.boot.disabledStartupModules || [];
// Repeatedly execute the next eligible task
$tw.boot.executeNextStartupTask(options.callback);
}
/*
Startup TiddlyWiki
*/
$tw.boot.startup = function(options) {
options = options || {};
// Get the URL hash and check for safe mode
$tw.boot.initStartup(options);
$tw.boot.loadStartup(options);
$tw.boot.execStartup(options);
};
/*
Add another unload task
*/
$tw.addUnloadTask = function(task) {
if($tw.unloadTasks.indexOf(task) === -1) {
$tw.unloadTasks.push(task);
}
}
/*
Execute the remaining eligible startup tasks
*/
$tw.boot.executeNextStartupTask = function(callback) {
// Find the next eligible task
var taskIndex = 0, task,
asyncTaskCallback = function() {
if(task.name) {
$tw.boot.executedStartupModules[task.name] = true;
}
return $tw.boot.executeNextStartupTask(callback);
};
while(taskIndex < $tw.boot.remainingStartupModules.length) {
task = $tw.boot.remainingStartupModules[taskIndex];
if($tw.boot.isStartupTaskEligible(task)) {
// Remove this task from the list
$tw.boot.remainingStartupModules.splice(taskIndex,1);
// Assemble log message
var s = ["Startup task:",task.name];
if(task.platforms) {
s.push("platforms:",task.platforms.join(","));
}
if(task.after) {
s.push("after:",task.after.join(","));
}
if(task.before) {
s.push("before:",task.before.join(","));
}
$tw.boot.log(s.join(" "));
// Execute task
if(!$tw.utils.hop(task,"synchronous") || task.synchronous) {
task.startup();
if(task.name) {
$tw.boot.executedStartupModules[task.name] = true;
}
return $tw.boot.executeNextStartupTask(callback);
} else {
task.startup(asyncTaskCallback);
return true;
}
}
taskIndex++;
}
if(typeof callback === 'function') {
callback();
}
return false;
};
/*
Returns true if we are running on one of the platforms specified in taskModule's
`platforms` array; or if `platforms` property is not defined.
*/
$tw.boot.doesTaskMatchPlatform = function(taskModule) {
var platforms = taskModule.platforms;
if(platforms) {
for(var t=0; t<platforms.length; t++) {
switch (platforms[t]) {
case "browser":
if ($tw.browser) {
return true;
}
break;
case "node":
if ($tw.node) {
return true;
}
break;
default:
$tw.utils.error("Module " + taskModule.name + ": '" + platforms[t] + "' in export.platforms invalid");
}
}
return false;
}
return true;
};
$tw.boot.isStartupTaskEligible = function(taskModule) {
var t;
// Check that the platform is correct
if(!$tw.boot.doesTaskMatchPlatform(taskModule)) {
return false;
}
var name = taskModule.name,
remaining = $tw.boot.remainingStartupModules;
if(name) {
// Fail if this module is disabled
if($tw.boot.disabledStartupModules.indexOf(name) !== -1) {
return false;
}
// Check that no other outstanding tasks must be executed before this one
for(t=0; t<remaining.length; t++) {
var task = remaining[t];
if(task.before && task.before.indexOf(name) !== -1) {
if($tw.boot.doesTaskMatchPlatform(task) && (!task.name || $tw.boot.disabledStartupModules.indexOf(task.name) === -1)) {
return false;
}
}
}
}
// Check that all of the tasks that we must be performed after has been done
var after = taskModule.after;
if(after) {
for(t=0; t<after.length; t++) {
if(!$tw.boot.executedStartupModules[after[t]]) {
return false;
}
}
}
return true;
};
/*
Global Hooks mechanism which allows plugins to modify default functionality
*/
$tw.hooks = $tw.hooks || { names: {}};
/*
Add hooks to the hashmap
*/
$tw.hooks.addHook = function(hookName,definition) {
if($tw.utils.hop($tw.hooks.names,hookName)) {
$tw.hooks.names[hookName].push(definition);
}
else {
$tw.hooks.names[hookName] = [definition];
}
};
/*
Invoke the hook by key
*/
$tw.hooks.invokeHook = function(hookName /*, value,... */) {
var args = Array.prototype.slice.call(arguments,1);
if($tw.utils.hop($tw.hooks.names,hookName)) {
for (var i = 0; i < $tw.hooks.names[hookName].length; i++) {
args[0] = $tw.hooks.names[hookName][i].apply(null,args);
}
}
return args[0];
};
/////////////////////////// Main boot function to decrypt tiddlers and then startup
$tw.boot.boot = function(callback) {
// Initialise crypto object
$tw.crypto = new $tw.utils.Crypto();
// Initialise password prompter
if($tw.browser && !$tw.node) {
$tw.passwordPrompt = new $tw.utils.PasswordPrompt();
}
// Preload any encrypted tiddlers
$tw.boot.decryptEncryptedTiddlers(function() {
// Startup
$tw.boot.startup({callback: callback});
});
};
/////////////////////////// Autoboot in the browser
if($tw.browser && !$tw.boot.suppressBoot) {
$tw.boot.boot();
}
return $tw;
});
if(typeof(exports) !== "undefined") {
exports.TiddlyWiki = _boot;
} else {
_boot(window.$tw);
}
//# sourceURL=$:/boot/boot.js
</script>
</div>
<!--~~ Raw markup for the bottom of the body section ~~-->
</body>
</html>