(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="5c7ff267-2a4c-40c3-b45e-39f85a764a54",e._sentryDebugIdIdentifier="sentry-dbid-5c7ff267-2a4c-40c3-b45e-39f85a764a54")}catch{}})();var f={},c={allTags:!0,closeAll:!0,list:!0,newJournal:!0,newTiddler:!0,permaview:!0,saveChanges:!0,search:!0,slider:!0,tabs:!0,tag:!0,tagging:!0,tags:!0,tiddler:!0,timeline:!0,today:!0,version:!0,option:!0,with:!0,filter:!0},l=/[\w_\-]/i,d=/^\-\-\-\-+$/,k=/^\/\*\*\*$/,h=/^\*\*\*\/$/,a=/^<<<$/,b=/^\/\/\{\{\{$/,w=/^\/\/\}\}\}$/,p=/^<!--\{\{\{-->$/,y=/^<!--\}\}\}-->$/,g=/^\{\{\{$/,v=/^\}\}\}$/,S=/.*?\}\}\}/;function o(e,t,r){return t.tokenize=r,r(e,t)}function i(e,t){var r=e.sol(),n=e.peek();if(t.block=!1,r&&/[<\/\*{}\-]/.test(n)){if(e.match(g))return t.block=!0,o(e,t,u);if(e.match(a))return"quote";if(e.match(k)||e.match(h)||e.match(b)||e.match(w)||e.match(p)||e.match(y))return"comment";if(e.match(d))return"contentSeparator"}if(e.next(),r&&/[\/\*!#;:>|]/.test(n)){if(n=="!")return e.skipToEnd(),"header";if(n=="*")return e.eatWhile("*"),"comment";if(n=="#")return e.eatWhile("#"),"comment";if(n==";")return e.eatWhile(";"),"comment";if(n==":")return e.eatWhile(":"),"comment";if(n==">")return e.eatWhile(">"),"quote";if(n=="|")return"header"}if(n=="{"&&e.match("{{"))return o(e,t,u);if(/[hf]/i.test(n)&&/[ti]/i.test(e.peek())&&e.match(/\b(ttps?|tp|ile):\/\/[\-A-Z0-9+&@#\/%?=~_|$!:,.;]*[A-Z0-9+&@#\/%=~_|$]/i))return"link";if(n=='"')return"string";if(n=="~"||/[\[\]]/.test(n)&&e.match(n))return"brace";if(n=="@")return e.eatWhile(l),"link";if(/\d/.test(n))return e.eatWhile(/\d/),"number";if(n=="/"){if(e.eat("%"))return o(e,t,$);if(e.eat("/"))return o(e,t,z)}if(n=="_"&&e.eat("_"))return o(e,t,C);if(n=="-"&&e.eat("-")){if(e.peek()!=" ")return o(e,t,W);if(e.peek()==" ")return"brace"}return n=="'"&&e.eat("'")?o(e,t,_):n=="<"&&e.eat("<")?o(e,t,x):(e.eatWhile(/[\w\$_]/),f.propertyIsEnumerable(e.current())?"keyword":null)}function $(e,t){for(var r=!1,n;n=e.next();){if(n=="/"&&r){t.tokenize=i;break}r=n=="%"}return"comment"}function _(e,t){for(var r=!1,n;n=e.next();){if(n=="'"&&r){t.tokenize=i;break}r=n=="'"}return"strong"}function u(e,t){var r=t.block;return r&&e.current()?"comment":!r&&e.match(S)||r&&e.sol()&&e.match(v)?(t.tokenize=i,"comment"):(e.next(),"comment")}function z(e,t){for(var r=!1,n;n=e.next();){if(n=="/"&&r){t.tokenize=i;break}r=n=="/"}return"emphasis"}function C(e,t){for(var r=!1,n;n=e.next();){if(n=="_"&&r){t.tokenize=i;break}r=n=="_"}return"link"}function W(e,t){for(var r=!1,n;n=e.next();){if(n=="-"&&r){t.tokenize=i;break}r=n=="-"}return"deleted"}function x(e,t){if(e.current()=="<<")return"meta";var r=e.next();return r?r==">"&&e.peek()==">"?(e.next(),t.tokenize=i,"meta"):(e.eatWhile(/[\w\$_]/),c.propertyIsEnumerable(e.current())?"keyword":null):(t.tokenize=i,null)}const E={name:"tiddlywiki",startState:function(){return{tokenize:i}},token:function(e,t){if(e.eatSpace())return null;var r=t.tokenize(e,t);return r}};export{E as tiddlyWiki};
//# sourceMappingURL=tiddlywiki-JKJ67aUZ.js.map
