`+$),Me&&($=Q($,Mt," "),$=Q($,Ot," "),$=Q($,kt," ")),se&<?se.createHTML($):$},A.setConfig=function(E){jt(E),Gt=!0},A.clearConfig=function(){Be=null,Gt=!1},A.isValidAttribute=function(E,u,v){Be||jt({});var y=j(E),M=j(u);return qi(y,M,v)},A.addHook=function(E,u){typeof u=="function"&&(he[E]=he[E]||[],P(he[E],u))},A.removeHook=function(E){if(he[E])return c(he[E])},A.removeHooks=function(E){he[E]&&(he[E]=[])},A.removeAllHooks=function(){he={}},A}var Kr=wi();return Kr})});var fi=we((Es,Lr)=>{Lr.exports=window.DOMPurify||(window.DOMPurify=mi().default||mi())});var Pr=we((Ls,bi)=>{function Cr(e,t){if(t&&t.documentElement)e=t,t=arguments[2];else if(!e||!e.documentElement)throw new Error("First argument to Readability constructor should be a document object.");if(t=t||{},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=!!t.debug,this._maxElemsToParse=t.maxElemsToParse||this.DEFAULT_MAX_ELEMS_TO_PARSE,this._nbTopCandidates=t.nbTopCandidates||this.DEFAULT_N_TOP_CANDIDATES,this._charThreshold=t.charThreshold||this.DEFAULT_CHAR_THRESHOLD,this._classesToPreserve=this.CLASSES_TO_PRESERVE.concat(t.classesToPreserve||[]),this._keepClasses=!!t.keepClasses,this._serializer=t.serializer||function(i){return i.innerHTML},this._disableJSONLD=!!t.disableJSONLD,this._allowedVideoRegex=t.allowedVideoRegex||this.REGEXPS.videos,this._flags=this.FLAG_STRIP_UNLIKELYS|this.FLAG_WEIGHT_CLASSES|this.FLAG_CLEAN_CONDITIONALLY,this._debug){let i=function(r){if(r.nodeType==r.TEXT_NODE)return`${r.nodeName}("${r.textContent}")`;let o=Array.from(r.attributes||[],function(n){return`${n.name}="${n.value}"`}).join(" ");return`<${r.localName}${o}>`};this.log=function(){if(typeof console!="undefined"){let o=Array.from(arguments,n=>n&&n.nodeType==this.ELEMENT_NODE?i(n):n);o.unshift("Reader: (Readability)"),console.log.apply(console,o)}else if(typeof dump!="undefined"){var r=Array.prototype.map.call(arguments,function(o){return o&&o.nodeName?i(o):o}).join(" ");dump("Reader: (Readability) "+r+`
`)}}}else this.log=function(){}}Cr.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,t){if(this._docJSDOMParser&&e._isLiveNodeList)throw new Error("Do not pass live node lists to _removeNodes");for(var i=e.length-1;i>=0;i--){var r=e[i],o=r.parentNode;o&&(!t||t.call(this,r,i,e))&&o.removeChild(r)}},_replaceNodeTags:function(e,t){if(this._docJSDOMParser&&e._isLiveNodeList)throw new Error("Do not pass live node lists to _replaceNodeTags");for(let i of e)this._setNodeTag(i,t)},_forEachNode:function(e,t){Array.prototype.forEach.call(e,t,this)},_findNode:function(e,t){return Array.prototype.find.call(e,t,this)},_someNode:function(e,t){return Array.prototype.some.call(e,t,this)},_everyNode:function(e,t){return Array.prototype.every.call(e,t,this)},_concatNodeLists:function(){var e=Array.prototype.slice,t=e.call(arguments),i=t.map(function(r){return e.call(r)});return Array.prototype.concat.apply([],i)},_getAllNodesWithTag:function(e,t){return e.querySelectorAll?e.querySelectorAll(t.join(",")):[].concat.apply([],t.map(function(i){var r=e.getElementsByTagName(i);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 w=require("obsidian");var Nt=class extends w.PluginSettingTab{constructor(t,i){super(t,i),this.plugin=i}display(){let{containerEl:t}=this;t.empty(),t.createEl("h2",{text:"General"}),new w.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||_.inboxDir).onChange(async a=>{this.plugin.settings.inboxDir=a,await this.plugin.saveSettings()})),new w.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||_.inboxDir+"/assets").onChange(async a=>{this.plugin.settings.assetsDir=a,await this.plugin.saveSettings()})),new w.Setting(t).setName("Open new note").setDesc("If enabled, new note will open in current workspace").addToggle(n=>n.setValue(this.plugin.settings.openNewNote||_.openNewNote).onChange(async a=>{this.plugin.settings.openNewNote=a,await this.plugin.saveSettings()})),new w.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||_.dateTitleFmt).onChange(async a=>{this.plugin.settings.dateTitleFmt=a,await this.plugin.saveSettings()})),new w.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||_.dateContentFmt).onChange(async a=>{this.plugin.settings.dateContentFmt=a,await this.plugin.saveSettings()})),new w.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:_.extendShareMenu).onChange(async a=>{this.plugin.settings.extendShareMenu=a,await this.plugin.saveSettings()})),t.createEl("h2",{text:"YouTube"}),new w.Setting(t).setName("Youtube note template title").setDesc("Available variables: %title%, %date%").addText(n=>n.setPlaceholder("Defaults to %title%").setValue(this.plugin.settings.youtubeNoteTitle||_.youtubeNoteTitle).onChange(async a=>{this.plugin.settings.youtubeNoteTitle=a,await this.plugin.saveSettings()})),new w.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||_.youtubeNote).onChange(async a=>{this.plugin.settings.youtubeNote=a,await this.plugin.saveSettings()}),n.inputEl.rows=10,n.inputEl.cols=25}),new w.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||_.youtubeApiKey).onChange(async a=>{this.plugin.settings.youtubeApiKey=a,await this.plugin.saveSettings()})),new w.Setting(t).setName("Youtube embed player width").addText(n=>n.setPlaceholder(_.youtubeEmbedWidth).setValue(this.plugin.settings.youtubeEmbedWidth||_.youtubeEmbedWidth).onChange(async a=>{this.plugin.settings.youtubeEmbedWidth=a,await this.plugin.saveSettings()})),new w.Setting(t).setName("Youtube embed player height").addText(n=>n.setPlaceholder(_.youtubeEmbedHeight).setValue(this.plugin.settings.youtubeEmbedHeight||_.youtubeEmbedHeight).onChange(async a=>{this.plugin.settings.youtubeEmbedHeight=a,await this.plugin.saveSettings()})),new w.Setting(t).setName("Embed in privacy enh
`:i}};this.options=Gn({},t,e),this.rules=new Tr(this.options)}_t.prototype={turndown:function(e){if(!ha(e))throw new TypeError(e+" is not a string, or an element/document/fragment node.");if(e==="")return"";var t=Nr.call(this,new ea(e,this.options));return ca.call(this,t)},use:function(e){if(Array.isArray(e))for(var t=0;t<e.length;t++)this.use(e[t]);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,t){return this.rules.add(e,t),this},keep:function(e){return this.rules.keep(e),this},remove:function(e){return this.rules.remove(e),this},escape:function(e){return la.reduce(function(t,i){return t.replace(i[0],i[1])},e)}};function Nr(e){var t=this;return oa.call(e.childNodes,function(i,r){r=new ra(r,t.options);var o="";return r.nodeType===3?o=r.isCode?r.nodeValue:t.escape(r.nodeValue):r.nodeType===1&&(o=ua.call(t,r)),Ar(i,o)},"")}function ca(e){var t=this;return this.rules.forEach(function(i){typeof i.append=="function"&&(e=Ar(e,i.append(t.options)))}),e.replace(/^[\t\r\n]+/,"").replace(/[\t\r\n\s]+$/,"")}function ua(e){var t=this.rules.forNode(e),i=Nr.call(this,e),r=e.flankingWhitespace;return(r.leading||r.trailing)&&(i=i.trim()),r.leading+t.replacement(i,e,this.options)+r.trailing}function Ar(e,t){var i=Wn(e),r=Vn(t),o=Math.max(e.length-i.length,t.length-r.length),n=`