`+z),ke&&(z=ee(z,Ft," "),z=ee(z,Ut," "),z=ee(z,Bt," ")),oe&&ht?oe.createHTML(z):z},A.setConfig=function(_){Kt(_),$t=!0},A.clearConfig=function(){Ge=null,$t=!1},A.isValidAttribute=function(_,h,v){Ge||Kt({});var T=Y(_),O=Y(h);return Xi(T,O,v)},A.addHook=function(_,h){typeof h=="function"&&(ge[_]=ge[_]||[],P(ge[_],h))},A.removeHook=function(_){if(ge[_])return c(ge[_])},A.removeHooks=function(_){ge[_]&&(ge[_]=[])},A.removeAllHooks=function(){ge={}},A}var Zr=Di();return Zr})});var bi=Se((Os,Ir)=>{Ir.exports=window.DOMPurify||(window.DOMPurify=vi().default||vi())});var Or=Se((Ws,Ni)=>{function Mr(e,i){if(i&&i.documentElement)e=i,i=arguments[2];else if(!e||!e.documentElement)throw new Error("First argument to Readability constructor should be a document object.");if(i=i||{},this._doc=e,this._docJSDOMParser=this._doc.firstChild.__JSDOMParser__,this._articleTitle=null,this._articleByline=null,this._articleDir=null,this._articleSiteName=null,this._attempts=[],this._debug=!!i.debug,this._maxElemsToParse=i.maxElemsToParse||this.DEFAULT_MAX_ELEMS_TO_PARSE,this._nbTopCandidates=i.nbTopCandidates||this.DEFAULT_N_TOP_CANDIDATES,this._charThreshold=i.charThreshold||this.DEFAULT_CHAR_THRESHOLD,this._classesToPreserve=this.CLASSES_TO_PRESERVE.concat(i.classesToPreserve||[]),this._keepClasses=!!i.keepClasses,this._serializer=i.serializer||function(t){return t.innerHTML},this._disableJSONLD=!!i.disableJSONLD,this._allowedVideoRegex=i.allowedVideoRegex||this.REGEXPS.videos,this._flags=this.FLAG_STRIP_UNLIKELYS|this.FLAG_WEIGHT_CLASSES|this.FLAG_CLEAN_CONDITIONALLY,this._debug){let t=function(r){if(r.nodeType==r.TEXT_NODE)return`${r.nodeName}("${r.textContent}")`;let a=Array.from(r.attributes||[],function(l){return`${l.name}="${l.value}"`}).join(" ");return`<${r.localName}${a}>`};this.log=function(){if(typeof console!="undefined"){let a=Array.from(arguments,l=>l&&l.nodeType==this.ELEMENT_NODE?t(l):l);a.unshift("Reader: (Readability)"),console.log.apply(console,a)}else if(typeof dump!="undefined"){var r=Array.prototype.map.call(arguments,function(a){return a&&a.nodeName?t(a):a}).join(" ");dump("Reader: (Readability) "+r+`
`)}}}else this.log=function(){}}Mr.prototype={FLAG_STRIP_UNLIKELYS:1,FLAG_WEIGHT_CLASSES:2,FLAG_CLEAN_CONDITIONALLY:4,ELEMENT_NODE:1,TEXT_NODE:3,DEFAULT_MAX_ELEMS_TO_PARSE:0,DEFAULT_N_TOP_CANDIDATES:5,DEFAULT_TAGS_TO_SCORE:"section,h2,h3,h4,h5,h6,p,td,pre".toUpperCase().split(","),DEFAULT_CHAR_THRESHOLD:500,REGEXPS:{unlikelyCandidates:/-ad-|ai2html|banner|breadcrumbs|combx|comment|community|cover-wrap|disqus|extra|footer|gdpr|header|legends|menu|related|remark|replies|rss|shoutbox|sidebar|skyscraper|social|sponsor|supplemental|ad-break|agegate|pagination|pager|popup|yom-remote/i,okMaybeItsACandidate:/and|article|body|column|content|main|shadow/i,positive:/article|body|content|entry|hentry|h-entry|main|page|pagination|post|text|blog|story/i,negative:/-ad-|hidden|^hid$| hid$| hid |^hid |banner|combx|comment|com-|contact|foot|footer|footnote|gdpr|masthead|media|meta|outbrain|promo|related|scroll|share|shoutbox|sidebar|skyscraper|sponsor|shopping|tags|tool|widget/i,extraneous:/print|archive|comment|discuss|e[\-]?mail|share|reply|all|login|sign|single|utility/i,byline:/byline|author|dateline|writtenby|p-author/i,replaceFonts:/<(\/?)font[^>]*>/gi,normalize:/\s{2,}/g,videos:/\/\/(www\.)?((dailymotion|youtube|youtube-nocookie|player\.vimeo|v\.qq)\.com|(archive|upload\.wikimedia)\.org|player\.twitch\.tv)/i,shareElements:/(\b|_)(share|sharedaddy)(\b|_)/i,nextLink:/(next|weiter|continue|>([^\|]|$)|»([^\|]|$))/i,prevLink:/(prev|earl|old|new|<|«)/i,tokenize:/\W+/g,whitespace:/^\s*$/,hasContent:/\S$/,hashUrl:/^#.+/,srcsetUrl:/(\S+)(\s+[\d.]+[xw])?(\s*(?:,|$))/g,b64DataUrl:/^data:\s*([^\s;,]+)\s*;\s*base64\s*,/i,commas:/\u002C|\u060C|\uFE50|\uFE10|\uFE11|\u2E41|\u2E34|\u2E32|\uFF0C/g,jsonLdArticleTypes:/^Article|AdvertiserContentArticle|NewsArticle|AnalysisNewsArticle|AskPublicNewsArticle|BackgroundNewsArticle|OpinionNewsArticle|ReportageNewsArticle|ReviewNewsArticle|Report|SatiricalArticle|ScholarlyArticle|MedicalScholarlyArticle|SocialMediaPosting|BlogPosting|LiveBlogPosting|DiscussionForumPosting|TechArticle|APIReference$/},UNLIKELY_ROLES:["menu","menubar","complementary","navigation","alert","alertdialog","dialog"],DIV_TO_P_ELEMS:new Set(["BLOCKQUOTE","DL","DIV","IMG","OL","P","PRE","TABLE","UL"]),ALTER_TO_DIV_EXCEPTIONS:["DIV","ARTICLE","SECTION","P"],PRESENTATIONAL_ATTRIBUTES:["align","background","bgcolor","border","cellpadding","cellspacing","frame","hspace","rules","style","valign","vspace"],DEPRECATED_SIZE_ATTRIBUTE_ELEMS:["TABLE","TH","TD","HR","PRE"],PHRASING_ELEMS:["ABBR","AUDIO","B","BDO","BR","BUTTON","CITE","CODE","DATA","DATALIST","DFN","EM","EMBED","I","IMG","INPUT","KBD","LABEL","MARK","MATH","METER","NOSCRIPT","OBJECT","OUTPUT","PROGRESS","Q","RUBY","SAMP","SCRIPT","SELECT","SMALL","SPAN","STRONG","SUB","SUP","TEXTAREA","TIME","VAR","WBR"],CLASSES_TO_PRESERVE:["page"],HTML_ESCAPE_MAP:{lt:"<",gt:">",amp:"&",quot:'"',apos:"'"},_postProcessContent:function(e){this._fixRelativeUris(e),this._simplifyNestedElements(e),this._keepClasses||this._cleanClasses(e)},_removeNodes:function(e,i){if(this._docJSDOMParser&&e._isLiveNodeList)throw new Error("Do not pass live node lists to _removeNodes");for(var t=e.length-1;t>=0;t--){var r=e[t],a=r.parentNode;a&&(!i||i.call(this,r,t,e))&&a.removeChild(r)}},_replaceNodeTags:function(e,i){if(this._docJSDOMParser&&e._isLiveNodeList)throw new Error("Do not pass live node lists to _replaceNodeTags");for(let t of e)this._setNodeTag(t,i)},_forEachNode:function(e,i){Array.prototype.forEach.call(e,i,this)},_findNode:function(e,i){return Array.prototype.find.call(e,i,this)},_someNode:function(e,i){return Array.prototype.some.call(e,i,this)},_everyNode:function(e,i){return Array.prototype.every.call(e,i,this)},_concatNodeLists:function(){var e=Array.prototype.slice,i=e.call(arguments),t=i.map(function(r){return e.call(r)});return Array.prototype.concat.apply([],t)},_getAllNodesWithTag:function(e,i){return e.querySelectorAll?e.querySelectorAll(i.join(",")):[].concat.apply([],i.map(function(t){var r=e.getElementsByTagName(t);return Array.isArray(r)?r:Array.from(r)}))},_cleanClasses:function(e){v
%videoPlayer%`,bilibiliEmbedWidth:"560",bilibiliEmbedHeight:"315",twitterNoteTitle:"Tweet from %tweetAuthorName% (%date%)",twitterNote:`[[ReadItLater]][[Tweet]]
%answerContent%`,downloadStackExchangeAssets:!0,downloadStackExchangeAssetsInDir:!1,youtubeApiKey:"",tikTokNoteTitle:"TikTok from %authorName% (%date%)",tikTokNote:`[[ReadItLater]][[TikTok]]
%videoPlayer%`,tikTokEmbedWidth:"325",tikTokEmbedHeight:"760",extendShareMenu:!0};var S=require("obsidian");var _t=class extends S.PluginSettingTab{constructor(t,r){super(t,r);k(this,"plugin");this.plugin=r}display(){let{containerEl:t}=this;t.empty(),t.createEl("h2",{text:"General"}),new S.Setting(t).setName("Inbox dir").setDesc("Enter valid folder name. For nested folders use this format: Folder A/Folder B. If no folder is entered, new note will be created in vault root.").addText(n=>n.setPlaceholder("Defaults to root").setValue(this.plugin.settings.inboxDir||E.inboxDir).onChange(async u=>{this.plugin.settings.inboxDir=u,await this.plugin.saveSettings()})),new S.Setting(t).setName("Assets dir").setDesc("Enter valid folder name. For nested folders use this format: Folder A/Folder B. If no folder is entered, new note will be created in vault root.").addText(n=>n.setPlaceholder("Defaults to root").setValue(this.plugin.settings.assetsDir||E.inboxDir+"/assets").onChange(async u=>{this.plugin.settings.assetsDir=u,await this.plugin.saveSettings()})),new S.Setting(t).setName("Open new note in current workspace").setDesc("If enabled, new note will open in current workspace").addToggle(n=>n.setValue(this.plugin.settings.openNewNote||E.openNewNote).onChange(async u=>{this.plugin.settings.openNewNote=u,u===!0&&(this.plugin.settings.openNewNoteInNewTab=!1),await this.plugin.saveSettings(),this.display()})),new S.Setting(t).setName("Open new note in new tab").setDesc("If enabled, new note will open in new tab").addToggle(n=>n.setValue(this.plugin.settings.openNewNoteInNewTab||E.openNewNoteInNewTab).onChange(async u=>{this.plugin.settings.openNewNoteInNewTab=u,u===!0&&(this.plugin.settings.openNewNote=!1),await this.plugin.saveSettings(),this.display()})),new S.Setting(t).setName("Date format string").setDesc("Format of the %date% variable. NOTE: do not use symbols forbidden in file names.").addText(n=>n.setPlaceholder("Defaults to YYYY-MM-DD HH-mm-ss").setValue(this.plugin.settings.dateTitleFmt||E.dateTitleFmt).onChange(async u=>{this.plugin.settings.dateTitleFmt=u,await this.plugin.saveSettings()})),new S.Setting(t).setName("Date format string in contents").setDesc("Format of the %date% variable for contents").addText(n=>n.setPlaceholder("Defaults to YYYY-MM-DD").setValue(this.plugin.settings.dateContentFmt||E.dateContentFmt).onChange(async u=>{this.plugin.settings.dateContentFmt=u,await this.plugin.saveSettings()})),new S.Setting(t).setName("Extend share menu").setDesc("If enabled, share menu will be extended with shortcut to create note directly from it. Requires plugin reload or Obsidian restart to apply change.").addToggle(n=>n.setValue(Object.prototype.hasOwnProperty.call(this.plugin.settings,"extendShareMenu")?this.plugin.settings.extendShareMenu:E.extendShareMenu).onChange(async u=>{this.plugin.settings.extendShareMenu=u,await this.plugin.saveSettings()})),t.createEl("h2",{text:"YouTube"}),new S.Setting(t).setName("Youtube note template title").setDesc("Available variables: %title%, %date%").addText(n=>n.setPlaceholder("Defaults to %title%").setValue(this.plugin.settings.youtubeNoteTitle||E.youtubeNoteTitle).onChange(async u=>{this.plugin.settings.youtubeNoteTitle=u,await this.plugin.saveSettings()})),new S.Setting(t).setName("Youtube note template").setDesc("Available variables: %date%, %videoTitle%, %videoURL%, %videoId%, %videoPlayer%, %videoThumbnail%, %channelId%, %channelName%, %channelURL%").addTextArea(n=>{n.setValue(this.plugin.settings.youtubeNote||E.youtubeNote).onChange(async u=>{this.plugin.settings.youtubeNote=u,await this.plugin.saveSettings()}),n.inputEl.rows=10,n.inputEl.cols=25}),new S.Setting(t).setName("Youtube Data API v3 key").setDesc("If entered, additional template variables are available").addText(n=>n.setPlaceholder("").setValue(this.plugin.settings.youtubeApiKey||E.youtubeApiKey).onChange(async u=>{this.plugin.settings.youtubeApiKey=u,await this.plugin.saveSettings()})),new S.Setting(t).setName("Youtube embed player width").addText(n=>n.setPlaceholder(E.youtubeEmbedWidth).setValue(this.plugin.setti
`:t}};this.options=$n({},i,e),this.rules=new Ar(this.options)}Rt.prototype={turndown:function(e){if(!ma(e))throw new TypeError(e+" is not a string, or an element/document/fragment node.");if(e==="")return"";var i=Er.call(this,new ra(e,this.options));return ga.call(this,i)},use:function(e){if(Array.isArray(e))for(var i=0;i<e.length;i++)this.use(e[i]);else if(typeof e=="function")e(this);else throw new TypeError("plugin must be a Function or an Array of Functions");return this},addRule:function(e,i){return this.rules.add(e,i),this},keep:function(e){return this.rules.keep(e),this},remove:function(e){return this.rules.remove(e),this},escape:function(e){return ha.reduce(function(i,t){return i.replace(t[0],t[1])},e)}};function Er(e){var i=this;return ua.call(e.childNodes,function(t,r){r=new sa(r,i.options);var a="";return r.nodeType===3?a=r.isCode?r.nodeValue:i.escape(r.nodeValue):r.nodeType===1&&(a=pa.call(i,r)),_r(t,a)},"")}function ga(e){var i=this;return this.rules.forEach(function(t){typeof t.append=="function"&&(e=_r(e,t.append(i.options)))}),e.replace(/^[\t\r\n]+/,"").replace(/[\t\r\n\s]+$/,"")}function pa(e){var i=this.rules.forNode(e),t=Er.call(this,e),r=e.flankingWhitespace;return(r.leading||r.trailing)&&(t=t.trim()),r.leading+i.replacement(t,e,this.options)+r.trailing}function _r(e,i){var t=qn(e),r=zn(i),a=Math.max(e.length-t.length,i.length-r.length),l=`